From 1a1110b4f77dc242ac2537cee280112e02870877 Mon Sep 17 00:00:00 2001 From: Antz Date: Tue, 14 Jan 2020 13:12:16 +0000 Subject: [PATCH] Apply style fix pt5 --- src/framework/Dynamic/ObjectRegistry.h | 8 +- src/framework/GameSystem/NGrid.h | 8 +- src/game/AuctionHouseBot/AuctionHouseBot.cpp | 28 ++++-- src/game/BattleGround/BattleGround.cpp | 20 +++- src/game/BattleGround/BattleGroundAB.cpp | 8 +- src/game/BattleGround/BattleGroundAV.cpp | 24 +++-- src/game/BattleGround/BattleGroundMgr.cpp | 44 ++++++--- src/game/ChatCommands/Level0.cpp | 4 +- src/game/ChatCommands/Level3.cpp | 28 ++++-- src/game/ChatCommands/Level4.cpp | 8 +- src/game/ChatCommands/debugcmds.cpp | 8 +- src/game/MotionGenerators/PathFinder.cpp | 16 +++- src/game/Object/AuctionHouseMgr.cpp | 8 +- src/game/Object/AuctionHouseMgr.h | 4 +- src/game/Object/Bag.cpp | 4 +- src/game/Object/Creature.cpp | 12 ++- src/game/Object/Creature.h | 4 +- src/game/Object/CreatureAI.cpp | 4 +- src/game/Object/CreatureEventAI.cpp | 4 +- src/game/Object/GameObject.cpp | 4 +- src/game/Object/Guild.cpp | 4 +- src/game/Object/Item.cpp | 16 +++- src/game/Object/LootMgr.cpp | 52 ++++++++--- src/game/Object/LootMgr.h | 12 ++- src/game/Object/Object.cpp | 4 +- src/game/Object/ObjectAccessor.cpp | 4 +- src/game/Object/ObjectMgr.cpp | 92 ++++++++++++++----- src/game/Object/Pet.cpp | 12 ++- src/game/Object/PetAI.cpp | 4 +- src/game/Object/Player.cpp | 40 ++++++-- src/game/Object/Player.h | 5 +- src/game/Object/StatSystem.cpp | 32 +++++-- src/game/Object/Unit.cpp | 24 +++-- src/game/OutdoorPvP/OutdoorPvPEP.cpp | 32 +++++-- src/game/OutdoorPvP/OutdoorPvPMgr.cpp | 4 +- src/game/Server/DBCStores.cpp | 4 +- src/game/Server/WorldSession.cpp | 24 +++-- src/game/Tools/PlayerDump.cpp | 9 +- src/game/WorldHandlers/Map.cpp | 16 +++- src/game/WorldHandlers/MoveMap.cpp | 4 +- src/game/WorldHandlers/ScriptMgr.cpp | 4 +- src/game/WorldHandlers/SpellAuras.cpp | 16 +++- src/game/WorldHandlers/WaypointManager.cpp | 16 +++- src/game/movement/spline.cpp | 4 +- src/game/vmap/BIH.h | 9 +- src/game/vmap/GameObjectModel.cpp | 4 +- src/game/vmap/MapTree.cpp | 4 +- src/game/vmap/RegularGrid.h | 4 +- src/game/vmap/TileAssembler.cpp | 8 +- src/game/vmap/WorldModel.cpp | 8 +- src/shared/Auth/BigNumber.cpp | 4 +- src/shared/Database/Database.cpp | 8 +- src/shared/Database/DatabaseMysql.cpp | 4 +- src/shared/Database/DatabasePostgre.cpp | 4 +- src/shared/Database/QueryResultMysql.cpp | 4 +- src/shared/Database/QueryResultPostgre.cpp | 4 +- src/shared/Database/SQLStorage.cpp | 4 +- src/shared/Log/Log.cpp | 8 +- src/shared/Threading/Threading.cpp | 4 +- src/shared/Utilities/ProgressBar.cpp | 15 ++- src/shared/Win/WheatyExceptionReport.cpp | 4 +- .../Movemap-Generator/IntermediateValues.cpp | 8 +- .../Movemap-Generator/MapBuilder.cpp | 4 +- .../Movemap-Generator/TerrainBuilder.cpp | 32 +++++-- .../map-extractor/System.cpp | 28 ++++-- .../vmap-extractor/vmapexport.cpp | 4 +- .../Extractor_projects/vmap-extractor/wmo.cpp | 4 +- 67 files changed, 648 insertions(+), 214 deletions(-) diff --git a/src/framework/Dynamic/ObjectRegistry.h b/src/framework/Dynamic/ObjectRegistry.h index 019450ae4..bd76e2433 100644 --- a/src/framework/Dynamic/ObjectRegistry.h +++ b/src/framework/Dynamic/ObjectRegistry.h @@ -125,7 +125,9 @@ class ObjectRegistry unsigned int sz = l.size(); l.resize(sz + i_registeredObjects.size()); for (typename RegistryMapType::const_iterator iter = i_registeredObjects.begin(); iter != i_registeredObjects.end(); ++iter) - { l[sz++] = iter->first; } + { + l[sz++] = iter->first; + } return i_registeredObjects.size(); } @@ -155,7 +157,9 @@ class ObjectRegistry ~ObjectRegistry() { for (typename RegistryMapType::iterator iter = i_registeredObjects.begin(); iter != i_registeredObjects.end(); ++iter) - { delete iter->second; } + { + delete iter->second; + } i_registeredObjects.clear(); } }; diff --git a/src/framework/GameSystem/NGrid.h b/src/framework/GameSystem/NGrid.h index 0f7a03fd0..1bfa8328d 100644 --- a/src/framework/GameSystem/NGrid.h +++ b/src/framework/GameSystem/NGrid.h @@ -343,7 +343,9 @@ class NGrid { for (uint32 x = 0; x < N; ++x) for (uint32 y = 0; y < N; ++y) - { i_cells[x][y].Visit(visitor); } + { + i_cells[x][y].Visit(visitor); + } } template @@ -370,7 +372,9 @@ class NGrid uint32 count = 0; for (uint32 x = 0; x < N; ++x) for (uint32 y = 0; y < N; ++y) - { count += i_cells[x][y].ActiveObjectsInGrid(); } + { + count += i_cells[x][y].ActiveObjectsInGrid(); + } return count; } diff --git a/src/game/AuctionHouseBot/AuctionHouseBot.cpp b/src/game/AuctionHouseBot/AuctionHouseBot.cpp index 989c0b2dd..d8d4abb69 100644 --- a/src/game/AuctionHouseBot/AuctionHouseBot.cpp +++ b/src/game/AuctionHouseBot/AuctionHouseBot.cpp @@ -663,7 +663,9 @@ AuctionBotBuyer::AuctionBotBuyer(): m_CheckInterval(0) { // Define faction for our main data class. for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) - { m_HouseConfig[i].Initialize(AuctionHouseType(i)); } + { + m_HouseConfig[i].Initialize(AuctionHouseType(i)); + } } AuctionBotBuyer::~AuctionBotBuyer() @@ -1149,7 +1151,9 @@ AuctionBotSeller::AuctionBotSeller() { // Define faction for our main data class. for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) - { m_HouseConfig[i].Initialize(AuctionHouseType(i)); } + { + m_HouseConfig[i].Initialize(AuctionHouseType(i)); + } } AuctionBotSeller::~AuctionBotSeller() @@ -1744,7 +1748,9 @@ void AuctionBotSeller::LoadItemsQuantity(AHB_Seller_Config& config) sAuctionBotConfig.getConfig(CONFIG_UINT32_AHBOT_CLASS_RECIPE_AMOUNT) + sAuctionBotConfig.getConfig(CONFIG_UINT32_AHBOT_CLASS_QUIVER_AMOUNT) + sAuctionBotConfig.getConfig(CONFIG_UINT32_AHBOT_CLASS_QUEST_AMOUNT) + sAuctionBotConfig.getConfig(CONFIG_UINT32_AHBOT_CLASS_KEY_AMOUNT) + sAuctionBotConfig.getConfig(CONFIG_UINT32_AHBOT_CLASS_MISC_AMOUNT) + sAuctionBotConfig.getConfig(CONFIG_UINT32_AHBOT_CLASS_GLYPH_AMOUNT)); for (uint32 i = 0; i < MAX_ITEM_CLASS; ++i) - { config.SetItemsAmountPerClass(AuctionQuality(j), ItemClass(i), indice); } + { + config.SetItemsAmountPerClass(AuctionQuality(j), ItemClass(i), indice); + } } } @@ -1882,7 +1888,9 @@ void AuctionBotSeller::SetItemsRatio(uint32 al, uint32 ho, uint32 ne) sAuctionBotConfig.setConfig(CONFIG_UINT32_AHBOT_NEUTRAL_ITEM_AMOUNT_RATIO, ne < 10000 ? ne : 10000); for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) - { LoadItemsQuantity(m_HouseConfig[i]); } + { + LoadItemsQuantity(m_HouseConfig[i]); + } } void AuctionBotSeller::SetItemsRatioForHouse(AuctionHouseType house, uint32 val) @@ -1913,7 +1921,9 @@ void AuctionBotSeller::SetItemsAmount(uint32(&vals) [MAX_AUCTION_QUALITY]) sAuctionBotConfig.setConfig(CONFIG_UINT32_AHBOT_ITEM_YELLOW_AMOUNT, vals[AUCTION_QUALITY_YELLOW]); for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) - { LoadItemsQuantity(m_HouseConfig[i]); } + { + LoadItemsQuantity(m_HouseConfig[i]); + } } void AuctionBotSeller::SetItemsAmountForQuality(AuctionQuality quality, uint32 val) @@ -1930,7 +1940,9 @@ void AuctionBotSeller::SetItemsAmountForQuality(AuctionQuality quality, uint32 v } for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) - { LoadItemsQuantity(m_HouseConfig[i]); } + { + LoadItemsQuantity(m_HouseConfig[i]); + } } // Add new auction to one of the factions. @@ -2129,7 +2141,9 @@ void AuctionHouseBot::PrepareStatusInfos(AuctionHouseBotStatusInfo& statusInfo) statusInfo[i].ItemsCount = 0; for (int j = 0; j < MAX_AUCTION_QUALITY; ++j) - { statusInfo[i].QualityInfo[j] = 0; } + { + statusInfo[i].QualityInfo[j] = 0; + } AuctionHouseObject::AuctionEntryMapBounds bounds = sAuctionMgr.GetAuctionsMap(AuctionHouseType(i))->GetAuctionsBounds(); for (AuctionHouseObject::AuctionEntryMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr) diff --git a/src/game/BattleGround/BattleGround.cpp b/src/game/BattleGround/BattleGround.cpp index dc213a930..0eaf73cde 100644 --- a/src/game/BattleGround/BattleGround.cpp +++ b/src/game/BattleGround/BattleGround.cpp @@ -321,7 +321,9 @@ BattleGround::~BattleGround() this->RemoveFromBGFreeSlotQueue(); for (BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } } /// @@ -1444,7 +1446,9 @@ void BattleGround::Reset() m_Players.clear(); for (BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } m_PlayerScores.clear(); } @@ -1896,7 +1900,9 @@ void BattleGround::OpenDoorEvent(uint8 event1, uint8 event2 /*=0*/) } GuidVector::const_iterator itr = m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.begin(); for (; itr != m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.end(); ++itr) - { DoorOpen(*itr); } + { + DoorOpen(*itr); + } } /// @@ -1924,10 +1930,14 @@ void BattleGround::SpawnEvent(uint8 event1, uint8 event2, bool spawn) GuidVector::const_iterator itr = m_EventObjects[MAKE_PAIR32(event1, event2)].creatures.begin(); for (; itr != m_EventObjects[MAKE_PAIR32(event1, event2)].creatures.end(); ++itr) - { SpawnBGCreature(*itr, (spawn) ? RESPAWN_IMMEDIATELY : RESPAWN_ONE_DAY); } + { + SpawnBGCreature(*itr, (spawn) ? RESPAWN_IMMEDIATELY : RESPAWN_ONE_DAY); + } GuidVector::const_iterator itr2 = m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.begin(); for (; itr2 != m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.end(); ++itr2) - { SpawnBGObject(*itr2, (spawn) ? RESPAWN_IMMEDIATELY : RESPAWN_ONE_DAY); } + { + SpawnBGObject(*itr2, (spawn) ? RESPAWN_IMMEDIATELY : RESPAWN_ONE_DAY); + } } /// diff --git a/src/game/BattleGround/BattleGroundAB.cpp b/src/game/BattleGround/BattleGroundAB.cpp index 13e38eb86..632d96c7f 100644 --- a/src/game/BattleGround/BattleGroundAB.cpp +++ b/src/game/BattleGround/BattleGroundAB.cpp @@ -318,12 +318,16 @@ void BattleGroundAB::FillInitialWorldStates(WorldPacket& data, uint32& count) // Node icons for (uint8 node = 0; node < BG_AB_NODES_MAX; ++node) - { FillInitialWorldState(data, count, BG_AB_OP_NODEICONS[node], m_Nodes[node] == 0); } + { + FillInitialWorldState(data, count, BG_AB_OP_NODEICONS[node], m_Nodes[node] == 0); + } // Node occupied states for (uint8 node = 0; node < BG_AB_NODES_MAX; ++node) for (uint8 i = 1; i < BG_AB_NODES_MAX; ++i) - { FillInitialWorldState(data, count, BG_AB_OP_NODESTATES[node] + plusArray[i], m_Nodes[node] == i); } + { + FillInitialWorldState(data, count, BG_AB_OP_NODESTATES[node] + plusArray[i], m_Nodes[node] == i); + } // How many bases each team owns uint8 ally = 0, horde = 0; diff --git a/src/game/BattleGround/BattleGroundAV.cpp b/src/game/BattleGround/BattleGroundAV.cpp index e84e4e563..54d0e6513 100644 --- a/src/game/BattleGround/BattleGroundAV.cpp +++ b/src/game/BattleGround/BattleGroundAV.cpp @@ -889,7 +889,9 @@ void BattleGroundAV::Reset() for (uint8 i = 0; i < PVP_TEAM_COUNT; ++i) { for (uint8 j = 0; j < 9; ++j) // 9 quests getting tracked - { m_Team_QuestStatus[i][j] = 0; } + { + m_Team_QuestStatus[i][j] = 0; + } m_TeamScores[i] = BG_AV_SCORE_INITIAL_POINTS; m_IsInformedNearLose[i] = false; m_ActiveEvents[BG_AV_NodeEventCaptainDead_A + i] = BG_EVENT_NONE; @@ -910,17 +912,27 @@ void BattleGroundAV::Reset() m_ActiveEvents[BG_AV_BOSS_A] = 0; m_ActiveEvents[BG_AV_BOSS_H] = 0; for (BG_AV_Nodes i = BG_AV_NODES_DUNBALDAR_SOUTH; i <= BG_AV_NODES_FROSTWOLF_WTOWER; ++i) // towers - { m_ActiveEvents[BG_AV_MARSHAL_A_SOUTH + i - BG_AV_NODES_DUNBALDAR_SOUTH] = 0; } + { + m_ActiveEvents[BG_AV_MARSHAL_A_SOUTH + i - BG_AV_NODES_DUNBALDAR_SOUTH] = 0; + } for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_STONEHEART_GRAVE; ++i) // alliance graves - { InitNode(i, BG_AV_TEAM_ALLIANCE, false); } + { + InitNode(i, BG_AV_TEAM_ALLIANCE, false); + } for (BG_AV_Nodes i = BG_AV_NODES_DUNBALDAR_SOUTH; i <= BG_AV_NODES_STONEHEART_BUNKER; ++i) // alliance towers - { InitNode(i, BG_AV_TEAM_ALLIANCE, true); } + { + InitNode(i, BG_AV_TEAM_ALLIANCE, true); + } for (BG_AV_Nodes i = BG_AV_NODES_ICEBLOOD_GRAVE; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i) // horde graves - { InitNode(i, BG_AV_TEAM_HORDE, false); } + { + InitNode(i, BG_AV_TEAM_HORDE, false); + } for (BG_AV_Nodes i = BG_AV_NODES_ICEBLOOD_TOWER; i <= BG_AV_NODES_FROSTWOLF_WTOWER; ++i) // horde towers - { InitNode(i, BG_AV_TEAM_HORDE, true); } + { + InitNode(i, BG_AV_TEAM_HORDE, true); + } InitNode(BG_AV_NODES_SNOWFALL_GRAVE, BG_AV_TEAM_NEUTRAL, false); // give snowfall neutral owner } diff --git a/src/game/BattleGround/BattleGroundMgr.cpp b/src/game/BattleGround/BattleGroundMgr.cpp index 1558ccb34..c1f44a8b8 100644 --- a/src/game/BattleGround/BattleGroundMgr.cpp +++ b/src/game/BattleGround/BattleGroundMgr.cpp @@ -70,7 +70,9 @@ BattleGroundQueue::BattleGroundQueue() m_SumOfWaitTimes[i][j] = 0; m_WaitTimeLastPlayer[i][j] = 0; for (uint8 k = 0; k < COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME; ++k) - { m_WaitTimes[i][j][k] = 0; } + { + m_WaitTimes[i][j][k] = 0; + } } } } @@ -83,7 +85,9 @@ BattleGroundQueue::~BattleGroundQueue() for (uint8 j = 0; j < BG_QUEUE_GROUP_TYPES_COUNT; ++j) { for (GroupsQueueType::iterator itr = m_QueuedGroups[i][j].begin(); itr != m_QueuedGroups[i][j].end(); ++itr) - { delete(*itr); } + { + delete(*itr); + } m_QueuedGroups[i][j].clear(); } } @@ -553,13 +557,17 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BattleGroundBracketId // index to queue which group is current uint32 aliIndex = 0; for (; aliIndex < aliCount && m_SelectionPools[TEAM_INDEX_ALLIANCE].AddGroup((*Ali_itr), aliFree); ++aliIndex) - { ++Ali_itr; } + { + ++Ali_itr; + } // the same thing for horde GroupsQueueType::const_iterator Horde_itr = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].begin(); uint32 hordeCount = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].size(); uint32 hordeIndex = 0; for (; hordeIndex < hordeCount && m_SelectionPools[TEAM_INDEX_HORDE].AddGroup((*Horde_itr), hordeFree); ++hordeIndex) - { ++Horde_itr; } + { + ++Horde_itr; + } // if ofc like BG queue invitation is set in config, then we are happy if (sWorld.getConfig(CONFIG_UINT32_BATTLEGROUND_INVITATION_TYPE) == 0) @@ -587,7 +595,9 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BattleGroundBracketId if (m_SelectionPools[TEAM_INDEX_ALLIANCE].KickGroup(diffHorde - diffAli)) { for (; aliIndex < aliCount && m_SelectionPools[TEAM_INDEX_ALLIANCE].AddGroup((*Ali_itr), (aliFree >= diffHorde) ? aliFree - diffHorde : 0); ++aliIndex) - { ++Ali_itr; } + { + ++Ali_itr; + } } // if ali selection is already empty, then kick horde group, but if there are less horde than ali in bg - break; if (!m_SelectionPools[TEAM_INDEX_ALLIANCE].GetPlayerCount()) @@ -605,7 +615,9 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BattleGroundBracketId if (m_SelectionPools[TEAM_INDEX_HORDE].KickGroup(diffAli - diffHorde)) { for (; hordeIndex < hordeCount && m_SelectionPools[TEAM_INDEX_HORDE].AddGroup((*Horde_itr), (hordeFree >= diffAli) ? hordeFree - diffAli : 0); ++hordeIndex) - { ++Horde_itr; } + { + ++Horde_itr; + } } if (!m_SelectionPools[TEAM_INDEX_HORDE].GetPlayerCount()) { @@ -844,9 +856,13 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI // now everything is set, invite players for (GroupsQueueType::const_iterator citr = m_SelectionPools[TEAM_INDEX_ALLIANCE].SelectedGroups.begin(); citr != m_SelectionPools[TEAM_INDEX_ALLIANCE].SelectedGroups.end(); ++citr) - { InviteGroupToBG((*citr), bg, (*citr)->GroupTeam); } + { + InviteGroupToBG((*citr), bg, (*citr)->GroupTeam); + } for (GroupsQueueType::const_iterator citr = m_SelectionPools[TEAM_INDEX_HORDE].SelectedGroups.begin(); citr != m_SelectionPools[TEAM_INDEX_HORDE].SelectedGroups.end(); ++citr) - { InviteGroupToBG((*citr), bg, (*citr)->GroupTeam); } + { + InviteGroupToBG((*citr), bg, (*citr)->GroupTeam); + } if (!bg->HasFreeSlots()) { @@ -927,7 +943,9 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI // invite those selection pools for (uint8 i = 0; i < PVP_TEAM_COUNT; ++i) for (GroupsQueueType::const_iterator citr = m_SelectionPools[TEAM_INDEX_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[TEAM_INDEX_ALLIANCE + i].SelectedGroups.end(); ++citr) - { InviteGroupToBG((*citr), bg2, (*citr)->GroupTeam); } + { + InviteGroupToBG((*citr), bg2, (*citr)->GroupTeam); + } // start bg bg2->StartBattleGround(); // clear structures @@ -954,7 +972,9 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI // invite those selection pools for (uint8 i = 0; i < PVP_TEAM_COUNT; ++i) for (GroupsQueueType::const_iterator citr = m_SelectionPools[TEAM_INDEX_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[TEAM_INDEX_ALLIANCE + i].SelectedGroups.end(); ++citr) - { InviteGroupToBG((*citr), bg2, (*citr)->GroupTeam); } + { + InviteGroupToBG((*citr), bg2, (*citr)->GroupTeam); + } // start bg bg2->StartBattleGround(); } @@ -1194,7 +1214,9 @@ void BGQueueRemoveEvent::Abort(uint64 /*e_time*/) BattleGroundMgr::BattleGroundMgr() : m_AutoDistributionTimeChecker(0), m_ArenaTesting(false) { for (uint8 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i) - { m_BattleGrounds[i].clear(); } + { + m_BattleGrounds[i].clear(); + } m_NextRatingDiscardUpdate = sWorld.getConfig(CONFIG_UINT32_ARENA_RATING_DISCARD_TIMER); m_Testing = false; } diff --git a/src/game/ChatCommands/Level0.cpp b/src/game/ChatCommands/Level0.cpp index 6f586debb..3186f21d5 100644 --- a/src/game/ChatCommands/Level0.cpp +++ b/src/game/ChatCommands/Level0.cpp @@ -202,7 +202,9 @@ bool ChatHandler::HandleGMListIngameCommand(char* /*args*/) char const* accepts = GetMangosString(LANG_GM_ACCEPTS_WHISPER); char const* not_accept = GetMangosString(LANG_GM_NO_WHISPER); for (std::list >::const_iterator iter = names.begin(); iter != names.end(); ++iter) - { PSendSysMessage("%s - %s", iter->first.c_str(), iter->second ? accepts : not_accept); } + { + PSendSysMessage("%s - %s", iter->first.c_str(), iter->second ? accepts : not_accept); + } } else { diff --git a/src/game/ChatCommands/Level3.cpp b/src/game/ChatCommands/Level3.cpp index 3f3887d68..5c6ed40ab 100644 --- a/src/game/ChatCommands/Level3.cpp +++ b/src/game/ChatCommands/Level3.cpp @@ -85,7 +85,9 @@ bool ChatHandler::HandleAHBotItemsAmountCommand(char* args) sAuctionBot.SetItemsAmount(qVals); for (int i = 0; i < MAX_AUCTION_QUALITY; ++i) - { PSendSysMessage(LANG_AHBOT_ITEMS_AMOUNT, GetMangosString(ahbotQualityIds[i]), sAuctionBotConfig.getConfigItemQualityAmount(AuctionQuality(i))); } + { + PSendSysMessage(LANG_AHBOT_ITEMS_AMOUNT, GetMangosString(ahbotQualityIds[i]), sAuctionBotConfig.getConfigItemQualityAmount(AuctionQuality(i))); + } return true; } @@ -124,7 +126,9 @@ bool ChatHandler::HandleAHBotItemsRatioCommand(char* args) sAuctionBot.SetItemsRatio(rVal[0], rVal[1], rVal[2]); for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) - { PSendSysMessage(LANG_AHBOT_ITEMS_RATIO, AuctionBotConfig::GetHouseTypeName(AuctionHouseType(i)), sAuctionBotConfig.getConfigItemAmountRatio(AuctionHouseType(i))); } + { + PSendSysMessage(LANG_AHBOT_ITEMS_RATIO, AuctionBotConfig::GetHouseTypeName(AuctionHouseType(i)), sAuctionBotConfig.getConfigItemAmountRatio(AuctionHouseType(i))); + } return true; } @@ -2688,7 +2692,9 @@ bool ChatHandler::HandleLearnAllLangCommand(char* /*args*/) // skipping UNIVERSAL language (0) for (int i = 1; i < LANGUAGES_COUNT; ++i) - { player->learnSpell(lang_description[i].spell_id, false); } + { + player->learnSpell(lang_description[i].spell_id, false); + } SendSysMessage(LANG_COMMAND_LEARN_ALL_LANG); return true; @@ -5975,7 +5981,9 @@ bool ChatHandler::HandleResetAllCommand(char* args) CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'", atLogin, atLogin); HashMapHolder::MapType const& plist = sObjectAccessor.GetPlayers(); for (HashMapHolder::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr) - { itr->second->SetAtLoginFlag(atLogin); } + { + itr->second->SetAtLoginFlag(atLogin); + } return true; } @@ -6255,18 +6263,24 @@ bool ChatHandler::HandleQuestCompleteCommand(char* args) if (uint32 spell_id = pQuest->ReqSpell[i]) { for (uint16 z = 0; z < creaturecount; ++z) - { player->CastedCreatureOrGO(creature, ObjectGuid(), spell_id); } + { + player->CastedCreatureOrGO(creature, ObjectGuid(), spell_id); + } } else if (creature > 0) { if (CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(creature)) for (uint16 z = 0; z < creaturecount; ++z) - { player->KilledMonster(cInfo, ObjectGuid()); } + { + player->KilledMonster(cInfo, ObjectGuid()); + } } else if (creature < 0) { for (uint16 z = 0; z < creaturecount; ++z) - { player->CastedCreatureOrGO(-creature, ObjectGuid(), 0); } + { + player->CastedCreatureOrGO(-creature, ObjectGuid(), 0); + } } } diff --git a/src/game/ChatCommands/Level4.cpp b/src/game/ChatCommands/Level4.cpp index 5d29ebd89..e6f9115ef 100644 --- a/src/game/ChatCommands/Level4.cpp +++ b/src/game/ChatCommands/Level4.cpp @@ -327,7 +327,9 @@ bool ChatHandler::HandleCharacterDeletedRestoreCommand(char* args) { // Drop nonexistent account cases for (DeletedInfoList::iterator itr = foundList.begin(); itr != foundList.end(); ++itr) - { HandleCharacterDeletedRestoreHelper(*itr); } + { + HandleCharacterDeletedRestoreHelper(*itr); + } } else if (foundList.size() == 1 && normalizePlayerName(newCharName)) { @@ -388,7 +390,9 @@ bool ChatHandler::HandleCharacterDeletedDeleteCommand(char* args) // Call the appropriate function to delete them (current account for deleted characters is 0) for (DeletedInfoList::const_iterator itr = foundList.begin(); itr != foundList.end(); ++itr) - { Player::DeleteFromDB(ObjectGuid(HIGHGUID_PLAYER, itr->lowguid), 0, false, true); } + { + Player::DeleteFromDB(ObjectGuid(HIGHGUID_PLAYER, itr->lowguid), 0, false, true); + } return true; } diff --git a/src/game/ChatCommands/debugcmds.cpp b/src/game/ChatCommands/debugcmds.cpp index cc17e0f43..ed1f9ffdb 100644 --- a/src/game/ChatCommands/debugcmds.cpp +++ b/src/game/ChatCommands/debugcmds.cpp @@ -825,7 +825,9 @@ bool ChatHandler::HandleDebugSetAuraStateCommand(char* args) { // reset all states for (int i = 1; i <= 32; ++i) - { unit->ModifyAuraState(AuraState(i), false); } + { + unit->ModifyAuraState(AuraState(i), false); + } return true; } @@ -1013,7 +1015,9 @@ bool ChatHandler::HandleGetValueHelper(Object* target, uint32 field, char* typeS res.reserve(1 + 32 + 1); res = (iValue & (1 << (32 - 1))) ? "0" : " "; for (int i = 32; i > 0; --i) - { res += (iValue & (1 << (i - 1))) ? "1" : "0"; } + { + res += (iValue & (1 << (i - 1))) ? "1" : "0"; + } DEBUG_LOG(GetMangosString(LANG_GET_BITSTR), guid.GetString().c_str(), field, res.c_str()); PSendSysMessage(LANG_GET_BITSTR_FIELD, guid.GetString().c_str(), field, res.c_str()); break; diff --git a/src/game/MotionGenerators/PathFinder.cpp b/src/game/MotionGenerators/PathFinder.cpp index a210de000..5c6d60c5f 100644 --- a/src/game/MotionGenerators/PathFinder.cpp +++ b/src/game/MotionGenerators/PathFinder.cpp @@ -462,7 +462,9 @@ void PathFinder::BuildPointPath(const float* startPoint, const float* endPoint) m_pathPoints.resize(pointCount); for (uint32 i = 0; i < pointCount; ++i) - { m_pathPoints[i] = Vector3(pathPoints[i * VERTEX_SIZE + 2], pathPoints[i * VERTEX_SIZE], pathPoints[i * VERTEX_SIZE + 1]); } + { + m_pathPoints[i] = Vector3(pathPoints[i * VERTEX_SIZE + 2], pathPoints[i * VERTEX_SIZE], pathPoints[i * VERTEX_SIZE + 1]); + } // first point is always our current location - we need the next one setActualEndPosition(m_pathPoints[pointCount - 1]); @@ -625,7 +627,9 @@ uint32 PathFinder::fixupCorridor(dtPolyRef* path, uint32 npath, uint32 maxPath, // Store visited for (uint32 i = 0; i < req; ++i) - { path[i] = visited[(nvisited - 1) - i]; } + { + path[i] = visited[(nvisited - 1) - i]; + } return req + size; } @@ -771,7 +775,9 @@ dtStatus PathFinder::findSmoothPath(const float* startPos, const float* endPos, } for (uint32 i = npos; i < npolys; ++i) - { polys[i - npos] = polys[i]; } + { + polys[i - npos] = polys[i]; + } npolys -= npos; @@ -829,7 +835,9 @@ float PathFinder::dist3DSqr(const Vector3& p1, const Vector3& p2) const void PathFinder::NormalizePath(uint32& size) { for (uint32 i = 0; i < m_pathPoints.size(); ++i) - { m_sourceUnit->UpdateAllowedPositionZ(m_pathPoints[i].x, m_pathPoints[i].y, m_pathPoints[i].z); } + { + m_sourceUnit->UpdateAllowedPositionZ(m_pathPoints[i].x, m_pathPoints[i].y, m_pathPoints[i].z); + } // check if the Z difference between each point is higher than SMOOTH_PATH_HEIGHT. // add another point if that's the case and keep adding new midpoints till the Z difference is low enough diff --git a/src/game/Object/AuctionHouseMgr.cpp b/src/game/Object/AuctionHouseMgr.cpp index cc0495982..53d4afdb5 100644 --- a/src/game/Object/AuctionHouseMgr.cpp +++ b/src/game/Object/AuctionHouseMgr.cpp @@ -56,7 +56,9 @@ AuctionHouseMgr::AuctionHouseMgr() AuctionHouseMgr::~AuctionHouseMgr() { for (ItemMap::const_iterator itr = mAitems.begin(); itr != mAitems.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } } AuctionHouseObject* AuctionHouseMgr::GetAuctionsMap(AuctionHouseEntry const* house) @@ -512,7 +514,9 @@ bool AuctionHouseMgr::RemoveAItem(uint32 id) void AuctionHouseMgr::Update() { for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) - { mAuctions[i].Update(); } + { + mAuctions[i].Update(); + } } uint32 AuctionHouseMgr::GetAuctionHouseTeam(AuctionHouseEntry const* house) diff --git a/src/game/Object/AuctionHouseMgr.h b/src/game/Object/AuctionHouseMgr.h index 33f9e54e5..96ef77724 100644 --- a/src/game/Object/AuctionHouseMgr.h +++ b/src/game/Object/AuctionHouseMgr.h @@ -121,7 +121,9 @@ class AuctionHouseObject ~AuctionHouseObject() { for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } } typedef std::map AuctionEntryMap; diff --git a/src/game/Object/Bag.cpp b/src/game/Object/Bag.cpp index e6eee7b60..9301a711d 100644 --- a/src/game/Object/Bag.cpp +++ b/src/game/Object/Bag.cpp @@ -40,7 +40,9 @@ Bag::Bag(): Item() Bag::~Bag() { for (int i = 0; i < MAX_BAG_SIZE; ++i) - { delete m_bagslot[i]; } + { + delete m_bagslot[i]; + } } void Bag::AddToWorld() diff --git a/src/game/Object/Creature.cpp b/src/game/Object/Creature.cpp index c6e0adf29..914589298 100644 --- a/src/game/Object/Creature.cpp +++ b/src/game/Object/Creature.cpp @@ -180,7 +180,9 @@ Creature::Creature(CreatureSubtype subtype) : Unit(), m_valuesCount = UNIT_END; for (int i = 0; i < CREATURE_MAX_SPELLS; ++i) - { m_spells[i] = 0; } + { + m_spells[i] = 0; + } m_CreatureSpellCooldowns.clear(); m_CreatureCategoryCooldowns.clear(); @@ -1824,7 +1826,9 @@ void Creature::LoadEquipment(uint32 equip_entry, bool force) if (force) { for (uint8 i = 0; i < MAX_VIRTUAL_ITEM_SLOT; ++i) - { SetVirtualItem(VirtualItemSlot(i), 0); } + { + SetVirtualItem(VirtualItemSlot(i), 0); + } m_equipmentId = 0; } return; @@ -3237,7 +3241,9 @@ void Creature::FillGuidsListFromThreatList(GuidVector& guids, uint32 maxamount / guids.reserve(guids.size() + maxamount); for (ThreatList::const_iterator itr = threats.begin(); maxamount && itr != threats.end(); ++itr, --maxamount) - { guids.push_back((*itr)->getUnitGuid()); } + { + guids.push_back((*itr)->getUnitGuid()); + } } struct AddCreatureToRemoveListInMapsWorker diff --git a/src/game/Object/Creature.h b/src/game/Object/Creature.h index bb111df83..7845e97ef 100644 --- a/src/game/Object/Creature.h +++ b/src/game/Object/Creature.h @@ -401,7 +401,9 @@ struct VendorItemData void Clear() { for (VendorItemList::const_iterator itr = m_items.begin(); itr != m_items.end(); ++itr) - { delete(*itr); } + { + delete(*itr); + } m_items.clear(); } }; diff --git a/src/game/Object/CreatureAI.cpp b/src/game/Object/CreatureAI.cpp index 6e70d9751..dcf045dd3 100644 --- a/src/game/Object/CreatureAI.cpp +++ b/src/game/Object/CreatureAI.cpp @@ -232,7 +232,9 @@ class AiDelayEventAround : public BasicEvent // Pushing guids because in delay can happen some creature gets despawned => invalid pointer m_receiverGuids.reserve(receivers.size()); for (std::list::const_iterator itr = receivers.begin(); itr != receivers.end(); ++itr) - { m_receiverGuids.push_back((*itr)->GetObjectGuid()); } + { + m_receiverGuids.push_back((*itr)->GetObjectGuid()); + } } bool Execute(uint64 /*e_time*/, uint32 /*p_time*/) override diff --git a/src/game/Object/CreatureEventAI.cpp b/src/game/Object/CreatureEventAI.cpp index 67178febf..448e65b1c 100644 --- a/src/game/Object/CreatureEventAI.cpp +++ b/src/game/Object/CreatureEventAI.cpp @@ -591,7 +591,9 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction if (!(pHolder.Event.event_flags & EFLAG_RANDOM_ACTION)) { for (uint32 j = 0; j < MAX_ACTIONS; ++j) - { ProcessAction(pHolder.Event.action[j], rnd, pHolder.Event.event_id, pActionInvoker, pAIEventSender); } + { + ProcessAction(pHolder.Event.action[j], rnd, pHolder.Event.event_id, pActionInvoker, pAIEventSender); + } } // Process actions, random case else diff --git a/src/game/Object/GameObject.cpp b/src/game/Object/GameObject.cpp index 5e50f5fe6..989a3acab 100644 --- a/src/game/Object/GameObject.cpp +++ b/src/game/Object/GameObject.cpp @@ -2549,7 +2549,9 @@ void GameObject::TickCapturePoint() // on retail this is also sent to newly added players even though they already received a slider value for (std::list::iterator itr = capturingPlayers.begin(); itr != capturingPlayers.end(); ++itr) - { (*itr)->SendUpdateWorldState(info->capturePoint.worldState2, (uint32)m_captureSlider); } + { + (*itr)->SendUpdateWorldState(info->capturePoint.worldState2, (uint32)m_captureSlider); + } // send capture point events uint32 eventId = 0; diff --git a/src/game/Object/Guild.cpp b/src/game/Object/Guild.cpp index efe7f0a93..bfa0153ed 100644 --- a/src/game/Object/Guild.cpp +++ b/src/game/Object/Guild.cpp @@ -1172,7 +1172,9 @@ uint32 Guild::GetAccountsNumber() // We use a set to be sure each element will be unique std::set accountsIdSet; for (MemberList::const_iterator itr = members.begin(); itr != members.end(); ++itr) - { accountsIdSet.insert(itr->second.accountId); } + { + accountsIdSet.insert(itr->second.accountId); + } m_accountsNumber = accountsIdSet.size(); diff --git a/src/game/Object/Item.cpp b/src/game/Object/Item.cpp index a5ebb221f..9fd947978 100644 --- a/src/game/Object/Item.cpp +++ b/src/game/Object/Item.cpp @@ -467,7 +467,9 @@ bool Item::Create(uint32 guidlow, uint32 itemid, Player const* owner) SetUInt32Value(ITEM_FIELD_DURABILITY, itemProto->MaxDurability); for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) - { SetSpellCharges(i, itemProto->Spells[i].SpellCharges); } + { + SetSpellCharges(i, itemProto->Spells[i].SpellCharges); + } SetUInt32Value(ITEM_FIELD_DURATION, itemProto->Duration); @@ -525,7 +527,9 @@ void Item::SaveToDB() std::ostringstream ss; for (uint16 i = 0; i < m_valuesCount; ++i) - { ss << GetUInt32Value(i) << " "; } + { + ss << GetUInt32Value(i) << " "; + } stmt = CharacterDatabase.CreateStatement(insItem, "INSERT INTO item_instance (guid,owner_guid,data,text) VALUES (?, ?, ?, ?)"); stmt.PExecute(guid, GetOwnerGuid().GetCounter(), ss.str().c_str(), m_text.c_str()); @@ -539,7 +543,9 @@ void Item::SaveToDB() std::ostringstream ss; for (uint16 i = 0; i < m_valuesCount; ++i) - { ss << GetUInt32Value(i) << " "; } + { + ss << GetUInt32Value(i) << " "; + } stmt.PExecute(ss.str().c_str(), GetOwnerGuid().GetCounter(), m_text.c_str(), guid); @@ -733,7 +739,9 @@ bool Item::LoadFromDB(uint32 guidLow, Field* fields, ObjectGuid ownerGuid) std::ostringstream ss; for (uint16 i = 0; i < m_valuesCount; ++i) - { ss << GetUInt32Value(i) << " "; } + { + ss << GetUInt32Value(i) << " "; + } stmt.addString(ss); stmt.addUInt32(GetOwnerGuid().GetCounter()); diff --git a/src/game/Object/LootMgr.cpp b/src/game/Object/LootMgr.cpp index f6e3cf9a0..d40f63db0 100644 --- a/src/game/Object/LootMgr.cpp +++ b/src/game/Object/LootMgr.cpp @@ -82,7 +82,9 @@ class LootTemplate::LootGroup // A set of loot def void LootStore::Clear() { for (LootTemplateMap::const_iterator itr = m_LootTemplates.begin(); itr != m_LootTemplates.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } m_LootTemplates.clear(); } @@ -91,7 +93,9 @@ void LootStore::Clear() void LootStore::Verify() const { for (LootTemplateMap::const_iterator i = m_LootTemplates.begin(); i != m_LootTemplates.end(); ++i) - { i->second->Verify(*this, i->first); } + { + i->second->Verify(*this, i->first); + } } // Loads a *_loot_template DB table into loot store @@ -230,13 +234,17 @@ void LootStore::LoadAndCollectLootIds(LootIdSet& ids_set) LoadLootTable(); for (LootTemplateMap::const_iterator tab = m_LootTemplates.begin(); tab != m_LootTemplates.end(); ++tab) - { ids_set.insert(tab->first); } + { + ids_set.insert(tab->first); + } } void LootStore::CheckLootRefs(LootIdSet* ref_set) const { for (LootTemplateMap::const_iterator ltItr = m_LootTemplates.begin(); ltItr != m_LootTemplates.end(); ++ltItr) - { ltItr->second->CheckLootRefs(ref_set); } + { + ltItr->second->CheckLootRefs(ref_set); + } } void LootStore::ReportUnusedIds(LootIdSet const& ids_set) const @@ -1292,7 +1300,9 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, bool rate, uint8 } for (uint32 loop = 0; loop < i->maxcount; ++loop) // Ref multiplicator - { Referenced->Process(loot, store, rate, i->group); } + { + Referenced->Process(loot, store, rate, i->group); + } } else // Plain entries (not a reference, not grouped) { loot.AddItem(*i); } // Chance is already checked, just add @@ -1300,7 +1310,9 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, bool rate, uint8 // Now processing groups for (LootGroups::const_iterator i = Groups.begin() ; i != Groups.end() ; ++i) - { i->Process(loot); } + { + i->Process(loot); + } } // True if template includes at least 1 quest drop entry @@ -1381,7 +1393,9 @@ void LootTemplate::Verify(LootStore const& lootstore, uint32 id) const { // Checking group chances for (uint32 i = 0; i < Groups.size(); ++i) - { Groups[i].Verify(lootstore, id, i + 1); } + { + Groups[i].Verify(lootstore, id, i + 1); + } // TODO: References validity checks } @@ -1404,7 +1418,9 @@ void LootTemplate::CheckLootRefs(LootIdSet* ref_set) const } for (LootGroups::const_iterator grItr = Groups.begin(); grItr != Groups.end(); ++grItr) - { grItr->CheckLootRefs(ref_set); } + { + grItr->CheckLootRefs(ref_set); + } } void LoadLootTemplates_Creature() @@ -1431,7 +1447,9 @@ void LoadLootTemplates_Creature() } } for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr) - { ids_set.erase(*itr); } + { + ids_set.erase(*itr); + } // for alterac valley we've defined Player-loot inside creature_loot_template id=0 // this hack is used, so that we won't need to create an extra table player_loot_template for just one case @@ -1465,7 +1483,9 @@ void LoadLootTemplates_Disenchant() } } for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr) - { ids_set.erase(*itr); } + { + ids_set.erase(*itr); + } // output error for any still listed (not referenced from appropriate table) ids LootTemplates_Disenchant.ReportUnusedIds(ids_set); } @@ -1513,7 +1533,9 @@ void LoadLootTemplates_Gameobject() } } for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr) - { ids_set.erase(*itr); } + { + ids_set.erase(*itr); + } // output error for any still listed (not referenced from appropriate table) ids LootTemplates_Gameobject.ReportUnusedIds(ids_set); @@ -1599,7 +1621,9 @@ void LoadLootTemplates_Pickpocketing() } } for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr) - { ids_set.erase(*itr); } + { + ids_set.erase(*itr); + } // output error for any still listed (not referenced from appropriate table) ids LootTemplates_Pickpocketing.ReportUnusedIds(ids_set); @@ -1671,7 +1695,9 @@ void LoadLootTemplates_Skinning() } } for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr) - { ids_set.erase(*itr); } + { + ids_set.erase(*itr); + } // output error for any still listed (not referenced from appropriate table) ids LootTemplates_Skinning.ReportUnusedIds(ids_set); diff --git a/src/game/Object/LootMgr.h b/src/game/Object/LootMgr.h index e00f3306a..d61c284ed 100644 --- a/src/game/Object/LootMgr.h +++ b/src/game/Object/LootMgr.h @@ -283,15 +283,21 @@ struct Loot m_playerCurrencies.clear(); for (QuestItemMap::const_iterator itr = m_playerQuestItems.begin(); itr != m_playerQuestItems.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } m_playerQuestItems.clear(); for (QuestItemMap::const_iterator itr = m_playerFFAItems.begin(); itr != m_playerFFAItems.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } m_playerFFAItems.clear(); for (QuestItemMap::const_iterator itr = m_playerNonQuestNonFFANonCurrencyConditionalItems.begin(); itr != m_playerNonQuestNonFFANonCurrencyConditionalItems.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } m_playerNonQuestNonFFANonCurrencyConditionalItems.clear(); m_playersLooting.clear(); diff --git a/src/game/Object/Object.cpp b/src/game/Object/Object.cpp index 481cf7333..add1440d5 100644 --- a/src/game/Object/Object.cpp +++ b/src/game/Object/Object.cpp @@ -767,7 +767,9 @@ void Object::ClearUpdateMask(bool remove) if (m_uint32Values) { for (uint16 index = 0; index < m_valuesCount; ++index) - { m_changedValues[index] = false; } + { + m_changedValues[index] = false; + } } if (m_objectUpdated) diff --git a/src/game/Object/ObjectAccessor.cpp b/src/game/Object/ObjectAccessor.cpp index 7f0a55619..9c70b36b2 100644 --- a/src/game/Object/ObjectAccessor.cpp +++ b/src/game/Object/ObjectAccessor.cpp @@ -259,7 +259,9 @@ ObjectAccessor::ConvertCorpseForPlayer(ObjectGuid player_guid, bool insignia) bones->Create(corpse->GetGUIDLow()); for (int i = 3; i < CORPSE_END; ++i) // don't overwrite guid and object type - { bones->SetUInt32Value(i, corpse->GetUInt32Value(i)); } + { + bones->SetUInt32Value(i, corpse->GetUInt32Value(i)); + } bones->SetGrid(corpse->GetGrid()); // bones->m_time = m_time; // don't overwrite time diff --git a/src/game/Object/ObjectMgr.cpp b/src/game/Object/ObjectMgr.cpp index 718f32f53..ccbd1a95b 100644 --- a/src/game/Object/ObjectMgr.cpp +++ b/src/game/Object/ObjectMgr.cpp @@ -79,7 +79,9 @@ bool normalizePlayerName(std::string& name) wstr_buf[0] = wcharToUpper(wstr_buf[0]); for (size_t i = 1; i < wstr_len; ++i) - { wstr_buf[i] = wcharToLower(wstr_buf[i]); } + { + wstr_buf[i] = wcharToLower(wstr_buf[i]); + } if (!WStrToUtf8(wstr_buf, wstr_len, name)) { @@ -185,18 +187,26 @@ ObjectMgr::ObjectMgr() : ObjectMgr::~ObjectMgr() { for (QuestMap::iterator i = mQuestTemplates.begin(); i != mQuestTemplates.end(); ++i) - { delete i->second; } + { + delete i->second; + } for (PetLevelInfoMap::iterator i = petInfo.begin(); i != petInfo.end(); ++i) - { delete[] i->second; } + { + delete[] i->second; + } for (int race = 0; race < MAX_RACES; ++race) for (int class_ = 0; class_ < MAX_CLASSES; ++class_) - { delete[] playerInfo[race][class_].levelInfo; } + { + delete[] playerInfo[race][class_].levelInfo; + } // free objects for (GroupMap::iterator itr = mGroupMap.begin(); itr != mGroupMap.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } for (ArenaTeamMap::iterator itr = mArenaTeamMap.begin(); itr != mArenaTeamMap.end(); ++itr) { @@ -204,13 +214,19 @@ ObjectMgr::~ObjectMgr() } for (CacheVendorItemMap::iterator itr = m_mCacheVendorTemplateItemMap.begin(); itr != m_mCacheVendorTemplateItemMap.end(); ++itr) - { itr->second.Clear(); } + { + itr->second.Clear(); + } for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr) - { itr->second.Clear(); } + { + itr->second.Clear(); + } for (CacheTrainerSpellMap::iterator itr = m_mCacheTrainerSpellMap.begin(); itr != m_mCacheTrainerSpellMap.end(); ++itr) - { itr->second.Clear(); } + { + itr->second.Clear(); + } } Group* ObjectMgr::GetGroupById(uint32 id) const @@ -2699,7 +2715,9 @@ void ObjectMgr::LoadItemPrototypes() } for (std::set::const_iterator itr = notFoundOutfit.begin(); itr != notFoundOutfit.end(); ++itr) - { sLog.outErrorDb("Item (Entry: %u) not exist in `item_template` but referenced in `CharStartOutfit.dbc`", *itr); } + { + sLog.outErrorDb("Item (Entry: %u) not exist in `item_template` but referenced in `CharStartOutfit.dbc`", *itr); + } } void ObjectMgr::LoadItemConverts() @@ -3416,7 +3434,9 @@ void ObjectMgr::LoadPlayerInfo() PlayerLevelInfo* pLevelInfo = &pInfo->levelInfo[current_level - 1]; for (int i = 0; i < MAX_STATS; ++i) - { pLevelInfo->stats[i] = fields[i + 3].GetUInt8(); } + { + pLevelInfo->stats[i] = fields[i + 3].GetUInt8(); + } bar.step(); ++count; @@ -3490,7 +3510,9 @@ void ObjectMgr::LoadPlayerInfo() { mPlayerXPperLevel.resize(sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL)); for (uint32 level = 0; level < sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL); ++level) - { mPlayerXPperLevel[level] = 0; } + { + mPlayerXPperLevel[level] = 0; + } // 0 1 QueryResult* result = WorldDatabase.Query("SELECT lvl, xp_for_next_level FROM player_xp_for_level"); @@ -3930,7 +3952,9 @@ void ObjectMgr::LoadQuests() { // For reload case for (QuestMap::const_iterator itr = mQuestTemplates.begin(); itr != mQuestTemplates.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } mQuestTemplates.clear(); @@ -5040,7 +5064,9 @@ void ObjectMgr::LoadPageTexts() std::ostringstream ss; ss << "The text page(s) "; for (std::set::iterator itr = checkedPages.begin(); itr != checkedPages.end(); ++itr) - { ss << *itr << " "; } + { + ss << *itr << " "; + } ss << "create(s) a circular reference, which can cause the server to freeze. Changing Next_Page of page " << pageItr->Page_ID << " to 0"; sLog.outErrorDb("%s", ss.str().c_str()); @@ -5548,7 +5574,9 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) { // mail open and then not returned for (MailItemInfoVec::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2) - { CharacterDatabase.PExecute("DELETE FROM item_instance WHERE guid = '%u'", itr2->item_guid); } + { + CharacterDatabase.PExecute("DELETE FROM item_instance WHERE guid = '%u'", itr2->item_guid); + } } else { @@ -9763,7 +9791,9 @@ void ObjectMgr::LoadTrainers(char const* tableName, bool isTemplates) // For reload case for (CacheTrainerSpellMap::iterator itr = trainerList.begin(); itr != trainerList.end(); ++itr) - { itr->second.Clear(); } + { + itr->second.Clear(); + } trainerList.clear(); std::set skip_trainers; @@ -9932,7 +9962,9 @@ void ObjectMgr::LoadTrainerTemplates() bool hasErrored = false; for (CacheTrainerSpellMap::const_iterator tItr = m_mCacheTrainerTemplateSpellMap.begin(); tItr != m_mCacheTrainerTemplateSpellMap.end(); ++tItr) - { trainer_ids.insert(tItr->first); } + { + trainer_ids.insert(tItr->first); + } for (uint32 i = 1; i < sCreatureStorage.GetMaxEntry(); ++i) { @@ -9954,7 +9986,9 @@ void ObjectMgr::LoadTrainerTemplates() } for (std::set::const_iterator tItr = trainer_ids.begin(); tItr != trainer_ids.end(); ++tItr) - { sLog.outErrorDb("Table `npc_trainer_template` has trainer template %u not used by any trainers ", *tItr); } + { + sLog.outErrorDb("Table `npc_trainer_template` has trainer template %u not used by any trainers ", *tItr); + } if (hasErrored || !trainer_ids.empty()) // Append extra line in case of reported errors { @@ -9968,7 +10002,9 @@ void ObjectMgr::LoadVendors(char const* tableName, bool isTemplates) // For reload case for (CacheVendorItemMap::iterator itr = vendorList.begin(); itr != vendorList.end(); ++itr) - { itr->second.Clear(); } + { + itr->second.Clear(); + } vendorList.clear(); std::set skip_vendors; @@ -10027,7 +10063,9 @@ void ObjectMgr::LoadVendorTemplates() std::set vendor_ids; for (CacheVendorItemMap::const_iterator vItr = m_mCacheVendorTemplateItemMap.begin(); vItr != m_mCacheVendorTemplateItemMap.end(); ++vItr) - { vendor_ids.insert(vItr->first); } + { + vendor_ids.insert(vItr->first); + } for (uint32 i = 1; i < sCreatureStorage.GetMaxEntry(); ++i) { @@ -10046,7 +10084,9 @@ void ObjectMgr::LoadVendorTemplates() } for (std::set::const_iterator vItr = vendor_ids.begin(); vItr != vendor_ids.end(); ++vItr) - { sLog.outErrorDb("Table `npc_vendor_template` has vendor template %u not used by any vendors ", *vItr); } + { + sLog.outErrorDb("Table `npc_vendor_template` has vendor template %u not used by any vendors ", *vItr); + } } /* This function is supposed to take care of three things: @@ -10381,7 +10421,9 @@ void ObjectMgr::LoadGossipMenuItems(std::set& gossipScriptSet) if (!sLog.HasLogFilter(LOG_FILTER_DB_STRICTED_CHECK)) { for (std::set::const_iterator itr = menu_ids.begin(); itr != menu_ids.end(); ++itr) - { sLog.outErrorDb("Table `gossip_menu` contain unused (in creature or GO or menu options) menu id %u.", *itr); } + { + sLog.outErrorDb("Table `gossip_menu` contain unused (in creature or GO or menu options) menu id %u.", *itr); + } } sLog.outString(">> Loaded %u gossip_menu_option entries", count); @@ -10399,7 +10441,9 @@ void ObjectMgr::LoadGossipMenus() // Check which script-ids in db_scripts type DBS_ON_GOSSIP are not used std::set gossipScriptSet; for (ScriptChainMap::const_iterator itr = scm->begin(); itr != scm->end(); ++itr) - { gossipScriptSet.insert(itr->first); } + { + gossipScriptSet.insert(itr->first); + } // Load gossip_menu and gossip_menu_option data sLog.outString("(Re)Loading Gossip menus..."); @@ -10408,7 +10452,9 @@ void ObjectMgr::LoadGossipMenus() LoadGossipMenuItems(gossipScriptSet); for (std::set::const_iterator itr = gossipScriptSet.begin(); itr != gossipScriptSet.end(); ++itr) - { sLog.outErrorDb("Table `db_scripts [type = %d]` contains unused script, id %u.", DBS_ON_GOSSIP, *itr); } + { + sLog.outErrorDb("Table `db_scripts [type = %d]` contains unused script, id %u.", DBS_ON_GOSSIP, *itr); + } } void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, uint8 type, uint32 maxcount, uint32 incrtime, uint32 extendedcost) diff --git a/src/game/Object/Pet.cpp b/src/game/Object/Pet.cpp index a07b43da7..41d2a3b5f 100644 --- a/src/game/Object/Pet.cpp +++ b/src/game/Object/Pet.cpp @@ -1560,10 +1560,14 @@ void Pet::_SaveAuras() stmt.addUInt8(holder->GetAuraCharges()); for (uint32 i = 0; i < MAX_EFFECT_INDEX; ++i) - { stmt.addInt32(damage[i]); } + { + stmt.addInt32(damage[i]); + } for (uint32 i = 0; i < MAX_EFFECT_INDEX; ++i) - { stmt.addUInt32(periodicTime[i]); } + { + stmt.addUInt32(periodicTime[i]); + } stmt.addInt32(holder->GetAuraMaxDuration()); stmt.addInt32(holder->GetAuraDuration()); @@ -2231,7 +2235,9 @@ void Pet::LearnPetPassives() if (petStore != sPetFamilySpellsStore.end()) { for (PetFamilySpellsSet::const_iterator petSet = petStore->second.begin(); petSet != petStore->second.end(); ++petSet) - { addSpell(*petSet, ACT_DECIDE, PETSPELL_NEW, PETSPELL_FAMILY); } + { + addSpell(*petSet, ACT_DECIDE, PETSPELL_NEW, PETSPELL_FAMILY); + } } } diff --git a/src/game/Object/PetAI.cpp b/src/game/Object/PetAI.cpp index b03c7bf39..a439aedac 100644 --- a/src/game/Object/PetAI.cpp +++ b/src/game/Object/PetAI.cpp @@ -350,7 +350,9 @@ void PetAI::UpdateAI(const uint32 diff) // deleted cached Spell objects for (TargetSpellList::const_iterator itr = targetSpellStore.begin(); itr != targetSpellStore.end(); ++itr) - { delete itr->second; } + { + delete itr->second; + } } // Guardians will always look in threat list for victim diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index 8be726f56..ae43945a9 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -266,7 +266,9 @@ std::string PlayerTaxi::SaveTaxiDestinationsToString() std::ostringstream ss; for (size_t i = 0; i < m_TaxiDestinations.size(); ++i) - { ss << m_TaxiDestinations[i] << " "; } + { + ss << m_TaxiDestinations[i] << " "; + } return ss.str(); } @@ -505,7 +507,9 @@ Player::Player(WorldSession* session): Unit(), m_mover(this), m_camera(this), m_ m_lastLiquid = NULL; for (int i = 0; i < MAX_TIMERS; ++i) - { m_MirrorTimer[i] = DISABLED_MIRROR_TIMER; } + { + m_MirrorTimer[i] = DISABLED_MIRROR_TIMER; + } m_MirrorTimerFlags = UNDERWATER_NONE; m_MirrorTimerFlagsLast = UNDERWATER_NONE; @@ -554,7 +558,9 @@ Player::Player(WorldSession* session): Unit(), m_mover(this), m_camera(this), m_ m_itemUpdateQueueBlocked = false; for (int i = 0; i < MAX_MOVE_TYPE; ++i) - { m_forced_speed_changes[i] = 0; } + { + m_forced_speed_changes[i] = 0; + } m_stableSlots = 0; @@ -629,7 +635,9 @@ Player::~Player() // all mailed items should be deleted, also all mail should be deallocated for (PlayerMails::const_iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr) - { delete *itr; } + { + delete *itr; + } for (ItemMap::const_iterator iter = mMitems.begin(); iter != mMitems.end(); ++iter) { delete iter->second; } // if item is duplicated... then server may crash ... but that item should be deallocated @@ -642,7 +650,9 @@ Player::~Player() } for (size_t x = 0; x < ItemSetEff.size(); ++x) - { delete ItemSetEff[x]; } + { + delete ItemSetEff[x]; + } // clean up player-instance binds, may unload some instance saves for (uint8 i = 0; i < MAX_DIFFICULTY; ++i) @@ -699,7 +709,9 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c } for (int i = 0; i < PLAYER_SLOTS_COUNT; ++i) - { m_items[i] = NULL; } + { + m_items[i] = NULL; + } SetLocationMapId(info->mapId); Relocate(info->positionX, info->positionY, info->positionZ, info->orientation); @@ -863,7 +875,9 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c } for (PlayerCreateInfoItems::const_iterator item_id_itr = info->item.begin(); item_id_itr != info->item.end(); ++item_id_itr) - { StoreNewItemInBestSlots(item_id_itr->item_id, item_id_itr->item_amount); } + { + StoreNewItemInBestSlots(item_id_itr->item_id, item_id_itr->item_amount); + } // bags and main-hand weapon must equipped at this moment // now second pass for not equipped (offhand weapon/shield if it attempt equipped before main-hand weapon) @@ -1063,7 +1077,9 @@ int32 Player::getMaxTimer(MirrorTimerType timer) int32 UnderWaterTime = sWorld.getConfig(CONFIG_UINT32_TIMERBAR_BREATH_MAX) * IN_MILLISECONDS; AuraList const& mModWaterBreathing = GetAurasByType(SPELL_AURA_MOD_WATER_BREATHING); for (AuraList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i) - { UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifier()->m_amount) / 100.0f); } + { + UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifier()->m_amount) / 100.0f); + } return UnderWaterTime; } case FIRE_TIMER: @@ -19252,10 +19268,14 @@ void Player::_SaveStats() stmt.addUInt32(GetMaxPowerByIndex(i)); } for (int i = 0; i < MAX_STATS; ++i) - { stmt.addFloat(GetStat(Stats(i))); } + { + stmt.addFloat(GetStat(Stats(i))); + } // armor + school resistances for (int i = 0; i < MAX_SPELL_SCHOOL; ++i) - { stmt.addUInt32(GetResistance(SpellSchools(i))); } + { + stmt.addUInt32(GetResistance(SpellSchools(i))); + } stmt.addFloat(GetFloatValue(PLAYER_BLOCK_PERCENTAGE)); stmt.addFloat(GetFloatValue(PLAYER_DODGE_PERCENTAGE)); stmt.addFloat(GetFloatValue(PLAYER_PARRY_PERCENTAGE)); diff --git a/src/game/Object/Player.h b/src/game/Object/Player.h index 98dea0ab5..dd44199a5 100644 --- a/src/game/Object/Player.h +++ b/src/game/Object/Player.h @@ -284,7 +284,10 @@ struct PlayerLevelInfo { PlayerLevelInfo() { - for (int i = 0; i < MAX_STATS; ++i) { stats[i] = 0; } + for (int i = 0; i < MAX_STATS; ++i) + { + stats[i] = 0; + } } uint8 stats[MAX_STATS]; diff --git a/src/game/Object/StatSystem.cpp b/src/game/Object/StatSystem.cpp index ffdd4e5eb..d3373b05f 100644 --- a/src/game/Object/StatSystem.cpp +++ b/src/game/Object/StatSystem.cpp @@ -141,7 +141,9 @@ bool Player::UpdateAllStats() UpdateMaxHealth(); for (uint32 i = POWER_MANA; i < MAX_POWERS; ++i) - { UpdateMaxPower(Powers(i)); } + { + UpdateMaxPower(Powers(i)); + } UpdateAllRatings(); UpdateAllCritPercentages(); @@ -156,7 +158,9 @@ bool Player::UpdateAllStats() UpdateExpertise(BASE_ATTACK); UpdateExpertise(OFF_ATTACK); for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) - { UpdateResistances(i); } + { + UpdateResistances(i); + } return true; } @@ -648,7 +652,9 @@ void Player::UpdateSpellHitChances() void Player::UpdateAllSpellCritChances() { for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) - { UpdateSpellCritChance(i); } + { + UpdateSpellCritChance(i); + } } void Player::UpdateExpertise(WeaponAttackType attack) @@ -819,10 +825,14 @@ bool Creature::UpdateAllStats() UpdateAttackPowerAndDamage(); for (uint32 i = POWER_MANA; i < MAX_POWERS; ++i) - { UpdateMaxPower(Powers(i)); } + { + UpdateMaxPower(Powers(i)); + } for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) - { UpdateResistances(i); } + { + UpdateResistances(i); + } return true; } @@ -970,13 +980,19 @@ bool Pet::UpdateStats(Stats stat) bool Pet::UpdateAllStats() { for (int i = STAT_STRENGTH; i < MAX_STATS; ++i) - { UpdateStats(Stats(i)); } + { + UpdateStats(Stats(i)); + } for (uint32 i = POWER_MANA; i < MAX_POWERS; ++i) - { UpdateMaxPower(Powers(i)); } + { + UpdateMaxPower(Powers(i)); + } for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) - { UpdateResistances(i); } + { + UpdateResistances(i); + } return true; } diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index c4c842924..83e48976a 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -516,7 +516,9 @@ Unit::Unit() : m_deathState = ALIVE; for (uint32 i = 0; i < CURRENT_MAX_SPELL; ++i) - { m_currentSpells[i] = NULL; } + { + m_currentSpells[i] = NULL; + } m_castCounter = 0; @@ -535,7 +537,9 @@ Unit::Unit() : m_canModifyStats = false; for (int i = 0; i < MAX_SPELL_IMMUNITY; ++i) - { m_spellImmune[i].clear(); } + { + m_spellImmune[i].clear(); + } for (int i = 0; i < UNIT_MOD_END; ++i) { m_auraModifiersGroup[i][BASE_VALUE] = 0.0f; @@ -553,7 +557,9 @@ Unit::Unit() : m_weaponDamage[i][MAXDAMAGE] = BASE_MAXDAMAGE; } for (int i = 0; i < MAX_STATS; ++i) - { m_createStats[i] = 0.0f; } + { + m_createStats[i] = 0.0f; + } m_attacking = NULL; m_modMeleeHitChance = 0.0f; @@ -565,14 +571,20 @@ Unit::Unit() : // m_victimThreat = 0.0f; for (int i = 0; i < MAX_SPELL_SCHOOL; ++i) - { m_threatModifier[i] = 1.0f; } + { + m_threatModifier[i] = 1.0f; + } m_isSorted = true; for (int i = 0; i < MAX_MOVE_TYPE; ++i) - { m_speed_rate[i] = 1.0f; } + { + m_speed_rate[i] = 1.0f; + } // remove aurastates allowing special moves for (int i = 0; i < MAX_REACTIVE; ++i) - { m_reactiveTimer[i] = 0; } + { + m_reactiveTimer[i] = 0; + } m_isCreatureLinkingTrigger = false; m_isSpawningLinked = false; diff --git a/src/game/OutdoorPvP/OutdoorPvPEP.cpp b/src/game/OutdoorPvP/OutdoorPvPEP.cpp index ebbb50f50..57005a5a9 100644 --- a/src/game/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/game/OutdoorPvP/OutdoorPvPEP.cpp @@ -41,7 +41,9 @@ OutdoorPvPEP::OutdoorPvPEP() : OutdoorPvP(), m_towerWorldState[3] = WORLD_STATE_EP_PLAGUEWOOD_NEUTRAL; for (uint8 i = 0; i < MAX_EP_TOWERS; ++i) - { m_towerOwner[i] = TEAM_NONE; } + { + m_towerOwner[i] = TEAM_NONE; + } // initially set graveyard owner to neither faction sObjectMgr.SetGraveYardLinkTeam(GRAVEYARD_ID_EASTERN_PLAGUE, GRAVEYARD_ZONE_EASTERN_PLAGUE, TEAM_INVALID); @@ -53,13 +55,17 @@ void OutdoorPvPEP::FillInitialWorldStates(WorldPacket& data, uint32& count) FillInitialWorldState(data, count, WORLD_STATE_EP_TOWER_COUNT_HORDE, m_towersHorde); for (uint8 i = 0; i < MAX_EP_TOWERS; ++i) - { FillInitialWorldState(data, count, m_towerWorldState[i], WORLD_STATE_ADD); } + { + FillInitialWorldState(data, count, m_towerWorldState[i], WORLD_STATE_ADD); + } } void OutdoorPvPEP::SendRemoveWorldStates(Player* player) { for (uint8 i = 0; i < MAX_EP_TOWERS; ++i) - { player->SendUpdateWorldState(m_towerWorldState[i], WORLD_STATE_REMOVE); } + { + player->SendUpdateWorldState(m_towerWorldState[i], WORLD_STATE_REMOVE); + } } void OutdoorPvPEP::HandlePlayerEnterZone(Player* player, bool isMainZone) @@ -68,7 +74,9 @@ void OutdoorPvPEP::HandlePlayerEnterZone(Player* player, bool isMainZone) // remove the buff from the player first; Sometimes on relog players still have the aura for (uint8 i = 0; i < MAX_EP_TOWERS; ++i) - { player->RemoveAurasDueToSpell(player->GetTeam() == ALLIANCE ? plaguelandsTowerBuffs[i].spellIdAlliance : plaguelandsTowerBuffs[i].spellIdHorde); } + { + player->RemoveAurasDueToSpell(player->GetTeam() == ALLIANCE ? plaguelandsTowerBuffs[i].spellIdAlliance : plaguelandsTowerBuffs[i].spellIdHorde); + } // buff the player switch (player->GetTeam()) @@ -94,7 +102,9 @@ void OutdoorPvPEP::HandlePlayerLeaveZone(Player* player, bool isMainZone) { // remove the buff from the player for (uint8 i = 0; i < MAX_EP_TOWERS; ++i) - { player->RemoveAurasDueToSpell(player->GetTeam() == ALLIANCE ? plaguelandsTowerBuffs[i].spellIdAlliance : plaguelandsTowerBuffs[i].spellIdHorde); } + { + player->RemoveAurasDueToSpell(player->GetTeam() == ALLIANCE ? plaguelandsTowerBuffs[i].spellIdAlliance : plaguelandsTowerBuffs[i].spellIdHorde); + } OutdoorPvP::HandlePlayerLeaveZone(player, isMainZone); } @@ -238,7 +248,9 @@ bool OutdoorPvPEP::ProcessCaptureEvent(GameObject* go, uint32 towerId, Team team { // update banner for (GuidList::const_iterator itr = m_towerBanners[towerId].begin(); itr != m_towerBanners[towerId].end(); ++itr) - { SetBannerVisual(go, (*itr), CAPTURE_ARTKIT_ALLIANCE, CAPTURE_ANIM_ALLIANCE); } + { + SetBannerVisual(go, (*itr), CAPTURE_ARTKIT_ALLIANCE, CAPTURE_ANIM_ALLIANCE); + } // update counter ++m_towersAlliance; @@ -251,7 +263,9 @@ bool OutdoorPvPEP::ProcessCaptureEvent(GameObject* go, uint32 towerId, Team team { // update banner for (GuidList::const_iterator itr = m_towerBanners[towerId].begin(); itr != m_towerBanners[towerId].end(); ++itr) - { SetBannerVisual(go, (*itr), CAPTURE_ARTKIT_HORDE, CAPTURE_ANIM_HORDE); } + { + SetBannerVisual(go, (*itr), CAPTURE_ARTKIT_HORDE, CAPTURE_ANIM_HORDE); + } // update counter ++m_towersHorde; @@ -264,7 +278,9 @@ bool OutdoorPvPEP::ProcessCaptureEvent(GameObject* go, uint32 towerId, Team team { // update banner for (GuidList::const_iterator itr = m_towerBanners[towerId].begin(); itr != m_towerBanners[towerId].end(); ++itr) - { SetBannerVisual(go, (*itr), CAPTURE_ARTKIT_NEUTRAL, CAPTURE_ANIM_NEUTRAL); } + { + SetBannerVisual(go, (*itr), CAPTURE_ARTKIT_NEUTRAL, CAPTURE_ANIM_NEUTRAL); + } if (m_towerOwner[towerId] == ALLIANCE) { diff --git a/src/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/game/OutdoorPvP/OutdoorPvPMgr.cpp index 36cde03b3..56e3b50d3 100644 --- a/src/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -47,7 +47,9 @@ OutdoorPvPMgr::OutdoorPvPMgr() OutdoorPvPMgr::~OutdoorPvPMgr() { for (uint8 i = 0; i < MAX_OPVP_ID; ++i) - { delete m_scripts[i]; } + { + delete m_scripts[i]; + } } #define LOAD_OPVP_ZONE(a) \ diff --git a/src/game/Server/DBCStores.cpp b/src/game/Server/DBCStores.cpp index d016c4697..3bab3518c 100644 --- a/src/game/Server/DBCStores.cpp +++ b/src/game/Server/DBCStores.cpp @@ -272,7 +272,9 @@ std::string AcceptableClientBuildsListStr() std::ostringstream data; int accepted_versions[] = EXPECTED_MANGOSD_CLIENT_BUILD; for (int i = 0; accepted_versions[i]; ++i) - { data << accepted_versions[i] << " "; } + { + data << accepted_versions[i] << " "; + } return data.str(); } diff --git a/src/game/Server/WorldSession.cpp b/src/game/Server/WorldSession.cpp index 6c67ce52f..eee624813 100644 --- a/src/game/Server/WorldSession.cpp +++ b/src/game/Server/WorldSession.cpp @@ -489,7 +489,9 @@ void WorldSession::LogoutPlayer(bool Save) // give honor to all attackers from set like group case for (std::set::const_iterator itr = aset.begin(); itr != aset.end(); ++itr) - { (*itr)->RewardHonor(_player, aset.size()); } + { + (*itr)->RewardHonor(_player, aset.size()); + } // give bg rewards and update counters like kill by first from attackers // this can't be called for all attackers. @@ -968,7 +970,9 @@ void WorldSession::SendAccountDataTimes(uint32 mask) void WorldSession::LoadTutorialsData() { for (int aX = 0 ; aX < 8 ; ++aX) - { m_Tutorials[ aX ] = 0; } + { + m_Tutorials[ aX ] = 0; + } QueryResult* result = CharacterDatabase.PQuery("SELECT tut0,tut1,tut2,tut3,tut4,tut5,tut6,tut7 FROM character_tutorial WHERE account = '%u'", GetAccountId()); @@ -983,7 +987,9 @@ void WorldSession::LoadTutorialsData() Field* fields = result->Fetch(); for (int iI = 0; iI < 8; ++iI) - { m_Tutorials[iI] = fields[iI].GetUInt32(); } + { + m_Tutorials[iI] = fields[iI].GetUInt32(); + } } while (result->NextRow()); @@ -1013,7 +1019,9 @@ void WorldSession::SendTutorialsData() { WorldPacket data(SMSG_TUTORIAL_FLAGS, 4 * 8); for (uint32 i = 0; i < 8; ++i) - { data << m_Tutorials[i]; } + { + data << m_Tutorials[i]; + } SendPacket(&data); } @@ -1028,7 +1036,9 @@ void WorldSession::SaveTutorialsData() { SqlStatement stmt = CharacterDatabase.CreateStatement(updTutorial, "UPDATE character_tutorial SET tut0=?, tut1=?, tut2=?, tut3=?, tut4=?, tut5=?, tut6=?, tut7=? WHERE account = ?"); for (int i = 0; i < 8; ++i) - { stmt.addUInt32(m_Tutorials[i]); } + { + stmt.addUInt32(m_Tutorials[i]); + } stmt.addUInt32(GetAccountId()); stmt.Execute(); @@ -1041,7 +1051,9 @@ void WorldSession::SaveTutorialsData() stmt.addUInt32(GetAccountId()); for (int i = 0; i < 8; ++i) - { stmt.addUInt32(m_Tutorials[i]); } + { + stmt.addUInt32(m_Tutorials[i]); + } stmt.Execute(); } diff --git a/src/game/Tools/PlayerDump.cpp b/src/game/Tools/PlayerDump.cpp index b1d260a8e..eb1d5c0b2 100644 --- a/src/game/Tools/PlayerDump.cpp +++ b/src/game/Tools/PlayerDump.cpp @@ -78,7 +78,10 @@ static bool findtoknth(std::string& str, int n, std::string::size_type& s, std:: { int i; s = e = 0; std::string::size_type size = str.size(); - for (i = 1; s < size && i < n; ++s) if (str[s] == ' ') { ++i; } + for (i = 1; s < size && i < n; ++s) if (str[s] == ' ') + { + ++i; + } if (i < n) { return false; @@ -439,7 +442,9 @@ std::string PlayerDumpWriter::GetDump(uint32 guid) } for (DumpTable* itr = &dumpTables[0]; itr->isValid(); ++itr) - { DumpTableContent(dump, guid, itr->name, itr->name, itr->type); } + { + DumpTableContent(dump, guid, itr->name, itr->name, itr->type); + } // TODO: Add instance/group.. // TODO: Add a dump level option to skip some non-important tables diff --git a/src/game/WorldHandlers/Map.cpp b/src/game/WorldHandlers/Map.cpp index f93688130..1ef9dce2b 100644 --- a/src/game/WorldHandlers/Map.cpp +++ b/src/game/WorldHandlers/Map.cpp @@ -1191,7 +1191,9 @@ uint32 Map::GetPlayersCountExceptGMs() const void Map::SendToPlayers(WorldPacket const* data) const { for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - { itr->getSource()->GetSession()->SendPacket(data); } + { + itr->getSource()->GetSession()->SendPacket(data); + } } bool Map::SendToPlayersInZone(WorldPacket const* data, uint32 zoneId) const @@ -1690,7 +1692,9 @@ bool DungeonMap::Reset(InstanceResetMethod method) { // notify the players to leave the instance so it can be reset for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - { itr->getSource()->SendResetFailedNotify(GetId()); } + { + itr->getSource()->SendResetFailedNotify(GetId()); + } } else { @@ -1698,7 +1702,9 @@ bool DungeonMap::Reset(InstanceResetMethod method) { // set the homebind timer for players inside (1 minute) for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - { itr->getSource()->m_InstanceValid = false; } + { + itr->getSource()->m_InstanceValid = false; + } } // the unload timer is not started @@ -2235,7 +2241,9 @@ void Map::MonsterYellToMap(CreatureInfo const* cinfo, int32 textId, Language lan Map::PlayerList const& pList = GetPlayers(); for (PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr) - { say_do(itr->getSource()); } + { + say_do(itr->getSource()); + } } /** diff --git a/src/game/WorldHandlers/MoveMap.cpp b/src/game/WorldHandlers/MoveMap.cpp index 8b9d77fe6..5449d2a08 100644 --- a/src/game/WorldHandlers/MoveMap.cpp +++ b/src/game/WorldHandlers/MoveMap.cpp @@ -149,7 +149,9 @@ namespace MMAP MMapManager::~MMapManager() { for (MMapDataSet::iterator i = loadedMMaps.begin(); i != loadedMMaps.end(); ++i) - { delete i->second; } + { + delete i->second; + } // by now we should not have maps loaded // if we had, tiles in MMapData->mmapLoadedTiles, their actual data is lost! diff --git a/src/game/WorldHandlers/ScriptMgr.cpp b/src/game/WorldHandlers/ScriptMgr.cpp index 45e329566..8b76437a8 100644 --- a/src/game/WorldHandlers/ScriptMgr.cpp +++ b/src/game/WorldHandlers/ScriptMgr.cpp @@ -902,7 +902,9 @@ void ScriptMgr::LoadDbScriptStrings() sWaypointMgr.CheckTextsExistance(ids); for (std::set::const_iterator itr = ids.begin(); itr != ids.end(); ++itr) - { sLog.outErrorDb("Table `db_script_string` has unused string id %u", *itr); } + { + sLog.outErrorDb("Table `db_script_string` has unused string id %u", *itr); + } } void ScriptMgr::CheckScriptTexts(std::set& ids) diff --git a/src/game/WorldHandlers/SpellAuras.cpp b/src/game/WorldHandlers/SpellAuras.cpp index 5a687bb47..c5716aef9 100644 --- a/src/game/WorldHandlers/SpellAuras.cpp +++ b/src/game/WorldHandlers/SpellAuras.cpp @@ -5107,7 +5107,9 @@ void Aura::HandleInvisibility(bool apply, bool Real) target->m_invisibilityMask = 0; Unit::AuraList const& auras = target->GetAurasByType(SPELL_AURA_MOD_INVISIBILITY); for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) - { target->m_invisibilityMask |= (1 << (*itr)->GetModifier()->m_miscvalue); } + { + target->m_invisibilityMask |= (1 << (*itr)->GetModifier()->m_miscvalue); + } // only at real aura remove and if not have different invisibility auras. if (Real && target->m_invisibilityMask == 0) @@ -5146,7 +5148,9 @@ void Aura::HandleInvisibilityDetect(bool apply, bool Real) target->m_detectInvisibilityMask = 0; Unit::AuraList const& auras = target->GetAurasByType(SPELL_AURA_MOD_INVISIBILITY_DETECTION); for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) - { target->m_detectInvisibilityMask |= (1 << (*itr)->GetModifier()->m_miscvalue); } + { + target->m_detectInvisibilityMask |= (1 << (*itr)->GetModifier()->m_miscvalue); + } } if (Real && target->GetTypeId() == TYPEID_PLAYER) { @@ -7130,7 +7134,9 @@ void Aura::HandleModDamagePercentDone(bool apply, bool Real) // Send info to client if (target->GetTypeId() == TYPEID_PLAYER) for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) - { target->ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT + i, m_modifier.m_amount / 100.0f, apply); } + { + target->ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT + i, m_modifier.m_amount / 100.0f, apply); + } } void Aura::HandleModOffhandDamagePercent(bool apply, bool Real) @@ -9860,7 +9866,9 @@ SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit* target, Wor } for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i) - { m_auras[i] = NULL; } + { + m_auras[i] = NULL; + } } void SpellAuraHolder::AddAura(Aura* aura, SpellEffectIndex index) diff --git a/src/game/WorldHandlers/WaypointManager.cpp b/src/game/WorldHandlers/WaypointManager.cpp index 6e3d935dd..39963f4ea 100644 --- a/src/game/WorldHandlers/WaypointManager.cpp +++ b/src/game/WorldHandlers/WaypointManager.cpp @@ -76,7 +76,9 @@ void WaypointManager::Load() std::set movementScriptSet; for (ScriptChainMap::const_iterator itr = scm->begin(); itr != scm->end(); ++itr) - { movementScriptSet.insert(itr->first); } + { + movementScriptSet.insert(itr->first); + } // ///////////////////////////////////////////////////// // creature_movement @@ -412,15 +414,21 @@ void WaypointManager::Load() void WaypointManager::Unload() { for (WaypointPathMap::iterator itr = m_pathMap.begin(); itr != m_pathMap.end(); ++itr) - { _clearPath(itr->second); } + { + _clearPath(itr->second); + } m_pathMap.clear(); for (WaypointPathMap::iterator itr = m_pathTemplateMap.begin(); itr != m_pathTemplateMap.end(); ++itr) - { _clearPath(itr->second); } + { + _clearPath(itr->second); + } m_pathTemplateMap.clear(); for (WaypointPathMap::iterator itr = m_externalPathTemplateMap.begin(); itr != m_externalPathTemplateMap.end(); ++itr) - { _clearPath(itr->second); } + { + _clearPath(itr->second); + } m_externalPathTemplateMap.clear(); } diff --git a/src/game/movement/spline.cpp b/src/game/movement/spline.cpp index 955a54609..0dedd2795 100644 --- a/src/game/movement/spline.cpp +++ b/src/game/movement/spline.cpp @@ -311,7 +311,9 @@ namespace Movement str << "mode: " << mode_str[mode()] << std::endl; str << "points count: " << count << std::endl; for (index_type i = 0; i < count; ++i) - { str << "point " << i << " : " << points[i].toString() << std::endl; } + { + str << "point " << i << " : " << points[i].toString() << std::endl; + } return str.str(); } diff --git a/src/game/vmap/BIH.h b/src/game/vmap/BIH.h index 060cc919f..a4d67cc41 100644 --- a/src/game/vmap/BIH.h +++ b/src/game/vmap/BIH.h @@ -160,7 +160,9 @@ class BIH objects.resize(dat.numPrims); for (uint32 i = 0; i < dat.numPrims; ++i) - { objects[i] = dat.indices[i]; } + { + objects[i] = dat.indices[i]; + } // nObjects = dat.numPrims; tree = tempTree; delete[] dat.primBound; @@ -512,7 +514,10 @@ class BIH maxObjects(0xFFFFFFFF), sumDepth(0), minDepth(0x0FFFFFFF), maxDepth(0xFFFFFFFF), numBVH2(0) { - for (int i = 0; i < 6; ++i) { numLeavesN[i] = 0; } + for (int i = 0; i < 6; ++i) + { + numLeavesN[i] = 0; + } } /** diff --git a/src/game/vmap/GameObjectModel.cpp b/src/game/vmap/GameObjectModel.cpp index 37de78aa6..15268fd9a 100644 --- a/src/game/vmap/GameObjectModel.cpp +++ b/src/game/vmap/GameObjectModel.cpp @@ -140,7 +140,9 @@ bool GameObjectModel::initialize(const GameObject* const pGo, const GameObjectDi mdl_box = AABox(mdl_box.low() * iScale, mdl_box.high() * iScale); AABox rotated_bounds; for (int i = 0; i < 8; ++i) - { rotated_bounds.merge(iRotation * mdl_box.corner(i)); } + { + rotated_bounds.merge(iRotation * mdl_box.corner(i)); + } this->iBound = rotated_bounds + iPos; diff --git a/src/game/vmap/MapTree.cpp b/src/game/vmap/MapTree.cpp index 9f7079446..4e1e21b3b 100644 --- a/src/game/vmap/MapTree.cpp +++ b/src/game/vmap/MapTree.cpp @@ -378,7 +378,9 @@ namespace VMAP { iTreeValues[i->first].setUnloaded(); for (uint32 refCount = 0; refCount < i->second; ++refCount) - { vm->releaseModelInstance(iTreeValues[i->first].name); } + { + vm->releaseModelInstance(iTreeValues[i->first].name); + } } iLoadedSpawns.clear(); iLoadedTiles.clear(); diff --git a/src/game/vmap/RegularGrid.h b/src/game/vmap/RegularGrid.h index 75b08f384..e8bfcd43a 100644 --- a/src/game/vmap/RegularGrid.h +++ b/src/game/vmap/RegularGrid.h @@ -107,7 +107,9 @@ class RegularGrid2D { for (int x = 0; x < CELL_NUMBER; ++x) for (int y = 0; y < CELL_NUMBER; ++y) - { delete nodes[x][y]; } + { + delete nodes[x][y]; + } } /** diff --git a/src/game/vmap/TileAssembler.cpp b/src/game/vmap/TileAssembler.cpp index 63731cb5c..6600f596c 100644 --- a/src/game/vmap/TileAssembler.cpp +++ b/src/game/vmap/TileAssembler.cpp @@ -119,7 +119,9 @@ namespace VMAP // ===> possibly move this code to StaticMapTree class std::map modelNodeIdx; for (uint32 i = 0; i < mapSpawns.size(); ++i) - { modelNodeIdx.insert(pair(mapSpawns[i]->ID, i)); } + { + modelNodeIdx.insert(pair(mapSpawns[i]->ID, i)); + } // write map tree file std::stringstream mapfilename; @@ -607,7 +609,9 @@ namespace VMAP groupsArray.resize(groups); bool succeed = true; for (uint32 g = 0; g < groups && succeed; ++g) - { succeed = groupsArray[g].Read(rf); } + { + succeed = groupsArray[g].Read(rf); + } fclose(rf); return succeed; diff --git a/src/game/vmap/WorldModel.cpp b/src/game/vmap/WorldModel.cpp index e6f5467dc..1dcb4d8cb 100644 --- a/src/game/vmap/WorldModel.cpp +++ b/src/game/vmap/WorldModel.cpp @@ -735,7 +735,9 @@ namespace VMAP result = false; } for (uint32 i = 0; i < groupModels.size() && result; ++i) - { result = groupModels[i].writeToFile(wf); } + { + result = groupModels[i].writeToFile(wf); + } // write group BIH if (result && fwrite("GBIH", 1, 4, wf) != 4) @@ -797,7 +799,9 @@ namespace VMAP } // if (result && fread(&groupModels[0], sizeof(GroupModel), count, rf) != count) result = false; for (uint32 i = 0; i < count && result; ++i) - { result = groupModels[i].readFromFile(rf); } + { + result = groupModels[i].readFromFile(rf); + } // read group BIH if (result && !readChunk(rf, chunk, "GBIH", 4)) diff --git a/src/shared/Auth/BigNumber.cpp b/src/shared/Auth/BigNumber.cpp index 2b2216fa2..fa3b4d1f0 100644 --- a/src/shared/Auth/BigNumber.cpp +++ b/src/shared/Auth/BigNumber.cpp @@ -70,7 +70,9 @@ void BigNumber::SetBinary(const uint8* bytes, int len) { uint8 t[1000]; for (int i = 0; i < len; ++i) - { t[i] = bytes[len - 1 - i]; } + { + t[i] = bytes[len - 1 - i]; + } BN_bin2bn(t, len, _bn); } diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp index c703dfb04..f159e924f 100644 --- a/src/shared/Database/Database.cpp +++ b/src/shared/Database/Database.cpp @@ -62,7 +62,9 @@ void SqlConnection::FreePreparedStatements() size_t nStmts = m_holder.size(); for (size_t i = 0; i < nStmts; ++i) - { delete m_holder[i]; } + { + delete m_holder[i]; + } m_holder.clear(); } @@ -193,7 +195,9 @@ void Database::StopServer() m_pAsyncConn = NULL; for (size_t i = 0; i < m_pQueryConnections.size(); ++i) - { delete m_pQueryConnections[i]; } + { + delete m_pQueryConnections[i]; + } m_pQueryConnections.clear(); } diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp index 43de889e7..a8e2b2197 100644 --- a/src/shared/Database/DatabaseMysql.cpp +++ b/src/shared/Database/DatabaseMysql.cpp @@ -268,7 +268,9 @@ QueryNamedResult* MySQLConnection::QueryNamed(const char* sql) QueryFieldNames names(fieldCount); for (uint32 i = 0; i < fieldCount; ++i) - { names[i] = fields[i].name; } + { + names[i] = fields[i].name; + } QueryResultMysql* queryResult = new QueryResultMysql(result, fields, rowCount, fieldCount); diff --git a/src/shared/Database/DatabasePostgre.cpp b/src/shared/Database/DatabasePostgre.cpp index 9b167ed69..d61213b75 100644 --- a/src/shared/Database/DatabasePostgre.cpp +++ b/src/shared/Database/DatabasePostgre.cpp @@ -196,7 +196,9 @@ QueryNamedResult* PostgreSQLConnection::QueryNamed(const char* sql) QueryFieldNames names(fieldCount); for (uint32 i = 0; i < fieldCount; ++i) - { names[i] = PQfname(result, i); } + { + names[i] = PQfname(result, i); + } QueryResultPostgre* queryResult = new QueryResultPostgre(result, rowCount, fieldCount); diff --git a/src/shared/Database/QueryResultMysql.cpp b/src/shared/Database/QueryResultMysql.cpp index 5ce78749b..9d9f288cd 100644 --- a/src/shared/Database/QueryResultMysql.cpp +++ b/src/shared/Database/QueryResultMysql.cpp @@ -61,7 +61,9 @@ bool QueryResultMysql::NextRow() } for (uint32 i = 0; i < mFieldCount; ++i) - { mCurrentRow[i].SetValue(row[i]); } + { + mCurrentRow[i].SetValue(row[i]); + } return true; } diff --git a/src/shared/Database/QueryResultPostgre.cpp b/src/shared/Database/QueryResultPostgre.cpp index 744e33b36..13b5aef18 100644 --- a/src/shared/Database/QueryResultPostgre.cpp +++ b/src/shared/Database/QueryResultPostgre.cpp @@ -34,7 +34,9 @@ QueryResultPostgre::QueryResultPostgre(PGresult* result, uint64 rowCount, uint32 MANGOS_ASSERT(mCurrentRow); for (uint32 i = 0; i < mFieldCount; ++i) - { mCurrentRow[i].SetType(ConvertNativeType(PQftype(result, i))); } + { + mCurrentRow[i].SetType(ConvertNativeType(PQftype(result, i))); + } } QueryResultPostgre::~QueryResultPostgre() diff --git a/src/shared/Database/SQLStorage.cpp b/src/shared/Database/SQLStorage.cpp index f386be43c..402841f15 100644 --- a/src/shared/Database/SQLStorage.cpp +++ b/src/shared/Database/SQLStorage.cpp @@ -90,7 +90,9 @@ void SQLStorageBase::Free() case DBC_FF_STRING: { for (uint32 recordItr = 0; recordItr < m_recordCount; ++recordItr) - { delete[] *(char**)((char*)(m_data + (recordItr * m_recordSize)) + offset); } + { + delete[] *(char**)((char*)(m_data + (recordItr * m_recordSize)) + offset); + } offset += sizeof(char*); break; diff --git a/src/shared/Log/Log.cpp b/src/shared/Log/Log.cpp index 1bc8e6a0d..f6da80e53 100644 --- a/src/shared/Log/Log.cpp +++ b/src/shared/Log/Log.cpp @@ -111,7 +111,9 @@ void Log::InitColors(const std::string& str) } for (int i = 0; i < LogType_count; ++i) - { m_colors[i] = Color(color[i]); } + { + m_colors[i] = Color(color[i]); + } m_colored = true; } @@ -1169,7 +1171,9 @@ void Log::outWorldPacketDump(uint32 socket, uint32 opcode, char const* opcodeNam while (p < packet->size()) { for (size_t j = 0; j < 16 && p < packet->size(); ++j) - { fprintf(worldLogfile, "%.2X ", (*packet)[p++]); } + { + fprintf(worldLogfile, "%.2X ", (*packet)[p++]); + } fprintf(worldLogfile, "\n"); } diff --git a/src/shared/Threading/Threading.cpp b/src/shared/Threading/Threading.cpp index b7566e676..63e5f3d87 100644 --- a/src/shared/Threading/Threading.cpp +++ b/src/shared/Threading/Threading.cpp @@ -33,7 +33,9 @@ using namespace ACE_Based; ThreadPriority::ThreadPriority() { for (int i = Idle; i < MAXPRIORITYNUM; ++i) - { m_priority[i] = ACE_THR_PRI_OTHER_DEF; } + { + m_priority[i] = ACE_THR_PRI_OTHER_DEF; + } m_priority[Idle] = ACE_Sched_Params::priority_min(ACE_SCHED_OTHER); m_priority[Realtime] = ACE_Sched_Params::priority_max(ACE_SCHED_OTHER); diff --git a/src/shared/Utilities/ProgressBar.cpp b/src/shared/Utilities/ProgressBar.cpp index cb51df37c..e9754b87e 100644 --- a/src/shared/Utilities/ProgressBar.cpp +++ b/src/shared/Utilities/ProgressBar.cpp @@ -69,7 +69,10 @@ void BarGoLink::init(int row_count) #else printf("["); #endif - for (int i = 0; i < indic_len; ++i) { printf(empty); } + for (int i = 0; i < indic_len; ++i) + { + printf(empty); + } #ifdef _WIN32 printf("\x3D 0%%\r\x3D"); #else @@ -100,8 +103,14 @@ void BarGoLink::step() #else printf("\r["); #endif - for (i = 0; i < n; ++i) { printf(full); } - for (; i < indic_len; ++i) { printf(empty); } + for (i = 0; i < n; ++i) + { + printf(full); + } + for (; i < indic_len; ++i) + { + printf(empty); + } float percent = (((float)n / (float)indic_len) * 100); #ifdef _WIN32 printf("\x3D %i%% \r\x3D", (int)percent); diff --git a/src/shared/Win/WheatyExceptionReport.cpp b/src/shared/Win/WheatyExceptionReport.cpp index 44f822060..0a569e6b3 100644 --- a/src/shared/Win/WheatyExceptionReport.cpp +++ b/src/shared/Win/WheatyExceptionReport.cpp @@ -830,7 +830,9 @@ char* WheatyExceptionReport::DumpTypeIndex( { // Add appropriate indentation level (since this routine is recursive) for (unsigned j = 0; j <= nestingLevel + 1; ++j) - { pszCurrBuffer += sprintf(pszCurrBuffer, "\t"); } + { + pszCurrBuffer += sprintf(pszCurrBuffer, "\t"); + } // Recurse for each of the child types bool bHandled2; diff --git a/src/tools/Extractor_projects/Movemap-Generator/IntermediateValues.cpp b/src/tools/Extractor_projects/Movemap-Generator/IntermediateValues.cpp index dcbb2e4c7..03c9bdc9c 100644 --- a/src/tools/Extractor_projects/Movemap-Generator/IntermediateValues.cpp +++ b/src/tools/Extractor_projects/Movemap-Generator/IntermediateValues.cpp @@ -273,10 +273,14 @@ namespace MMAP int triCount = allTris.size() / 3; for (int i = 0; i < allVerts.size() / 3; i++) - { fprintf(objFile, "v %f %f %f\n", verts[i * 3], verts[i * 3 + 1], verts[i * 3 + 2]); } + { + fprintf(objFile, "v %f %f %f\n", verts[i * 3], verts[i * 3 + 1], verts[i * 3 + 2]); + } for (int i = 0; i < allTris.size() / 3; i++) - { fprintf(objFile, "f %i %i %i\n", tris[i * 3] + 1, tris[i * 3 + 1] + 1, tris[i * 3 + 2] + 1); } + { + fprintf(objFile, "f %i %i %i\n", tris[i * 3] + 1, tris[i * 3 + 1] + 1, tris[i * 3 + 2] + 1); + } fclose(objFile); diff --git a/src/tools/Extractor_projects/Movemap-Generator/MapBuilder.cpp b/src/tools/Extractor_projects/Movemap-Generator/MapBuilder.cpp index 9804c107f..b4b46884c 100644 --- a/src/tools/Extractor_projects/Movemap-Generator/MapBuilder.cpp +++ b/src/tools/Extractor_projects/Movemap-Generator/MapBuilder.cpp @@ -194,7 +194,9 @@ namespace MMAP // add all tiles within bounds to tile list. for (uint32 i = minX; i <= maxX; ++i) for (uint32 j = minY; j <= maxY; ++j) - { tiles->insert(StaticMapTree::packTileID(i, j)); } + { + tiles->insert(StaticMapTree::packTileID(i, j)); + } } if (!tiles->size()) diff --git a/src/tools/Extractor_projects/Movemap-Generator/TerrainBuilder.cpp b/src/tools/Extractor_projects/Movemap-Generator/TerrainBuilder.cpp index 8f5b45358..ddf661311 100644 --- a/src/tools/Extractor_projects/Movemap-Generator/TerrainBuilder.cpp +++ b/src/tools/Extractor_projects/Movemap-Generator/TerrainBuilder.cpp @@ -142,10 +142,14 @@ namespace MMAP heightMultiplier = (hheader.gridMaxHeight - hheader.gridHeight) / 255; for (i = 0; i < V9_SIZE_SQ; ++i) - { V9[i] = (float)v9[i] * heightMultiplier + hheader.gridHeight; } + { + V9[i] = (float)v9[i] * heightMultiplier + hheader.gridHeight; + } for (i = 0; i < V8_SIZE_SQ; ++i) - { V8[i] = (float)v8[i] * heightMultiplier + hheader.gridHeight; } + { + V8[i] = (float)v8[i] * heightMultiplier + hheader.gridHeight; + } } else if (hheader.flags & MAP_HEIGHT_AS_INT16) { @@ -156,10 +160,14 @@ namespace MMAP heightMultiplier = (hheader.gridMaxHeight - hheader.gridHeight) / 65535; for (i = 0; i < V9_SIZE_SQ; ++i) - { V9[i] = (float)v9[i] * heightMultiplier + hheader.gridHeight; } + { + V9[i] = (float)v9[i] * heightMultiplier + hheader.gridHeight; + } for (i = 0; i < V8_SIZE_SQ; ++i) - { V8[i] = (float)v8[i] * heightMultiplier + hheader.gridHeight; } + { + V8[i] = (float)v8[i] * heightMultiplier + hheader.gridHeight; + } } else { @@ -456,12 +464,16 @@ namespace MMAP { meshData.liquidType.append(liquidType); for (int k = 0; k < 3; ++k) - { meshData.liquidTris.append(ltris[k]); } + { + meshData.liquidTris.append(ltris[k]); + } } if (useTerrain) for (int k = 0; k < 3 * tTriCount / 2; ++k) - { meshData.solidTris.append(ttris[k]); } + { + meshData.solidTris.append(ttris[k]); + } // advance to next set of triangles ltris += 3; @@ -729,7 +741,9 @@ namespace MMAP uint32 liqOffset = meshData.liquidVerts.size() / 3; for (uint32 i = 0; i < liqVerts.size(); ++i) - { meshData.liquidVerts.append(liqVerts[i].y, liqVerts[i].z, liqVerts[i].x); } + { + meshData.liquidVerts.append(liqVerts[i].y, liqVerts[i].z, liqVerts[i].x); + } for (uint32 i = 0; i < liqTris.size() / 3; ++i) { @@ -800,7 +814,9 @@ namespace MMAP { int* src = source.getCArray(); for (int32 i = 0; i < source.size(); ++i) - { dest.append(src[i] + offset); } + { + dest.append(src[i] + offset); + } } /**************************************************************************/ diff --git a/src/tools/Extractor_projects/map-extractor/System.cpp b/src/tools/Extractor_projects/map-extractor/System.cpp index 8c2cf193f..45077b34f 100644 --- a/src/tools/Extractor_projects/map-extractor/System.cpp +++ b/src/tools/Extractor_projects/map-extractor/System.cpp @@ -350,7 +350,9 @@ void ReadAreaTableDBC(int const locale) memset(areas, 0xff, (maxid + 1) * sizeof(uint16)); for (uint32 x = 0; x < area_count; ++x) - { areas[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); } + { + areas[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); + } maxAreaId = dbc.getMaxId(); @@ -387,7 +389,9 @@ void ReadLiquidTypeTableDBC(int const locale) memset(LiqType, 0xff, (LiqType_maxid + 1) * sizeof(uint16)); for (uint32 x = 0; x < LiqType_count; ++x) - { LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); } + { + LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); + } printf(" Success! %lu liquid types loaded.\n", LiqType_count); } @@ -777,20 +781,28 @@ bool ConvertADT(char* filename, char* filename2, int cell_y, int cell_x, uint32 { for (int y = 0; y < ADT_GRID_SIZE; y++) for (int x = 0; x < ADT_GRID_SIZE; x++) - { uint8_V8[y][x] = uint8((V8[y][x] - minHeight) * step + 0.5f); } + { + uint8_V8[y][x] = uint8((V8[y][x] - minHeight) * step + 0.5f); + } for (int y = 0; y <= ADT_GRID_SIZE; y++) for (int x = 0; x <= ADT_GRID_SIZE; x++) - { uint8_V9[y][x] = uint8((V9[y][x] - minHeight) * step + 0.5f); } + { + uint8_V9[y][x] = uint8((V9[y][x] - minHeight) * step + 0.5f); + } map.heightMapSize += sizeof(uint8_V9) + sizeof(uint8_V8); } else if (heightHeader.flags & MAP_HEIGHT_AS_INT16) { for (int y = 0; y < ADT_GRID_SIZE; y++) for (int x = 0; x < ADT_GRID_SIZE; x++) - { uint16_V8[y][x] = uint16((V8[y][x] - minHeight) * step + 0.5f); } + { + uint16_V8[y][x] = uint16((V8[y][x] - minHeight) * step + 0.5f); + } for (int y = 0; y <= ADT_GRID_SIZE; y++) for (int x = 0; x <= ADT_GRID_SIZE; x++) - { uint16_V9[y][x] = uint16((V9[y][x] - minHeight) * step + 0.5f); } + { + uint16_V9[y][x] = uint16((V9[y][x] - minHeight) * step + 0.5f); + } map.heightMapSize += sizeof(uint16_V9) + sizeof(uint16_V8); } else @@ -1137,7 +1149,9 @@ bool ConvertADT(char* filename, char* filename2, int cell_y, int cell_x, uint32 if (!(liquidHeader.flags & MAP_LIQUID_NO_HEIGHT)) { for (int y = 0; y < liquidHeader.height; y++) - { fwrite(&liquid_height[y + liquidHeader.offsetY][liquidHeader.offsetX], sizeof(float), liquidHeader.width, output); } + { + fwrite(&liquid_height[y + liquidHeader.offsetY][liquidHeader.offsetX], sizeof(float), liquidHeader.width, output); + } } } diff --git a/src/tools/Extractor_projects/vmap-extractor/vmapexport.cpp b/src/tools/Extractor_projects/vmap-extractor/vmapexport.cpp index 24373388b..3d09c5ee3 100644 --- a/src/tools/Extractor_projects/vmap-extractor/vmapexport.cpp +++ b/src/tools/Extractor_projects/vmap-extractor/vmapexport.cpp @@ -440,7 +440,9 @@ void ParsMapFiles() { printf(" Warning: Some models could not be extracted, see below\n"); for (StringSet::const_iterator itr = failedPaths.begin(); itr != failedPaths.end(); ++itr) - { printf("Could not find file of model %s\n", itr->c_str()); } + { + printf("Could not find file of model %s\n", itr->c_str()); + } printf(" A few not found models can be expected and are not alarming.\n"); } } diff --git a/src/tools/Extractor_projects/vmap-extractor/wmo.cpp b/src/tools/Extractor_projects/vmap-extractor/wmo.cpp index eb614351e..48dc2fa11 100644 --- a/src/tools/Extractor_projects/vmap-extractor/wmo.cpp +++ b/src/tools/Extractor_projects/vmap-extractor/wmo.cpp @@ -486,7 +486,9 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE* output, WMORoot* rootWMO, bool pPrecis fwrite(hlq, sizeof(WMOLiquidHeader), 1, output); // only need height values, the other values are unknown anyway for (uint32 i = 0; i < LiquEx_size / sizeof(WMOLiquidVert); ++i) - { fwrite(&LiquEx[i].height, sizeof(float), 1, output); } + { + fwrite(&LiquEx[i].height, sizeof(float), 1, output); + } // todo: compress to bit field fwrite(LiquBytes, 1, hlq->xtiles * hlq->ytiles, output); }