aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
authorclick <clickvd@gonnamakeyou.com>2011-06-11 22:35:29 +0200
committerclick <clickvd@gonnamakeyou.com>2011-06-11 22:35:29 +0200
commit158966dc793f47dd4ada264da775f647601298aa (patch)
tree8fa1dc1cc36d07123662c32eb5981cfac01e91b6 /src/server/game/Entities
parent9ef8bd307200445f448a67d1bb26c3afee9b7051 (diff)
Core: Codestyle cleanup
Diffstat (limited to 'src/server/game/Entities')
-rwxr-xr-xsrc/server/game/Entities/Creature/TemporarySummon.h2
-rwxr-xr-xsrc/server/game/Entities/DynamicObject/DynamicObject.cpp2
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp12
-rwxr-xr-xsrc/server/game/Entities/Item/Container/Bag.cpp2
-rwxr-xr-xsrc/server/game/Entities/Item/Container/Bag.h2
-rwxr-xr-xsrc/server/game/Entities/Object/Object.cpp2
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.cpp6
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.h4
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp48
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h36
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp160
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h74
12 files changed, 175 insertions, 175 deletions
diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h
index 82f63d887ab..67a94ecd591 100755
--- a/src/server/game/Entities/Creature/TemporarySummon.h
+++ b/src/server/game/Entities/Creature/TemporarySummon.h
@@ -57,7 +57,7 @@ class Minion : public TempSummon
bool IsPetGhoul() const {return GetEntry() == 26125;} // Ghoul may be guardian or pet
bool IsGuardianPet() const;
protected:
- Unit * const m_owner;
+ Unit* const m_owner;
float m_followAngle;
};
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
index 444b4170104..d6eb5ac3516 100755
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
@@ -196,7 +196,7 @@ void DynamicObject::SetCasterViewpoint()
void DynamicObject::RemoveCasterViewpoint()
{
- if (Player * caster = _caster->ToPlayer())
+ if (Player* caster = _caster->ToPlayer())
{
caster->SetViewpoint(this, false);
_isViewpoint = false;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index f79b2ddbb23..dae77ac300e 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -144,7 +144,7 @@ void GameObject::RemoveFromWorld()
// Possible crash at access to deleted GO in Unit::m_gameobj
if (uint64 owner_guid = GetOwnerGUID())
{
- if (Unit * owner = GetOwner())
+ if (Unit* owner = GetOwner())
owner->RemoveGameObject(this, false);
else
sLog->outError("Delete GameObject (GUID: %u Entry: %u) that have references in not found creature %u GO list. Crash possible later.", GetGUIDLow(), GetGOInfo()->entry, GUID_LOPART(owner_guid));
@@ -609,7 +609,7 @@ void GameObject::Delete()
{
SetLootState(GO_NOT_READY);
if (GetOwnerGUID())
- if (Unit * owner = GetOwner())
+ if (Unit* owner = GetOwner())
owner->RemoveGameObject(this, false);
ASSERT (!GetOwnerGUID());
@@ -817,7 +817,7 @@ bool GameObject::hasInvolvedQuest(uint32 quest_id) const
bool GameObject::IsTransport() const
{
// If something is marked as a transport, don't transmit an out of range packet for it.
- GameObjectTemplate const * gInfo = GetGOInfo();
+ GameObjectTemplate const* gInfo = GetGOInfo();
if (!gInfo) return false;
return gInfo->type == GAMEOBJECT_TYPE_TRANSPORT || gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT;
}
@@ -826,7 +826,7 @@ bool GameObject::IsTransport() const
bool GameObject::IsDynTransport() const
{
// If something is marked as a transport, don't transmit an out of range packet for it.
- GameObjectTemplate const * gInfo = GetGOInfo();
+ GameObjectTemplate const* gInfo = GetGOInfo();
if (!gInfo) return false;
return gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT || (gInfo->type == GAMEOBJECT_TYPE_TRANSPORT && !gInfo->transport.pause);
}
@@ -929,7 +929,7 @@ void GameObject::TriggeringLinkedGameObject(uint32 trapEntry, Unit* target)
return;
float range;
- SpellRangeEntry const * srentry = sSpellRangeStore.LookupEntry(trapSpell->rangeIndex);
+ SpellRangeEntry const* srentry = sSpellRangeStore.LookupEntry(trapSpell->rangeIndex);
if (GetSpellMaxRangeForHostile(srentry) == GetSpellMaxRangeForFriend(srentry))
range = GetSpellMaxRangeForHostile(srentry);
else
@@ -1657,7 +1657,7 @@ void GameObject::SendCustomAnim(uint32 anim)
bool GameObject::IsInRange(float x, float y, float z, float radius) const
{
- GameObjectDisplayInfoEntry const * info = sGameObjectDisplayInfoStore.LookupEntry(GetUInt32Value(GAMEOBJECT_DISPLAYID));
+ GameObjectDisplayInfoEntry const* info = sGameObjectDisplayInfoStore.LookupEntry(GetUInt32Value(GAMEOBJECT_DISPLAYID));
if (!info)
return IsWithinDist3d(x, y, z, radius);
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index 4d2ebf1b466..007e22d5dfa 100755
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
@@ -70,7 +70,7 @@ void Bag::RemoveFromWorld()
bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
{
- ItemTemplate const * itemProto = sObjectMgr->GetItemTemplate(itemid);
+ ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(itemid);
if (!itemProto || itemProto->ContainerSlots > MAX_BAG_SIZE)
return false;
diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h
index c8421346082..df6253caf9e 100755
--- a/src/server/game/Entities/Item/Container/Bag.h
+++ b/src/server/game/Entities/Item/Container/Bag.h
@@ -66,7 +66,7 @@ class Bag : public Item
Item* m_bagslot[MAX_BAG_SIZE];
};
-inline Item* NewItemOrBag(ItemTemplate const * proto)
+inline Item* NewItemOrBag(ItemTemplate const* proto)
{
return (proto->InventoryType == INVTYPE_BAG) ? new Bag : new Item;
}
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index ce937cdedfd..877621af69f 100755
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1147,7 +1147,7 @@ bool Object::PrintIndexError(uint32 index, bool set) const
return false;
}
-bool Position::HasInLine(const Unit * const target, float distance, float width) const
+bool Position::HasInLine(const Unit* const target, float distance, float width) const
{
if (!HasInArc(M_PI, target) || !target->IsWithinDist3d(m_positionX, m_positionY, m_positionZ, distance))
return false;
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index b4e95cc8f4c..dc925c9f451 100755
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -762,7 +762,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
return true;
}
-bool Pet::CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit * owner)
+bool Pet::CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner)
{
if (!CreateBaseAtTamed(cinfo, owner->GetMap(), owner->GetPhaseMask()))
return false;
@@ -775,7 +775,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit * owner)
return true;
}
-bool Pet::CreateBaseAtTamed(CreatureTemplate const * cinfo, Map * map, uint32 phaseMask)
+bool Pet::CreateBaseAtTamed(CreatureTemplate const* cinfo, Map * map, uint32 phaseMask)
{
sLog->outDebug(LOG_FILTER_PETS, "Pet::CreateBaseForTamed");
uint32 guid=sObjectMgr->GenerateLowGuid(HIGHGUID_PET);
@@ -1564,7 +1564,7 @@ bool Pet::resetTalents()
if (owner->ToPlayer()->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS))
owner->ToPlayer()->RemoveAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS, true);
- CreatureTemplate const * ci = GetCreatureInfo();
+ CreatureTemplate const* ci = GetCreatureInfo();
if (!ci)
return false;
// Check pet talent type
diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h
index 52d2e4401f1..172151ac85a 100755
--- a/src/server/game/Entities/Pet/Pet.h
+++ b/src/server/game/Entities/Pet/Pet.h
@@ -136,8 +136,8 @@ class Pet : public Guardian
bool Create (uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 pet_number);
bool CreateBaseAtCreature(Creature* creature);
- bool CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit * owner);
- bool CreateBaseAtTamed(CreatureTemplate const * cinfo, Map * map, uint32 phaseMask);
+ bool CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner);
+ bool CreateBaseAtTamed(CreatureTemplate const* cinfo, Map * map, uint32 phaseMask);
bool LoadPetFromDB(Player* owner, uint32 petentry = 0, uint32 petnumber = 0, bool current = false);
bool isBeingLoaded() const { return m_loading;}
void SavePetToDB(PetSaveMode mode);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 6215c043586..19202a6d882 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -4202,7 +4202,7 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns)
{
next = itr;
++next;
- SpellEntry const * entry = sSpellStore.LookupEntry(itr->first);
+ SpellEntry const* entry = sSpellStore.LookupEntry(itr->first);
// check if spellentry is present and if the cooldown is less or equal to 10 min
if (entry &&
entry->RecoveryTime <= 10 * MINUTE * IN_MILLISECONDS &&
@@ -6897,7 +6897,7 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in
float percent = 100.0f;
// Get the generic rate first
- if (RepRewardRate const * repData = sObjectMgr->GetRepRewardRate(faction))
+ if (RepRewardRate const* repData = sObjectMgr->GetRepRewardRate(faction))
{
float repRate = for_quest ? repData->quest_rate : repData->creature_rate;
percent *= repRate;
@@ -7582,7 +7582,7 @@ void Player::DuelComplete(DuelCompleteType type)
AuraApplicationMap &itsAuras = duel->opponent->GetAppliedAuras();
for (AuraApplicationMap::iterator i = itsAuras.begin(); i != itsAuras.end();)
{
- Aura const * aura = i->second->GetBase();
+ Aura const* aura = i->second->GetBase();
if (!i->second->IsPositive() && aura->GetCasterGUID() == GetGUID() && aura->GetApplyTime() >= duel->startTime)
duel->opponent->RemoveAura(i);
else
@@ -7592,7 +7592,7 @@ void Player::DuelComplete(DuelCompleteType type)
AuraApplicationMap &myAuras = GetAppliedAuras();
for (AuraApplicationMap::iterator i = myAuras.begin(); i != myAuras.end();)
{
- Aura const * aura = i->second->GetBase();
+ Aura const* aura = i->second->GetBase();
if (!i->second->IsPositive() && aura->GetCasterGUID() == duel->opponent->GetGUID() && aura->GetApplyTime() >= duel->startTime)
RemoveAura(i);
else
@@ -8183,7 +8183,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
{
// If usable, try to cast item spell
- if (Item * item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
+ if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
if (!item->IsBroken() && CanUseAttackType(attType))
if (ItemTemplate const *proto = item->GetTemplate())
{
@@ -8211,7 +8211,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
}
}
-void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const * proto)
+void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const* proto)
{
// Can do effect if any damage done to target
if (procVictim & PROC_FLAG_TAKEN_DAMAGE)
@@ -9611,7 +9611,7 @@ void Player::SendBGWeekendWorldStates()
{
for (uint32 i = 1; i < sBattlemasterListStore.GetNumRows(); ++i)
{
- BattlemasterListEntry const * bl = sBattlemasterListStore.LookupEntry(i);
+ BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(i);
if (bl && bl->HolidayWorldStateId)
{
if (BattlegroundMgr::IsBGWeekend((BattlegroundTypeId)bl->id))
@@ -14481,7 +14481,7 @@ bool Player::IsActiveQuest(uint32 quest_id) const
return m_QuestStatus.find(quest_id) != m_QuestStatus.end();
}
-Quest const * Player::GetNextQuest(uint64 guid, Quest const *pQuest)
+Quest const* Player::GetNextQuest(uint64 guid, Quest const *pQuest)
{
QuestRelationBounds pObjectQR;
@@ -15435,7 +15435,7 @@ bool Player::GiveQuestSourceItem(Quest const *pQuest)
InventoryResult msg = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, srcitem, count);
if (msg == EQUIP_ERR_OK)
{
- Item * item = StoreNewItem(dest, srcitem, true);
+ Item* item = StoreNewItem(dest, srcitem, true);
SendNewItem(item, count, true, false);
return true;
}
@@ -16548,7 +16548,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
_LoadInstanceTimeRestrictions(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES));
_LoadBGData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBGDATA));
- MapEntry const * mapEntry = sMapStore.LookupEntry(mapId);
+ MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
if (!mapEntry || !IsPositionValid())
{
sLog->outError("Player (guidlow %d) have invalid coordinates (MapId: %u X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
@@ -17316,7 +17316,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
Item* item = NULL;
uint32 itemGuid = fields[13].GetUInt32();
uint32 itemEntry = fields[14].GetUInt32();
- if (ItemTemplate const * proto = sObjectMgr->GetItemTemplate(itemEntry))
+ if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry))
{
bool remove = false;
item = NewItemOrBag(proto);
@@ -19543,7 +19543,7 @@ void Player::SendRemoveControlBar()
GetSession()->SendPacket(&data);
}
-bool Player::IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mod, Spell * spell)
+bool Player::IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mod, Spell* spell)
{
if (!mod || !spellInfo)
return false;
@@ -19645,7 +19645,7 @@ void Player::RestoreSpellMods(Spell *spell, uint32 ownerAuraId)
}
}
-void Player::RemoveSpellMods(Spell * spell)
+void Player::RemoveSpellMods(Spell* spell)
{
if (!spell)
return;
@@ -19678,7 +19678,7 @@ void Player::RemoveSpellMods(Spell * spell)
}
}
-void Player::DropModCharge(SpellModifier * mod, Spell * spell)
+void Player::DropModCharge(SpellModifier* mod, Spell* spell)
{
// don't handle spells with proc_event entry defined
// this is a temporary workaround, because all spellmods should be handled like that
@@ -19695,7 +19695,7 @@ void Player::DropModCharge(SpellModifier * mod, Spell * spell)
}
}
-void Player::SetSpellModTakingSpell(Spell * spell, bool apply)
+void Player::SetSpellModTakingSpell(Spell* spell, bool apply)
{
if (!spell || (m_spellModTakingSpell && m_spellModTakingSpell != spell))
return;
@@ -21195,14 +21195,14 @@ void Player::ModifyMoney(int32 d)
}
}
-Unit * Player::GetSelectedUnit() const
+Unit* Player::GetSelectedUnit() const
{
if (m_curSelection)
return ObjectAccessor::GetUnit(*this, m_curSelection);
return NULL;
}
-Player * Player::GetSelectedPlayer() const
+Player* Player::GetSelectedPlayer() const
{
if (m_curSelection)
return ObjectAccessor::GetPlayer(*this, m_curSelection);
@@ -21228,7 +21228,7 @@ void Player::SendComboPoints()
}
}
-void Player::AddComboPoints(Unit* target, int8 count, Spell * spell)
+void Player::AddComboPoints(Unit* target, int8 count, Spell* spell)
{
if (!count)
return;
@@ -21481,7 +21481,7 @@ void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint3
GetSession()->SendPacket(&data);
}
-void Player::ApplyEquipCooldown(Item * pItem)
+void Player::ApplyEquipCooldown(Item* pItem)
{
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_PROTO_FLAG_NO_EQUIP_COOLDOWN))
return;
@@ -22074,7 +22074,7 @@ bool Player::CanNoReagentCast(SpellEntry const* spellInfo) const
return false;
}
-void Player::RemoveItemDependentAurasAndCasts(Item * pItem)
+void Player::RemoveItemDependentAurasAndCasts(Item* pItem)
{
for (AuraMap::iterator itr = m_ownedAuras.begin(); itr != m_ownedAuras.end();)
{
@@ -22765,7 +22765,7 @@ uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 n
void Player::InitGlyphsForLevel()
{
for (uint32 i = 0; i < sGlyphSlotStore.GetNumRows(); ++i)
- if (GlyphSlotEntry const * gs = sGlyphSlotStore.LookupEntry(i))
+ if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(i))
if (gs->Order)
SetGlyphSlot(gs->Order - 1, gs->Id);
@@ -22946,7 +22946,7 @@ uint32 Player::GetRuneBaseCooldown(uint8 index)
return cooldown;
}
-void Player::RemoveRunesByAuraEffect(AuraEffect const * aura)
+void Player::RemoveRunesByAuraEffect(AuraEffect const* aura)
{
for (uint8 i = 0; i < MAX_RUNES; ++i)
{
@@ -22960,7 +22960,7 @@ void Player::RemoveRunesByAuraEffect(AuraEffect const * aura)
void Player::RestoreBaseRune(uint8 index)
{
- AuraEffect const * aura = m_runes->runes[index].ConvertAura;
+ AuraEffect const* aura = m_runes->runes[index].ConvertAura;
ConvertRune(index, GetBaseRune(index));
SetRuneConvertAura(index, NULL);
// Don't drop passive talents providing rune convertion
@@ -23097,7 +23097,7 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot)
if (msg == EQUIP_ERR_OK)
{
AllowedLooterSet* looters = item->GetAllowedLooters();
- Item * newitem = StoreNewItem(dest, item->itemid, true, item->randomPropertyId, (looters->size() > 1) ? looters : NULL);
+ Item* newitem = StoreNewItem(dest, item->itemid, true, item->randomPropertyId, (looters->size() > 1) ? looters : NULL);
if (qitem)
{
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 081948d7b9d..84f7e1edd86 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -310,7 +310,7 @@ struct RuneInfo
uint8 BaseRune;
uint8 CurrentRune;
uint32 Cooldown;
- AuraEffect const * ConvertAura;
+ AuraEffect const* ConvertAura;
};
struct Runes
@@ -331,10 +331,10 @@ struct Runes
struct EnchantDuration
{
EnchantDuration() : item(NULL), slot(MAX_ENCHANTMENT_SLOT), leftduration(0) {};
- EnchantDuration(Item * _item, EnchantmentSlot _slot, uint32 _leftduration) : item(_item), slot(_slot),
+ EnchantDuration(Item* _item, EnchantmentSlot _slot, uint32 _leftduration) : item(_item), slot(_slot),
leftduration(_leftduration){ ASSERT(item); };
- Item * item;
+ Item* item;
EnchantmentSlot slot;
uint32 leftduration;
};
@@ -1250,7 +1250,7 @@ class Player : public Unit, public GridObject<Player>
void AddRefundReference(uint32 it);
void DeleteRefundReference(uint32 it);
- void ApplyEquipCooldown(Item * pItem);
+ void ApplyEquipCooldown(Item* pItem);
void SetAmmo(uint32 item);
void RemoveAmmo();
float GetAmmoDPS() const { return m_ammoDPS; }
@@ -1268,7 +1268,7 @@ class Player : public Unit, public GridObject<Player>
// in trade, auction, guild bank, mail....
void MoveItemToInventory(ItemPosCountVec const& dest, Item* pItem, bool update, bool in_characterInventoryDB = false);
// in trade, guild bank, mail....
- void RemoveItemDependentAurasAndCasts(Item * pItem);
+ void RemoveItemDependentAurasAndCasts(Item* pItem);
void DestroyItem(uint8 bag, uint8 slot, bool update);
void DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check = false);
void DestroyItemCount(Item* item, uint32& count, bool update);
@@ -1536,7 +1536,7 @@ class Player : public Unit, public GridObject<Player>
uint8 GetComboPoints() { return m_comboPoints; }
const uint64& GetComboTarget() const { return m_comboTarget; }
- void AddComboPoints(Unit* target, int8 count, Spell * spell = NULL);
+ void AddComboPoints(Unit* target, int8 count, Spell* spell = NULL);
void GainSpellComboPoints(int8 count);
void ClearComboPoints();
void SendComboPoints();
@@ -1655,11 +1655,11 @@ class Player : public Unit, public GridObject<Player>
SpellCooldowns const& GetSpellCooldownMap() const { return m_spellCooldowns; }
void AddSpellMod(SpellModifier* mod, bool apply);
- bool IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mod, Spell * spell = NULL);
- template <class T> T ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell * spell = NULL);
- void RemoveSpellMods(Spell * spell);
+ bool IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mod, Spell* spell = NULL);
+ template <class T> T ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell = NULL);
+ void RemoveSpellMods(Spell* spell);
void RestoreSpellMods(Spell *spell, uint32 ownerAuraId=0);
- void DropModCharge(SpellModifier * mod, Spell * spell);
+ void DropModCharge(SpellModifier* mod, Spell* spell);
void SetSpellModTakingSpell(Spell* spell, bool apply);
static uint32 const infinityCooldownDelay = MONTH; // used for set "infinity cooldowns" for spells and check
@@ -2042,8 +2042,8 @@ class Player : public Unit, public GridObject<Player>
void ResetAllPowers();
void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType, bool apply);
- void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect const * aura, bool apply);
- void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, AuraEffect const * aura, bool apply);
+ void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect const* aura, bool apply);
+ void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, AuraEffect const* aura, bool apply);
void _ApplyItemMods(Item *item, uint8 slot, bool apply);
void _RemoveAllItemMods();
@@ -2062,7 +2062,7 @@ class Player : public Unit, public GridObject<Player>
void UpdateEquipSpellsAtFormChange();
void CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx);
void CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8 cast_count, uint32 glyphIndex);
- void CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const * proto);
+ void CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const* proto);
void SendEquipmentSetList();
void SetEquipmentSet(uint32 index, EquipmentSet eqset);
@@ -2407,9 +2407,9 @@ class Player : public Unit, public GridObject<Player>
void SetBaseRune(uint8 index, RuneType baseRune) { m_runes->runes[index].BaseRune = baseRune; }
void SetCurrentRune(uint8 index, RuneType currentRune) { m_runes->runes[index].CurrentRune = currentRune; }
void SetRuneCooldown(uint8 index, uint32 cooldown) { m_runes->runes[index].Cooldown = cooldown; m_runes->SetRuneState(index, (cooldown == 0) ? true : false); }
- void SetRuneConvertAura(uint8 index, AuraEffect const * aura) { m_runes->runes[index].ConvertAura = aura; }
- void AddRuneByAuraEffect(uint8 index, RuneType newType, AuraEffect const * aura) { SetRuneConvertAura(index, aura); ConvertRune(index, newType); }
- void RemoveRunesByAuraEffect(AuraEffect const * aura);
+ void SetRuneConvertAura(uint8 index, AuraEffect const* aura) { m_runes->runes[index].ConvertAura = aura; }
+ void AddRuneByAuraEffect(uint8 index, RuneType newType, AuraEffect const* aura) { SetRuneConvertAura(index, aura); ConvertRune(index, newType); }
+ void RemoveRunesByAuraEffect(AuraEffect const* aura);
void RestoreBaseRune(uint8 index);
void ConvertRune(uint8 index, RuneType newType);
void ResyncRunes(uint8 count);
@@ -2430,7 +2430,7 @@ class Player : public Unit, public GridObject<Player>
uint32 GetChampioningFaction() const { return m_ChampioningFaction; }
void SetChampioningFaction(uint32 faction) { m_ChampioningFaction = faction; }
- Spell * m_spellModTakingSpell;
+ Spell* m_spellModTakingSpell;
float GetAverageItemLevel();
bool isDebugAreaTriggers;
@@ -2597,7 +2597,7 @@ class Player : public Unit, public GridObject<Player>
SpellModList m_spellMods[MAX_SPELLMOD];
//uint32 m_pad;
-// Spell * m_spellModTakingSpell; // Spell for which charges are dropped in spell::finish
+// Spell* m_spellModTakingSpell; // Spell for which charges are dropped in spell::finish
EnchantDurationList m_enchantDuration;
ItemDurationList m_itemDuration;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 414791b73c6..ef2a117b517 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -600,10 +600,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
if (((*i)->GetMiscValue() & damageSchoolMask) == 0)
continue;
- Unit * shareDamageTarget = (*i)->GetCaster();
+ Unit* shareDamageTarget = (*i)->GetCaster();
if (!shareDamageTarget)
continue;
- SpellEntry const * spell = (*i)->GetSpellProto();
+ SpellEntry const* spell = (*i)->GetSpellProto();
uint32 share = CalculatePctN(damage, (*i)->GetAmount());
@@ -819,7 +819,7 @@ void Unit::CastStop(uint32 except_spellid)
InterruptSpell(CurrentSpellTypes(i), false);
}
-void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem, AuraEffect const * triggeredByAura, uint64 originalCaster)
+void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem, AuraEffect const* triggeredByAura, uint64 originalCaster)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
@@ -832,7 +832,7 @@ void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castIte
CastSpell(Victim, spellInfo, triggered, castItem, triggeredByAura, originalCaster);
}
-void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered, Item *castItem, AuraEffect const * triggeredByAura, uint64 originalCaster)
+void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered, Item *castItem, AuraEffect const* triggeredByAura, uint64 originalCaster)
{
if (!spellInfo)
{
@@ -841,7 +841,7 @@ void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered,
}
if (!originalCaster && GetTypeId() == TYPEID_UNIT && this->ToCreature()->isTotem() && IsControlledByPlayer())
- if (Unit * owner = GetOwner())
+ if (Unit* owner = GetOwner())
originalCaster=owner->GetGUID();
SpellCastTargets targets;
@@ -859,7 +859,7 @@ void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered,
spell->prepare(&targets, triggeredByAura);
}
-void Unit::CastCustomSpell(Unit* target, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem, AuraEffect const * triggeredByAura, uint64 originalCaster)
+void Unit::CastCustomSpell(Unit* target, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem, AuraEffect const* triggeredByAura, uint64 originalCaster)
{
CustomSpellValues values;
if (bp0)
@@ -871,14 +871,14 @@ void Unit::CastCustomSpell(Unit* target, uint32 spellId, int32 const* bp0, int32
CastCustomSpell(spellId, values, target, triggered, castItem, triggeredByAura, originalCaster);
}
-void Unit::CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* target, bool triggered, Item *castItem, AuraEffect const * triggeredByAura, uint64 originalCaster)
+void Unit::CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* target, bool triggered, Item *castItem, AuraEffect const* triggeredByAura, uint64 originalCaster)
{
CustomSpellValues values;
values.AddSpellMod(mod, value);
CastCustomSpell(spellId, values, target, triggered, castItem, triggeredByAura, originalCaster);
}
-void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim, bool triggered, Item *castItem, AuraEffect const * triggeredByAura, uint64 originalCaster)
+void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim, bool triggered, Item *castItem, AuraEffect const* triggeredByAura, uint64 originalCaster)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo)
@@ -908,7 +908,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit*
}
// used for scripting
-void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem, AuraEffect const * triggeredByAura, uint64 originalCaster, Unit* OriginalVictim)
+void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem, AuraEffect const* triggeredByAura, uint64 originalCaster, Unit* OriginalVictim)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
@@ -1660,7 +1660,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
{
AuraEffect * absorbAurEff = (*itr);
// Check if aura was removed during iteration - we don't need to work on such auras
- AuraApplication const * aurApp = absorbAurEff->GetBase()->GetApplicationOfTarget(pVictim->GetGUID());
+ AuraApplication const* aurApp = absorbAurEff->GetBase()->GetApplicationOfTarget(pVictim->GetGUID());
if (!aurApp)
continue;
if (!(absorbAurEff->GetMiscValue() & schoolMask))
@@ -1710,7 +1710,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
{
AuraEffect * absorbAurEff = (*itr);
// Check if aura was removed during iteration - we don't need to work on such auras
- AuraApplication const * aurApp = absorbAurEff->GetBase()->GetApplicationOfTarget(pVictim->GetGUID());
+ AuraApplication const* aurApp = absorbAurEff->GetBase()->GetApplicationOfTarget(pVictim->GetGUID());
if (!aurApp)
continue;
// check damage school mask
@@ -1779,7 +1779,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
continue;
// Damage can be splitted only if aura has an alive caster
- Unit * caster = (*itr)->GetCaster();
+ Unit* caster = (*itr)->GetCaster();
if (!caster || (caster == pVictim) || !caster->IsInWorld() || !caster->isAlive())
continue;
@@ -1813,7 +1813,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
continue;
// Damage can be splitted only if aura has an alive caster
- Unit * caster = (*itr)->GetCaster();
+ Unit* caster = (*itr)->GetCaster();
if (!caster || (caster == pVictim) || !caster->IsInWorld() || !caster->isAlive())
continue;
@@ -2222,7 +2222,7 @@ void Unit::SendMeleeAttackStop(Unit* victim)
sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
}
-bool Unit::isSpellBlocked(Unit* victim, SpellEntry const * spellProto, WeaponAttackType attackType)
+bool Unit::isSpellBlocked(Unit* victim, SpellEntry const* spellProto, WeaponAttackType attackType)
{
// These spells can't be blocked
if (spellProto && spellProto->Attributes & SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK)
@@ -2895,7 +2895,7 @@ void Unit::_UpdateAutoRepeatSpell()
}
}
-void Unit::SetCurrentCastedSpell(Spell * pSpell)
+void Unit::SetCurrentCastedSpell(Spell* pSpell)
{
ASSERT(pSpell); // NULL may be never passed here, use InterruptSpell or InterruptNonMeleeSpells
@@ -3063,7 +3063,7 @@ Spell* Unit::FindCurrentSpellBySpellId(uint32 spell_id) const
int32 Unit::GetCurrentSpellCastTime(uint32 spell_id) const
{
- if (Spell const * spell = FindCurrentSpellBySpellId(spell_id))
+ if (Spell const* spell = FindCurrentSpellBySpellId(spell_id))
return spell->GetCastTime();
return 0;
}
@@ -3167,7 +3167,7 @@ Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellEntry const* newAura, uint
return NULL;
}
-void Unit::_AddAura(UnitAura * aura, Unit * caster)
+void Unit::_AddAura(UnitAura* aura, Unit* caster)
{
ASSERT(!m_cleanupDone);
m_ownedAuras.insert(AuraMap::value_type(aura->GetId(), aura));
@@ -3219,7 +3219,7 @@ AuraApplication * Unit::_CreateAuraApplication(Aura * aura, uint8 effMask)
(GetTypeId() != TYPEID_PLAYER || !this->ToPlayer()->GetSession()->PlayerLoading()))
return NULL;
- Unit * caster = aura->GetCaster();
+ Unit* caster = aura->GetCaster();
AuraApplication * aurApp = new AuraApplication(this, caster, aura, effMask);
m_appliedAuras.insert(AuraApplicationMap::value_type(aurId, aurApp));
@@ -3271,7 +3271,7 @@ void Unit::_ApplyAura(AuraApplication * aurApp, uint8 effMask)
if (aura->GetSpellProto()->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED && !IsSitState())
SetStandState(UNIT_STAND_STATE_SIT);
- Unit * caster = aura->GetCaster();
+ Unit* caster = aura->GetCaster();
if (aurApp->GetRemoveMode())
return;
@@ -3303,7 +3303,7 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo
++m_removedAurasCount;
- Unit * caster = aura->GetCaster();
+ Unit* caster = aura->GetCaster();
// Remove all pointers from lists here to prevent possible pointer invalidation on spellcast/auraapply/auraremove
m_appliedAuras.erase(i);
@@ -3576,7 +3576,7 @@ void Unit::RemoveAura(uint32 spellId, uint64 caster, uint8 reqEffMask, AuraRemov
{
for (AuraApplicationMap::iterator iter = m_appliedAuras.lower_bound(spellId); iter != m_appliedAuras.upper_bound(spellId);)
{
- Aura const * aura = iter->second->GetBase();
+ Aura const* aura = iter->second->GetBase();
if (((aura->GetEffectMask() & reqEffMask) == reqEffMask)
&& (!caster || aura->GetCasterGUID() == caster))
{
@@ -3632,7 +3632,7 @@ void Unit::RemoveAurasDueToSpell(uint32 spellId, uint64 caster, uint8 reqEffMask
{
for (AuraApplicationMap::iterator iter = m_appliedAuras.lower_bound(spellId); iter != m_appliedAuras.upper_bound(spellId);)
{
- Aura const * aura = iter->second->GetBase();
+ Aura const* aura = iter->second->GetBase();
if (((aura->GetEffectMask() & reqEffMask) == reqEffMask)
&& (!caster || aura->GetCasterGUID() == caster))
{
@@ -3764,7 +3764,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
int32 baseDamage[MAX_SPELL_EFFECTS];
uint8 effMask = 0;
uint8 recalculateMask = 0;
- Unit * caster = aura->GetCaster();
+ Unit* caster = aura->GetCaster();
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if (aura->GetEffect(i))
@@ -3876,8 +3876,8 @@ void Unit::RemoveNotOwnSingleTargetAuras(uint32 newPhase)
// single target auras from other casters
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
- AuraApplication const * aurApp = iter->second;
- Aura const * aura = aurApp->GetBase();
+ AuraApplication const* aurApp = iter->second;
+ Aura const* aura = aurApp->GetBase();
if (aura->GetCasterGUID() != GetGUID() && IsSingleTargetSpell(aura->GetSpellProto()))
{
@@ -3944,7 +3944,7 @@ void Unit::RemoveAurasWithFamily(SpellFamilyNames family, uint32 familyFlag1, ui
{
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
- Aura const * aura = iter->second->GetBase();
+ Aura const* aura = iter->second->GetBase();
if (!casterGUID || aura->GetCasterGUID() == casterGUID)
{
SpellEntry const *spell = aura->GetSpellProto();
@@ -3967,7 +3967,7 @@ void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemo
{
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
- Aura const * aura = iter->second->GetBase();
+ Aura const* aura = iter->second->GetBase();
if (!except || aura->GetId() != except)
{
if (GetAllSpellMechanicMask(aura->GetSpellProto()) & mechanic_mask)
@@ -3992,7 +3992,7 @@ void Unit::RemoveAreaAurasDueToLeaveWorld()
{
AuraApplication * aurApp = itr->second;
++itr;
- Unit * target = aurApp->GetTarget();
+ Unit* target = aurApp->GetTarget();
if (target == this)
continue;
target->RemoveAura(aurApp);
@@ -4035,8 +4035,8 @@ void Unit::RemoveArenaAuras(bool onleave)
// used to remove positive visible auras in arenas
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
- AuraApplication const * aurApp = iter->second;
- Aura const * aura = aurApp->GetBase();
+ AuraApplication const* aurApp = iter->second;
+ Aura const* aura = aurApp->GetBase();
if (!(aura->GetSpellProto()->AttributesEx4 & SPELL_ATTR4_UNK21) // don't remove stances, shadowform, pally/hunter auras
&& !aura->IsPassive() // don't remove passive auras
&& !(aura->GetSpellProto()->AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT) // not death persistent auras
@@ -4053,7 +4053,7 @@ void Unit::RemoveAllAurasOnDeath()
// and disable the mods for the passive ones
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
- Aura const * aura = iter->second->GetBase();
+ Aura const* aura = iter->second->GetBase();
if (!aura->IsPassive() && !aura->IsDeathPersistent())
_UnapplyAura(iter, AURA_REMOVE_BY_DEATH);
else
@@ -4074,7 +4074,7 @@ void Unit::RemoveAllAurasRequiringDeadTarget()
{
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
- Aura const * aura = iter->second->GetBase();
+ Aura const* aura = iter->second->GetBase();
if (!aura->IsPassive() && IsRequiringDeadTargetSpell(aura->GetSpellProto()))
_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT);
else
@@ -4158,7 +4158,7 @@ AuraEffect * Unit::GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, ui
{
if (AuraEffect * aurEff = GetAuraEffect(rankSpell, effIndex, caster))
return aurEff;
- SpellChainNode const * chainNode = sSpellMgr->GetSpellChainNode(rankSpell);
+ SpellChainNode const* chainNode = sSpellMgr->GetSpellChainNode(rankSpell);
if (!chainNode)
break;
else
@@ -4174,7 +4174,7 @@ AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 ico
{
if (effIndex != (*itr)->GetEffIndex())
continue;
- SpellEntry const * spell = (*itr)->GetSpellProto();
+ SpellEntry const* spell = (*itr)->GetSpellProto();
if (spell->SpellIconID == iconId && spell->SpellFamilyName == uint32(name) && !spell->SpellFamilyFlags)
return *itr;
}
@@ -4201,7 +4201,7 @@ AuraApplication * Unit::GetAuraApplication(uint32 spellId, uint64 casterGUID, ui
{
for (AuraApplicationMap::const_iterator itr = m_appliedAuras.lower_bound(spellId); itr != m_appliedAuras.upper_bound(spellId); ++itr)
{
- Aura const * aura = itr->second->GetBase();
+ Aura const* aura = itr->second->GetBase();
if (((aura->GetEffectMask() & reqEffMask) == reqEffMask) && (!casterGUID || aura->GetCasterGUID() == casterGUID) && (!itemCasterGUID || aura->GetCastItemGUID() == itemCasterGUID) && (!except || except != itr->second))
return itr->second;
}
@@ -4221,7 +4221,7 @@ AuraApplication * Unit::GetAuraApplicationOfRankedSpell(uint32 spellId, uint64 c
{
if (AuraApplication * aurApp = GetAuraApplication(rankSpell, casterGUID, itemCasterGUID, reqEffMask, except))
return aurApp;
- SpellChainNode const * chainNode = sSpellMgr->GetSpellChainNode(rankSpell);
+ SpellChainNode const* chainNode = sSpellMgr->GetSpellChainNode(rankSpell);
if (!chainNode)
break;
else
@@ -4287,7 +4287,7 @@ bool Unit::HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const
return false;
}
-bool Unit::HasAuraTypeWithAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const
+bool Unit::HasAuraTypeWithAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const
{
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
@@ -4345,7 +4345,7 @@ bool Unit::HasAuraWithMechanic(uint32 mechanicMask)
return false;
}
-AuraEffect * Unit::IsScriptOverriden(SpellEntry const * spell, int32 script) const
+AuraEffect * Unit::IsScriptOverriden(SpellEntry const* spell, int32 script) const
{
AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
@@ -4569,7 +4569,7 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_
return modifier;
}
-int32 Unit::GetTotalAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const
+int32 Unit::GetTotalAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const
{
int32 modifier = 0;
@@ -4582,7 +4582,7 @@ int32 Unit::GetTotalAuraModifierByAffectMask(AuraType auratype, SpellEntry const
return modifier;
}
-float Unit::GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const
+float Unit::GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const
{
float multiplier = 1.0f;
@@ -4595,7 +4595,7 @@ float Unit::GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellEntry con
return multiplier;
}
-int32 Unit::GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const
+int32 Unit::GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const
{
int32 modifier = 0;
@@ -4609,7 +4609,7 @@ int32 Unit::GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellEntry
return modifier;
}
-int32 Unit::GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const
+int32 Unit::GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const
{
int32 modifier = 0;
@@ -4803,7 +4803,7 @@ void Unit::SendSpellNonMeleeDamageLog(Unit *target, uint32 SpellID, uint32 Damag
SendSpellNonMeleeDamageLog(&log);
}
-void Unit::ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procExtra, uint32 amount, WeaponAttackType attType, SpellEntry const *procSpell, SpellEntry const * procAura)
+void Unit::ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procExtra, uint32 amount, WeaponAttackType attType, SpellEntry const *procSpell, SpellEntry const* procAura)
{
// Not much to do if no flags are set.
if (procAttacker)
@@ -4816,7 +4816,7 @@ void Unit::ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVic
void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
{
- AuraEffect const * aura = pInfo->auraEff;
+ AuraEffect const* aura = pInfo->auraEff;
WorldPacket data(SMSG_PERIODICAURALOG, 30);
data.append(GetPackGUID());
@@ -4874,7 +4874,7 @@ void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
SendMessageToSet(&data, true);
}
-void Unit::SendSpellDamageImmune(Unit * target, uint32 spellId)
+void Unit::SendSpellDamageImmune(Unit* target, uint32 spellId)
{
WorldPacket data(SMSG_SPELLORDAMAGE_IMMUNE, 8+8+4+1);
data << uint64(GetGUID());
@@ -4962,7 +4962,7 @@ void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 /*SwingType
SendAttackStateUpdate(&dmgInfo);
}
-bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const * /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
+bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
{
SpellEntry const *hasteSpell = triggeredByAura->GetSpellProto();
@@ -5025,7 +5025,7 @@ bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
return true;
}
-bool Unit::HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellEntry const * /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
+bool Unit::HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
{
SpellEntry const *triggeredByAuraSpell = triggeredByAura->GetSpellProto();
@@ -5087,7 +5087,7 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 /*damage*/, AuraE
return true;
}
-bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
+bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
{
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto();
uint32 effIndex = triggeredByAura->GetEffIndex();
@@ -6038,7 +6038,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// regen mana for caster
CastCustomSpell(this, 59117, &basepoints0, NULL, NULL, true, castItem, triggeredByAura);
// Get second aura of spell for replenishment effect on party
- if (AuraEffect const * aurEff = (*i)->GetBase()->GetEffect(1))
+ if (AuraEffect const* aurEff = (*i)->GetBase()->GetEffect(1))
{
// Replenishment - roll chance
if (roll_chance_i(aurEff->GetAmount()))
@@ -6547,7 +6547,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if (!procSpell)
return false;
- Spell * spell = ToPlayer()->m_spellModTakingSpell;
+ Spell* spell = ToPlayer()->m_spellModTakingSpell;
// Disable charge drop because of Lock and Load
ToPlayer()->SetSpellModTakingSpell(spell, false);
@@ -6644,7 +6644,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if (dummySpell->Id == 53651)
{
// Get target of beacon of light
- if (Unit * beaconTarget = triggeredByAura->GetBase()->GetCaster())
+ if (Unit* beaconTarget = triggeredByAura->GetBase()->GetCaster())
{
// do not proc when target of beacon of light is healed
if (beaconTarget == this)
@@ -7382,7 +7382,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
return false;
// Water Shield
- if (AuraEffect const * aurEff = GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN, 0, 0x00000020, 0))
+ if (AuraEffect const* aurEff = GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN, 0, 0x00000020, 0))
{
uint32 spell = aurEff->GetSpellProto()->EffectTriggerSpell[aurEff->GetEffIndex()];
CastSpell(this, spell, true, castItem, triggeredByAura);
@@ -7458,7 +7458,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if (dummySpell->SpellIconID == 3059)
{
// Lightning Shield
- if (AuraEffect const * aurEff = GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN, 0x400, 0, 0))
+ if (AuraEffect const* aurEff = GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN, 0x400, 0, 0))
{
uint32 spell = sSpellMgr->GetSpellWithRank(26364, sSpellMgr->GetSpellRank(aurEff->GetId()));
@@ -7774,7 +7774,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
return true;
}
-bool Unit::HandleObsModEnergyAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellEntry const * /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
+bool Unit::HandleObsModEnergyAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
{
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto ();
//uint32 effIndex = triggeredByAura->GetEffIndex();
@@ -7831,7 +7831,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffe
this->ToPlayer()->AddSpellCooldown(triggered_spell_id, 0, time(NULL) + cooldown);
return true;
}
-bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellEntry const * /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
+bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
{
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto ();
//uint32 effIndex = triggeredByAura->GetEffIndex();
@@ -7893,7 +7893,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 /*damage*/, Aur
// Used in case when access to whole aura is needed
// All procs should be handled like this...
-bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 cooldown, bool * handled)
+bool Unit::HandleAuraProc(Unit* pVictim, uint32 damage, Aura * triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 cooldown, bool * handled)
{
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto();
@@ -8839,7 +8839,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
{
// Get talent aura from owner
if (isPet())
- if (Unit * owner = GetOwner())
+ if (Unit* owner = GetOwner())
{
if (AuraEffect * aurEff = owner->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 3220, 0))
{
@@ -9663,7 +9663,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
}
}
-uint32 Unit::BuildAuraStateUpdateForTarget(Unit * target) const
+uint32 Unit::BuildAuraStateUpdateForTarget(Unit* target) const
{
uint32 auraStates = GetUInt32Value(UNIT_FIELD_AURASTATE) &~(PER_CASTER_AURA_STATE_MASK);
for (AuraStateAurasMap::const_iterator itr = m_auraStateAuras.begin(); itr != m_auraStateAuras.end(); ++itr)
@@ -9674,7 +9674,7 @@ uint32 Unit::BuildAuraStateUpdateForTarget(Unit * target) const
return auraStates;
}
-bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit const * Caster) const
+bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit const* Caster) const
{
if (Caster)
{
@@ -10150,7 +10150,7 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
// We are pet now, return owner
if (player != this)
return IsWithinDistInMap(player, radius) ? player : NULL;
- Unit * pet = GetGuardianPet();
+ Unit* pet = GetGuardianPet();
//No pet, no group, nothing to return
if (!pet)
return NULL;
@@ -10246,7 +10246,7 @@ void Unit::SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32
SendMessageToSet(&data, true);
}
-int32 Unit::HealBySpell(Unit * pVictim, SpellEntry const * spellInfo, uint32 addHealth, bool critical)
+int32 Unit::HealBySpell(Unit* pVictim, SpellEntry const* spellInfo, uint32 addHealth, bool critical)
{
uint32 absorb = 0;
// calculate heal absorb and reduce healing
@@ -10333,7 +10333,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
AddPctN(DoneTotalMod, (*i)->GetAmount());
// done scripted mod (take it from owner)
- Unit * owner = GetOwner() ? GetOwner() : this;
+ Unit* owner = GetOwner() ? GetOwner() : this;
AuraEffectList const &mOverrideClassScript= owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
{
@@ -10365,7 +10365,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
AuraApplicationMap const &victimAuras = pVictim->GetAppliedAuras();
for (AuraApplicationMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
{
- Aura const * aura = itr->second->GetBase();
+ Aura const* aura = itr->second->GetBase();
SpellEntry const *m_spell = aura->GetSpellProto();
if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK || !(m_spell->SpellFamilyFlags[1] & 0x0004071B || m_spell->SpellFamilyFlags[0] & 0x8044C402))
continue;
@@ -10930,7 +10930,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
case SPELLFAMILY_DRUID:
// Improved Faerie Fire
if (pVictim->HasAuraState(AURA_STATE_FAERIE_FIRE))
- if (AuraEffect const * aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 109, 0))
+ if (AuraEffect const* aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 109, 0))
crit_chance+=aurEff->GetAmount();
// cumulative effect - don't break
@@ -10939,7 +10939,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
if (spellProto->SpellFamilyFlags[0] & 0x4 && spellProto->SpellIconID == 1485)
{
// Improved Insect Swarm
- if (AuraEffect const * aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1771, 0))
+ if (AuraEffect const* aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1771, 0))
if (pVictim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00000002, 0, 0))
crit_chance+=aurEff->GetAmount();
break;
@@ -11157,7 +11157,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
AuraApplicationMap const& victimAuras = pVictim->GetAppliedAuras();
for (AuraApplicationMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
{
- Aura const * aura = itr->second->GetBase();
+ Aura const* aura = itr->second->GetBase();
if (aura->GetCasterGUID() != GetGUID())
continue;
SpellEntry const* m_spell = aura->GetSpellProto();
@@ -11535,7 +11535,7 @@ bool Unit::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) con
return false;
}
-bool Unit::IsDamageToThreatSpell(SpellEntry const * spellInfo) const
+bool Unit::IsDamageToThreatSpell(SpellEntry const* spellInfo) const
{
if (!spellInfo)
return false;
@@ -11670,7 +11670,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
default: return;
}
- Item * item = ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, slot);
+ Item* item = ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, slot);
if (item && !item->IsBroken() && item->IsFitToSpellRequirements((*i)->GetSpellProto()))
AddPctN(DoneTotalMod, (*i)->GetAmount());
@@ -11691,7 +11691,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
AddPctN(DoneTotalMod, (*i)->GetAmount());
// done scripted mod (take it from owner)
- Unit * owner = GetOwner() ? GetOwner() : this;
+ Unit* owner = GetOwner() ? GetOwner() : this;
AuraEffectList const &mOverrideClassScript= owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
{
@@ -12223,7 +12223,7 @@ bool Unit::canAttack(Unit const* target, bool force) const
return true;
}
-bool Unit::isAttackableByAOE(SpellEntry const * spellProto) const
+bool Unit::isAttackableByAOE(SpellEntry const* spellProto) const
{
bool targetMustBeDead = spellProto ? bool(spellProto->AttributesEx3 & SPELL_ATTR3_REQUIRE_DEAD_TARGET) : false;
bool targetCanBeDead = spellProto ? bool(spellProto->AttributesEx2 & SPELL_ATTR2_ALLOW_DEAD_TARGET) : false;
@@ -12413,7 +12413,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
// for some spells this mod is applied on vehicle owner
int32 owner_speed_mod = 0;
- if (Unit * owner = GetCharmer())
+ if (Unit* owner = GetCharmer())
owner_speed_mod = owner->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED);
main_speed_mod = std::max(main_speed_mod, owner_speed_mod);
@@ -12844,7 +12844,7 @@ Unit* Creature::SelectVictim()
target = getAttackerForHelper();
if (!target && isSummon())
{
- if (Unit * owner = this->ToTempSummon()->GetOwner())
+ if (Unit* owner = this->ToTempSummon()->GetOwner())
{
if (owner->isInCombat())
target = owner->getAttackerForHelper();
@@ -13064,7 +13064,7 @@ int32 Unit::ModSpellDuration(SpellEntry const* spellProto, Unit const* target, i
return std::max(duration, 0);
}
-void Unit::ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spell * spell)
+void Unit::ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spell* spell)
{
if (!spellProto || castTime < 0)
return;
@@ -14111,7 +14111,7 @@ uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missC
return procEx;
}
-void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage, SpellEntry const * procAura)
+void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const* procSpell, uint32 damage, SpellEntry const* procAura)
{
// Player is loaded now - do not allow passive spell casts to proc
if (GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->GetSession()->PlayerLoading())
@@ -14601,7 +14601,7 @@ void Unit::RestoreDisplayId()
// iterate over already applied transform auras - from newest to oldest
for (Unit::AuraEffectList::const_reverse_iterator i = transforms.rbegin(); i != transforms.rend(); ++i)
{
- if (AuraApplication const * aurApp = (*i)->GetBase()->GetApplicationOfTarget(GetGUID()))
+ if (AuraApplication const* aurApp = (*i)->GetBase()->GetApplicationOfTarget(GetGUID()))
{
if (!handledAura)
handledAura = (*i);
@@ -15129,9 +15129,9 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect *triggeredByAura)
else
radius = (float)GetSpellMaxRangeForTarget(triggeredByAura->GetCaster(), sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
- if (Unit * caster = triggeredByAura->GetCaster())
+ if (Unit* caster = triggeredByAura->GetCaster())
{
- if (Player * modOwner = caster->GetSpellModOwner())
+ if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius, NULL);
if (Unit *target = GetNextRandomRaidMemberOrPet(radius))
@@ -15189,9 +15189,9 @@ bool Unit::HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura)
else
radius = (float)GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() , sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
- if (Unit * caster = triggeredByAura->GetCaster())
+ if (Unit* caster = triggeredByAura->GetCaster())
{
- if (Player * modOwner = caster->GetSpellModOwner())
+ if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius, NULL);
if (Unit* target= GetNextRandomRaidMemberOrPet(radius))
@@ -15701,7 +15701,7 @@ void Unit::SetConfused(bool apply)
this->ToPlayer()->SetClientControl(this, !apply);
}
-bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const * aurApp)
+bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* aurApp)
{
if (!charmer)
return false;
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 3b2fc825b74..9912b6b638c 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -802,17 +802,17 @@ struct CleanDamage
class DamageInfo
{
private:
- Unit * const m_attacker;
- Unit * const m_victim;
+ Unit* const m_attacker;
+ Unit* const m_victim;
uint32 m_damage;
- SpellEntry const * const m_spellInfo;
+ SpellEntry const* const m_spellInfo;
SpellSchoolMask const m_schoolMask;
DamageEffectType const m_damageType;
uint32 m_absorb;
uint32 m_resist;
uint32 m_block;
public:
- explicit DamageInfo(Unit * _attacker, Unit * _victim, uint32 _damage, SpellEntry const * _spellInfo, SpellSchoolMask _schoolMask, DamageEffectType _damageType)
+ explicit DamageInfo(Unit* _attacker, Unit* _victim, uint32 _damage, SpellEntry const* _spellInfo, SpellSchoolMask _schoolMask, DamageEffectType _damageType)
: m_attacker(_attacker), m_victim(_victim), m_damage(_damage), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask), m_damageType(_damageType)
{
m_absorb = 0;
@@ -842,10 +842,10 @@ public:
m_block += amount;
m_damage -= amount;
}
- Unit * GetAttacker() const { return m_attacker; };
- Unit * GetVictim() const { return m_victim; };
+ Unit* GetAttacker() const { return m_attacker; };
+ Unit* GetVictim() const { return m_victim; };
DamageEffectType GetDamageType() const { return m_damageType; };
- SpellEntry const * GetSpellInfo() const { return m_spellInfo; };
+ SpellEntry const* GetSpellInfo() const { return m_spellInfo; };
SpellSchoolMask GetSchoolMask() const { return m_schoolMask; };
uint32 GetDamage() const { return m_damage; };
uint32 GetAbsorb() const { return m_absorb; };
@@ -903,7 +903,7 @@ struct SpellPeriodicAuraLogInfo
SpellPeriodicAuraLogInfo(AuraEffect const *_auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical)
: auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){}
- AuraEffect const * auraEff;
+ AuraEffect const* auraEff;
uint32 damage;
uint32 overDamage; // overkill/overheal
uint32 absorb;
@@ -1203,7 +1203,7 @@ class Unit : public WorldObject
{
m_attackers.erase(pAttacker);
}
- Unit * getAttackerForHelper() const // If someone wants to help, who to give them
+ Unit* getAttackerForHelper() const // If someone wants to help, who to give them
{
if (getVictim() != NULL)
return getVictim();
@@ -1357,8 +1357,8 @@ class Unit : public WorldObject
void Kill(Unit *pVictim, bool durabilityLoss = true);
int32 DealHeal(Unit *pVictim, uint32 addhealth);
- void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellEntry const *procSpell = NULL, SpellEntry const * procAura = NULL);
- void ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage , SpellEntry const * procAura = NULL);
+ void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellEntry const *procSpell = NULL, SpellEntry const* procAura = NULL);
+ void ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const* procSpell, uint32 damage , SpellEntry const* procAura = NULL);
void HandleEmoteCommand(uint32 anim_id);
void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false);
@@ -1384,7 +1384,7 @@ class Unit : public WorldObject
uint32 GetRangedDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_RANGED, 2.0f, 100.0f, damage); }
uint32 GetSpellDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_SPELL, 2.0f, 100.0f, damage); }
- void ApplyResilience(const Unit * pVictim, float * crit, int32 * damage, bool isCrit, CombatRating type) const;
+ void ApplyResilience(const Unit* pVictim, float * crit, int32 * damage, bool isCrit, CombatRating type) const;
float MeleeSpellMissChance(const Unit *pVictim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
SpellMissInfo MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell);
@@ -1462,29 +1462,29 @@ class Unit : public WorldObject
bool isFrozen() const;
bool isTargetableForAttack() const;
- bool isAttackableByAOE(SpellEntry const * spellProto = NULL) const;
+ bool isAttackableByAOE(SpellEntry const* spellProto = NULL) const;
bool canAttack(Unit const* target, bool force = true) const;
virtual bool IsInWater() const;
virtual bool IsUnderWater() const;
bool isInAccessiblePlaceFor(Creature const* c) const;
void SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false);
- int32 HealBySpell(Unit * pVictim, SpellEntry const * spellInfo, uint32 addHealth, bool critical = false);
+ int32 HealBySpell(Unit* pVictim, SpellEntry const* spellInfo, uint32 addHealth, bool critical = false);
void SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
void EnergizeBySpell(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
uint32 SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage);
- void CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
- void CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered, Item *castItem= NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
- void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0, Unit* originalVictim = 0);
- void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
- void CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
- void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const * triggeredByAura = NULL, uint64 originalCaster = 0);
+ void CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
+ void CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
+ void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0, Unit* originalVictim = 0);
+ void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
+ void CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
+ void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
void CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect* triggeredByAura = NULL, uint64 originalCaster = 0);
Aura * AddAura(uint32 spellId, Unit *target);
Aura * AddAura(SpellEntry const *spellInfo, uint8 effMask, Unit *target);
void SetAuraStack(uint32 spellId, Unit *target, uint32 stack);
- bool IsDamageToThreatSpell(SpellEntry const * spellInfo) const;
+ bool IsDamageToThreatSpell(SpellEntry const* spellInfo) const;
void DeMorph();
@@ -1579,7 +1579,7 @@ class Unit : public WorldObject
void RemoveAllMinionsByEntry(uint32 entry);
void SetCharm(Unit* target, bool apply);
Unit* GetNextRandomRaidMemberOrPet(float radius);
- bool SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const * aurApp = NULL);
+ bool SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* aurApp = NULL);
void RemoveCharmedBy(Unit* charmer);
void RestoreFaction();
@@ -1603,8 +1603,8 @@ class Unit : public WorldObject
CharmInfo* InitCharmInfo();
void DeleteCharmInfo();
void UpdateCharmAI();
- //Player * GetMoverSource() const;
- Player * m_movedPlayer;
+ //Player* GetMoverSource() const;
+ Player* m_movedPlayer;
SharedVisionList const& GetSharedVisionList() { return m_sharedVision; }
void AddPlayerToVision(Player* plr);
void RemovePlayerFromVision(Player* plr);
@@ -1618,7 +1618,7 @@ class Unit : public WorldObject
// aura apply/remove helpers - you should better not use these
Aura* _TryStackingOrRefreshingExistingAura(SpellEntry const* newAura, uint8 effMask, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0);
- void _AddAura(UnitAura * aura, Unit * caster);
+ void _AddAura(UnitAura* aura, Unit* caster);
AuraApplication * _CreateAuraApplication(Aura * aura, uint8 effMask);
void _ApplyAuraEffect(Aura * aura, uint8 effIndex);
void _ApplyAura(AuraApplication * aurApp, uint8 effMask);
@@ -1694,13 +1694,13 @@ class Unit : public WorldObject
bool HasAuraType(AuraType auraType) const;
bool HasAuraTypeWithCaster(AuraType auratype, uint64 caster) const;
bool HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const;
- bool HasAuraTypeWithAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
+ bool HasAuraTypeWithAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
bool HasAuraTypeWithValue(AuraType auratype, int32 value) const;
bool HasNegativeAuraWithInterruptFlag(uint32 flag, uint64 guid = 0);
bool HasNegativeAuraWithAttribute(uint32 flag, uint64 guid = 0);
bool HasAuraWithMechanic(uint32 mechanicMask);
- AuraEffect * IsScriptOverriden(SpellEntry const * spell, int32 script) const;
+ AuraEffect * IsScriptOverriden(SpellEntry const* spell, int32 script) const;
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false);
uint32 GetDoTsByCaster(uint64 casterGUID) const;
@@ -1719,10 +1719,10 @@ class Unit : public WorldObject
int32 GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
int32 GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
- int32 GetTotalAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
- float GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
- int32 GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
- int32 GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellEntry const * affectedSpell) const;
+ int32 GetTotalAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
+ float GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
+ int32 GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
+ int32 GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellEntry const* affectedSpell) const;
float GetResistanceBuffMods(SpellSchools school, bool positive) const { return GetFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school); }
void SetResistanceBuffMods(SpellSchools school, bool positive, float val) { SetFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school, val); }
@@ -1749,7 +1749,7 @@ class Unit : public WorldObject
float GetNegStat(Stats stat) const { return GetFloatValue(UNIT_FIELD_NEGSTAT0+stat); }
float GetCreateStat(Stats stat) const { return m_createStats[stat]; }
- void SetCurrentCastedSpell(Spell * pSpell);
+ void SetCurrentCastedSpell(Spell* pSpell);
virtual void ProhibitSpellSchool(SpellSchoolMask /*idSchoolMask*/, uint32 /*unTimeMs*/) { }
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed = true, bool withInstant = true);
void FinishSpell(CurrentSpellTypes spellType, bool ok = true);
@@ -1904,8 +1904,8 @@ class Unit : public WorldObject
uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct);
float GetAPMultiplier(WeaponAttackType attType, bool normalized);
void ModifyAuraState(AuraState flag, bool apply);
- uint32 BuildAuraStateUpdateForTarget(Unit * target) const;
- bool HasAuraState(AuraState flag, SpellEntry const *spellProto = NULL, Unit const * Caster = NULL) const ;
+ uint32 BuildAuraStateUpdateForTarget(Unit* target) const;
+ bool HasAuraState(AuraState flag, SpellEntry const *spellProto = NULL, Unit const* Caster = NULL) const ;
void UnsummonAllTotems();
Unit* SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo = NULL);
int32 SpellBaseDamageBonus(SpellSchoolMask schoolMask);
@@ -1956,7 +1956,7 @@ class Unit : public WorldObject
int32 CalculateSpellDamage(Unit const* target, SpellEntry const* spellProto, uint8 effect_index, int32 const* basePoints = NULL) const;
int32 CalcSpellDuration(SpellEntry const* spellProto);
int32 ModSpellDuration(SpellEntry const* spellProto, Unit const* target, int32 duration, bool positive);
- void ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spell * spell=NULL);
+ void ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spell* spell=NULL);
float CalculateLevelPenalty(SpellEntry const* spellProto) const;
void addFollower(FollowerReference* pRef) { m_FollowingRefManager.insertFirst(pRef); }
@@ -2158,13 +2158,13 @@ class Unit : public WorldObject
bool isAlwaysDetectableFor(WorldObject const* seer) const;
private:
- bool IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry const * procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const *& spellProcEvent);
+ bool IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const *& spellProcEvent);
bool HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleObsModEnergyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
- bool HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled);
+ bool HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled);
bool HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 cooldown);
bool HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura);