aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Entities')
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp12
-rwxr-xr-xsrc/server/game/Entities/Creature/TemporarySummon.cpp2
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp6
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.h18
-rwxr-xr-xsrc/server/game/Entities/Item/Item.cpp10
-rwxr-xr-xsrc/server/game/Entities/Item/ItemEnchantmentMgr.cpp2
-rwxr-xr-xsrc/server/game/Entities/Item/ItemPrototype.h6
-rwxr-xr-xsrc/server/game/Entities/Object/Object.cpp18
-rwxr-xr-xsrc/server/game/Entities/Object/Object.h20
-rwxr-xr-xsrc/server/game/Entities/Object/ObjectDefines.h4
-rwxr-xr-xsrc/server/game/Entities/Object/ObjectPosSelector.cpp4
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.cpp2
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp64
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h2
-rwxr-xr-xsrc/server/game/Entities/Transport/Transport.cpp4
-rwxr-xr-xsrc/server/game/Entities/Unit/StatSystem.cpp18
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp110
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h10
-rwxr-xr-xsrc/server/game/Entities/Vehicle/Vehicle.cpp2
19 files changed, 157 insertions, 157 deletions
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);