diff options
| author | Spp <spp@jorge.gr> | 2011-09-29 12:43:05 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2011-09-29 12:43:05 +0200 |
| commit | b16d2245bbd374805d15cdca585e8b42bf139605 (patch) | |
| tree | b7b63c567112e1999a2566611363cf5e83adb1be /src/server/game | |
| parent | 8b820baa7324d41df264f48e344d62584bff70f8 (diff) | |
Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces
Note: Only affects files with extension "cpp" and "h" under /src/server
Diffstat (limited to 'src/server/game')
97 files changed, 450 insertions, 450 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index e11be0612a2..8397ad7954e 100755 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -131,7 +131,7 @@ void UnitAI::DoCast(uint32 spellId) { Unit* target = NULL; //sLog->outError("aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target); - switch(AISpellInfo[spellId].target) + switch (AISpellInfo[spellId].target) { default: case AITARGET_SELF: target = me; break; diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 8485559c7fa..4fdedea414a 100755 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -49,7 +49,7 @@ enum SelectAggroTarget }; // default predicate function to select target based on distance, player and/or aura criteria -struct DefaultTargetSelector : public std::unary_function<Unit* , bool> +struct DefaultTargetSelector : public std::unary_function<Unit*, bool> { const Unit* me; float m_dist; @@ -152,7 +152,7 @@ class UnitAI Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0); // Select the targets satifying the predicate. - // predicate shall extend std::unary_function<Unit* , bool> + // predicate shall extend std::unary_function<Unit*, bool> template <class PREDICATE> Unit* SelectTarget(SelectAggroTarget targetType, uint32 position, PREDICATE const& predicate) { const std::list<HostileReference*>& threatlist = me->getThreatManager().getThreatList(); @@ -202,7 +202,7 @@ class UnitAI void SelectTargetList(std::list<Unit*>& targetList, uint32 num, SelectAggroTarget targetType, float dist = 0.0f, bool playerOnly = false, int32 aura = 0); // Select the targets satifying the predicate. - // predicate shall extend std::unary_function<Unit* , bool> + // predicate shall extend std::unary_function<Unit*, bool> template <class PREDICATE> void SelectTargetList(std::list<Unit*>& targetList, PREDICATE const& predicate, uint32 maxTargets, SelectAggroTarget targetType) { std::list<HostileReference*> const& threatlist = me->getThreatManager().getThreatList(); diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index 27807283edc..62d7a1f4f58 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -1272,7 +1272,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", textEntry, source->GetTypeId()); } - switch((*i).second.Type) + switch ((*i).second.Type) { case CHAT_TYPE_SAY: source->MonsterSay(textEntry, (*i).second.Language, target ? target->GetGUID() : 0); diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp index 72828ad01d6..c27613f320f 100755 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp @@ -278,7 +278,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_SPAWNED: - switch(temp.spawned.condition) + switch (temp.spawned.condition) { case SPAWNED_EVENT_ALWAY: break; diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index ecdae923a9d..305821095fa 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -436,7 +436,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(uint32 const diff) float y = me->GetPositionY(); float z = me->GetPositionZ(); - switch(me->GetEntry()) + switch (me->GetEntry()) { case NPC_BROODLORD: // broodlord (not move down stairs) if (z > 448.60f) @@ -457,7 +457,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(uint32 const diff) default: // For most of creatures that certain area is their home area. sLog->outDetail("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition. Using the default one.", me->GetEntry()); uint32 homeAreaId = me->GetMap()->GetAreaId(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY(), me->GetHomePosition().GetPositionZ()); - if(me->GetAreaId() == homeAreaId) + if (me->GetAreaId() == homeAreaId) return false; } diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h index 9bf602d499d..5d376be888e 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h +++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h @@ -82,7 +82,7 @@ enum eTradeskill #define ADD_GOSSIP_ITEM(a, b, c, d) PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, a, b, c, d, "", 0) #define ADD_GOSSIP_ITEM_EXTENDED(a, b, c, d, e, f, g) PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, a, b, c, d, e, f, g) -// This fuction Sends the current menu to show to client, a - NPCTEXTID(uint32) , b - npc guid(uint64) +// This fuction Sends the current menu to show to client, a - NPCTEXTID(uint32), b - npc guid(uint64) #define SEND_GOSSIP_MENU(a, b) PlayerTalkClass->SendGossipMenu(a, b) // Closes the Menu diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 2b3f3dd7305..72dbb4baff7 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -843,7 +843,7 @@ void SmartGameObjectAI::Reset() bool SmartGameObjectAI::GossipHello(Player* player) { sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartGameObjectAI::GossipHello"); - GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, 0 , 0 , false, NULL, go); + GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, 0, 0, false, NULL, go); return false; } @@ -863,14 +863,14 @@ bool SmartGameObjectAI::GossipSelectCode(Player* /*player*/, uint32 /*sender*/, // Called when a player accepts a quest from the gameobject. bool SmartGameObjectAI::QuestAccept(Player* player, Quest const* quest) { - GetScript()->ProcessEventsFor(SMART_EVENT_ACCEPTED_QUEST, player, quest->GetQuestId() , 0 , false, NULL, go); + GetScript()->ProcessEventsFor(SMART_EVENT_ACCEPTED_QUEST, player, quest->GetQuestId(), 0, false, NULL, go); return false; } // Called when a player selects a quest reward. bool SmartGameObjectAI::QuestReward(Player* player, Quest const* quest, uint32 opt) { - GetScript()->ProcessEventsFor(SMART_EVENT_REWARD_QUEST, player, quest->GetQuestId() , opt , false, NULL, go); + GetScript()->ProcessEventsFor(SMART_EVENT_REWARD_QUEST, player, quest->GetQuestId(), opt, false, NULL, go); return false; } @@ -880,7 +880,7 @@ uint32 SmartGameObjectAI::GetDialogStatus(Player* /*player*/) { return 100; } // Called when the gameobject is destroyed (destructible buildings only). void SmartGameObjectAI::Destroyed(Player* player, uint32 eventId) { - GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, player, eventId , 0 , false, NULL, go); + GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, player, eventId, 0, false, NULL, go); } void SmartGameObjectAI::SetData(uint32 id, uint32 value) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 854e155c148..b17e2e4736e 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -460,7 +460,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (IsPlayer(*itr)) { (*itr)->ToPlayer()->CastedCreatureOrGO(e.action.castedCreatureOrGO.creature, GetBaseObject()->GetGUID(), e.action.castedCreatureOrGO.spell); - sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SEND_CASTCREATUREORGO: Player guidLow %u.org Creature: %u, BaseObject GUID: "UI64FMTD" , Spell: %u", + sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SEND_CASTCREATUREORGO: Player guidLow %u.org Creature: %u, BaseObject GUID: "UI64FMTD", Spell: %u", (*itr)->GetGUIDLow(), e.action.castedCreatureOrGO.creature, GetBaseObject()->GetGUID(), e.action.castedCreatureOrGO.spell); } } @@ -1309,7 +1309,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u bool run = e.action.setRun.run ? true : false; CAST_AI(SmartAI, me->AI())->SetRun(run); - me->GetMotionMaster()->MovePoint(0, e.target.x, e.target.y , e.target.z); + me->GetMotionMaster()->MovePoint(0, e.target.x, e.target.y, e.target.z); break; } case SMART_ACTION_RESPAWN_TARGET: @@ -1781,7 +1781,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } case SMART_ACTION_JUMP_TO_POS: { - me->GetMotionMaster()->MoveJump(e.target.x, e.target.y , e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz); + me->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz); break; } default: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index f03e278a133..fab2a6b7722 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -123,7 +123,7 @@ void SmartAIMgr::LoadSmartAIFromDB() } if (temp.entryOrGuid >= 0) { - switch(source_type) + switch (source_type) { case SMART_SCRIPT_TYPE_CREATURE: { diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index b16c2223d25..bfc8c956eb6 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -1600,7 +1600,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui } } -static const uint32 achievIdByClass[MAX_CLASSES] = { 0, 459, 465 , 462, 458, 464, 461, 467, 460, 463, 0, 466 }; +static const uint32 achievIdByClass[MAX_CLASSES] = { 0, 459, 465, 462, 458, 464, 461, 467, 460, 463, 0, 466 }; static const uint32 achievIdByRace[MAX_RACES] = { 0, 1408, 1410, 1407, 1409, 1413, 1411, 1404, 1412, 0, 1405, 1406 }; bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achievementCriteria, AchievementEntry const* achievement) @@ -2039,9 +2039,9 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement) return; // titles - //! Currently there's only one achievement that deals with gender-specific titles. + //! Currently there's only one achievement that deals with gender-specific titles. //! Since no common attributes were found, (not even in titleRewardFlags field) - //! we explicitly check by ID. Maybe in the future we could move the achievement_reward + //! we explicitly check by ID. Maybe in the future we could move the achievement_reward //! condition fields to the condition system. if (uint32 titleId = reward->titleId[achievement->ID == 1793 ? GetPlayer()->getGender() : (GetPlayer()->GetTeam() == ALLIANCE ? 0 : 1)]) if (CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId)) diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index a5feac09ea4..445c5c26bd6 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -255,7 +255,7 @@ void Battleground::Update(uint32 diff) return; } - switch(GetStatus()) + switch (GetStatus()) { case STATUS_WAIT_JOIN: if (GetPlayersSize()) @@ -890,7 +890,7 @@ uint32 Battleground::GetBonusHonorFromKill(uint32 kills) const uint32 Battleground::GetBattlemasterEntry() const { - switch(GetTypeID(true)) + switch (GetTypeID(true)) { case BATTLEGROUND_AV: return 15972; case BATTLEGROUND_WS: return 14623; diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 86a9511bcf8..43b315c3928 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -203,7 +203,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battlegro *data << uint8(bg->isRated()); // 1 for rated match, 0 for bg or non rated match *data << uint32(StatusID); // status - switch(StatusID) + switch (StatusID) { case STATUS_WAIT_QUEUE: // status_in_queue *data << uint32(Time1); // average wait time, milliseconds @@ -300,10 +300,10 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg) } *data << uint32(itr2->second->DamageDone); // damage done *data << uint32(itr2->second->HealingDone); // healing done - switch(bg->GetTypeID(true)) // battleground specific things + switch (bg->GetTypeID(true)) // battleground specific things { case BATTLEGROUND_RB: - switch(bg->GetMapId()) + switch (bg->GetMapId()) { case 489: *data << uint32(0x00000002); // count of next fields @@ -554,7 +554,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId Battleground* bg = NULL; // create a copy of the BG template - switch(bgTypeId) + switch (bgTypeId) { case BATTLEGROUND_AV: bg = new BattlegroundAV(*(BattlegroundAV*)bg_template); @@ -863,7 +863,7 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid *data << uint32(*itr); ++count; } - data->put<uint32>(count_pos , count); + data->put<uint32>(count_pos, count); } } } @@ -913,7 +913,7 @@ bool BattlegroundMgr::IsArenaType(BattlegroundTypeId bgTypeId) BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgTypeId, uint8 arenaType) { - switch(bgTypeId) + switch (bgTypeId) { case BATTLEGROUND_WS: return BATTLEGROUND_QUEUE_WS; @@ -935,7 +935,7 @@ BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType case BATTLEGROUND_BE: case BATTLEGROUND_DS: case BATTLEGROUND_RV: - switch(arenaType) + switch (arenaType) { case ARENA_TYPE_2v2: return BATTLEGROUND_QUEUE_2v2; @@ -953,7 +953,7 @@ BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType BattlegroundTypeId BattlegroundMgr::BGTemplateId(BattlegroundQueueTypeId bgQueueTypeId) { - switch(bgQueueTypeId) + switch (bgQueueTypeId) { case BATTLEGROUND_QUEUE_WS: return BATTLEGROUND_WS; @@ -980,7 +980,7 @@ BattlegroundTypeId BattlegroundMgr::BGTemplateId(BattlegroundQueueTypeId bgQueue uint8 BattlegroundMgr::BGArenaType(BattlegroundQueueTypeId bgQueueTypeId) { - switch(bgQueueTypeId) + switch (bgQueueTypeId) { case BATTLEGROUND_QUEUE_2v2: return ARENA_TYPE_2v2; diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 9cd87bf4725..67cea3e7be1 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -805,7 +805,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId //this switch can be much shorter MaxPlayersPerTeam = arenaType; MinPlayersPerTeam = arenaType; - /*switch(arenaType) + /*switch (arenaType) { case ARENA_TYPE_2v2: MaxPlayersPerTeam = 2; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index efe8075a03e..a647a3c6299 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -618,9 +618,9 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node) //send a nice message to all :) char buf[256]; if (IsTower(node)) - sprintf(buf, GetTrinityString(LANG_BG_AV_TOWER_TAKEN) , GetNodeName(node), (owner == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) : GetTrinityString(LANG_BG_AV_HORDE)); + sprintf(buf, GetTrinityString(LANG_BG_AV_TOWER_TAKEN), GetNodeName(node), (owner == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) : GetTrinityString(LANG_BG_AV_HORDE)); else - sprintf(buf, GetTrinityString(LANG_BG_AV_GRAVE_TAKEN) , GetNodeName(node), (owner == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) :GetTrinityString(LANG_BG_AV_HORDE)); + sprintf(buf, GetTrinityString(LANG_BG_AV_GRAVE_TAKEN), GetNodeName(node), (owner == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) :GetTrinityString(LANG_BG_AV_HORDE)); Creature* creature = GetBGCreature(AV_CPLACE_HERALD); if (creature) @@ -1298,17 +1298,17 @@ bool BattlegroundAV::SetupBattleground() } } - if (!AddObject(BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE, BG_AV_OBJECTID_BANNER_SNOWFALL_N , BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][0], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][1], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][2], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3], 0, 0, sin(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), cos(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), RESPAWN_ONE_DAY)) + if (!AddObject(BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE, BG_AV_OBJECTID_BANNER_SNOWFALL_N, BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][0], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][1], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][2], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3], 0, 0, sin(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), cos(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), RESPAWN_ONE_DAY)) { sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!8"); return false; } for (uint8 i = 0; i < 4; i++) { - if (!AddObject(BG_AV_OBJECT_SNOW_EYECANDY_A+i, BG_AV_OBJECTID_SNOWFALL_CANDY_A , BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY) - || !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PA+i, BG_AV_OBJECTID_SNOWFALL_CANDY_PA , BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY) - || !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_H+i, BG_AV_OBJECTID_SNOWFALL_CANDY_H , BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY) - || !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PH+i, BG_AV_OBJECTID_SNOWFALL_CANDY_PH , BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY)) + if (!AddObject(BG_AV_OBJECT_SNOW_EYECANDY_A+i, BG_AV_OBJECTID_SNOWFALL_CANDY_A, BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY) + || !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PA+i, BG_AV_OBJECTID_SNOWFALL_CANDY_PA, BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY) + || !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_H+i, BG_AV_OBJECTID_SNOWFALL_CANDY_H, BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY) + || !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PH+i, BG_AV_OBJECTID_SNOWFALL_CANDY_PH, BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY)) { sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i); return false; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h index ff40739f83d..fdb81491771 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h @@ -48,7 +48,7 @@ enum BG_EY_WorldStates BLOOD_ELF_ALLIANCE_CONTROL = 2723, BLOOD_ELF_UNCONTROL = 2722, PROGRESS_BAR_PERCENT_GREY = 2720, //100 = empty (only grey), 0 = blue|red (no grey) - PROGRESS_BAR_STATUS = 2719, //50 init!, 48 ... hordak bere .. 33 .. 0 = full 100% hordacky , 100 = full alliance + PROGRESS_BAR_STATUS = 2719, //50 init!, 48 ... hordak bere .. 33 .. 0 = full 100% hordacky, 100 = full alliance PROGRESS_BAR_SHOW = 2718, //1 init, 0 druhy send - bez messagu, 1 = controlled aliance NETHERSTORM_FLAG = 2757, //set to 2 when flag is picked up, and to 1 if it is dropped diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 47c13d8f860..b00e8dac1d8 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -332,7 +332,7 @@ void BattlegroundIC::UpdatePlayerScore(Player* Source, uint32 type, uint32 value if (itr == m_PlayerScores.end()) // player not found... return; - switch(type) + switch (type) { case SCORE_BASES_ASSAULTED: ((BattlegroundICScore*)itr->second)->BasesAssaulted += value; @@ -642,7 +642,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture) sLog->outError("Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction); } - switch(nodePoint->gameobject_type) + switch (nodePoint->gameobject_type) { case BG_IC_GO_HANGAR_BANNER: // all the players on the stopped transport should be teleported out @@ -833,7 +833,7 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go) uint32 lang_entry = 0; - switch(go->GetEntry()) + switch (go->GetEntry()) { case GO_HORDE_GATE_1: lang_entry = LANG_BG_IC_NORTH_GATE_DESTROYED; @@ -940,7 +940,7 @@ Transport* BattlegroundIC::CreateTransport(uint32 goEntry, uint32 period) t->SetMap(GetBgMap()); for (uint8 i = 0; i < 5; i++) - t->AddNPCPassenger(0, (goEntry == GO_HORDE_GUNSHIP ? NPC_HORDE_GUNSHIP_CANNON : NPC_ALLIANCE_GUNSHIP_CANNON), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionX() : allianceGunshipPassengers[i].GetPositionX()) , (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionY() : allianceGunshipPassengers[i].GetPositionY()), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionZ() : allianceGunshipPassengers[i].GetPositionZ()), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetOrientation() : allianceGunshipPassengers[i].GetOrientation())); + t->AddNPCPassenger(0, (goEntry == GO_HORDE_GUNSHIP ? NPC_HORDE_GUNSHIP_CANNON : NPC_ALLIANCE_GUNSHIP_CANNON), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionX() : allianceGunshipPassengers[i].GetPositionX()), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionY() : allianceGunshipPassengers[i].GetPositionY()), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionZ() : allianceGunshipPassengers[i].GetPositionZ()), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetOrientation() : allianceGunshipPassengers[i].GetOrientation())); return t; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index ed8a271921d..efa91559ca6 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -911,7 +911,7 @@ class BattlegroundIC : public Battleground uint32 GetGateIDFromEntry(uint32 id) { uint32 i = 0; - switch(id) + switch (id) { case GO_HORDE_GATE_1: i = BG_IC_H_FRONT ;break; case GO_HORDE_GATE_2: i = BG_IC_H_WEST ;break; @@ -927,7 +927,7 @@ class BattlegroundIC : public Battleground { uint32 uws = 0; - switch(id) + switch (id) { case GO_HORDE_GATE_1: uws = (open ? BG_IC_GATE_FRONT_H_WS_OPEN : BG_IC_GATE_FRONT_H_WS_CLOSED); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 775467fecde..c214ac21068 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -201,13 +201,13 @@ bool BattlegroundSA::ResetObjs() } //Player may enter BEFORE we set up bG - lets update his worldstates anyway... - UpdateWorldState(BG_SA_RIGHT_GY_HORDE , GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_HORDE?1:0); - UpdateWorldState(BG_SA_LEFT_GY_HORDE , GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_HORDE?1:0); - UpdateWorldState(BG_SA_CENTER_GY_HORDE , GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_HORDE?1:0); + UpdateWorldState(BG_SA_RIGHT_GY_HORDE, GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_HORDE?1:0); + UpdateWorldState(BG_SA_LEFT_GY_HORDE, GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_HORDE?1:0); + UpdateWorldState(BG_SA_CENTER_GY_HORDE, GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_HORDE?1:0); - UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE , GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0); - UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE , GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0); - UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE , GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0); + UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0); + UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0); + UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE, GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0); if (Attackers == TEAM_ALLIANCE) { @@ -612,7 +612,7 @@ void BattlegroundSA::DestroyGate(Player* player, GameObject* go) UpdateWorldState(uws, GateStatus[i]); bool rewardHonor = true; gateDestroyed = true; - switch(i) + switch (i) { case BG_SA_GREEN_GATE: if (GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED) @@ -686,7 +686,7 @@ void BattlegroundSA::SendTime() void BattlegroundSA::EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) { - switch(target_obj->GetEntry()) + switch (target_obj->GetEntry()) { case 191307: case 191308: @@ -721,7 +721,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source) uint32 npc = 0; uint32 flag = 0; - switch(i) + switch (i) { case BG_SA_LEFT_CAPTURABLE_GY: flag = BG_SA_LEFT_FLAG; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h index 9d8325f2c6f..5f01d0fac4d 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h @@ -168,7 +168,7 @@ const float BG_SA_NpcSpawnlocs[BG_SA_MAXNPC + BG_SA_DEMOLISHER_AMOUNT][4] = { 1232.345f, -187.517f, 66.945f, 0.45f }, { 1249.634f, -224.189f, 66.72f, 0.635f }, { 1236.213f, 92.287f, 64.965f, 5.751f }, - { 1215.11f, 57.772f, 64.739f, 5.78f } , + { 1215.11f, 57.772f, 64.739f, 5.78f }, //Demolishers { 1611.597656f, -117.270073f, 8.719355f, 2.513274f}, { 1575.562500f, -158.421875f, 5.024450f, 2.129302f}, @@ -446,7 +446,7 @@ class BattlegroundSA : public Battleground uint32 GetGateIDFromDestroyEventID(uint32 id) { uint32 i = 0; - switch(id) + switch (id) { case 19046: i = BG_SA_GREEN_GATE; break; //Green gate destroyed case 19045: i = BG_SA_BLUE_GATE; break; //blue gate @@ -461,7 +461,7 @@ class BattlegroundSA : public Battleground uint32 GetWorldStateFromGateID(uint32 id) { uint32 uws = 0; - switch(id) + switch (id) { case BG_SA_GREEN_GATE: uws = BG_SA_GREEN_GATEWS; break; case BG_SA_YELLOW_GATE: uws = BG_SA_YELLOW_GATEWS; break; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index b34ab0997ac..951fe8f6b51 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -607,7 +607,7 @@ void BattlegroundWS::HandleAreaTrigger(Player* Source, uint32 Trigger) //uint32 SpellId = 0; //uint64 buff_guid = 0; - switch(Trigger) + switch (Trigger) { case 3686: // Alliance elixir of speed spawn. Trigger not working, because located inside other areatrigger, can be replaced by IsWithinDist(object, dist) in Battleground::Update(). //buff_guid = m_BgObjects[BG_WS_OBJECT_SPEEDBUFF_1]; @@ -761,7 +761,7 @@ void BattlegroundWS::UpdatePlayerScore(Player* Source, uint32 type, uint32 value if (itr == m_PlayerScores.end()) // player not found return; - switch(type) + switch (type) { case SCORE_FLAG_CAPTURES: // flags captured ((BattlegroundWGScore*)itr->second)->FlagCaptures += value; diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 91a9382b2e3..cd62d93c242 100755 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -986,7 +986,7 @@ void ChatHandler::FillMessageData(WorldPacket* data, WorldSession* session, uint else *data << uint32(LANG_UNIVERSAL); - switch(type) + switch (type) { case CHAT_MSG_SAY: case CHAT_MSG_PARTY: @@ -1287,7 +1287,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text) uint32 id = (uint32)atol(idS); - switch(type) + switch (type) { case SPELL_LINK_SPELL: return id; @@ -1367,7 +1367,7 @@ uint64 ChatHandler::extractGuidFromLink(char* text) if (!idS) return 0; - switch(type) + switch (type) { case SPELL_LINK_PLAYER: { diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp index 2055952a233..9e772e2cde7 100755 --- a/src/server/game/Chat/Commands/Level2.cpp +++ b/src/server/game/Chat/Commands/Level2.cpp @@ -373,7 +373,7 @@ bool ChatHandler::HandlePInfoCommand(const char* args) PSendSysMessage(LANG_PINFO_BAN, banTime > 0 ? secsToTimeString(banTime - time(NULL), true).c_str() : "permanently", bannedby.c_str(), banreason.c_str()); std::string race_s, Class_s; - switch(race) + switch (race) { case RACE_HUMAN: race_s = "Human"; break; case RACE_ORC: race_s = "Orc"; break; @@ -386,7 +386,7 @@ bool ChatHandler::HandlePInfoCommand(const char* args) case RACE_BLOODELF: race_s = "Blood Elf"; break; case RACE_DRAENEI: race_s = "Draenei"; break; } - switch(Class) + switch (Class) { case CLASS_WARRIOR: Class_s = "Warrior"; break; case CLASS_PALADIN: Class_s = "Paladin"; break; diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index 9a5edda8700..78fcd55278d 100755 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -1596,7 +1596,7 @@ bool ChatHandler::HandleLookupMapCommand(const char *args) if (MapInfo->IsContinent()) ss << GetTrinityString(LANG_CONTINENT); - switch(MapInfo->map_type) + switch (MapInfo->map_type) { case MAP_INSTANCE: ss << GetTrinityString(LANG_INSTANCE); break; case MAP_BATTLEGROUND: ss << GetTrinityString(LANG_BATTLEGROUND); break; @@ -2908,7 +2908,7 @@ bool ChatHandler::HandleBanHelper(BanMode mode, const char *args) if (!reason) return false; - switch(mode) + switch (mode) { case BAN_ACCOUNT: if (!AccountMgr::normalizeString(nameOrIP)) @@ -2932,7 +2932,7 @@ bool ChatHandler::HandleBanHelper(BanMode mode, const char *args) break; } - switch(sWorld->BanAccount(mode, nameOrIP, duration, reason, m_session ? m_session->GetPlayerName() : "")) + switch (sWorld->BanAccount(mode, nameOrIP, duration, reason, m_session ? m_session->GetPlayerName() : "")) { case BAN_SUCCESS: if (atoi(duration)>0) @@ -2943,7 +2943,7 @@ bool ChatHandler::HandleBanHelper(BanMode mode, const char *args) case BAN_SYNTAX_ERROR: return false; case BAN_NOTFOUND: - switch(mode) + switch (mode) { default: PSendSysMessage(LANG_BAN_NOTFOUND, "account", nameOrIP.c_str()); @@ -3016,7 +3016,7 @@ bool ChatHandler::HandleUnBanHelper(BanMode mode, const char *args) std::string nameOrIP = cnameOrIP; - switch(mode) + switch (mode) { case BAN_ACCOUNT: if (!AccountMgr::normalizeString(nameOrIP)) @@ -3569,7 +3569,7 @@ bool ChatHandler::HandlePDumpLoadCommand(const char *args) } } - switch(PlayerDumpReader().LoadDump(file, account_id, name, guid)) + switch (PlayerDumpReader().LoadDump(file, account_id, name, guid)) { case DUMP_SUCCESS: PSendSysMessage(LANG_COMMAND_IMPORT_SUCCESS); @@ -3630,7 +3630,7 @@ bool ChatHandler::HandlePDumpWriteCommand(const char *args) return false; } - switch(PlayerDumpWriter().WriteDump(file, uint32(guid))) + switch (PlayerDumpWriter().WriteDump(file, uint32(guid))) { case DUMP_SUCCESS: PSendSysMessage(LANG_COMMAND_EXPORT_SUCCESS); @@ -3673,7 +3673,7 @@ bool ChatHandler::HandleMovegensCommand(const char* /*args*/) SendSysMessage("Empty"); continue; } - switch(mg->GetMovementGeneratorType()) + switch (mg->GetMovementGeneratorType()) { case IDLE_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_IDLE); break; case RANDOM_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_RANDOM); break; @@ -3766,7 +3766,7 @@ bool ChatHandler::HandleServerPLimitCommand(const char *args) uint32 pLimit = sWorld->GetPlayerAmountLimit(); AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit(); char const* secName = ""; - switch(allowedAccountType) + switch (allowedAccountType) { case SEC_PLAYER: secName = "Player"; break; case SEC_MODERATOR: secName = "Moderator"; break; diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index e5a2460b1a6..6303181a44d 100755 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -519,7 +519,7 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat HostileReference* hostilRef = threatRefStatusChangeEvent->getReference(); - switch(threatRefStatusChangeEvent->getType()) + switch (threatRefStatusChangeEvent->getType()) { case UEV_THREAT_REF_THREAT_CHANGE: if ((getCurrentVictim() == hostilRef && threatRefStatusChangeEvent->getFValue()<0.0f) || diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 7e3b19336ee..bfefb3e4e76 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1213,7 +1213,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) return false; } - switch(cond->mConditionValue1) + switch (cond->mConditionValue1) { case SPELL_TARGET_TYPE_GAMEOBJECT: { diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index e2506a36f63..faa73cefb11 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -739,7 +739,7 @@ ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId) if (!mapEntry) return CONTENT_1_60; - switch(mapEntry->Expansion()) + switch (mapEntry->Expansion()) { default: return CONTENT_1_60; case 1: return CONTENT_61_70; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 2c7bfb3eb1d..e01acd2e03d 100755 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1056,7 +1056,7 @@ struct HolidaysEntry //uint32 holidayDescriptionId; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc) //char *textureFilename; // 51 m_textureFilename //uint32 priority; // 52 m_priority - //uint32 calendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk,1 = Darkmoon Festival, 2 = Yearly holiday) + //uint32 calendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) //uint32 flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) }; diff --git a/src/server/game/DungeonFinding/LFGGroupData.cpp b/src/server/game/DungeonFinding/LFGGroupData.cpp index 0691c6e1b40..e81b8bd1774 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.cpp +++ b/src/server/game/DungeonFinding/LFGGroupData.cpp @@ -30,7 +30,7 @@ LfgGroupData::~LfgGroupData() void LfgGroupData::SetState(LfgState state) { - switch(state) + switch (state) { case LFG_STATE_NONE: case LFG_STATE_DUNGEON: diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 7d2c02d6b23..d3a0c68a9e7 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -271,7 +271,7 @@ void LFGMgr::Update(uint32 diff) role &= ~ROLE_LEADER; int32 waitTime = -1; - switch(role) + switch (role) { case ROLE_NONE: // Should not happen - just in case waitTime = -1; @@ -514,7 +514,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon bool isDungeon = false; for (LfgDungeonSet::const_iterator it = dungeons.begin(); it != dungeons.end() && joinData.result == LFG_JOIN_OK; ++it) { - switch(GetDungeonType(*it)) + switch (GetDungeonType(*it)) { case LFG_TYPE_RANDOM: if (dungeons.size() > 1) // Only allow 1 random dungeon @@ -657,7 +657,7 @@ void LFGMgr::Leave(Player* plr, Group* grp /* = NULL*/) LfgState state = GetState(guid); sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Leave: [" UI64FMTD "]", guid); - switch(state) + switch (state) { case LFG_STATE_QUEUED: { @@ -904,7 +904,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) { LfgQueueInfoMap::const_iterator itOther = itFirst; ++itOther; - while(itOther != pqInfoMap.end() && itOther->second->dungeons.find(*itDungeon) != itOther->second->dungeons.end()) + while (itOther != pqInfoMap.end() && itOther->second->dungeons.find(*itDungeon) != itOther->second->dungeons.end()) ++itOther; if (itOther == pqInfoMap.end()) @@ -1358,7 +1358,7 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept) // Update timers uint8 role = GetRoles(pguid); role &= ~ROLE_LEADER; - switch(role) + switch (role) { case ROLE_DAMAGE: { diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp index e3e84c6a8a0..e9400f85d3b 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.cpp +++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp @@ -27,7 +27,7 @@ LfgPlayerData::~LfgPlayerData() void LfgPlayerData::SetState(LfgState state) { - switch(state) + switch (state) { case LFG_STATE_NONE: case LFG_STATE_DUNGEON: diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index bf0fd1ae214..7a86136b3a8 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -434,7 +434,7 @@ void Creature::Update(uint32 diff) m_vehicleKit->Reset(); } - switch(m_deathState) + switch (m_deathState) { case JUST_ALIVED: // Must not be called, see Creature::setDeathState JUST_ALIVED -> ALIVE promoting. @@ -674,7 +674,7 @@ void Creature::DoFleeToGetAssistance() UpdateSpeed(MOVE_RUN, false); if (!pCreature) - //SetFeared(true, getVictim()->GetGUID(), 0 , sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY)); + //SetFeared(true, getVictim()->GetGUID(), 0, sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY)); //TODO: use 31365 SetControlled(true, UNIT_STAT_FLEEING); else @@ -819,7 +819,7 @@ bool Creature::isCanTrainingOf(Player* pPlayer, bool msg) const return false; } - switch(GetCreatureInfo()->trainer_type) + switch (GetCreatureInfo()->trainer_type) { case TRAINER_TYPE_CLASS: if (pPlayer->getClass() != GetCreatureInfo()->trainer_class) @@ -827,7 +827,7 @@ bool Creature::isCanTrainingOf(Player* pPlayer, bool msg) const if (msg) { pPlayer->PlayerTalkClass->ClearMenus(); - switch(GetCreatureInfo()->trainer_class) + switch (GetCreatureInfo()->trainer_class) { case CLASS_DRUID: pPlayer->PlayerTalkClass->SendGossipMenu(4913, GetGUID()); break; case CLASS_HUNTER: pPlayer->PlayerTalkClass->SendGossipMenu(10090, GetGUID()); break; @@ -857,7 +857,7 @@ bool Creature::isCanTrainingOf(Player* pPlayer, bool msg) const if (msg) { pPlayer->PlayerTalkClass->ClearMenus(); - switch(GetCreatureInfo()->trainer_class) + switch (GetCreatureInfo()->trainer_class) { case RACE_DWARF: pPlayer->PlayerTalkClass->SendGossipMenu(5865, GetGUID()); break; case RACE_GNOME: pPlayer->PlayerTalkClass->SendGossipMenu(4881, GetGUID()); break; @@ -903,7 +903,7 @@ bool Creature::isCanInteractWithBattleMaster(Player* pPlayer, bool msg) const if (!pPlayer->GetBGAccessByLevel(bgTypeId)) { pPlayer->PlayerTalkClass->ClearMenus(); - switch(bgTypeId) + switch (bgTypeId) { case BATTLEGROUND_AV: pPlayer->PlayerTalkClass->SendGossipMenu(7616, GetGUID()); break; case BATTLEGROUND_WS: pPlayer->PlayerTalkClass->SendGossipMenu(7599, GetGUID()); break; diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index 27b0ba53b3d..b17606b83cc 100755 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -44,7 +44,7 @@ void TempSummon::Update(uint32 diff) UnSummon(); return; } - switch(m_type) + switch (m_type) { case TEMPSUMMON_MANUAL_DESPAWN: break; diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 1af59592eea..4ec77e38bcf 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -276,7 +276,7 @@ void GameObject::Update(uint32 diff) { case GO_NOT_READY: { - switch(GetGoType()) + switch (GetGoType()) { case GAMEOBJECT_TYPE_TRAP: { @@ -484,7 +484,7 @@ void GameObject::Update(uint32 diff) } case GO_ACTIVATED: { - switch(GetGoType()) + switch (GetGoType()) { case GAMEOBJECT_TYPE_DOOR: case GAMEOBJECT_TYPE_BUTTON: @@ -1537,7 +1537,7 @@ void GameObject::Use(Unit* user) GameObjectTemplate const* info = GetGOInfo(); if (info) { - switch(info->entry) + switch (info->entry) { case 179785: // Silverwing Flag // check if it's correct bg diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index ff0cf03c8b8..49230569498 100755 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -409,7 +409,7 @@ struct GameObjectTemplate // helpers bool IsDespawnAtAction() const { - switch(type) + switch (type) { case GAMEOBJECT_TYPE_CHEST: return chest.consumable; case GAMEOBJECT_TYPE_GOOBER: return goober.consumable; @@ -419,7 +419,7 @@ struct GameObjectTemplate uint32 GetLockId() const { - switch(type) + switch (type) { case GAMEOBJECT_TYPE_DOOR: return door.lockId; case GAMEOBJECT_TYPE_BUTTON: return button.lockId; @@ -438,7 +438,7 @@ struct GameObjectTemplate bool GetDespawnPossibility() const // despawn at targeting of cast? { - switch(type) + switch (type) { case GAMEOBJECT_TYPE_DOOR: return door.noDamageImmune; case GAMEOBJECT_TYPE_BUTTON: return button.noDamageImmune; @@ -452,7 +452,7 @@ struct GameObjectTemplate uint32 GetCharges() const // despawn at uses amount { - switch(type) + switch (type) { //case GAMEOBJECT_TYPE_TRAP: return trap.charges; case GAMEOBJECT_TYPE_GUARDPOST: return guardpost.charges; @@ -463,7 +463,7 @@ struct GameObjectTemplate uint32 GetLinkedGameObjectEntry() const { - switch(type) + switch (type) { case GAMEOBJECT_TYPE_CHEST: return chest.linkedTrapId; case GAMEOBJECT_TYPE_SPELL_FOCUS: return spellFocus.linkedTrapId; @@ -475,7 +475,7 @@ struct GameObjectTemplate uint32 GetAutoCloseTime() const { uint32 autoCloseTime = 0; - switch(type) + switch (type) { case GAMEOBJECT_TYPE_DOOR: autoCloseTime = door.autoCloseTime; break; case GAMEOBJECT_TYPE_BUTTON: autoCloseTime = button.autoCloseTime; break; @@ -490,7 +490,7 @@ struct GameObjectTemplate uint32 GetLootId() const { - switch(type) + switch (type) { case GAMEOBJECT_TYPE_CHEST: return chest.lootId; case GAMEOBJECT_TYPE_FISHINGHOLE: return fishinghole.lootId; @@ -500,7 +500,7 @@ struct GameObjectTemplate uint32 GetGossipMenuId() const { - switch(type) + switch (type) { case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.gossipID; case GAMEOBJECT_TYPE_GOOBER: return goober.gossipID; @@ -510,7 +510,7 @@ struct GameObjectTemplate uint32 GetEventScriptId() const { - switch(type) + switch (type) { case GAMEOBJECT_TYPE_GOOBER: return goober.eventId; case GAMEOBJECT_TYPE_CHEST: return chest.eventId; diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 1394b018df4..6ea9bf92dfe 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -173,10 +173,10 @@ bool ItemCanGoIntoBag(ItemTemplate const* pProto, ItemTemplate const* pBagProto) if (!pProto || !pBagProto) return false; - switch(pBagProto->Class) + switch (pBagProto->Class) { case ITEM_CLASS_CONTAINER: - switch(pBagProto->SubClass) + switch (pBagProto->SubClass) { case ITEM_SUBCLASS_CONTAINER: return true; @@ -216,7 +216,7 @@ bool ItemCanGoIntoBag(ItemTemplate const* pProto, ItemTemplate const* pBagProto) return false; } case ITEM_CLASS_QUIVER: - switch(pBagProto->SubClass) + switch (pBagProto->SubClass) { case ITEM_SUBCLASS_QUIVER: if (!(pProto->BagFamily & BAG_FAMILY_MASK_ARROWS)) @@ -1103,7 +1103,7 @@ bool ItemRequiredTarget::IsFitToRequirements(Unit* pUnitTarget) const if (pUnitTarget->GetEntry() != m_uiTargetEntry) return false; - switch(m_uiType) + switch (m_uiType) { case ITEM_TARGET_TYPE_CREATURE: return pUnitTarget->isAlive(); @@ -1145,7 +1145,7 @@ void Item::SetNotRefundable(Player* owner, bool changestate /*=true*/, SQLTransa // Following is not applicable in the trading procedure if (changestate) SetState(ITEM_CHANGED, owner); - + SetRefundRecipient(0); SetPaidMoney(0); SetPaidExtendedCost(0); diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index 7f7f1c4ae7f..4ed475e0545 100755 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -132,7 +132,7 @@ uint32 GenerateEnchSuffixFactor(uint32 item_id) return 0; uint32 suffixFactor; - switch(itemProto->InventoryType) + switch (itemProto->InventoryType) { // Items of that type don`t have points case INVTYPE_NON_EQUIP: diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h index 94c740de1f6..155673edbaa 100755 --- a/src/server/game/Entities/Item/ItemPrototype.h +++ b/src/server/game/Entities/Item/ItemPrototype.h @@ -527,7 +527,7 @@ const uint32 MaxItemSubclassValues[MAX_ITEM_CLASS] = inline uint8 ItemSubClassToDurabilityMultiplierId(uint32 ItemClass, uint32 ItemSubClass) { - switch(ItemClass) + switch (ItemClass) { case ITEM_CLASS_WEAPON: return ItemSubClass; case ITEM_CLASS_ARMOR: return ItemSubClass + 21; @@ -656,7 +656,7 @@ struct ItemTemplate // helpers bool CanChangeEquipStateInCombat() const { - switch(InventoryType) + switch (InventoryType) { case INVTYPE_RELIC: case INVTYPE_SHIELD: @@ -664,7 +664,7 @@ struct ItemTemplate return true; } - switch(Class) + switch (Class) { case ITEM_CLASS_WEAPON: case ITEM_CLASS_PROJECTILE: diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 7413ff221f1..7894abd3c59 100755 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -48,7 +48,7 @@ uint32 GuidHigh2TypeId(uint32 guid_hi) { - switch(guid_hi) + switch (guid_hi) { case HIGHGUID_ITEM: return TYPEID_ITEM; //case HIGHGUID_CONTAINER: return TYPEID_CONTAINER; HIGHGUID_CONTAINER == HIGHGUID_ITEM currently @@ -134,7 +134,7 @@ void Object::_Create(uint32 guidlow, uint32 entry, HighGuid guidhigh) uint64 guid = MAKE_NEW_GUID(guidlow, entry, guidhigh); SetUInt64Value(OBJECT_FIELD_GUID, guid); uint32 type = 0; - switch(m_objectType) + switch (m_objectType) { //case TYPEID_ITEM: type = 3; break; //case TYPEID_CONTAINER: type = 7; break; //+4 @@ -220,7 +220,7 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c // UPDATETYPE_CREATE_OBJECT2 for some gameobject types... if (isType(TYPEMASK_GAMEOBJECT)) { - switch(((GameObject*)this)->GetGoType()) + switch (((GameObject*)this)->GetGoType()) { case GAMEOBJECT_TYPE_TRAP: case GAMEOBJECT_TYPE_DUEL_ARBITER: @@ -430,7 +430,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const // 0x8 if (flags & UPDATEFLAG_LOWGUID) { - switch(GetTypeId()) + switch (GetTypeId()) { case TYPEID_OBJECT: case TYPEID_ITEM: @@ -895,7 +895,7 @@ void Object::SetUInt64Value(uint16 index, uint64 value) bool Object::AddUInt64Value(uint16 index, uint64 value) { - ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , true)); + ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true)); if (value && !*((uint64*)&(m_uint32Values[index]))) { m_uint32Values[index] = PAIR64_LOPART(value); @@ -917,7 +917,7 @@ bool Object::AddUInt64Value(uint16 index, uint64 value) bool Object::RemoveUInt64Value(uint16 index, uint64 value) { - ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , true)); + ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true)); if (value && *((uint64*)&(m_uint32Values[index])) == value) { m_uint32Values[index] = 0; @@ -2285,13 +2285,13 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction()); pet->setPowerType(POWER_MANA); - pet->SetUInt32Value(UNIT_NPC_FLAGS , 0); + pet->SetUInt32Value(UNIT_NPC_FLAGS, 0); pet->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); pet->InitStatsForLevel(getLevel()); SetMinion(pet, true); - switch(petType) + switch (petType) { case SUMMON_PET: // this enables pet details window (Shift+P) @@ -2309,7 +2309,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy map->Add(pet->ToCreature()); - switch(petType) + switch (petType) { case SUMMON_PET: pet->InitPetCreateSpells(); diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index ec2ec8f6edc..d27ea23ba7e 100755 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -151,38 +151,38 @@ class Object int32 GetInt32Value(uint16 index) const { - ASSERT(index < m_valuesCount || PrintIndexError(index , false)); + ASSERT(index < m_valuesCount || PrintIndexError(index, false)); return m_int32Values[index]; } uint32 GetUInt32Value(uint16 index) const { - ASSERT(index < m_valuesCount || PrintIndexError(index , false)); + ASSERT(index < m_valuesCount || PrintIndexError(index, false)); return m_uint32Values[index]; } uint64 GetUInt64Value(uint16 index) const { - ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , false)); + ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, false)); return *((uint64*)&(m_uint32Values[index])); } float GetFloatValue(uint16 index) const { - ASSERT(index < m_valuesCount || PrintIndexError(index , false)); + ASSERT(index < m_valuesCount || PrintIndexError(index, false)); return m_floatValues[index]; } uint8 GetByteValue(uint16 index, uint8 offset) const { - ASSERT(index < m_valuesCount || PrintIndexError(index , false)); + ASSERT(index < m_valuesCount || PrintIndexError(index, false)); ASSERT(offset < 4); return *(((uint8*)&m_uint32Values[index])+offset); } uint16 GetUInt16Value(uint16 index, uint8 offset) const { - ASSERT(index < m_valuesCount || PrintIndexError(index , false)); + ASSERT(index < m_valuesCount || PrintIndexError(index, false)); ASSERT(offset < 2); return *(((uint16*)&m_uint32Values[index])+offset); } @@ -227,7 +227,7 @@ class Object bool HasFlag(uint16 index, uint32 flag) const { - if (index >= m_valuesCount && !PrintIndexError(index , false)) return false; + if (index >= m_valuesCount && !PrintIndexError(index, false)) return false; return (m_uint32Values[index] & flag) != 0; } @@ -244,7 +244,7 @@ class Object bool HasByteFlag(uint16 index, uint8 offset, uint8 flag) const { - ASSERT(index < m_valuesCount || PrintIndexError(index , false)); + ASSERT(index < m_valuesCount || PrintIndexError(index, false)); ASSERT(offset < 4); return (((uint8*)&m_uint32Values[index])[offset] & flag) != 0; } @@ -278,7 +278,7 @@ class Object bool HasFlag64(uint16 index, uint64 flag) const { - ASSERT(index < m_valuesCount || PrintIndexError(index , false)); + ASSERT(index < m_valuesCount || PrintIndexError(index, false)); return (GetUInt64Value(index) & flag) != 0; } @@ -294,7 +294,7 @@ class Object virtual bool hasQuest(uint32 /* quest_id */) const { return false; } virtual bool hasInvolvedQuest(uint32 /* quest_id */) const { return false; } virtual void BuildUpdate(UpdateDataMapType&) {} - void BuildFieldsUpdate(Player* , UpdateDataMapType &) const; + void BuildFieldsUpdate(Player*, UpdateDataMapType &) const; // FG: some hacky helpers void ForceValuesUpdateAtIndex(uint32); diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h index 6dd04e1dee4..4108063bfb3 100755 --- a/src/server/game/Entities/Object/ObjectDefines.h +++ b/src/server/game/Entities/Object/ObjectDefines.h @@ -80,7 +80,7 @@ enum HighGuid inline bool IsGuidHaveEnPart(uint64 guid) { - switch(GUID_HIPART(guid)) + switch (GUID_HIPART(guid)) { case HIGHGUID_ITEM: case HIGHGUID_PLAYER: @@ -104,7 +104,7 @@ inline bool IsGuidHaveEnPart(uint64 guid) inline char const* GetLogNameForGuid(uint64 guid) { - switch(GUID_HIPART(guid)) + switch (GUID_HIPART(guid)) { case HIGHGUID_ITEM: return "item"; case HIGHGUID_PLAYER: return guid ? "player" : "none"; diff --git a/src/server/game/Entities/Object/ObjectPosSelector.cpp b/src/server/game/Entities/Object/ObjectPosSelector.cpp index e90e21eb2df..c322c35ef81 100755 --- a/src/server/game/Entities/Object/ObjectPosSelector.cpp +++ b/src/server/game/Entities/Object/ObjectPosSelector.cpp @@ -85,7 +85,7 @@ bool ObjectPosSelector::FirstAngle(float& angle) bool ObjectPosSelector::NextAngle(float& angle) { - while(m_nextUsedPos[USED_POS_PLUS]!=m_UsedPosLists[USED_POS_PLUS].end() || + while (m_nextUsedPos[USED_POS_PLUS]!=m_UsedPosLists[USED_POS_PLUS].end() || m_nextUsedPos[USED_POS_MINUS]!=m_UsedPosLists[USED_POS_MINUS].end() || m_smallStepOk[USED_POS_PLUS] || m_smallStepOk[USED_POS_MINUS] ) { @@ -99,7 +99,7 @@ bool ObjectPosSelector::NextAngle(float& angle) bool ObjectPosSelector::NextUsedAngle(float& angle) { - while(m_nextUsedPos[USED_POS_PLUS]!=m_UsedPosLists[USED_POS_PLUS].end() || + while (m_nextUsedPos[USED_POS_PLUS]!=m_UsedPosLists[USED_POS_PLUS].end() || m_nextUsedPos[USED_POS_MINUS]!=m_UsedPosLists[USED_POS_MINUS].end() ) { // calculate next possible angle diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 2a151f50064..25a66206663 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -483,7 +483,7 @@ void Pet::Update(uint32 diff) if (m_loading) return; - switch(m_deathState) + switch (m_deathState) { case CORPSE: { diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9b4b8b8251e..579a704bd83 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -151,7 +151,7 @@ PlayerTaxi::PlayerTaxi() void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level) { // class specific initial known nodes - switch(chrClass) + switch (chrClass) { case CLASS_DEATH_KNIGHT: { @@ -162,7 +162,7 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level } // race specific initial known nodes: capital and taxi hub masks - switch(race) + switch (race) { case RACE_HUMAN: SetTaximaskNode(2); break; // Human case RACE_ORC: SetTaximaskNode(23); break; // Orc @@ -178,7 +178,7 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level } // new continent starting masks (It will be accessible only at new map) - switch(Player::TeamForRace(race)) + switch (Player::TeamForRace(race)) { case ALLIANCE: SetTaximaskNode(100); break; case HORDE: SetTaximaskNode(99); break; @@ -1035,7 +1035,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) GetReputationMgr().SetReputation(sFactionStore.LookupEntry(1077), 42999); // Factions depending on team, like cities and some more stuff - switch(GetTeam()) + switch (GetTeam()) { case ALLIANCE: GetReputationMgr().SetReputation(sFactionStore.LookupEntry(72), 42999); @@ -1132,7 +1132,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) // special amount for food/drink if (iProto->Class == ITEM_CLASS_CONSUMABLE && iProto->SubClass == ITEM_SUBCLASS_FOOD) { - switch(iProto->Spells[0].SpellCategory) + switch (iProto->Spells[0].SpellCategory) { case SPELL_CATEGORY_FOOD: // food count = getClass() == CLASS_DEATH_KNIGHT ? 10 : 4; @@ -1220,7 +1220,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) } // item can't be added - sLog->outError("STORAGE: Can't equip or store initial item %u for race %u class %u , error msg = %u", titem_id, getRace(), getClass(), msg); + sLog->outError("STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(), getClass(), msg); return false; } @@ -2384,13 +2384,13 @@ void Player::ProcessDelayedOperations() ContinueTaxiFlight(); } } - + if (m_DelayedOperations & DELAYED_BG_GROUP_RESTORE) { if (Group *g = GetGroup()) g->SendUpdateToPlayer(GetGUID()); } - + //we have executed ALL delayed ops, so clear the flag m_DelayedOperations = 0; } @@ -2876,7 +2876,7 @@ void Player::SetGMVisible(bool on) bool Player::IsGroupVisibleFor(Player const* p) const { - switch(sWorld->getIntConfig(CONFIG_GROUP_VISIBILITY)) + switch (sWorld->getIntConfig(CONFIG_GROUP_VISIBILITY)) { default: return IsInSameGroupWith(p); case 1: return IsInSameRaidWith(p); @@ -3627,7 +3627,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen disabled_case = true; } - else switch(itr->second->state) + else switch (itr->second->state) { case PLAYERSPELL_UNCHANGED: // known saved spell return false; @@ -3813,7 +3813,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen // lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL ((pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->max_value == 0)) { - switch(GetSkillRangeType(pSkill, _spell_idx->second->racemask != 0)) + switch (GetSkillRangeType(pSkill, _spell_idx->second->racemask != 0)) { case SKILL_RANGE_LANGUAGE: SetSkill(pSkill->id, GetSkillStep(pSkill->id), 300, 300); @@ -4992,14 +4992,14 @@ void Player::DeleteOldCharacters(uint32 keepDays) { Field* charFields = resultChars->Fetch(); Player::DeleteFromDB(charFields[0].GetUInt64(), charFields[1].GetUInt32(), true, true); - } while(resultChars->NextRow()); + } while (resultChars->NextRow()); } } void Player::SetMovement(PlayerMovementType pType) { WorldPacket data; - switch(pType) + switch (pType) { case MOVE_ROOT: data.Initialize(SMSG_FORCE_MOVE_ROOT, GetPackGUID().size()+4); break; case MOVE_UNROOT: data.Initialize(SMSG_FORCE_MOVE_UNROOT, GetPackGUID().size()+4); break; @@ -5699,7 +5699,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa if (!CanModifyStats()) return; - switch(modGroup) + switch (modGroup) { case CRIT_PERCENTAGE: UpdateCritPercentage(BASE_ATTACK); break; case RANGED_CRIT_PERCENTAGE: UpdateCritPercentage(RANGED_ATTACK); break; @@ -6250,7 +6250,7 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType) uint32 weapon_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON); - switch(attType) + switch (attType) { case BASE_ATTACK: { @@ -10166,7 +10166,7 @@ Item* Player::GetShield(bool useable) const uint8 Player::GetAttackBySlot(uint8 slot) { - switch(slot) + switch (slot) { case EQUIPMENT_SLOT_MAINHAND: return BASE_ATTACK; case EQUIPMENT_SLOT_OFFHAND: return OFF_ATTACK; @@ -12149,7 +12149,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update) else if (slot == EQUIPMENT_SLOT_OFFHAND) UpdateExpertise(OFF_ATTACK); - switch(slot) + switch (slot) { case EQUIPMENT_SLOT_MAINHAND: case EQUIPMENT_SLOT_OFFHAND: @@ -12307,7 +12307,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) else if (slot == EQUIPMENT_SLOT_OFFHAND) UpdateExpertise(OFF_ATTACK); // update armor penetration - passive auras may need it - switch(slot) + switch (slot) { case EQUIPMENT_SLOT_MAINHAND: case EQUIPMENT_SLOT_OFFHAND: @@ -13260,7 +13260,7 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint data << uint64(pItem2 ? pItem2->GetGUID() : 0); data << uint8(0); // bag type subclass, used with EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM and EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2 - switch(msg) + switch (msg) { case EQUIP_ERR_CANT_EQUIP_LEVEL_I: case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: @@ -13563,7 +13563,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool uint32 enchant_amount = pEnchant->amount[s]; uint32 enchant_spell_id = pEnchant->spellid[s]; - switch(enchant_display_type) + switch (enchant_display_type) { case ITEM_ENCHANTMENT_TYPE_NONE: break; @@ -13864,7 +13864,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool default: sLog->outError("Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type); break; - } /*switch(enchant_display_type)*/ + } /*switch (enchant_display_type)*/ } /*for*/ } @@ -15284,7 +15284,7 @@ bool Player::SatisfyQuestReputation(Quest const* qInfo, bool msg) SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); return false; } - + // ReputationObjective2 does not seem to be an objective requirement but a requirement // to be able to accept the quest uint32 fIdObj = qInfo->GetRepObjectiveFaction2(); @@ -15863,7 +15863,7 @@ void Player::KilledPlayerCredit() { uint32 reqkill = qInfo->GetPlayersSlain(); uint16 curkill = q_status.m_playercount; - + if (curkill < reqkill) { q_status.m_playercount = curkill + addkillcount; @@ -17122,7 +17122,7 @@ bool Player::isAllowedToLoot(const Creature* creature) { if (!creature->isDead() || !creature->IsDamageEnoughForLootingAndReward()) return false; - + if (HasPendingBind()) return false; @@ -17136,7 +17136,7 @@ bool Player::isAllowedToLoot(const Creature* creature) else if (thisGroup != creature->GetLootRecipientGroup()) return false; - switch(thisGroup->GetLootMethod()) + switch (thisGroup->GetLootMethod()) { case FREE_FOR_ALL: return true; @@ -19295,7 +19295,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent) if (returnreagent) { - switch(pet->GetEntry()) + switch (pet->GetEntry()) { //warlock pets except imp are removed(?) when logging out case 1860: @@ -20336,7 +20336,7 @@ void Player::InitDisplayIds() } uint8 gender = getGender(); - switch(gender) + switch (gender) { case GENDER_FEMALE: SetDisplayId(info->displayId_f); @@ -20872,7 +20872,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) // if have <CompareColor> use them as count, else use <value> from Condition uint32 _cmp_gem = Condition->CompareColor[i] ? curcount[Condition->CompareColor[i] - 1]: Condition->Value[i]; - switch(Condition->Comparator[i]) + switch (Condition->Comparator[i]) { case 2: // requires less <color> than (<value> || <comparecolor>) gems activate &= (_cur_gem < _cmp_gem) ? true : false; @@ -21594,7 +21594,7 @@ void Player::SendTransferAborted(uint32 mapid, TransferAbortReason reason, uint8 WorldPacket data(SMSG_TRANSFER_ABORTED, 4+2); data << uint32(mapid); data << uint8(reason); // transfer abort reason - switch(reason) + switch (reason) { case TRANSFER_ABORT_INSUF_EXPAN_LVL: case TRANSFER_ABORT_DIFFICULTY: @@ -22509,7 +22509,7 @@ void Player::UpdateAreaDependentAuras(uint32 newArea) if (newArea == 4273 && GetVehicle() && GetPositionX() > 400) // Ulduar { - switch(GetVehicleBase()->GetEntry()) + switch (GetVehicleBase()->GetEntry()) { case 33062: case 33109: @@ -23310,7 +23310,7 @@ void Player::_LoadSkills(PreparedQueryResult result) } // set fixed skill ranges - switch(GetSkillRangeType(pSkill, false)) + switch (GetSkillRangeType(pSkill, false)) { case SKILL_RANGE_LANGUAGE: // 300..300 value = max = 300; @@ -23513,7 +23513,7 @@ void Player::HandleFall(MovementInfo const& movementInfo) } //Z given by moveinfo, LastZ, FallTime, WaterZ, MapZ, Damage, Safefall reduction - sLog->outStaticDebug("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall); + sLog->outStaticDebug("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d", movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall); } } RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LANDING); // No fly zone - Parachute diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 65746043894..59522241d49 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1806,7 +1806,7 @@ class Player : public Unit, public GridObject<Player> bool IsInSameGroupWith(Player const* p) const; bool IsInSameRaidWith(Player const* p) const { return p == this || (GetGroup() != NULL && GetGroup() == p->GetGroup()); } void UninviteFromGroup(); - static void RemoveFromGroup(Group* group, uint64 guid, RemoveMethod method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0 , const char* reason = NULL); + static void RemoveFromGroup(Group* group, uint64 guid, RemoveMethod method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0, const char* reason = NULL); void RemoveFromGroup(RemoveMethod method = GROUP_REMOVEMETHOD_DEFAULT) { RemoveFromGroup(GetGroup(), GetGUID(), method); } void SendUpdateToOutOfRangeGroupMembers(); diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index fe1abea0f1d..21a3c5ce58d 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -116,7 +116,7 @@ void MapManager::LoadTransports() uint32 guid = fields[0].GetUInt32(); uint32 entry = fields[1].GetUInt32(); std::string name = fields[2].GetString(); - sLog->outErrorDb("Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports must not have any records in `gameobject` or its behavior will be unpredictable/bugged.",entry,name.c_str(),guid); + sLog->outErrorDb("Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports must not have any records in `gameobject` or its behavior will be unpredictable/bugged.", entry, name.c_str(), guid); } while (result->NextRow()); } @@ -661,7 +661,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y, pCreature->Relocate( GetPositionX() + (x * cos(GetOrientation()) + y * sin(GetOrientation() + float(M_PI))), GetPositionY() + (y * cos(GetOrientation()) + x * sin(GetOrientation())), - z + GetPositionZ() , + z + GetPositionZ(), o + GetOrientation()); pCreature->SetHomePosition(pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ(), pCreature->GetOrientation()); diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 471a8324f90..594203e0c46 100755 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -68,7 +68,7 @@ bool Player::UpdateStats(Stats stat) pet->UpdateStats(stat); } - switch(stat) + switch (stat) { case STAT_STRENGTH: UpdateShieldBlockValue(); @@ -472,7 +472,7 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bo { UnitMods unitMod; - switch(attType) + switch (attType) { case BASE_ATTACK: default: @@ -584,7 +584,7 @@ void Player::UpdateCritPercentage(WeaponAttackType attType) uint16 index; CombatRating cr; - switch(attType) + switch (attType) { case OFF_ATTACK: modGroup = OFFHAND_CRIT_PERCENTAGE; @@ -814,7 +814,7 @@ void Player::UpdateExpertise(WeaponAttackType attack) if (expertise < 0) expertise = 0; - switch(attack) + switch (attack) { case BASE_ATTACK: SetUInt32Value(PLAYER_EXPERTISE, expertise); break; case OFF_ATTACK: SetUInt32Value(PLAYER_OFFHAND_EXPERTISE, expertise); break; @@ -998,7 +998,7 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged) void Creature::UpdateDamagePhysical(WeaponAttackType attType) { UnitMods unitMod; - switch(attType) + switch (attType) { case BASE_ATTACK: default: @@ -1034,7 +1034,7 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType) float mindamage = ((base_value + weapon_mindamage) * dmg_multiplier * base_pct + total_value) * total_pct; float maxdamage = ((base_value + weapon_maxdamage) * dmg_multiplier * base_pct + total_value) * total_pct; - switch(attType) + switch (attType) { case BASE_ATTACK: default: @@ -1221,7 +1221,7 @@ void Guardian::UpdateMaxHealth() float stamina = GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA); float multiplicator; - switch(GetEntry()) + switch (GetEntry()) { case ENTRY_IMP: multiplicator = 8.4f; break; case ENTRY_VOIDWALKER: multiplicator = 11.0f; break; @@ -1246,7 +1246,7 @@ void Guardian::UpdateMaxPower(Powers power) float addValue = (power == POWER_MANA) ? GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT) : 0.0f; float multiplicator = 15.0f; - switch(GetEntry()) + switch (GetEntry()) { case ENTRY_IMP: multiplicator = 4.95f; break; case ENTRY_VOIDWALKER: @@ -1386,7 +1386,7 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType) // Pet's base damage changes depending on happiness if (isHunterPet() && attType == BASE_ATTACK) { - switch(ToPet()->GetHappinessState()) + switch (ToPet()->GetHappinessState()) { case HAPPY: // 125% of normal damage diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9e74e3a8f5b..15984477a79 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -685,7 +685,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam uint32 weaponSpeedHitFactor; uint32 rage_damage = damage + cleanDamage->absorbed_damage; - switch(cleanDamage->attackType) + switch (cleanDamage->attackType) { case BASE_ATTACK: { @@ -1196,7 +1196,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam // Calculate armor reduction if (IsDamageReducedByArmor((SpellSchoolMask)(damageInfo->damageSchoolMask))) { - damageInfo->damage = CalcArmorReducedDamage(damageInfo->target, damage, NULL , damageInfo->attackType); + damageInfo->damage = CalcArmorReducedDamage(damageInfo->target, damage, NULL, damageInfo->attackType); damageInfo->cleanDamage += damage - damageInfo->damage; } else @@ -1420,7 +1420,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) { SpellInfo const* i_spellProto = (*dmgShieldItr)->GetSpellInfo(); // Damage shield can be resisted... - if (SpellMissInfo missInfo = victim->SpellHitResult(this, i_spellProto , false)) + if (SpellMissInfo missInfo = victim->SpellHitResult(this, i_spellProto, false)) { victim->SendSpellMiss(this, i_spellProto->Id, missInfo); continue; @@ -2734,7 +2734,7 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victi if (GetTypeId() == TYPEID_PLAYER) { - switch(attackType) + switch (attackType) { case BASE_ATTACK: crit = GetFloatValue(PLAYER_CRIT_PERCENTAGE); @@ -3601,7 +3601,7 @@ void Unit::RemoveAuraFromStack(uint32 spellId, uint64 caster, AuraRemoveMode rem if ((aura->GetType() == UNIT_AURA_TYPE) && (!caster || aura->GetCasterGUID() == caster)) { - aura->ModStackAmount(-1,removeMode); + aura->ModStackAmount(-1, removeMode); return; } else @@ -4079,7 +4079,7 @@ void Unit::DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime) // update for out of range group members (on 1 slot use) aura->SetNeedClientUpdateForTargets(); - sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms", aura->GetId() , GetGUIDLow(), aura->GetDuration()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms", aura->GetId(), GetGUIDLow(), aura->GetDuration()); } } } @@ -4769,7 +4769,7 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo) data << uint32(aura->GetId()); // spellId data << uint32(1); // count data << uint32(aura->GetAuraType()); // auraId - switch(aura->GetAuraType()) + switch (aura->GetAuraType()) { case SPELL_AURA_PERIODIC_DAMAGE: case SPELL_AURA_PERIODIC_DAMAGE_PERCENT: @@ -4928,11 +4928,11 @@ bool Unit::HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere Unit* target = victim; int32 basepoints0 = 0; - switch(hasteSpell->SpellFamilyName) + switch (hasteSpell->SpellFamilyName) { case SPELLFAMILY_ROGUE: { - switch(hasteSpell->Id) + switch (hasteSpell->Id) { // Blade Flurry case 13877: @@ -4987,11 +4987,11 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit* victim, uint32 /*damage*/, AuraEf Unit* target = victim; int32 basepoints0 = 0; - switch(triggeredByAuraSpell->SpellFamilyName) + switch (triggeredByAuraSpell->SpellFamilyName) { case SPELLFAMILY_MAGE: { - switch(triggeredByAuraSpell->Id) + switch (triggeredByAuraSpell->Id) { // Focus Magic case 54646: @@ -5054,7 +5054,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere int32 basepoints0 = 0; uint64 originalCaster = 0; - switch(dummySpell->SpellFamilyName) + switch (dummySpell->SpellFamilyName) { case SPELLFAMILY_GENERIC: { @@ -5118,7 +5118,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!GetAuraEffect(SPELL_AURA_MOD_MANA_REGEN_INTERRUPT, SPELLFAMILY_MAGE, 0x10000000, 0, 0)) return false; - switch(GetFirstSchoolInMask(procSpell->GetSchoolMask())) + switch (GetFirstSchoolInMask(procSpell->GetSchoolMask())) { case SPELL_SCHOOL_NORMAL: case SPELL_SCHOOL_HOLY: @@ -5141,7 +5141,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!procSpell) return false; - switch(GetFirstSchoolInMask(procSpell->GetSchoolMask())) + switch (GetFirstSchoolInMask(procSpell->GetSchoolMask())) { case SPELL_SCHOOL_NORMAL: return false; // ignore @@ -5701,7 +5701,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere triggered_spell_id = 37436; break; } - switch(dummySpell->Id) + switch (dummySpell->Id) { // Glyph of Polymorph case 56375: @@ -5795,7 +5795,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } case SPELLFAMILY_WARRIOR: { - switch(dummySpell->Id) + switch (dummySpell->Id) { // Sweeping Strikes case 12328: @@ -6206,7 +6206,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } case SPELLFAMILY_DRUID: { - switch(dummySpell->Id) + switch (dummySpell->Id) { // Glyph of Innervate case 54832: @@ -6957,7 +6957,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } case SPELLFAMILY_SHAMAN: { - switch(dummySpell->Id) + switch (dummySpell->Id) { // Earthen Power (Rank 1, 2) case 51523: @@ -7776,7 +7776,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit* victim, uint32 /*damage*/, AuraEffec Unit* target = victim; int32 basepoints0 = 0; - switch(dummySpell->SpellFamilyName) + switch (dummySpell->SpellFamilyName) { case SPELLFAMILY_HUNTER: { @@ -7829,7 +7829,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit* victim, uint32 /*damage*/, Aura Unit* target = victim; int32 basepoints0 = 0; - switch(dummySpell->SpellFamilyName) + switch (dummySpell->SpellFamilyName) { case SPELLFAMILY_PALADIN: { @@ -7878,7 +7878,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp { SpellInfo const* dummySpell = triggeredByAura->GetSpellInfo(); - switch(dummySpell->SpellFamilyName) + switch (dummySpell->SpellFamilyName) { case SPELLFAMILY_GENERIC: switch (dummySpell->Id) @@ -8084,7 +8084,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp return false; } - switch(dummySpell->Id) + switch (dummySpell->Id) { // Bone Shield cooldown case 49222: @@ -8270,7 +8270,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg { if (!procSpell) return false; - switch(GetFirstSchoolInMask(procSpell->GetSchoolMask())) + switch (GetFirstSchoolInMask(procSpell->GetSchoolMask())) { case SPELL_SCHOOL_NORMAL: return false; // ignore @@ -8456,7 +8456,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg // Holy Shock heal if (procSpell->SpellFamilyFlags[1] & 0x00010000) { - switch(procSpell->Id) + switch (procSpell->Id) { case 25914: originalSpellId = 20473; break; case 25913: originalSpellId = 20929; break; @@ -8562,7 +8562,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg { if (!procSpell) return false; - switch(GetFirstSchoolInMask(procSpell->GetSchoolMask())) + switch (GetFirstSchoolInMask(procSpell->GetSchoolMask())) { case SPELL_SCHOOL_NORMAL: return false; // ignore @@ -9038,7 +9038,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au uint32 triggered_spell_id = 0; - switch(scriptId) + switch (scriptId) { case 836: // Improved Blizzard (Rank 1) { @@ -9089,7 +9089,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au { if (!roll_chance_i(triggeredByAura->GetAmount())) return false; - switch(victim->getPowerType()) + switch (victim->getPowerType()) { case POWER_MANA: triggered_spell_id = 48542; break; case POWER_RAGE: triggered_spell_id = 48541; break; @@ -9147,7 +9147,7 @@ void Unit::setPowerType(Powers new_powertype) } } - switch(new_powertype) + switch (new_powertype) { default: case POWER_MANA: @@ -10405,7 +10405,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 } // Custom scripted damage - switch(spellProto->SpellFamilyName) + switch (spellProto->SpellFamilyName) { case SPELLFAMILY_MAGE: // Ice Lance @@ -10577,7 +10577,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32 AuraEffectList const& mDummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY); for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) { - switch((*i)->GetSpellInfo()->SpellIconID) + switch ((*i)->GetSpellInfo()->SpellIconID) { // Cheat Death case 2109: @@ -10814,7 +10814,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas return false; float crit_chance = 0.0f; - switch(spellProto->DmgClass) + switch (spellProto->DmgClass) { case SPELL_DAMAGE_CLASS_NONE: // We need more spells to find a general way (if there is any) @@ -10857,7 +10857,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas if (!((*i)->IsAffectedOnSpell(spellProto))) continue; int32 modChance = 0; - switch((*i)->GetMiscValue()) + switch ((*i)->GetMiscValue()) { // Shatter case 911: modChance+= 16; @@ -10954,7 +10954,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas if (victim) { // Custom crit by class - switch(spellProto->SpellFamilyName) + switch (spellProto->SpellFamilyName) { case SPELLFAMILY_DRUID: // Rend and Tear - bonus crit chance for Ferocious Bite on bleeding targets @@ -11008,7 +11008,7 @@ uint32 Unit::SpellCriticalDamageBonus(SpellInfo const* spellProto, uint32 damage int32 crit_bonus = damage; float crit_mod = 0.0f; - switch(spellProto->DmgClass) + switch (spellProto->DmgClass) { case SPELL_DAMAGE_CLASS_MELEE: // for melee based spells is 100% case SPELL_DAMAGE_CLASS_RANGED: @@ -11043,7 +11043,7 @@ uint32 Unit::SpellCriticalHealingBonus(SpellInfo const* spellProto, uint32 damag { // Calculate critical bonus int32 crit_bonus; - switch(spellProto->DmgClass) + switch (spellProto->DmgClass) { case SPELL_DAMAGE_CLASS_MELEE: // for melee based spells is 100% case SPELL_DAMAGE_CLASS_RANGED: @@ -11099,7 +11099,7 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32 { if (!(*i)->IsAffectedOnSpell(spellProto)) continue; - switch((*i)->GetMiscValue()) + switch ((*i)->GetMiscValue()) { case 4415: // Increased Rejuvenation Healing case 4953: @@ -11144,7 +11144,7 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32 } case 7871: // Glyph of Lesser Healing Wave { - if (victim->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0 , 0x00000400, 0, GetGUID())) + if (victim->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0, 0x00000400, 0, GetGUID())) AddPctN(DoneTotalMod, (*i)->GetAmount()); break; } @@ -11680,7 +11680,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT // Custom scripted damage if (spellProto) - switch(spellProto->SpellFamilyName) + switch (spellProto->SpellFamilyName) { case SPELLFAMILY_DEATHKNIGHT: // Glacier Rot @@ -11723,7 +11723,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT AuraEffectList const& mDummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY); for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) { - switch((*i)->GetSpellInfo()->SpellIconID) + switch ((*i)->GetSpellInfo()->SpellIconID) { // Cheat Death case 2109: @@ -11759,7 +11759,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT /*AuraEffectList const& mclassScritAuras = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); for (AuraEffectList::const_iterator i = mclassScritAuras.begin(); i != mclassScritAuras.end(); ++i) { - switch((*i)->GetMiscValue()) + switch ((*i)->GetMiscValue()) { } }*/ @@ -12559,7 +12559,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced) WorldPacket data; if (!forced) { - switch(mtype) + switch (mtype) { case MOVE_WALK: data.Initialize(MSG_MOVE_SET_WALK_SPEED, 8+4+2+4+4+4+4+4+4+4); @@ -12618,7 +12618,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced) pet->SetSpeed(mtype, m_speed_rate[mtype], forced); } - switch(mtype) + switch (mtype) { case MOVE_WALK: data.Initialize(SMSG_FORCE_WALK_SPEED_CHANGE, 16); @@ -13202,7 +13202,7 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration, if (GetTypeId() == TYPEID_UNIT && (ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TAUNT_DIMINISH)) { DiminishingLevels diminish = Level; - switch(diminish) + switch (diminish) { case DIMINISHING_LEVEL_1: break; case DIMINISHING_LEVEL_2: mod = 0.65f; break; @@ -13220,7 +13220,7 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration, || GetDiminishingReturnsGroupType(group) == DRTYPE_ALL) { DiminishingLevels diminish = Level; - switch(diminish) + switch (diminish) { case DIMINISHING_LEVEL_1: break; case DIMINISHING_LEVEL_2: mod = 0.5f; break; @@ -13334,7 +13334,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f if (!CanModifyStats()) return false; - switch(unitMod) + switch (unitMod) { case UNIT_MOD_STAT_STRENGTH: case UNIT_MOD_STAT_AGILITY: @@ -13427,7 +13427,7 @@ SpellSchools Unit::GetSpellSchoolByAuraGroup(UnitMods unitMod) const { SpellSchools school = SPELL_SCHOOL_NORMAL; - switch(unitMod) + switch (unitMod) { case UNIT_MOD_RESISTANCE_HOLY: school = SPELL_SCHOOL_HOLY; break; case UNIT_MOD_RESISTANCE_FIRE: school = SPELL_SCHOOL_FIRE; break; @@ -13447,7 +13447,7 @@ Stats Unit::GetStatByAuraGroup(UnitMods unitMod) const { Stats stat = STAT_STRENGTH; - switch(unitMod) + switch (unitMod) { case UNIT_MOD_STAT_STRENGTH: stat = STAT_STRENGTH; break; case UNIT_MOD_STAT_AGILITY: stat = STAT_AGILITY; break; @@ -13495,7 +13495,7 @@ float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const } } -float Unit::GetWeaponDamageRange(WeaponAttackType attType , WeaponDamageRange type) const +float Unit::GetWeaponDamageRange(WeaponAttackType attType, WeaponDamageRange type) const { if (attType == OFF_ATTACK && !haveOffhandWeapon()) return 0.0f; @@ -14306,7 +14306,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, AuraEffect* triggeredByAura = i->aura->GetEffect(effIndex); ASSERT(triggeredByAura); - switch(triggeredByAura->GetAuraType()) + switch (triggeredByAura->GetAuraType()) { case SPELL_AURA_PROC_TRIGGER_SPELL: { @@ -14318,7 +14318,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, } case SPELL_AURA_PROC_TRIGGER_DAMAGE: { - sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount() , spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount(), spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask); uint32 damage = SpellDamageBonus(pTarget, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE); CalculateSpellDamageTaken(&damageInfo, damage, spellInfo); @@ -15588,7 +15588,7 @@ void Unit::SetControlled(bool apply, UnitState state) return; AddUnitState(state); - switch(state) + switch (state) { case UNIT_STAT_STUNNED: SetStunned(true); @@ -15618,7 +15618,7 @@ void Unit::SetControlled(bool apply, UnitState state) } else { - switch(state) + switch (state) { case UNIT_STAT_STUNNED: if (HasAuraType(SPELL_AURA_MOD_STUN)) return; else SetStunned(false); break; @@ -15901,7 +15901,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au if (charmer->GetTypeId() == TYPEID_PLAYER) { - switch(type) + switch (type) { case CHARM_TYPE_VEHICLE: SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); @@ -16008,7 +16008,7 @@ void Unit::RemoveCharmedBy(Unit* charmer) if (charmer->GetTypeId() == TYPEID_PLAYER) { - switch(type) + switch (type) { case CHARM_TYPE_VEHICLE: charmer->ToPlayer()->SetClientControl(charmer, 1); @@ -16572,7 +16572,7 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form) // Male if (getGender() == GENDER_MALE) { - switch(skinColor) + switch (skinColor) { case 12: // White case 13: diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 8f68cd3e9e6..269df57301c 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1443,7 +1443,7 @@ class Unit : public WorldObject int32 DealHeal(Unit* pVictim, uint32 addhealth); void ProcDamageAndSpell(Unit* pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellInfo const* procSpell = NULL, SpellInfo const* procAura = NULL); - void ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const* procSpell, uint32 damage , SpellInfo const* procAura = NULL); + void ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const* procSpell, uint32 damage, SpellInfo const* procAura = NULL); void GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTriggeringProc, std::list<AuraApplication*>* procAuras, ProcEventInfo eventInfo); void TriggerAurasProcOnEvent(CalcDamageInfo& damageInfo); @@ -1490,7 +1490,7 @@ class Unit : public WorldObject int32 GetMechanicResistChance(const SpellInfo* spell); bool CanUseAttackType(uint8 attacktype) const { - switch(attacktype) + switch (attacktype) { case BASE_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED); case OFF_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_DISARM_OFFHAND); @@ -1783,7 +1783,7 @@ class Unit : public WorldObject AuraEffect* GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const; AuraEffect* GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const; AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const; // spell mustn't have familyflags - AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 familyFlag1 , uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID =0); + AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID =0); inline AuraEffect* GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId, effIndex);} AuraApplication * GetAuraApplication(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0, AuraApplication * except = NULL) const; @@ -1926,8 +1926,8 @@ class Unit : public WorldObject virtual void UpdateAttackPowerAndDamage(bool ranged = false) = 0; virtual void UpdateDamagePhysical(WeaponAttackType attType) = 0; float GetTotalAttackPowerValue(WeaponAttackType attType) const; - float GetWeaponDamageRange(WeaponAttackType attType , WeaponDamageRange type) const; - void SetBaseWeaponDamage(WeaponAttackType attType , WeaponDamageRange damageRange, float value) { m_weaponDamage[attType][damageRange] = value; } + float GetWeaponDamageRange(WeaponAttackType attType, WeaponDamageRange type) const; + void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value) { m_weaponDamage[attType][damageRange] = value; } bool isInFrontInMap(Unit const* target, float distance, float arc = M_PI) const; void SetInFront(Unit const* target) diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index bbba91b2658..effd43cd320 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -159,7 +159,7 @@ void Vehicle::ApplyAllImmunities() _me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_UNATTACKABLE, true); _me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_SCHOOL_ABSORB, true); _me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SHIELD, true); - _me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_IMMUNE_SHIELD , true); + _me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_IMMUNE_SHIELD, true); // ... Resistance, Split damage, Change stats ... _me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_DAMAGE_SHIELD, true); diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 84ad326e445..8187661f63f 100755 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -30,7 +30,7 @@ bool GameEventMgr::CheckOneGameEvent(uint16 entry) const { - switch(mGameEvent[entry].state) + switch (mGameEvent[entry].state) { default: case GAMEEVENT_NORMAL: @@ -1079,7 +1079,7 @@ void GameEventMgr::UnApplyEvent(uint16 event_id) void GameEventMgr::ApplyNewEvent(uint16 event_id) { - switch(sWorld->getIntConfig(CONFIG_EVENT_ANNOUNCE)) + switch (sWorld->getIntConfig(CONFIG_EVENT_ANNOUNCE)) { case 0: // disable break; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 8d0751ef9ab..89eca58576b 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2266,7 +2266,7 @@ void ObjectMgr::LoadItemTemplates() if (itemTemplate.Unk0 != dbcitem->Unk0) { - sLog->outErrorDb("Item (Entry: %u) does not have a correct Unk0 (%i) , must be %i .", entry, itemTemplate.Unk0, dbcitem->Unk0); + sLog->outErrorDb("Item (Entry: %u) does not have a correct Unk0 (%i), must be %i .", entry, itemTemplate.Unk0, dbcitem->Unk0); if (enforceDBCAttributes) itemTemplate.Unk0 = dbcitem->Unk0; } @@ -3612,7 +3612,7 @@ void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, Play // if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32 for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl) { - switch(_class) + switch (_class) { case CLASS_WARRIOR: info->stats[STAT_STRENGTH] += (lvl > 23 ? 2: (lvl > 1 ? 1: 0)); @@ -4206,7 +4206,7 @@ void ObjectMgr::LoadQuests() } if (!sFactionStore.LookupEntry(qinfo->RewRepFaction[j])) { - sLog->outErrorDb("Quest %u has `RewRepFaction%d` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.", qinfo->GetQuestId(), j+1, qinfo->RewRepFaction[j] , qinfo->RewRepFaction[j]); + sLog->outErrorDb("Quest %u has `RewRepFaction%d` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.", qinfo->GetQuestId(), j+1, qinfo->RewRepFaction[j], qinfo->RewRepFaction[j]); qinfo->RewRepFaction[j] = 0; // quest will not reward this } } @@ -4298,7 +4298,7 @@ void ObjectMgr::LoadQuests() if (qNextItr == mQuestTemplates.end()) { sLog->outErrorDb("Quest %u has `NextQuestInChain` = %u but quest %u does not exist, quest chain will not work.", - qinfo->GetQuestId(), qinfo->NextQuestInChain , qinfo->NextQuestInChain); + qinfo->GetQuestId(), qinfo->NextQuestInChain, qinfo->NextQuestInChain); qinfo->NextQuestInChain = 0; } else @@ -4362,7 +4362,7 @@ void ObjectMgr::LoadQuests() if (!quest->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) { - sLog->outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u , but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Quest flags must be fixed, quest modified to enable objective.", spellInfo->Id, quest_id); + sLog->outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Quest flags must be fixed, quest modified to enable objective.", spellInfo->Id, quest_id); // this will prevent quest completing without objective const_cast<Quest*>(quest)->SetFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT); @@ -4921,7 +4921,7 @@ void ObjectMgr::LoadSpellScriptNames() sLog->outErrorDb("Scriptname:`%s` spell (spell_id:%d) is not first rank of spell.", scriptName, fields[0].GetInt32()); continue; } - while(spellInfo) + while (spellInfo) { mSpellScripts.insert(SpellScriptsMap::value_type(spellInfo->Id, GetScriptId(scriptName))); spellInfo = sSpellMgr->GetSpellInfo(spellInfo->Id)->GetNextRankSpell(); @@ -6255,7 +6255,7 @@ uint32 ObjectMgr::GenerateMailID() uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh) { - switch(guidhigh) + switch (guidhigh) { case HIGHGUID_ITEM: if (m_hiItemGuid >= 0xFFFFFFFE) @@ -6474,7 +6474,7 @@ void ObjectMgr::LoadGameObjectTemplate() // Checks - switch(got.type) + switch (got.type) { case GAMEOBJECT_TYPE_DOOR: //0 { @@ -7562,7 +7562,7 @@ enum LanguageType static LanguageType GetRealmLanguageType(bool create) { - switch(sWorld->getIntConfig(CONFIG_REALM_ZONE)) + switch (sWorld->getIntConfig(CONFIG_REALM_ZONE)) { case REALM_ZONE_UNKNOWN: // any language case REALM_ZONE_DEVELOPMENT: @@ -7701,7 +7701,7 @@ void ObjectMgr::LoadGameObjectForQuests() GameObjectTemplateContainer const* gotc = sObjectMgr->GetGameObjectTemplates(); for (GameObjectTemplateContainer::const_iterator itr = gotc->begin(); itr != gotc->end(); ++itr) { - switch(itr->second.type) + switch (itr->second.type) { // scan GO chest with loot including quest items case GAMEOBJECT_TYPE_CHEST: @@ -7933,7 +7933,7 @@ SpellScriptsBounds ObjectMgr::GetSpellScriptsBounds(uint32 spell_id) SkillRangeType GetSkillRangeType(SkillLineEntry const* pSkill, bool racial) { - switch(pSkill->categoryId) + switch (pSkill->categoryId) { case SKILL_CATEGORY_LANGUAGES: return SKILL_RANGE_LANGUAGE; case SKILL_CATEGORY_WEAPON: @@ -8648,7 +8648,7 @@ void ObjectMgr::CheckScripts(ScriptsType type, std::set<int32>& ids) { for (ScriptMap::const_iterator itrM = itrMM->second.begin(); itrM != itrMM->second.end(); ++itrM) { - switch(itrM->second.command) + switch (itrM->second.command) { case SCRIPT_COMMAND_TALK: { diff --git a/src/server/game/Grids/Cells/CellImpl.h b/src/server/game/Grids/Cells/CellImpl.h index b9e734ab7ed..d36892ffcb0 100755 --- a/src/server/game/Grids/Cells/CellImpl.h +++ b/src/server/game/Grids/Cells/CellImpl.h @@ -54,7 +54,7 @@ Cell::Visit(const CellPair& standing_cell, TypeContainerVisitor<T, CONTAINER> &v CellPair begin_cell = standing_cell; CellPair end_cell = standing_cell; - switch(district) + switch (district) { case ALL_DISTRICT: { diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index df9ed7a4145..d0e2852e552 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1207,7 +1207,7 @@ void Group::SendUpdateToPlayer(uint64 playerGUID, MemberSlot* slot) slot = &(*witr); } - + WorldPacket data(SMSG_GROUP_LIST, (1+1+1+1+1+4+8+4+4+(GetMembersCount()-1)*(13+8+1+1+1+1)+8+1+8+1+1+1+1)); data << uint8(m_groupType); // group type (flags in 3.3) data << uint8(slot->group); diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp index f421c135233..6d54aacb311 100755 --- a/src/server/game/Mails/Mail.cpp +++ b/src/server/game/Mails/Mail.cpp @@ -29,7 +29,7 @@ MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery(stationery) { - switch(sender->GetTypeId()) + switch (sender->GetTypeId()) { case TYPEID_UNIT: m_messageType = MAIL_CREATURE; diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 5dcce67bcd3..e122c5bffae 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -119,7 +119,7 @@ void Map::LoadVMap(int gx, int gy) { // x and y are swapped !! int vmapLoadResult = VMAP::VMapFactory::createOrGetVMapManager()->loadMap((sWorld->GetDataPath()+ "vmaps").c_str(), GetId(), gx, gy); - switch(vmapLoadResult) + switch (vmapLoadResult) { case VMAP::VMAP_LOAD_RESULT_OK: sLog->outDetail("VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy); @@ -305,8 +305,8 @@ void Map::SwitchGridContainers(T* obj, bool on) obj->m_isWorldObject = on; } -template void Map::SwitchGridContainers(Creature* , bool); -//template void Map::SwitchGridContainers(DynamicObject* , bool); +template void Map::SwitchGridContainers(Creature*, bool); +//template void Map::SwitchGridContainers(DynamicObject*, bool); template<class T> void Map::DeleteFromWorld(T* obj) @@ -2028,7 +2028,7 @@ void Map::RemoveAllObjectsInRemoveList() bool on = itr->second; i_objectsToSwitch.erase(itr); - switch(obj->GetTypeId()) + switch (obj->GetTypeId()) { case TYPEID_UNIT: if (!obj->ToCreature()->isPet()) @@ -2045,7 +2045,7 @@ void Map::RemoveAllObjectsInRemoveList() std::set<WorldObject*>::iterator itr = i_objectsToRemove.begin(); WorldObject* obj = *itr; - switch(obj->GetTypeId()) + switch (obj->GetTypeId()) { case TYPEID_CORPSE: { @@ -2181,10 +2181,10 @@ template void Map::Add(Creature*); template void Map::Add(GameObject*); template void Map::Add(DynamicObject*); -template void Map::Remove(Corpse* , bool); -template void Map::Remove(Creature* , bool); -template void Map::Remove(GameObject* , bool); -template void Map::Remove(DynamicObject* , bool); +template void Map::Remove(Corpse*, bool); +template void Map::Remove(Creature*, bool); +template void Map::Remove(GameObject*, bool); +template void Map::Remove(DynamicObject*, bool); /* ******* Dungeon Instance Maps ******* */ @@ -2593,7 +2593,7 @@ BattlegroundMap::BattlegroundMap(uint32 id, time_t expiry, uint32 InstanceId, Ma BattlegroundMap::~BattlegroundMap() { - if(m_bg) + if (m_bg) { //unlink to prevent crash, always unlink all pointer reference before destruction m_bg->SetBgMap(NULL); diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 081516bb338..640b70413f8 100755 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -255,7 +255,7 @@ class Map : public GridRefManager<NGridType> } virtual bool Add(Player*); - virtual void Remove(Player* , bool); + virtual void Remove(Player*, bool); template<class T> void Add(T *); template<class T> void Remove(T *, bool); @@ -266,7 +266,7 @@ class Map : public GridRefManager<NGridType> //function for setting up visibility distance for maps on per-type/per-Id basis virtual void InitVisibilityDistance(); - void PlayerRelocation(Player* , float x, float y, float z, float orientation); + void PlayerRelocation(Player*, float x, float y, float z, float orientation); void CreatureRelocation(Creature* creature, float x, float y, float z, float ang, bool respawnRelocationOnFail = true); template<class T, class CONTAINER> void Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor); @@ -578,7 +578,7 @@ class InstanceMap : public Map InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent); ~InstanceMap(); bool Add(Player*); - void Remove(Player* , bool); + void Remove(Player*, bool); void Update(const uint32); void CreateInstanceData(bool load); bool Reset(uint8 method); @@ -608,7 +608,7 @@ class BattlegroundMap : public Map ~BattlegroundMap(); bool Add(Player*); - void Remove(Player* , bool); + void Remove(Player*, bool); bool CanEnter(Player* player); void SetUnload(); //void UnloadAll(bool pForce); diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 9d015a5284d..fa18cd801a4 100755 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -2402,7 +2402,7 @@ enum QuestSort inline uint8 ClassByQuestSort(int32 QuestSort) { - switch(QuestSort) + switch (QuestSort) { case QUEST_SORT_WARLOCK: return CLASS_WARLOCK; case QUEST_SORT_WARRIOR: return CLASS_WARRIOR; @@ -2578,7 +2578,7 @@ enum SkillType inline SkillType SkillByLockType(LockType locktype) { - switch(locktype) + switch (locktype) { case LOCKTYPE_PICKLOCK: return SKILL_LOCKPICKING; case LOCKTYPE_HERBALISM: return SKILL_HERBALISM; @@ -2592,7 +2592,7 @@ inline SkillType SkillByLockType(LockType locktype) inline uint32 SkillByQuestSort(int32 QuestSort) { - switch(QuestSort) + switch (QuestSort) { case QUEST_SORT_HERBALISM: return SKILL_HERBALISM; case QUEST_SORT_FISHING: return SKILL_FISHING; diff --git a/src/server/game/Movement/DestinationHolderImp.h b/src/server/game/Movement/DestinationHolderImp.h index f1e815c093e..84e7fbf4f08 100755 --- a/src/server/game/Movement/DestinationHolderImp.h +++ b/src/server/game/Movement/DestinationHolderImp.h @@ -113,7 +113,7 @@ DestinationHolder<TRAVELLER>::UpdateTraveller(TRAVELLER &traveller, uint32 diff, return true; if (traveller.GetTraveller().HasUnitState(UNIT_STAT_IN_FLIGHT)) - GetLocationNow(traveller.GetTraveller().GetBaseMap() , x, y, z, true); // Should reposition Object with right Coord, so I can bypass some Grid Relocation + GetLocationNow(traveller.GetTraveller().GetBaseMap(), x, y, z, true); // Should reposition Object with right Coord, so I can bypass some Grid Relocation else GetLocationNow(traveller.GetTraveller().GetBaseMap(), x, y, z, false); diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index 00fc3dde11f..5f84d6bc7b0 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -85,7 +85,7 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z) float distance = 5.0f; - switch(i) + switch (i) { case 0: angle = i_cur_angle; diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h index a12c05e847a..cca986ffea7 100755 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h @@ -37,7 +37,7 @@ class RandomMovementGenerator void Reset(T &); bool Update(T &, const uint32); bool GetDestination(float &x, float &y, float &z) const; - void UpdateMapPosition(uint32 mapid, float &x , float &y, float &z) + void UpdateMapPosition(uint32 mapid, float &x, float &y, float &z) { i_destinationHolder.GetLocationNow(mapid, x, y, z); } diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index a4432d7ca19..6cab6110741 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -413,7 +413,7 @@ void OPvPCapturePoint::SendUpdateWorldState(uint32 field, uint32 value) void OPvPCapturePoint::SendObjectiveComplete(uint32 id, uint64 guid) { uint32 team; - switch(m_State) + switch (m_State) { case OBJECTIVESTATE_ALLIANCE: team = 0; diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index 3b1a2041515..1969d1f98e1 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -180,7 +180,7 @@ class OPvPCapturePoint OutdoorPvP* m_PvP; // map to store the various gameobjects and creatures spawned by the objective - // type , guid + // type, guid std::map<uint32, uint64> m_Objects; std::map<uint32, uint64> m_Creatures; std::map<uint64, uint32> m_ObjectTypes; diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp index 23aa4c7a55a..cce89de27a8 100755 --- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp @@ -148,7 +148,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) etime *= MINUTE; // client understand only 3 auction time - switch(etime) + switch (etime) { case 1*MIN_AUCTION_TIME: case 2*MIN_AUCTION_TIME: @@ -578,7 +578,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data) AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction()); - //sLog->outDebug("Auctionhouse search (GUID: %u TypeId: %u)", , list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u", + //sLog->outDebug("Auctionhouse search (GUID: %u TypeId: %u)",, list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u", // GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable); WorldPacket data(SMSG_AUCTION_LIST_RESULT, (4+4+4)); diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp index efdcb5f4e1e..95327a71374 100755 --- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp @@ -414,7 +414,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) } uint32 queueSlot = _player->GetBattlegroundQueueIndex(bgQueueTypeId); WorldPacket data; - switch(action) + switch (action) { case 1: // port to battleground if (!_player->IsInvitedForBattlegroundQueueType(bgQueueTypeId)) @@ -631,7 +631,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) uint32 arenaRating = 0; uint32 matchmakerRating = 0; - switch(arenaslot) + switch (arenaslot) { case 0: arenatype = ARENA_TYPE_2v2; diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index 8cd2484bfa2..dc57baff7fe 100755 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -1006,7 +1006,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) std::string IP_str = GetRemoteAddress(); sLog->outChar("Account: %d (IP: %s) Login Character:[%s] (GUID: %u)", - GetAccountId(), IP_str.c_str(), pCurrChar->GetName() , pCurrChar->GetGUIDLow()); + GetAccountId(), IP_str.c_str(), pCurrChar->GetName(), pCurrChar->GetGUIDLow()); if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STAT_STUNNED)) pCurrChar->SetStandState(UNIT_STAND_STATE_STAND); diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp index cd80331069c..83d92df4f7a 100755 --- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp @@ -141,7 +141,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data) lang = LANG_UNIVERSAL; else { - switch(type) + switch (type) { case CHAT_MSG_PARTY: case CHAT_MSG_PARTY_LEADER: @@ -549,7 +549,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data) uint32 emote_anim = em->textid; - switch(emote_anim) + switch (emote_anim) { case EMOTE_STATE_SLEEP: case EMOTE_STATE_SIT: diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp index a3edcd3f827..7ace25832f2 100755 --- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp @@ -106,7 +106,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/) Loot* loot = NULL; bool shareMoney = true; - switch(GUID_HIPART(guid)) + switch (GUID_HIPART(guid)) { case HIGHGUID_GAMEOBJECT: { diff --git a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp index 564478e75b9..432a8bf3f6a 100755 --- a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp @@ -577,7 +577,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data) data << uint32((*itr)->messageID); // Message ID data << uint8((*itr)->messageType); // Message Type - switch((*itr)->messageType) + switch ((*itr)->messageType) { case MAIL_NORMAL: // sender guid data << uint64(MAKE_NEW_GUID((*itr)->sender, 0, HIGHGUID_PLAYER)); @@ -743,7 +743,7 @@ void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recv_data*/) else data << uint32(m->sender); // creature entry - switch(m->messageType) + switch (m->messageType) { case MAIL_AUCTION: data << uint32(2); diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index 125fba6db91..c75c02a723d 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -820,7 +820,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data) if (player->GetMapId() != atEntry->mapid) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", player->GetName(), atEntry->mapid, player->GetMapId(), player->GetGUIDLow(), triggerId); return; } @@ -1036,7 +1036,7 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data) } else { - switch(type) + switch (type) { case ACTION_BUTTON_MACRO: case ACTION_BUTTON_CMACRO: @@ -1347,7 +1347,7 @@ void WorldSession::HandleComplainOpcode(WorldPacket & recv_data) std::string description = ""; recv_data >> spam_type; // unk 0x01 const, may be spam type (mail/chat) recv_data >> spammer_guid; // player guid - switch(spam_type) + switch (spam_type) { case 0: recv_data >> unk1; // const 0 @@ -1401,7 +1401,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data) uint8 apply; recv_data >> apply; - switch(apply) + switch (apply) { case 0: sLog->outDebug(LOG_FILTER_NETWORKIO, "Player %u set vision to self", _player->GetGUIDLow()); diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp index c8c7e882046..8023f98c93d 100755 --- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp @@ -427,7 +427,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data) static char const* move_type_name[MAX_MOVE_TYPE] = { "Walk", "Run", "RunBack", "Swim", "SwimBack", "TurnRate", "Flight", "FlightBack", "PitchRate" }; - switch(opcode) + switch (opcode) { case CMSG_FORCE_WALK_SPEED_CHANGE_ACK: move_type = MOVE_WALK; force_move_type = MOVE_WALK; break; case CMSG_FORCE_RUN_SPEED_CHANGE_ACK: move_type = MOVE_RUN; force_move_type = MOVE_RUN; break; diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp index 3976517152d..5a8781d3925 100755 --- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp @@ -147,10 +147,10 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid return; } - switch(flag) + switch (flag) { case ACT_COMMAND: //0x07 - switch(spellid) + switch (spellid) { case COMMAND_STAY: //flat=1792 //STAY pet->AttackStop(); @@ -267,7 +267,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid } break; case ACT_REACTION: // 0x6 - switch(spellid) + switch (spellid) { case REACT_PASSIVE: //passive pet->AttackStop(); @@ -677,7 +677,7 @@ void WorldSession::HandlePetAbandon(WorldPacket & recv_data) if (pet->GetGUID() == _player->GetPetGUID()) { uint32 feelty = pet->GetPower(POWER_HAPPINESS); - pet->SetPower(POWER_HAPPINESS , feelty > 50000 ? (feelty-50000) : 0); + pet->SetPower(POWER_HAPPINESS, feelty > 50000 ? (feelty-50000) : 0); } _player->RemovePet((Pet*)pet, PET_SAVE_AS_DELETED); diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp index 80cb3eda484..e021b51c55e 100755 --- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp @@ -124,7 +124,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) return; } - switch(clientIndex) // arenaSlot+1 as received from client (1 from 3 case) + switch (clientIndex) // arenaSlot+1 as received from client (1 from 3 case) { case 1: charterid = ARENA_TEAM_CHARTER_2v2; @@ -224,7 +224,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) do { Field* fields = result->Fetch(); - ssInvalidPetitionGUIDs << '\'' << fields[0].GetUInt32() << "' , "; + ssInvalidPetitionGUIDs << '\'' << fields[0].GetUInt32() << "', "; } while (result->NextRow()); } diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp index 97f65865508..64711a41f97 100755 --- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp @@ -47,7 +47,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data) return; } - switch(questgiver->GetTypeId()) + switch (questgiver->GetTypeId()) { case TYPEID_UNIT: { @@ -185,7 +185,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data) if (_player->CanCompleteQuest(quest)) _player->CompleteQuest(quest); - switch(pObject->GetTypeId()) + switch (pObject->GetTypeId()) { case TYPEID_UNIT: sScriptMgr->OnQuestAccept(_player, (pObject->ToCreature()), qInfo); @@ -327,7 +327,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data) if (!(sScriptMgr->OnQuestReward(_player, (object->ToCreature()), quest, reward))) { // Send next quest - if (Quest const* nextQuest = _player->GetNextQuest(guid , quest)) + if (Quest const* nextQuest = _player->GetNextQuest(guid, quest)) { if (nextQuest->IsAutoAccept() && _player->CanAddQuest(nextQuest, true) && _player->CanTakeQuest(quest, true)) { @@ -346,7 +346,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data) if (!sScriptMgr->OnQuestReward(_player, ((GameObject*)object), quest, reward)) { // Send next quest - if (Quest const* nextQuest = _player->GetNextQuest(guid , quest)) + if (Quest const* nextQuest = _player->GetNextQuest(guid, quest)) { if (nextQuest->IsAutoAccept() && _player->CanAddQuest(nextQuest, true) && _player->CanTakeQuest(quest, true)) { @@ -623,7 +623,7 @@ uint32 WorldSession::getDialogStatus(Player* pPlayer, Object* questgiver, uint32 QuestRelationBounds qr; QuestRelationBounds qir; - switch(questgiver->GetTypeId()) + switch (questgiver->GetTypeId()) { case TYPEID_GAMEOBJECT: { diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp index 08b2d181cd4..fe6d3f02ffa 100755 --- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp @@ -191,7 +191,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data) if (nodes.empty()) return; - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" , nodes.front(), nodes.back()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d", nodes.front(), nodes.back()); GetPlayer()->ActivateTaxiPathTo(nodes, npc); } @@ -283,7 +283,7 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recv_data) nodes.resize(2); recv_data >> guid >> nodes[0] >> nodes[1]; - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" , nodes[0], nodes[1]); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI from %d to %d", nodes[0], nodes[1]); Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER); if (!npc) { diff --git a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp index b8289bfada3..865158e7860 100755 --- a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp @@ -34,7 +34,7 @@ void WorldSession::SendTradeStatus(TradeStatus status) { WorldPacket data; - switch(status) + switch (status) { case TRADE_STATUS_BEGIN_TRADE: data.Initialize(SMSG_TRADE_STATUS, 4+8); diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index cbaf789faf6..df7816f7cb9 100755 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -856,9 +856,9 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x33B*/ { "SMSG_INSTANCE_DIFFICULTY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x33C*/ { "MSG_GM_RESETINSTANCELIMIT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x33D*/ { "SMSG_MOTD", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x33E*/ { "SMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY",STATUS_NEVER,PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x33F*/ { "SMSG_MOVE_UNSET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY",STATUS_NEVER,PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x340*/ { "CMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY_ACK",STATUS_NEVER,PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x33E*/ { "SMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, + /*0x33F*/ { "SMSG_MOVE_UNSET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, + /*0x340*/ { "CMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY_ACK", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x341*/ { "MSG_MOVE_START_SWIM_CHEAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x342*/ { "MSG_MOVE_STOP_SWIM_CHEAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x343*/ { "SMSG_MOVE_SET_CAN_FLY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, @@ -868,7 +868,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x347*/ { "CMSG_SOCKET_GEMS", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleSocketOpcode }, /*0x348*/ { "CMSG_ARENA_TEAM_CREATE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x349*/ { "SMSG_ARENA_TEAM_COMMAND_RESULT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x34A*/ { "MSG_MOVE_UPDATE_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY",STATUS_NEVER,PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x34A*/ { "MSG_MOVE_UPDATE_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x34B*/ { "CMSG_ARENA_TEAM_QUERY", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleArenaTeamQueryOpcode }, /*0x34C*/ { "SMSG_ARENA_TEAM_QUERY_RESPONSE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x34D*/ { "CMSG_ARENA_TEAM_ROSTER", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleArenaTeamRosterOpcode }, @@ -1284,7 +1284,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x4E7*/ { "CMSG_BATTLEFIELD_MGR_EXIT_REQUEST", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4E8*/ { "SMSG_BATTLEFIELD_MGR_STATE_CHANGE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x4E9*/ { "CMSG_BATTLEFIELD_MANAGER_ADVANCE_STATE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, - /*0x4EA*/ { "CMSG_BATTLEFIELD_MANAGER_SET_NEXT_TRANSITION_TIME",STATUS_NEVER,PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x4EA*/ { "CMSG_BATTLEFIELD_MANAGER_SET_NEXT_TRANSITION_TIME", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4EB*/ { "MSG_SET_RAID_DIFFICULTY", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleSetRaidDifficultyOpcode }, /*0x4EC*/ { "CMSG_TOGGLE_XP_GAIN", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4ED*/ { "SMSG_TOGGLE_XP_GAIN", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index c02b52bfb5a..ef51d1be918 100755 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -1282,7 +1282,7 @@ enum Opcodes CMSG_SET_PAID_SERVICE_CHEAT = 0x4DD, SMSG_BATTLEFIELD_MGR_ENTRY_INVITE = 0x4DE, // uint32 CMSG_BATTLEFIELD_MGR_ENTRY_INVITE_RESPONSE = 0x4DF, - SMSG_BATTLEFIELD_MGR_ENTERED = 0x4E0, // uint32, uint8, uint8 + SMSG_BATTLEFIELD_MGR_ENTERED = 0x4E0, // uint32, uint8, uint8 SMSG_BATTLEFIELD_MGR_QUEUE_INVITE = 0x4E1, // uint32 CMSG_BATTLEFIELD_MGR_QUEUE_INVITE_RESPONSE = 0x4E2, CMSG_BATTLEFIELD_MGR_QUEUE_REQUEST = 0x4E3, @@ -1300,7 +1300,7 @@ enum Opcodes SMSG_GMRESPONSE_RECEIVED = 0x4EF, // uint32, uint32, string[2000], string[4000][4] CMSG_GMRESPONSE_RESOLVE = 0x4F0, SMSG_GMRESPONSE_STATUS_UPDATE = 0x4F1, // uint8 (1 - EVENT_GMSURVEY_DISPLAY, 0 - EVENT_UPDATE_TICKET) - SMSG_GMRESPONSE_CREATE_TICKET = 0x4F2, + SMSG_GMRESPONSE_CREATE_TICKET = 0x4F2, CMSG_GMRESPONSE_CREATE_TICKET = 0x4F3, CMSG_SERVERINFO = 0x4F4, SMSG_SERVERINFO = 0x4F5, diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 80af3961caf..d6004e809df 100755 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -492,7 +492,7 @@ void WorldSession::LogoutPlayer(bool Save) // e.g if he got disconnected during a transfer to another map // calls to GetMap in this case may cause crashes _player->CleanupsBeforeDelete(); - sLog->outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName() , _player->GetGUIDLow()); + sLog->outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName(), _player->GetGUIDLow()); Map* _map = _player->GetMap(); _map->Remove(_player, true); SetPlayer(NULL); // deleted in Remove call diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index c5daa540632..3875156289e 100755 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -310,7 +310,7 @@ int WorldSocket::handle_input (ACE_HANDLE) if ((errno == EWOULDBLOCK) || (errno == EAGAIN)) { - return Update(); // interesting line , isn't it ? + return Update(); // interesting line, isn't it ? } sLog->outStaticDebug("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno)); @@ -496,7 +496,7 @@ int WorldSocket::handle_input_header (void) if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240)) { Player* _player = m_Session ? m_Session->GetPlayer() : NULL; - sLog->outError ("WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d , cmd: %d)", + sLog->outError ("WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d, cmd: %d)", m_Session ? m_Session->GetAccountId() : 0, _player ? _player->GetGUIDLow() : 0, _player ? _player->GetName() : "<none>", @@ -599,7 +599,7 @@ int WorldSocket::handle_input_missing_data (void) // Its possible on some error situations that this happens // for example on closing when epoll receives more chunked data and stuff - // hope this is not hack , as proper m_RecvWPct is asserted around + // hope this is not hack, as proper m_RecvWPct is asserted around if (!m_RecvWPct) { sLog->outError ("Forcing close on input m_RecvWPct = NULL"); @@ -708,7 +708,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct) try { - switch(opcode) + switch (opcode) { case CMSG_PING: return HandlePing (*new_pct); @@ -722,7 +722,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct) sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct)); return HandleAuthSession (*new_pct); case CMSG_KEEP_ALIVE: - sLog->outStaticDebug ("CMSG_KEEP_ALIVE , size: " UI64FMTD, uint64(new_pct->size())); + sLog->outStaticDebug ("CMSG_KEEP_ALIVE, size: " UI64FMTD, uint64(new_pct->size())); sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct)); return 0; default: @@ -735,7 +735,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct) // Catches people idling on the login screen and any lingering ingame connections. m_Session->ResetTimeOutTime(); - // OK , give the packet to WorldSession + // OK, give the packet to WorldSession aptr.release(); // WARNINIG here we call it with locks held. // Its possible to cause deadlock if QueuePacket calls back diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h index d10b0a11301..aa7424085f8 100755 --- a/src/server/game/Server/WorldSocket.h +++ b/src/server/game/Server/WorldSocket.h @@ -118,7 +118,7 @@ class WorldSocket : public WorldHandler /// things called by ACE framework. - /// Called on open , the void* is the acceptor. + /// Called on open, the void* is the acceptor. virtual int open (void *); /// Called on failures inside of the acceptor, don't call from your code. @@ -152,7 +152,7 @@ class WorldSocket : public WorldHandler int handle_output_queue (GuardType& g); /// process one incoming packet. - /// @param new_pct received packet , note that you need to delete it. + /// @param new_pct received packet, note that you need to delete it. int ProcessIncoming (WorldPacket* new_pct); /// Called by ProcessIncoming() on CMSG_AUTH_SESSION. @@ -165,7 +165,7 @@ class WorldSocket : public WorldHandler /// Time in which the last ping was received ACE_Time_Value m_LastPingTime; - /// Keep track of over-speed pings , to prevent ping flood. + /// Keep track of over-speed pings, to prevent ping flood. uint32 m_OverSpeedPings; /// Address of the remote peer diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp index 95db31fd5df..ec29273d6b0 100755 --- a/src/server/game/Server/WorldSocketMgr.cpp +++ b/src/server/game/Server/WorldSocketMgr.cpp @@ -47,7 +47,7 @@ #include "ScriptMgr.h" /** -* This is a helper class to WorldSocketMgr , that manages +* This is a helper class to WorldSocketMgr, that manages * network threads, and assigning connections from acceptor thread * to other network threads */ @@ -263,7 +263,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address) if (m_Acceptor->open(listen_addr, m_NetThreads[0].GetReactor(), ACE_NONBLOCK) == -1) { - sLog->outError ("Failed to open acceptor , check if the port is free"); + sLog->outError ("Failed to open acceptor, check if the port is free"); return -1; } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index fae94236c17..55dc29e5ef4 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -449,7 +449,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) float DoneActualBenefit = 0.0f; // custom amount calculations go here - switch(GetAuraType()) + switch (GetAuraType()) { // crowd control auras case SPELL_AURA_MOD_CONFUSE: @@ -483,7 +483,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) m_canBeRecalculated = false; if (!caster) break; - switch(GetSpellInfo()->SpellFamilyName) + switch (GetSpellInfo()->SpellFamilyName) { case SPELLFAMILY_MAGE: // Ice Barrier @@ -864,7 +864,7 @@ void AuraEffect::CalculateSpellMod() switch (GetAuraType()) { case SPELL_AURA_DUMMY: - switch(GetSpellInfo()->SpellFamilyName) + switch (GetSpellInfo()->SpellFamilyName) { case SPELLFAMILY_PRIEST: // Pain and Suffering @@ -904,7 +904,7 @@ void AuraEffect::CalculateSpellMod() break; } case SPELL_AURA_MOD_SPELL_CRIT_CHANCE: - switch(GetId()) + switch (GetId()) { case 51466: // Elemental oath case 51470: // Elemental oath @@ -1112,21 +1112,21 @@ void AuraEffect::Update(uint32 diff, Unit* caster) void AuraEffect::UpdatePeriodic(Unit* caster) { - switch(GetAuraType()) + switch (GetAuraType()) { case SPELL_AURA_DUMMY: // Haunting Spirits if (GetId() == 7057) { - m_amplitude = irand (0 , 60) + 30; + m_amplitude = irand (0, 60) + 30; m_amplitude *= IN_MILLISECONDS; } break; case SPELL_AURA_PERIODIC_DUMMY: - switch(GetSpellInfo()->SpellFamilyName) + switch (GetSpellInfo()->SpellFamilyName) { case SPELLFAMILY_GENERIC: - switch(GetId()) + switch (GetId()) { // Drink case 430: @@ -1287,7 +1287,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit* caster) const Unit* target = aurApp->GetTarget(); - switch(GetAuraType()) + switch (GetAuraType()) { case SPELL_AURA_PERIODIC_DUMMY: HandlePeriodicDummyAuraTick(target, caster); @@ -1327,7 +1327,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit* caster) const case SPELL_AURA_DUMMY: // Haunting Spirits if (GetId() == 7057) - target->CastSpell((Unit*)NULL , GetAmount(), true); + target->CastSpell((Unit*)NULL, GetAmount(), true); break; default: break; @@ -1337,7 +1337,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit* caster) const void AuraEffect::HandleProc(AuraApplication* aurApp, ProcEventInfo& eventInfo) { // TODO: effect script handlers here - switch(GetAuraType()) + switch (GetAuraType()) { case SPELL_AURA_PROC_TRIGGER_SPELL: HandleProcTriggerSpellAuraProc(aurApp, eventInfo); @@ -1388,7 +1388,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const //uint32 spellId3 = 0; uint32 HotWSpellId = 0; - switch(GetMiscValue()) + switch (GetMiscValue()) { case FORM_CAT: spellId = 3025; @@ -1518,11 +1518,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const } } } - switch(GetMiscValue()) + switch (GetMiscValue()) { case FORM_CAT: // Savage Roar - if (target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0 , 0x10000000, 0)) + if (target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0, 0x10000000, 0)) target->CastSpell(target, 62071, true); // Nurturing Instinct if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, 0)) @@ -3469,7 +3469,7 @@ void AuraEffect::HandleAuraModStateImmunity(AuraApplication const* aurApp, uint8 target->ApplySpellImmune(GetId(), IMMUNITY_STATE, GetMiscValue(), apply); if (apply && GetSpellInfo()->AttributesEx & SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY) - target->RemoveAurasByType(AuraType(GetMiscValue()), 0 , GetBase()); + target->RemoveAurasByType(AuraType(GetMiscValue()), 0, GetBase()); } void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -4488,8 +4488,8 @@ void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 if (target->GetTypeId() == TYPEID_PLAYER) { - for(int i = 0; i < MAX_ATTACK; ++i) - if(Item* item = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i),false)) + for (int i = 0; i < MAX_ATTACK; ++i) + if (Item* item = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), false)) target->ToPlayer()->_ApplyWeaponDependentAuraDamageMod(item, WeaponAttackType(i), this, apply); } @@ -4669,7 +4669,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool break; } } - switch(GetId()) + switch (GetId()) { case 1515: // Tame beast // FIX_ME: this is 2.0.12 threat effect replaced in 2.1.x by dummy aura, must be checked for correctness @@ -4707,7 +4707,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool { if (caster) { - switch(caster->getGender()) + switch (caster->getGender()) { case GENDER_FEMALE: caster->CastSpell(target, 37095, true, NULL, this); // Blood Elf Disguise @@ -4747,7 +4747,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool case 46354: // Blood Elf Illusion if (caster) { - switch(caster->getGender()) + switch (caster->getGender()) { case GENDER_FEMALE: caster->CastSpell(target, 46356, true, NULL, this); @@ -4787,7 +4787,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool if (caster) // actually we can also use cast(this, originalcasterguid) { int32 damage; - switch(GetBase()->GetStackAmount()) + switch (GetBase()->GetStackAmount()) { case 1: damage = 0; break; case 2: damage = 500; break; @@ -4820,7 +4820,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool if ((GetSpellInfo()->IsQuestTame()) && caster && caster->isAlive() && target->isAlive()) { uint32 finalSpelId = 0; - switch(GetId()) + switch (GetId()) { case 19548: finalSpelId = 19597; break; case 19674: finalSpelId = 19677; break; @@ -4846,10 +4846,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool caster->CastSpell(target, finalSpelId, true, NULL, this); } - switch(m_spellInfo->SpellFamilyName) + switch (m_spellInfo->SpellFamilyName) { case SPELLFAMILY_GENERIC: - switch(GetId()) + switch (GetId()) { case 2584: // Waiting to Resurrect // Waiting to resurrect spell cancel, we must remove player from resurrect queue @@ -4967,13 +4967,13 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool // AT APPLY & REMOVE - switch(m_spellInfo->SpellFamilyName) + switch (m_spellInfo->SpellFamilyName) { case SPELLFAMILY_GENERIC: { if (!(mode & AURA_EFFECT_HANDLE_REAL)) break; - switch(GetId()) + switch (GetId()) { // Recently Bandaged case 11196: @@ -5050,7 +5050,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool case 57723: // Exhaustion case 57724: // Sated { - switch(GetId()) + switch (GetId()) { case 57723: target->ApplySpellImmune(GetId(), IMMUNITY_ID, 32182, apply); break; // Heroism case 57724: target->ApplySpellImmune(GetId(), IMMUNITY_ID, 2825, apply); break; // Bloodlust @@ -5069,7 +5069,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool if (apply) { - switch(m_spellInfo->Id) + switch (m_spellInfo->Id) { case 57819: FactionID = 1106; break; // Argent Crusade case 57820: FactionID = 1098; break; // Knights of the Ebon Blade @@ -5151,7 +5151,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool { if (!(mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK)) break; - switch(GetId()) + switch (GetId()) { case 52610: // Savage Roar { @@ -5608,8 +5608,8 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const case 66149: // Bullet Controller Periodic - 10 Man case 68396: // Bullet Controller Periodic - 25 Man { - caster->CastCustomSpell(66152, SPELLVALUE_MAX_TARGETS, urand(1,6), target, true); - caster->CastCustomSpell(66153, SPELLVALUE_MAX_TARGETS, urand(1,6), target, true); + caster->CastCustomSpell(66152, SPELLVALUE_MAX_TARGETS, urand(1, 6), target, true); + caster->CastCustomSpell(66153, SPELLVALUE_MAX_TARGETS, urand(1, 6), target, true); break; } case 54798: // FLAMING Arrow Triggered Effect @@ -5979,7 +5979,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster) } case SPELLFAMILY_SHAMAN: { - switch(auraId) + switch (auraId) { // Lightning Shield (The Earthshatterer set trigger after cast Lighting Shield) case 28820: @@ -6541,7 +6541,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con } // spell-specific code - switch(GetId()) + switch (GetId()) { case 31447: // Mark of Kaz'rogal if (target->GetPower(powerType) == 0) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 8bb46ed6144..e2690c02b1d 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -57,7 +57,7 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa Unit::VisibleAuraMap const* visibleAuras = GetTarget()->GetVisibleAuras(); // lookup for free slots in units visibleAuras Unit::VisibleAuraMap::const_iterator itr = visibleAuras->find(0); - for (uint32 freeSlot = 0; freeSlot < MAX_AURAS; ++itr , ++freeSlot) + for (uint32 freeSlot = 0; freeSlot < MAX_AURAS; ++itr, ++freeSlot) { if (itr == visibleAuras->end() || itr->first != freeSlot) { @@ -224,7 +224,7 @@ uint8 Aura::BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleE ASSERT(spellProto); ASSERT(owner); uint8 effMask = 0; - switch(owner->GetTypeId()) + switch (owner->GetTypeId()) { case TYPEID_UNIT: case TYPEID_PLAYER: @@ -362,7 +362,7 @@ void Aura::_InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount) Aura::~Aura() { // unload scripts - while(!m_loadedScripts.empty()) + while (!m_loadedScripts.empty()) { std::list<AuraScript*>::iterator itr = m_loadedScripts.begin(); (*itr)->_Unload(); @@ -469,7 +469,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) // fill up to date target list // target, effMask - std::map<Unit* , uint8> targets; + std::map<Unit*, uint8> targets; FillTargetMap(targets, caster); @@ -478,7 +478,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) // mark all auras as ready to remove for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end();++appIter) { - std::map<Unit* , uint8>::iterator existing = targets.find(appIter->second->GetTarget()); + std::map<Unit*, uint8>::iterator existing = targets.find(appIter->second->GetTarget()); // not found in current area - remove the aura if (existing == targets.end()) targetsToRemove.push_back(appIter->second->GetTarget()); @@ -495,7 +495,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) } // register auras for units - for (std::map<Unit* , uint8>::iterator itr = targets.begin(); itr!= targets.end();) + for (std::map<Unit*, uint8>::iterator itr = targets.begin(); itr!= targets.end();) { // aura mustn't be already applied on target if (AuraApplication * aurApp = GetApplicationOfTarget(itr->first->GetGUID())) @@ -572,7 +572,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) return; // apply aura effects for units - for (std::map<Unit* , uint8>::iterator itr = targets.begin(); itr!= targets.end();++itr) + for (std::map<Unit*, uint8>::iterator itr = targets.begin(); itr!= targets.end();++itr) { if (AuraApplication * aurApp = GetApplicationOfTarget(itr->first->GetGUID())) { @@ -1091,7 +1091,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b switch (GetSpellInfo()->SpellFamilyName) { case SPELLFAMILY_GENERIC: - switch(GetId()) + switch (GetId()) { case 32474: // Buffeting Winds of Susurrus if (target->GetTypeId() == TYPEID_PLAYER) @@ -1153,7 +1153,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b caster->CastSpell(target, 61634, true); } } - switch(GetId()) + switch (GetId()) { case 12536: // Clearcasting case 12043: // Presence of Mind @@ -1190,7 +1190,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b } break; case SPELLFAMILY_WARLOCK: - switch(GetId()) + switch (GetId()) { case 48020: // Demonic Circle if (target->GetTypeId() == TYPEID_PLAYER) @@ -1294,10 +1294,10 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b // mods at aura remove else { - switch(GetSpellInfo()->SpellFamilyName) + switch (GetSpellInfo()->SpellFamilyName) { case SPELLFAMILY_GENERIC: - switch(GetId()) + switch (GetId()) { case 61987: // Avenging Wrath // Remove the immunity shield marker on Avenging Wrath removal if Forbearance is not present @@ -1319,7 +1319,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b } break; case SPELLFAMILY_MAGE: - switch(GetId()) + switch (GetId()) { case 66: // Invisibility if (removeMode != AURA_REMOVE_BY_EXPIRE) @@ -1403,7 +1403,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b caster->CastSpell(target, spellId, true); } } - switch(GetId()) + switch (GetId()) { case 48018: // Demonic Circle // Do not remove GO when aura is removed by stack @@ -1461,7 +1461,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b break; int32 triggeredSpellId = 0; - switch(target->getPowerType()) + switch (target->getPowerType()) { case POWER_MANA: { @@ -1480,7 +1480,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b } } } - switch(GetId()) + switch (GetId()) { case 47788: // Guardian Spirit if (removeMode != AURA_REMOVE_BY_EXPIRE) @@ -1570,7 +1570,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b else { int32 basepoints0 = aurEff->GetAmount(); - target->CastCustomSpell(target, 31665, &basepoints0, NULL, NULL , true); + target->CastCustomSpell(target, 31665, &basepoints0, NULL, NULL, true); } } // Overkill @@ -1585,7 +1585,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b } break; case SPELLFAMILY_HUNTER: - switch(GetId()) + switch (GetId()) { case 19574: // Bestial Wrath // The Beast Within cast on owner if talent present @@ -1604,7 +1604,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b } break; case SPELLFAMILY_PALADIN: - switch(GetId()) + switch (GetId()) { case 19746: case 31821: @@ -1646,7 +1646,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b Unit::AuraEffectList const& vDummyAuras = target->GetAuraEffectsByType(SPELL_AURA_DUMMY); for (Unit::AuraEffectList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); ++itr) { - switch((*itr)->GetId()) + switch ((*itr)->GetId()) { // Improved Blood Presence case 50365: @@ -1698,7 +1698,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b { // Not listed as any effect, only base points set int32 basePoints0 = unholyPresenceAura->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); - target->CastCustomSpell(target, 63622, &basePoints0 , &basePoints0, &basePoints0, true, 0, unholyPresenceAura); + target->CastCustomSpell(target, 63622, &basePoints0, &basePoints0, &basePoints0, true, 0, unholyPresenceAura); } target->CastSpell(target, 49772, true); } @@ -2297,7 +2297,7 @@ void UnitAura::Remove(AuraRemoveMode removeMode) GetUnitOwner()->RemoveOwnedAura(this, removeMode); } -void UnitAura::FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster) +void UnitAura::FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster) { for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS ; ++effIndex) { @@ -2355,7 +2355,7 @@ void UnitAura::FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster) for (UnitList::iterator itr = targetList.begin(); itr!= targetList.end();++itr) { - std::map<Unit* , uint8>::iterator existing = targets.find(*itr); + std::map<Unit*, uint8>::iterator existing = targets.find(*itr); if (existing != targets.end()) existing->second |= 1<<effIndex; else @@ -2382,7 +2382,7 @@ void DynObjAura::Remove(AuraRemoveMode removeMode) _Remove(removeMode); } -void DynObjAura::FillTargetMap(std::map<Unit* , uint8> & targets, Unit* /*caster*/) +void DynObjAura::FillTargetMap(std::map<Unit*, uint8> & targets, Unit* /*caster*/) { Unit* dynObjOwnerCaster = GetDynobjOwner()->GetCaster(); float radius = GetDynobjOwner()->GetRadius(); @@ -2408,7 +2408,7 @@ void DynObjAura::FillTargetMap(std::map<Unit* , uint8> & targets, Unit* /*caster for (UnitList::iterator itr = targetList.begin(); itr!= targetList.end();++itr) { - std::map<Unit* , uint8>::iterator existing = targets.find(*itr); + std::map<Unit*, uint8>::iterator existing = targets.find(*itr); if (existing != targets.end()) existing->second |= 1<<effIndex; else diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index 6c641ef7d9b..bcf40fe69d7 100755 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -112,7 +112,7 @@ class Aura void _Remove(AuraRemoveMode removeMode); virtual void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) = 0; - virtual void FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster) = 0; + virtual void FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster) = 0; void UpdateTargetMap(Unit* caster, bool apply = true); void _RegisterForTargets() {Unit* caster = GetCaster(); UpdateTargetMap(caster, false);} @@ -252,7 +252,7 @@ class UnitAura : public Aura void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - void FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster); + void FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster); // Allow Apply Aura Handler to modify and access m_AuraDRGroup void SetDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; } @@ -270,6 +270,6 @@ class DynObjAura : public Aura public: void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - void FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster); + void FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster); }; #endif diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 255c6307d58..bcceb3eebbc 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -569,7 +569,7 @@ m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharme Spell::~Spell() { // unload scripts - while(!m_loadedScripts.empty()) + while (!m_loadedScripts.empty()) { std::list<SpellScript*>::iterator itr = m_loadedScripts.begin(); (*itr)->_Unload(); @@ -1820,7 +1820,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin break; // Check if (*next) is a valid chain target. If not, don't add to TagUnitMap, and repeat loop. - // If you want to add any conditions to exclude a target from TagUnitMap, add condition in this while() loop. + // If you want to add any conditions to exclude a target from TagUnitMap, add condition in this while () loop. while ((m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE && !m_caster->isInFrontInMap(*next, max_range)) || !m_caster->canSeeOrDetect(*next) @@ -5162,12 +5162,12 @@ SpellCastResult Spell::CheckCast(bool strict) // RETURN HERE case SPELL_EFFECT_SUMMON_RAF_FRIEND: { - if(m_caster->GetTypeId() != TYPEID_PLAYER) + if (m_caster->GetTypeId() != TYPEID_PLAYER) return SPELL_FAILED_BAD_TARGETS; Player* playerCaster = m_caster->ToPlayer(); // - if(!(playerCaster->GetSelection())) + if (!(playerCaster->GetSelection())) return SPELL_FAILED_BAD_TARGETS; Player* target = ObjectAccessor::FindPlayer(playerCaster->GetSelection()); diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index 6070df7e0aa..27b0844f32e 100755 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -723,7 +723,7 @@ namespace Trinity break; } - switch(i_push_type) + switch (i_push_type) { case PUSH_SRC_CENTER: case PUSH_DST_CENTER: diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 741648ce70f..1a3a5403bb2 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -330,7 +330,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) damage /= count; // divide to all targets } - switch(m_spellInfo->Id) // better way to check unknown + switch (m_spellInfo->Id) // better way to check unknown { // Positive/Negative Charge case 28062: @@ -945,7 +945,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) case 35745: // Socrethar's Stone { uint32 spell_id; - switch(m_caster->GetAreaId()) + switch (m_caster->GetAreaId()) { case 3900: spell_id = 35743; break; // Socrethar Portal case 3742: spell_id = 35744; break; // Socrethar Portal @@ -1281,7 +1281,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) m_damage += CalculatePctF(damage, m_caster->GetTotalAttackPowerValue(BASE_ATTACK)); return; } - switch(m_spellInfo->Id) + switch (m_spellInfo->Id) { // Bloodthirst case 23881: @@ -1363,7 +1363,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) return; } - switch(m_spellInfo->Id) + switch (m_spellInfo->Id) { case 31789: // Righteous Defense (step 1) { @@ -1564,7 +1564,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) && effectHandleMode == SPELL_EFFECT_HANDLE_LAUNCH_TARGET) { // special cases - switch(triggered_spell_id) + switch (triggered_spell_id) { // Mirror Image case 58832: @@ -2399,7 +2399,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype) // bg reward have some special in code work uint32 bgType = 0; - switch(m_spellInfo->Id) + switch (m_spellInfo->Id) { case SPELL_AV_MARK_WINNER: case SPELL_AV_MARK_LOSER: @@ -3189,7 +3189,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex) } typedef std::list< std::pair<uint32, uint64> > DispelList; -typedef std::list< std::pair<Aura* , uint8> > DispelChargesList; +typedef std::list< std::pair<Aura*, uint8> > DispelChargesList; void Spell::EffectDispel(SpellEffIndex effIndex) { if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET) @@ -3659,7 +3659,7 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) // enchanting spell selected by calculated damage-per-sec stored in Effect[1] base value // Note: damage calculated (correctly) with rounding int32(float(v)) but // RW enchantments applied damage int32(float(v)+0.5), this create 0..1 difference sometime - switch(damage) + switch (damage) { // Rank 1 case 2: spell_id = 36744; break; // 0% [ 7% == 2, 14% == 2, 20% == 2] @@ -4236,7 +4236,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex) { // We assume that a spell have at most one fixed_bonus // and at most one weaponDamagePercentMod - switch(m_spellInfo->Effects[j].Effect) + switch (m_spellInfo->Effects[j].Effect) { case SPELL_EFFECT_WEAPON_DAMAGE: case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL: @@ -4382,7 +4382,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex) Player* pl = m_caster->ToPlayer(); Battleground* bg = pl->GetBattleground(); - switch(pGameObj->GetMapId()) + switch (pGameObj->GetMapId()) { case 489: //WS { @@ -4438,11 +4438,11 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) // TODO: we must implement hunter pet summon at login there (spell 6962) - switch(m_spellInfo->SpellFamilyName) + switch (m_spellInfo->SpellFamilyName) { case SPELLFAMILY_GENERIC: { - switch(m_spellInfo->Id) + switch (m_spellInfo->Id) { // Glyph of Backstab case 63975: @@ -4525,7 +4525,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) return; uint32 spell_id = 0; - switch(urand(1, 5)) + switch (urand(1, 5)) { case 1: spell_id = 8854; break; default: spell_id = 8855; break; @@ -4660,7 +4660,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; - switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) + switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) { case 75: unitTarget->CastSpell(unitTarget, 51621, true); break; case 150: unitTarget->CastSpell(unitTarget, 48024, true); break; @@ -4705,7 +4705,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; - switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) + switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) { case 75: unitTarget->CastSpell(unitTarget, 42680, true); break; case 150: unitTarget->CastSpell(unitTarget, 42683, true); break; @@ -4775,7 +4775,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) return; uint32 spellId = 0; - switch(rand() % 4) + switch (rand() % 4) { case 0: spellId = 46740; break; case 1: spellId = 46739; break; @@ -5021,7 +5021,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; - switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) + switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) { case 0: unitTarget->CastSpell(unitTarget, 71343, true); break; case 75: unitTarget->CastSpell(unitTarget, 71344, true); break; @@ -5067,7 +5067,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; - switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) + switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) { case 75: unitTarget->CastSpell(unitTarget, 72281, true); break; case 150: unitTarget->CastSpell(unitTarget, 72282, true); break; @@ -5130,7 +5130,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; - switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) + switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING)) { case 75: unitTarget->CastSpell(unitTarget, 75619, true); break; case 150: unitTarget->CastSpell(unitTarget, 75620, true); break; @@ -5229,7 +5229,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) uint32 spell_heal; - switch(m_caster->GetEntry()) + switch (m_caster->GetEntry()) { case 31897: spell_heal = 7001; break; case 31896: spell_heal = 27873; break; @@ -5396,7 +5396,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) } case SPELLFAMILY_POTION: { - switch(m_spellInfo->Id) + switch (m_spellInfo->Id) { // Netherbloom case 28702: @@ -5562,8 +5562,8 @@ void Spell::EffectDuel(SpellEffIndex effIndex) Map* map = m_caster->GetMap(); if (!pGameObj->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, map, m_caster->GetPhaseMask(), - m_caster->GetPositionX()+(unitTarget->GetPositionX()-m_caster->GetPositionX())/2 , - m_caster->GetPositionY()+(unitTarget->GetPositionY()-m_caster->GetPositionY())/2 , + m_caster->GetPositionX()+(unitTarget->GetPositionX()-m_caster->GetPositionX())/2, + m_caster->GetPositionY()+(unitTarget->GetPositionY()-m_caster->GetPositionY())/2, m_caster->GetPositionZ(), m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY)) { @@ -5879,7 +5879,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex) uint32 go_id = m_spellInfo->Effects[effIndex].MiscValue; uint8 slot = 0; - switch(m_spellInfo->Effects[effIndex].Effect) + switch (m_spellInfo->Effects[effIndex].Effect) { case SPELL_EFFECT_SUMMON_OBJECT_SLOT1: slot = 0; break; case SPELL_EFFECT_SUMMON_OBJECT_SLOT2: slot = 1; break; @@ -6579,7 +6579,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) int32 duration = m_spellInfo->GetDuration(); - switch(goinfo->type) + switch (goinfo->type) { case GAMEOBJECT_TYPE_FISHINGNODE: { @@ -6589,7 +6589,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) // end time of range when possible catch fish (FISHING_BOBBER_READY_TIME..GetDuration(m_spellInfo)) // start time == fish-FISHING_BOBBER_READY_TIME (0..GetDuration(m_spellInfo)-FISHING_BOBBER_READY_TIME) int32 lastSec = 0; - switch(urand(0, 3)) + switch (urand(0, 3)) { case 0: lastSec = 3; break; case 1: lastSec = 7; break; @@ -7229,7 +7229,7 @@ void Spell::EffectPlayerNotification(SpellEffIndex effIndex) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return; - switch(m_spellInfo->Id) + switch (m_spellInfo->Id) { case 58730: // Restricted Flight Area case 58600: // Restricted Flight Area diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index b7bcf02f86c..8b831dd6c1a 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -370,7 +370,7 @@ SpellImplicitTargetInfo::StaticData SpellImplicitTargetInfo::_data[TOTAL_SPELL_ {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 23 TARGET_GAMEOBJECT_TARGET {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_FRONT}, // 24 TARGET_UNIT_CONE_ENEMY_24 {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 25 TARGET_UNIT_TARGET_ANY - {TARGET_OBJECT_TYPE_GOBJ_ITEM,TARGET_REFERENCE_TYPE_TARGET,TARGET_SELECT_CATEGORY_DEFAULT,TARGET_SELECT_CHECK_DEFAULT,TARGET_DIR_NONE}, // 26 TARGET_GAMEOBJECT_ITEM_TARGET + {TARGET_OBJECT_TYPE_GOBJ_ITEM, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 26 TARGET_GAMEOBJECT_ITEM_TARGET {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 27 TARGET_UNIT_MASTER {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 28 TARGET_DEST_DYNOBJ_ENEMY {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_ALLY, TARGET_DIR_NONE}, // 29 TARGET_DEST_DYNOBJ_ALLY @@ -437,9 +437,9 @@ SpellImplicitTargetInfo::StaticData SpellImplicitTargetInfo::_data[TOTAL_SPELL_ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 90 TARGET_UNIT_TARGET_MINIPET {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 91 TARGET_DEST_DEST_RADIUS {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 92 TARGET_UNIT_SUMMONER - {TARGET_OBJECT_TYPE_CORPSE,TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 93 TARGET_CORPSE_SRC_AREA_ENEMY + {TARGET_OBJECT_TYPE_CORPSE, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 93 TARGET_CORPSE_SRC_AREA_ENEMY {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 94 TARGET_UNIT_VEHICLE - {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_PASSENGER,TARGET_DIR_NONE}, // 95 TARGET_UNIT_TARGET_PASSENGER + {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_PASSENGER, TARGET_DIR_NONE}, // 95 TARGET_UNIT_TARGET_PASSENGER {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 96 TARGET_UNIT_PASSENGER_0 {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 97 TARGET_UNIT_PASSENGER_1 {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 98 TARGET_UNIT_PASSENGER_2 @@ -522,7 +522,7 @@ bool SpellEffectInfo::IsAreaAuraEffect() const bool SpellEffectInfo::IsFarUnitTargetEffect() const { - return (Effect == SPELL_EFFECT_SUMMON_PLAYER) + return (Effect == SPELL_EFFECT_SUMMON_PLAYER) || (Effect == SPELL_EFFECT_SUMMON_RAF_FRIEND) || (Effect == SPELL_EFFECT_RESURRECT) || (Effect == SPELL_EFFECT_RESURRECT_NEW) @@ -689,7 +689,7 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 2 SPELL_EFFECT_SCHOOL_DAMAGE {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_NONE}, // 3 SPELL_EFFECT_DUMMY {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_NONE}, // 4 SPELL_EFFECT_PORTAL_TELEPORT - {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST},// 5 SPELL_EFFECT_TELEPORT_UNITS + {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST}, // 5 SPELL_EFFECT_TELEPORT_UNITS {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 6 SPELL_EFFECT_APPLY_AURA {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 7 SPELL_EFFECT_ENVIRONMENTAL_DAMAGE {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 8 SPELL_EFFECT_POWER_DRAIN @@ -713,7 +713,7 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_UNIT}, // 26 SPELL_EFFECT_DEFENSE {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_DEST}, // 27 SPELL_EFFECT_PERSISTENT_AREA_AURA {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_DEST}, // 28 SPELL_EFFECT_SUMMON - {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST},// 29 SPELL_EFFECT_LEAP + {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST}, // 29 SPELL_EFFECT_LEAP {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_UNIT}, // 30 SPELL_EFFECT_ENERGIZE {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 31 SPELL_EFFECT_WEAPON_PERCENT_DAMAGE {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_NONE}, // 32 SPELL_EFFECT_TRIGGER_MISSILE @@ -727,7 +727,7 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 40 SPELL_EFFECT_DUAL_WIELD {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 41 SPELL_EFFECT_JUMP {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_DEST}, // 42 SPELL_EFFECT_JUMP_DEST - {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST},// 43 SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER + {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST}, // 43 SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 44 SPELL_EFFECT_SKILL_STEP {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 45 SPELL_EFFECT_ADD_HONOR {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_UNIT}, // 46 SPELL_EFFECT_SPAWN @@ -767,7 +767,7 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 80 SPELL_EFFECT_ADD_COMBO_POINTS {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_DEST}, // 81 SPELL_EFFECT_CREATE_HOUSE {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 82 SPELL_EFFECT_BIND_SIGHT - {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST},// 83 SPELL_EFFECT_DUEL + {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST}, // 83 SPELL_EFFECT_DUEL {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_UNIT}, // 84 SPELL_EFFECT_STUCK {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_NONE}, // 85 SPELL_EFFECT_SUMMON_PLAYER {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_GOBJ}, // 86 SPELL_EFFECT_ACTIVATE_OBJECT @@ -828,8 +828,8 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 141 SPELL_EFFECT_FORCE_CAST_WITH_VALUE {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 142 SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 143 SPELL_EFFECT_APPLY_AREA_AURA_OWNER - {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST},// 144 SPELL_EFFECT_KNOCK_BACK_DEST - {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST},// 145 SPELL_EFFECT_PULL_TOWARDS_DEST + {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST}, // 144 SPELL_EFFECT_KNOCK_BACK_DEST + {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT_AND_DEST}, // 145 SPELL_EFFECT_PULL_TOWARDS_DEST {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 146 SPELL_EFFECT_ACTIVATE_RUNE {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 147 SPELL_EFFECT_QUEST_FAIL {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_NONE}, // 148 SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index 9b29120ef1c..b4f4ca8c11e 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -62,7 +62,7 @@ enum SpellCastTargetFlags TARGET_FLAG_UNUSED20 = 0x00080000, // uint32 counter, loop { vec3 - screen position (?), guid }, not used so far TARGET_FLAG_UNIT_PASSENGER = 0x00100000, // guessed, used to validate target (if vehicle passenger) - TARGET_FLAG_UNIT_MASK = TARGET_FLAG_UNIT | TARGET_FLAG_UNIT_RAID | TARGET_FLAG_UNIT_PARTY + TARGET_FLAG_UNIT_MASK = TARGET_FLAG_UNIT | TARGET_FLAG_UNIT_RAID | TARGET_FLAG_UNIT_PARTY | TARGET_FLAG_UNIT_ENEMY | TARGET_FLAG_UNIT_ALLY | TARGET_FLAG_UNIT_DEAD | TARGET_FLAG_UNIT_MINIPET | TARGET_FLAG_UNIT_PASSENGER, TARGET_FLAG_GAMEOBJECT_MASK = TARGET_FLAG_GAMEOBJECT | TARGET_FLAG_GAMEOBJECT_ITEM, TARGET_FLAG_CORPSE_MASK = TARGET_FLAG_CORPSE_ALLY | TARGET_FLAG_CORPSE_ENEMY, diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 57fa113dec8..c80a3123739 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1135,7 +1135,7 @@ void SpellMgr::LoadSpellRanks() } mSpellChains.clear(); - QueryResult result = WorldDatabase.Query("SELECT first_spell_id, spell_id, rank from spell_ranks ORDER BY first_spell_id , rank"); + QueryResult result = WorldDatabase.Query("SELECT first_spell_id, spell_id, rank from spell_ranks ORDER BY first_spell_id, rank"); if (!result) { @@ -1820,7 +1820,7 @@ void SpellMgr::LoadSpellProcs() baseProcEntry.cooldown = uint32(cooldown); baseProcEntry.charges = fields[14].GetUInt32(); - while(true) + while (true) { if (mSpellProcMap.find(spellId) != mSpellProcMap.end()) { diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 64d21b7c3a5..d701ab2882c 100755 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -144,10 +144,10 @@ enum ProcFlags PROC_FLAG_DEATH = 0x01000000, // 24 Died in any way // flag masks - AUTO_ATTACK_PROC_FLAG_MASK = PROC_FLAG_DONE_MELEE_AUTO_ATTACK | PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK + AUTO_ATTACK_PROC_FLAG_MASK = PROC_FLAG_DONE_MELEE_AUTO_ATTACK | PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK | PROC_FLAG_DONE_RANGED_AUTO_ATTACK | PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK, - MELEE_PROC_FLAG_MASK = PROC_FLAG_DONE_MELEE_AUTO_ATTACK | PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK + MELEE_PROC_FLAG_MASK = PROC_FLAG_DONE_MELEE_AUTO_ATTACK | PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK | PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS | PROC_FLAG_TAKEN_SPELL_MELEE_DMG_CLASS | PROC_FLAG_DONE_MAINHAND_ATTACK | PROC_FLAG_DONE_OFFHAND_ATTACK, diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 2d83b2e8f1a..53ec7822623 100755 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -87,7 +87,7 @@ bool _SpellScript::EffectHook::IsEffectAffected(SpellInfo const* spellEntry, uin std::string _SpellScript::EffectHook::EffIndexToString() { - switch(effIndex) + switch (effIndex) { case EFFECT_ALL: return "EFFECT_ALL"; @@ -114,7 +114,7 @@ bool _SpellScript::EffectNameCheck::Check(SpellInfo const* spellEntry, uint8 eff std::string _SpellScript::EffectNameCheck::ToString() { - switch(effName) + switch (effName) { case SPELL_EFFECT_ANY: return "SPELL_EFFECT_ANY"; @@ -136,7 +136,7 @@ bool _SpellScript::EffectAuraNameCheck::Check(SpellInfo const* spellEntry, uint8 std::string _SpellScript::EffectAuraNameCheck::ToString() { - switch(effAurName) + switch (effAurName) { case SPELL_AURA_ANY: return "SPELL_AURA_ANY"; diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 15b22097f2d..dab77f6533d 100755 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -374,13 +374,13 @@ class AuraScript : public _SpellScript #define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \ typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit* target); \ - typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const* , AuraEffectHandleModes); \ + typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const*, AuraEffectHandleModes); \ typedef void(CLASSNAME::*AuraEffectPeriodicFnType)(AuraEffect const*); \ typedef void(CLASSNAME::*AuraEffectUpdatePeriodicFnType)(AuraEffect*); \ - typedef void(CLASSNAME::*AuraEffectCalcAmountFnType)(AuraEffect const* , int32 &, bool &); \ - typedef void(CLASSNAME::*AuraEffectCalcPeriodicFnType)(AuraEffect const* , bool &, int32 &); \ - typedef void(CLASSNAME::*AuraEffectCalcSpellModFnType)(AuraEffect const* , SpellModifier* &); \ - typedef void(CLASSNAME::*AuraEffectAbsorbFnType)(AuraEffect* , DamageInfo &, uint32 &); \ + typedef void(CLASSNAME::*AuraEffectCalcAmountFnType)(AuraEffect const*, int32 &, bool &); \ + typedef void(CLASSNAME::*AuraEffectCalcPeriodicFnType)(AuraEffect const*, bool &, int32 &); \ + typedef void(CLASSNAME::*AuraEffectCalcSpellModFnType)(AuraEffect const*, SpellModifier* &); \ + typedef void(CLASSNAME::*AuraEffectAbsorbFnType)(AuraEffect*, DamageInfo &, uint32 &); \ AURASCRIPT_FUNCTION_TYPE_DEFINES(AuraScript) diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index 24955737b46..e5865cc4f90 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -97,7 +97,7 @@ void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table ss << id; } } - while(result->NextRow()); + while (result->NextRow()); if (found) { diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index fff06661e10..8f888f8fb85 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -493,7 +493,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s } // change the data to server values - switch(type) + switch (type) { case DTT_CHARACTER: { diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index 0e98ebc7b17..590e6912cc5 100755 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -218,7 +218,7 @@ bool Weather::UpdateWeather() ///- Log the event char const* wthstr; - switch(state) + switch (state) { case WEATHER_STATE_LIGHT_RAIN: wthstr = "light rain"; @@ -281,7 +281,7 @@ WeatherState Weather::GetWeatherState() const if (m_grade<0.27f) return WEATHER_STATE_FINE; - switch(m_type) + switch (m_type) { case WEATHER_TYPE_RAIN: if (m_grade<0.40f) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index d72f09f3279..6794d99db32 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2216,7 +2216,7 @@ BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, std::string dura PreparedStatement* stmt = NULL; ///- Update the database with ban information - switch(mode) + switch (mode) { case BAN_IP: // No SQL injection with prepared statements |
