Core: Codestyle cleanup

This commit is contained in:
click
2011-06-11 22:35:29 +02:00
parent 9ef8bd3072
commit 158966dc79
410 changed files with 1790 additions and 1790 deletions
+5 -5
View File
@@ -39,22 +39,22 @@ void AggressorAI::UpdateAI(const uint32 /*diff*/)
}
// some day we will delete these useless things
int CombatAI::Permissible(const Creature * /*creature*/)
int CombatAI::Permissible(const Creature* /*creature*/)
{
return PERMIT_BASE_NO;
}
int ArcherAI::Permissible(const Creature * /*creature*/)
int ArcherAI::Permissible(const Creature* /*creature*/)
{
return PERMIT_BASE_NO;
}
int TurretAI::Permissible(const Creature * /*creature*/)
int TurretAI::Permissible(const Creature* /*creature*/)
{
return PERMIT_BASE_NO;
}
int VehicleAI::Permissible(const Creature * /*creature*/)
int VehicleAI::Permissible(const Creature* /*creature*/)
{
return PERMIT_BASE_NO;
}
@@ -229,7 +229,7 @@ TurretAI::TurretAI(Creature *c) : CreatureAI(c)
me->m_SightDistance = me->m_CombatDistance;
}
bool TurretAI::CanAIAttack(const Unit * /*who*/) const
bool TurretAI::CanAIAttack(const Unit* /*who*/) const
{
// TODO: use one function to replace it
if (!me->IsWithinCombatRange(me->getVictim(), me->m_CombatDistance)
+2 -2
View File
@@ -57,9 +57,9 @@ class CasterAI : public CombatAI
public:
explicit CasterAI(Creature *c) : CombatAI(c) { m_attackDist = MELEE_RANGE; }
void InitializeAI();
void AttackStart(Unit * victim) { AttackStartCaster(victim, m_attackDist); }
void AttackStart(Unit* victim) { AttackStartCaster(victim, m_attackDist); }
void UpdateAI(const uint32 diff);
void EnterCombat(Unit * /*who*/);
void EnterCombat(Unit* /*who*/);
private:
float m_attackDist;
};
+1 -1
View File
@@ -28,7 +28,7 @@
class GameObjectAI
{
protected:
GameObject * const go;
GameObject* const go;
public:
explicit GameObjectAI(GameObject *g) : go(g) {}
virtual ~GameObjectAI() {}
+2 -2
View File
@@ -46,7 +46,7 @@ void PossessedAI::UpdateAI(const uint32 /*diff*/)
}
}
void PossessedAI::JustDied(Unit * /*u*/)
void PossessedAI::JustDied(Unit* /*u*/)
{
// We died while possessed, disable our loot
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
@@ -59,7 +59,7 @@ void PossessedAI::KilledUnit(Unit* victim)
victim->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
void CritterAI::DamageTaken(Unit * /*done_by*/, uint32 &)
void CritterAI::DamageTaken(Unit* /*done_by*/, uint32 &)
{
if (!me->HasUnitState(UNIT_STAT_FLEEING))
me->SetControlled(true, UNIT_STAT_FLEEING);
+2 -2
View File
@@ -32,12 +32,12 @@ class PetAI : public CreatureAI
explicit PetAI(Creature *c);
void EnterEvadeMode();
void JustDied(Unit * /*who*/) { _stopAttack(); }
void JustDied(Unit* /*who*/) { _stopAttack(); }
void UpdateAI(const uint32);
static int Permissible(const Creature *);
void KilledUnit(Unit * /*victim*/);
void KilledUnit(Unit* /*victim*/);
void AttackStart(Unit *target);
void MovementInform(uint32 moveType, uint32 data);
+1 -1
View File
@@ -100,7 +100,7 @@ struct DefaultTargetSelector : public std::unary_function<Unit* , bool>
class UnitAI
{
protected:
Unit * const me;
Unit* const me;
public:
explicit UnitAI(Unit* unit) : me(unit) {}
virtual ~UnitAI() {}
@@ -294,7 +294,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
{
//Note: checked only aura for effect 0, if need check aura for effect 1/2 then
// possible way: pack in event.buffed.amount 2 uint16 (ammount+effectIdx)
Aura const * aura = me->GetAura(event.buffed.spellId);
Aura const* aura = me->GetAura(event.buffed.spellId);
if (!aura || aura->GetStackAmount() < event.buffed.amount)
return false;
@@ -310,7 +310,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
//Note: checked only aura for effect 0, if need check aura for effect 1/2 then
// possible way: pack in event.buffed.amount 2 uint16 (ammount+effectIdx)
Aura const * aura = pActionInvoker->GetAura(event.buffed.spellId);
Aura const* aura = pActionInvoker->GetAura(event.buffed.spellId);
if (!aura || aura->GetStackAmount() < event.buffed.amount)
return false;
@@ -27,9 +27,9 @@ struct SimpleAI : public ScriptedAI
void Reset();
void EnterCombat(Unit * /*who*/);
void EnterCombat(Unit* /*who*/);
void KilledUnit(Unit * /*victim*/);
void KilledUnit(Unit* /*victim*/);
void DamageTaken(Unit *killer, uint32 &damage);
+2 -2
View File
@@ -124,7 +124,7 @@ class SmartAI : public CreatureAI
void IsSummonedBy(Unit* summoner);
// Called at any Damage to any victim (before damage apply)
void DamageDealt(Unit * done_to, uint32 & damage, DamageEffectType /*damagetype*/);
void DamageDealt(Unit* done_to, uint32 & damage, DamageEffectType /*damagetype*/);
// Called when a summoned creature dissapears (UnSommoned)
void SummonedCreatureDespawn(Creature* unit);
@@ -251,7 +251,7 @@ public:
void SetScript9(SmartScriptHolder &e, uint32 entry, Unit* invoker);
protected:
GameObject * const go;
GameObject* const go;
SmartScript mScript;
};
#endif
@@ -1373,7 +1373,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
// Must be created this way, adding to godatamap would add it to the base map of the instance
// and when loading it (in go::LoadFromDB()), a new guid would be assigned to the object, and a new object would be created
// So we must create it specific for this instance
GameObject * go = new GameObject;
GameObject* go = new GameObject;
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, GetBgMap(),
PHASEMASK_NORMAL, x, y, z, o, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY))
{
+2 -2
View File
@@ -557,7 +557,7 @@ class Battleground
//to be removed
const char* GetTrinityString(int32 entry);
virtual bool HandlePlayerUnderMap(Player * /*plr*/) { return false; }
virtual bool HandlePlayerUnderMap(Player* /*plr*/) { return false; }
// since arenas can be AvA or Hvh, we have to get the "temporary" team of a player
uint32 GetPlayerTeam(const uint64& guid) const;
@@ -591,7 +591,7 @@ class Battleground
// Scorekeeping
BattlegroundScoreMap m_PlayerScores; // Player scores
// must be implemented in BG subclass
virtual void RemovePlayer(Player * /*player*/, uint64 /*guid*/) {}
virtual void RemovePlayer(Player* /*player*/, uint64 /*guid*/) {}
// Player lists, those need to be accessible by inherited classes
BattlegroundPlayerMap m_Players;
@@ -70,7 +70,7 @@ void BattlegroundMgr::DeleteAllBattlegrounds()
{
for (BattlegroundSet::iterator itr = m_Battlegrounds[i].begin(); itr != m_Battlegrounds[i].end();)
{
Battleground * bg = itr->second;
Battleground* bg = itr->second;
m_Battlegrounds[i].erase(itr++);
if (!m_ClientBattlegroundIds[i][bg->GetBracketId()].empty())
m_ClientBattlegroundIds[i][bg->GetBracketId()].erase(bg->GetClientInstanceID());
@@ -106,7 +106,7 @@ void BattlegroundMgr::Update(uint32 diff)
// direct deletion caused crashes
if (itr->second->m_SetDeleteThis)
{
Battleground * bg = itr->second;
Battleground* bg = itr->second;
m_Battlegrounds[i].erase(itr);
if (!m_ClientBattlegroundIds[i][bg->GetBracketId()].empty())
m_ClientBattlegroundIds[i][bg->GetBracketId()].erase(bg->GetClientInstanceID());
@@ -429,7 +429,7 @@ void BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(WorldPacket *data, Pla
*data << uint64(plr->GetGUID());
}
Battleground * BattlegroundMgr::GetBattlegroundThroughClientInstance(uint32 instanceId, BattlegroundTypeId bgTypeId)
Battleground* BattlegroundMgr::GetBattlegroundThroughClientInstance(uint32 instanceId, BattlegroundTypeId bgTypeId)
{
//cause at HandleBattlegroundJoinOpcode the clients sends the instanceid he gets from
//SMSG_BATTLEFIELD_LIST we need to find the battleground with this clientinstance-id
@@ -448,7 +448,7 @@ Battleground * BattlegroundMgr::GetBattlegroundThroughClientInstance(uint32 inst
return NULL;
}
Battleground * BattlegroundMgr::GetBattleground(uint32 InstanceID, BattlegroundTypeId bgTypeId)
Battleground* BattlegroundMgr::GetBattleground(uint32 InstanceID, BattlegroundTypeId bgTypeId)
{
if (!InstanceID)
return NULL;
@@ -468,7 +468,7 @@ Battleground * BattlegroundMgr::GetBattleground(uint32 InstanceID, BattlegroundT
return ((itr != m_Battlegrounds[bgTypeId].end()) ? itr->second : NULL);
}
Battleground * BattlegroundMgr::GetBattlegroundTemplate(BattlegroundTypeId bgTypeId)
Battleground* BattlegroundMgr::GetBattlegroundTemplate(BattlegroundTypeId bgTypeId)
{
//map is sorted and we can be sure that lowest instance id has only BG template
return m_Battlegrounds[bgTypeId].empty() ? NULL : m_Battlegrounds[bgTypeId].begin()->second;
@@ -497,7 +497,7 @@ uint32 BattlegroundMgr::CreateClientVisibleInstanceId(BattlegroundTypeId bgTypeI
}
// create a new battleground that will really be used to play
Battleground * BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated)
Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated)
{
// get the template BG
Battleground *bg_template = GetBattlegroundTemplate(bgTypeId);
@@ -1026,7 +1026,7 @@ void BattlegroundMgr::SetHolidayWeekends(uint32 mask)
{
for (uint32 bgtype = 1; bgtype < MAX_BATTLEGROUND_TYPE_ID; ++bgtype)
{
if (Battleground * bg = GetBattlegroundTemplate(BattlegroundTypeId(bgtype)))
if (Battleground* bg = GetBattlegroundTemplate(BattlegroundTypeId(bgtype)))
{
bg->SetHoliday(mask & (1 << bgtype));
}
@@ -390,7 +390,7 @@ void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
// first send removal information
if (Player *plr2 = sObjectMgr->GetPlayer(group->Players.begin()->first))
{
Battleground * bg = sBattlegroundMgr->GetBattlegroundTemplate(group->BgTypeId);
Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(group->BgTypeId);
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(group->BgTypeId, group->ArenaType);
uint32 queueSlot = plr2->GetBattlegroundQueueIndex(bgQueueTypeId);
plr2->RemoveBattlegroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to
@@ -422,7 +422,7 @@ bool BattlegroundQueue::GetPlayerGroupInfoData(const uint64& guid, GroupQueueInf
return true;
}
bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, Battleground * bg, uint32 side)
bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, Battleground* bg, uint32 side)
{
// set side if needed
if (side)
@@ -777,7 +777,7 @@ void BattlegroundQueue::Update(BattlegroundTypeId bgTypeId, BattlegroundBracketI
// finished iterating through the bgs with free slots, maybe we need to create a new bg
Battleground * bg_template = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
Battleground* bg_template = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
if (!bg_template)
{
sLog->outError("Battleground: Update: bg template not found for %u", bgTypeId);
@@ -835,7 +835,7 @@ void BattlegroundQueue::Update(BattlegroundTypeId bgTypeId, BattlegroundBracketI
if (CheckPremadeMatch(bracket_id, MinPlayersPerTeam, MaxPlayersPerTeam))
{
//create new battleground
Battleground * bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, 0, false);
Battleground* bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, 0, false);
if (!bg2)
{
sLog->outError("BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
@@ -861,7 +861,7 @@ void BattlegroundQueue::Update(BattlegroundTypeId bgTypeId, BattlegroundBracketI
|| (bg_template->isArena() && CheckSkirmishForSameFaction(bracket_id, MinPlayersPerTeam)))
{
// we successfully created a pool
Battleground * bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, false);
Battleground* bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, false);
if (!bg2)
{
sLog->outError("BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
@@ -118,7 +118,7 @@ class BattlegroundQueue
private:
bool InviteGroupToBG(GroupQueueInfo * ginfo, Battleground * bg, uint32 side);
bool InviteGroupToBG(GroupQueueInfo * ginfo, Battleground* bg, uint32 side);
uint32 m_WaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS][COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME];
uint32 m_WaitTimeLastPlayer[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS];
uint32 m_SumOfWaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS];
@@ -62,7 +62,7 @@ void BattlegroundAA::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc;
}
void BattlegroundAA::RemovePlayer(Player * /*plr*/, uint64 /*guid*/)
void BattlegroundAA::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
}
@@ -71,7 +71,7 @@ void BattlegroundAA::HandleKillPlayer(Player* player, Player* killer)
Battleground::HandleKillPlayer(player, killer);
}
void BattlegroundAA::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/)
void BattlegroundAA::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/)
{
}
@@ -215,7 +215,7 @@ void BattlegroundAB::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc;
}
void BattlegroundAB::RemovePlayer(Player * /*plr*/, uint64 /*guid*/)
void BattlegroundAB::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
}
@@ -68,7 +68,7 @@ class BattlegroundBE : public Battleground
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
void HandleKillPlayer(Player* player, Player *killer);
bool HandlePlayerUnderMap(Player * plr);
bool HandlePlayerUnderMap(Player* plr);
/* Scorekeeping */
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
@@ -110,7 +110,7 @@ void BattlegroundDS::AddPlayer(Player *plr)
UpdateArenaWorldState();
}
void BattlegroundDS::RemovePlayer(Player * /*plr*/, uint64 /*guid*/)
void BattlegroundDS::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
@@ -77,7 +77,7 @@ class BattlegroundDS : public Battleground
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
void HandleKillPlayer(Player* player, Player *killer);
bool HandlePlayerUnderMap(Player * plr);
bool HandlePlayerUnderMap(Player* plr);
private:
uint32 m_waterTimer;
bool m_waterfallActive;
@@ -370,7 +370,7 @@ class BattlegroundEY : public Battleground
bool IsAllNodesConrolledByTeam(uint32 team) const;
private:
void EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType);
void EventPlayerCapturedFlag(Player * /*Source*/) {}
void EventPlayerCapturedFlag(Player* /*Source*/) {}
void EventTeamCapturedPoint(Player *Source, uint32 Point);
void EventTeamLostPoint(Player *Source, uint32 Point);
void UpdatePointsCount(uint32 Team);
@@ -316,7 +316,7 @@ void BattlegroundIC::RemovePlayer(Player* plr, uint64 /*guid*/)
plr->RemoveAura(SPELL_OIL_REFINERY);
}
void BattlegroundIC::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/)
void BattlegroundIC::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/)
{
// this is wrong way to implement these things. On official it done by gameobject spell cast.
if (GetStatus() != STATUS_IN_PROGRESS)
@@ -69,6 +69,6 @@ class BattlegroundNA : public Battleground
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
void HandleKillPlayer(Player* player, Player *killer);
bool HandlePlayerUnderMap(Player * plr);
bool HandlePlayerUnderMap(Player* plr);
};
#endif
@@ -61,7 +61,7 @@ void BattlegroundRB::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
}
void BattlegroundRB::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/)
void BattlegroundRB::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/)
{
// this is wrong way to implement these things. On official it done by gameobject spell cast.
if (GetStatus() != STATUS_IN_PROGRESS)
@@ -65,6 +65,6 @@ class BattlegroundRL : public Battleground
void HandleAreaTrigger(Player *Source, uint32 Trigger);
bool SetupBattleground();
void HandleKillPlayer(Player* player, Player *killer);
bool HandlePlayerUnderMap(Player * plr);
bool HandlePlayerUnderMap(Player* plr);
};
#endif
@@ -131,7 +131,7 @@ void BattlegroundRV::AddPlayer(Player *plr)
UpdateWorldState(BG_RV_WORLD_STATE_H, GetAlivePlayersCountByTeam(HORDE));
}
void BattlegroundRV::RemovePlayer(Player * /*plr*/, uint64 /*guid*/)
void BattlegroundRV::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
@@ -122,7 +122,7 @@ class BattlegroundRV : public Battleground
void HandleAreaTrigger(Player *Source, uint32 Trigger);
bool SetupBattleground();
void HandleKillPlayer(Player* player, Player *killer);
bool HandlePlayerUnderMap(Player * plr);
bool HandlePlayerUnderMap(Player* plr);
private:
uint32 Timer;
@@ -469,7 +469,7 @@ void BattlegroundSA::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
}
void BattlegroundSA::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/)
void BattlegroundSA::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/)
{
// this is wrong way to implement these things. On official it done by gameobject spell cast.
if (GetStatus() != STATUS_IN_PROGRESS)
@@ -912,7 +912,7 @@ void BattlegroundSA::SendTransportInit(Player *player)
}
}
void BattlegroundSA::SendTransportsRemove(Player * player)
void BattlegroundSA::SendTransportsRemove(Player* player)
{
if (m_BgObjects[BG_SA_BOAT_ONE] || m_BgObjects[BG_SA_BOAT_TWO])
{
@@ -538,7 +538,7 @@ class BattlegroundSA : public Battleground
/// Send packet to player for create boats (client part)
void SendTransportInit(Player *player);
/// Send packet to player for destroy boats (client part)
void SendTransportsRemove(Player * player);
void SendTransportsRemove(Player* player);
/// Id of attacker team
TeamId Attackers;
@@ -142,20 +142,20 @@ void BattlegroundWS::Update(uint32 diff)
m_FlagSpellForceTimer += diff;
if (m_FlagDebuffState == 0 && m_FlagSpellForceTimer >= 600000) //10 minutes
{
if (Player * plr = sObjectMgr->GetPlayer(m_FlagKeepers[0]))
if (Player* plr = sObjectMgr->GetPlayer(m_FlagKeepers[0]))
plr->CastSpell(plr, WS_SPELL_FOCUSED_ASSAULT, true);
if (Player * plr = sObjectMgr->GetPlayer(m_FlagKeepers[1]))
if (Player* plr = sObjectMgr->GetPlayer(m_FlagKeepers[1]))
plr->CastSpell(plr, WS_SPELL_FOCUSED_ASSAULT, true);
m_FlagDebuffState = 1;
}
else if (m_FlagDebuffState == 1 && m_FlagSpellForceTimer >= 900000) //15 minutes
{
if (Player * plr = sObjectMgr->GetPlayer(m_FlagKeepers[0]))
if (Player* plr = sObjectMgr->GetPlayer(m_FlagKeepers[0]))
{
plr->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
plr->CastSpell(plr, WS_SPELL_BRUTAL_ASSAULT, true);
}
if (Player * plr = sObjectMgr->GetPlayer(m_FlagKeepers[1]))
if (Player* plr = sObjectMgr->GetPlayer(m_FlagKeepers[1]))
{
plr->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
plr->CastSpell(plr, WS_SPELL_BRUTAL_ASSAULT, true);
+1 -1
View File
@@ -1056,7 +1056,7 @@ void ChatHandler::FillMessageData(WorldPacket *data, WorldSession* session, uint
*data << uint8(0);
}
Player * ChatHandler::getSelectedPlayer()
Player* ChatHandler::getSelectedPlayer()
{
if (!m_session)
return NULL;
+4 -4
View File
@@ -103,7 +103,7 @@ bool ChatHandler::HandleSetSkillCommand(const char *args)
int32 level = atol (level_p);
Player * target = getSelectedPlayer();
Player* target = getSelectedPlayer();
if (!target)
{
SendSysMessage(LANG_NO_CHAR_SELECTED);
@@ -614,7 +614,7 @@ bool ChatHandler::HandleListObjectCommand(const char *args)
return false;
}
GameObjectTemplate const * gInfo = sObjectMgr->GetGameObjectTemplate(go_id);
GameObjectTemplate const* gInfo = sObjectMgr->GetGameObjectTemplate(go_id);
if (!gInfo)
{
PSendSysMessage(LANG_COMMAND_LISTOBJINVALIDID, go_id);
@@ -2405,8 +2405,8 @@ bool ChatHandler::HandleListAurasCommand (const char * /*args*/)
{
bool talent = GetTalentSpellCost(itr->second->GetBase()->GetId()) > 0;
AuraApplication const * aurApp = itr->second;
Aura const * aura = aurApp->GetBase();
AuraApplication const* aurApp = itr->second;
Aura const* aura = aurApp->GetBase();
char const* name = aura->GetSpellProto()->SpellName[GetSessionDbcLocale()];
if (m_session)
+2 -2
View File
@@ -29,7 +29,7 @@
// Checks if player meets the condition
// Can have CONDITION_SOURCE_TYPE_NONE && !mReferenceId if called from a special event (ie: eventAI)
bool Condition::Meets(Player * player, Unit* invoker)
bool Condition::Meets(Player* player, Unit* invoker)
{
if (!player)
{
@@ -1289,7 +1289,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_MAPID:
{
MapEntry const * me = sMapStore.LookupEntry(cond->mConditionValue1);
MapEntry const* me = sMapStore.LookupEntry(cond->mConditionValue1);
if (!me)
{
sLog->outErrorDb("Map condition has non existing map (%u), skipped", cond->mConditionValue1);
+1 -1
View File
@@ -127,7 +127,7 @@ struct Condition
mScriptId = 0;
}
bool Meets(Player * player, Unit* invoker = NULL);
bool Meets(Player* player, Unit* invoker = NULL);
bool isLoaded() const { return mConditionType > CONDITION_NONE || mReferenceId; }
};
+3 -3
View File
@@ -300,7 +300,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sFactionStore, dbcPath, "Faction.dbc");
for (uint32 i=0; i<sFactionStore.GetNumRows(); ++i)
{
FactionEntry const * faction = sFactionStore.LookupEntry(i);
FactionEntry const* faction = sFactionStore.LookupEntry(i);
if (faction && faction->team)
{
SimpleFactionsList &flist = sFactionTeamMap[faction->team];
@@ -312,7 +312,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sGameObjectDisplayInfoStore, dbcPath, "GameObjectDisplayInfo.dbc");
for (uint32 i = 0; i < sGameObjectDisplayInfoStore.GetNumRows(); ++i)
{
if (GameObjectDisplayInfoEntry const * info = sGameObjectDisplayInfoStore.LookupEntry(i))
if (GameObjectDisplayInfoEntry const* info = sGameObjectDisplayInfoStore.LookupEntry(i))
{
if (info->maxX < info->minX)
std::swap(*(float*)(&info->maxX), *(float*)(&info->minX));
@@ -386,7 +386,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry const * spell = sSpellStore.LookupEntry(i);
SpellEntry const* spell = sSpellStore.LookupEntry(i);
if (spell && spell->Category)
sSpellCategoryStore[spell->Category].insert(i);
}
@@ -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;
};
@@ -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;
@@ -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);
@@ -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;
@@ -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;
}
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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);
+24 -24
View File
@@ -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)
{
+18 -18
View File
@@ -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;
+80 -80
View File
@@ -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;
+37 -37
View File
@@ -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);
+4 -4
View File
@@ -910,7 +910,7 @@ void GameEventMgr::LoadFromDB()
}
}
uint32 GameEventMgr::GetNPCFlag(Creature * cr)
uint32 GameEventMgr::GetNPCFlag(Creature* cr)
{
uint32 mask = 0;
uint32 guid = cr->GetDBTableGUIDLow();
@@ -1109,7 +1109,7 @@ void GameEventMgr::UpdateEventNPCFlags(uint16 event_id)
// get the creature data from the low guid to get the entry, to be able to find out the whole guid
if (CreatureData const* data = sObjectMgr->GetCreatureData(itr->first))
{
Creature * cr = HashMapHolder<Creature>::Find(MAKE_NEW_GUID(itr->first, data->id, HIGHGUID_UNIT));
Creature* cr = HashMapHolder<Creature>::Find(MAKE_NEW_GUID(itr->first, data->id, HIGHGUID_UNIT));
// if we found the creature, modify its npcflag
if (cr)
{
@@ -1480,7 +1480,7 @@ void GameEventMgr::UpdateWorldStates(uint16 event_id, bool Activate)
BattlegroundTypeId bgTypeId = BattlegroundMgr::WeekendHolidayIdToBGType(event.holiday_id);
if (bgTypeId != BATTLEGROUND_TYPE_NONE)
{
BattlemasterListEntry const * bl = sBattlemasterListStore.LookupEntry(bgTypeId);
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
if (bl && bl->HolidayWorldStateId)
{
WorldPacket data;
@@ -1583,7 +1583,7 @@ void GameEventMgr::SaveWorldEventStateToDB(uint16 event_id)
CharacterDatabase.CommitTransaction(trans);
}
void GameEventMgr::SendWorldStateUpdate(Player * plr, uint16 event_id)
void GameEventMgr::SendWorldStateUpdate(Player* plr, uint16 event_id)
{
std::map<uint32, GameEventFinishCondition>::iterator itr;
for (itr = mGameEvent[event_id].conditions.begin(); itr !=mGameEvent[event_id].conditions.end(); ++itr)
+3 -3
View File
@@ -111,11 +111,11 @@ class GameEventMgr
bool StartEvent(uint16 event_id, bool overwrite = false);
void StopEvent(uint16 event_id, bool overwrite = false);
void HandleQuestComplete(uint32 quest_id); // called on world event type quest completions
void HandleWorldEventGossip(Player * plr, Creature * c);
uint32 GetNPCFlag(Creature * cr);
void HandleWorldEventGossip(Player* plr, Creature* c);
uint32 GetNPCFlag(Creature* cr);
uint32 GetNpcTextId(uint32 guid);
private:
void SendWorldStateUpdate(Player * plr, uint16 event_id);
void SendWorldStateUpdate(Player* plr, uint16 event_id);
void AddActiveEvent(uint16 event_id) { m_ActiveEvents.insert(event_id); }
void RemoveActiveEvent(uint16 event_id) { m_ActiveEvents.erase(event_id); }
void ApplyNewEvent(uint16 event_id);
+1 -1
View File
@@ -122,7 +122,7 @@ class ObjectAccessor
// Player may be not in world while in ObjectAccessor
static Player* GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/)
{
Player * player = HashMapHolder<Player>::Find(guid);
Player* player = HashMapHolder<Player>::Find(guid);
if (player && player->IsInWorld())
return player;
return NULL;
+5 -5
View File
@@ -222,7 +222,7 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke
if (clicker->HasAura(auraForbidden))
return false;
Unit const * summoner = NULL;
Unit const* summoner = NULL;
// Check summoners for party
if (clickee->isSummon())
summoner = clickee->ToTempSummon()->GetSummoner();
@@ -987,7 +987,7 @@ void ObjectMgr::LoadCreatureAddons()
sLog->outString();
}
CreatureAddon const * ObjectMgr::GetCreatureAddon(uint32 lowguid)
CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid)
{
CreatureAddonContainer::const_iterator itr = CreatureAddonStore.find(lowguid);
if (itr != CreatureAddonStore.end())
@@ -996,7 +996,7 @@ CreatureAddon const * ObjectMgr::GetCreatureAddon(uint32 lowguid)
return NULL;
}
CreatureAddon const * ObjectMgr::GetCreatureTemplateAddon(uint32 entry)
CreatureAddon const* ObjectMgr::GetCreatureTemplateAddon(uint32 entry)
{
CreatureAddonContainer::const_iterator itr = CreatureTemplateAddonStore.find(entry);
if (itr != CreatureTemplateAddonStore.end())
@@ -4906,7 +4906,7 @@ void ObjectMgr::LoadEventScripts()
// Load all possible script entries from spells
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry const * spell = sSpellStore.LookupEntry(i);
SpellEntry const* spell = sSpellStore.LookupEntry(i);
if (spell)
{
for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
@@ -5048,7 +5048,7 @@ void ObjectMgr::ValidateSpellScripts()
for (SpellScriptsMap::iterator itr = mSpellScripts.begin(); itr != mSpellScripts.end();)
{
SpellEntry const * spellEntry = sSpellStore.LookupEntry(itr->first);
SpellEntry const* spellEntry = sSpellStore.LookupEntry(itr->first);
std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> > SpellScriptLoaders;
sScriptMgr->CreateSpellScriptLoaders(itr->first, SpellScriptLoaders);
itr = mSpellScripts.upper_bound(itr->first);
+1 -1
View File
@@ -348,7 +348,7 @@ struct SpellClickInfo
SpellClickUserTypes userType;
// helpers
bool IsFitToRequirements(Unit const* clicker, Unit const * clickee) const;
bool IsFitToRequirements(Unit const* clicker, Unit const* clickee) const;
};
typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoMap;
@@ -144,7 +144,7 @@ void PlayerRelocationNotifier::Visit(CreatureMapType &m)
for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
Creature * c = iter->getSource();
Creature* c = iter->getSource();
vis_guids.erase(c->GetGUID());
@@ -159,7 +159,7 @@ void CreatureRelocationNotifier::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
Player * pl = iter->getSource();
Player* pl = iter->getSource();
if (!pl->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
pl->UpdateVisibilityOf(&i_creature);
@@ -187,7 +187,7 @@ void DelayedUnitRelocation::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
Creature * unit = iter->getSource();
Creature* unit = iter->getSource();
if (!unit->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
continue;
@@ -205,7 +205,7 @@ void DelayedUnitRelocation::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
Player * player = iter->getSource();
Player* player = iter->getSource();
WorldObject const *viewPoint = player->m_seer;
if (!viewPoint->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
+1 -1
View File
@@ -54,7 +54,7 @@ ObjectGridRespawnMover::Visit(CreatureMapType &m)
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
for (CreatureMapType::iterator iter = m.begin(); iter != m.end();)
{
Creature * c = iter->getSource();
Creature* c = iter->getSource();
++iter;
ASSERT(!c->isPet() && "ObjectGridRespawnMover don't must be called for pets");
+1 -1
View File
@@ -1466,7 +1466,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side
// get a player as reference, to compare other players' stats to (arena team id, queue id based on level, etc.)
Player * reference = GetFirstMember()->getSource();
Player* reference = GetFirstMember()->getSource();
// no reference found, can't join this way
if (!reference)
return ERR_BATTLEGROUND_JOIN_FAILED;
+5 -5
View File
@@ -53,7 +53,7 @@ class LootTemplate::LootGroup // A set of loot def
public:
void AddEntry(LootStoreItem& item); // Adds an entry to the group (at loading stage)
bool HasQuestDrop() const; // True if group includes at least 1 quest drop entry
bool HasQuestDropForPlayer(Player const * player) const;
bool HasQuestDropForPlayer(Player const* player) const;
// The same for active quests of the player
void Process(Loot& loot, uint16 lootMode) const; // Rolls an item from the group (if any) and adds the item to the loot
float RawTotalChance() const; // Overall chance for the group (without equal chanced items)
@@ -69,7 +69,7 @@ class LootTemplate::LootGroup // A set of loot def
LootStoreItemList ExplicitlyChanced; // Entries with chances defined in DB
LootStoreItemList EqualChanced; // Zero chances - every entry takes the same chance
LootStoreItem const * Roll() const; // Rolls an item from the group, returns NULL if all miss their chances
LootStoreItem const* Roll() const; // Rolls an item from the group, returns NULL if all miss their chances
};
//Remove all data and free all memory
@@ -337,7 +337,7 @@ LootItem::LootItem(LootStoreItem const& li)
}
// Basic checks for player/item compatibility - if false no chance to see the item in the loot
bool LootItem::AllowedForPlayer(Player const * player) const
bool LootItem::AllowedForPlayer(Player const* player) const
{
// DB conditions check
if (!sConditionMgr->IsPlayerMeetToConditions(const_cast<Player*>(player), conditions))
@@ -972,7 +972,7 @@ void LootTemplate::LootGroup::AddEntry(LootStoreItem& item)
}
// Rolls an item from the group, returns NULL if all miss their chances
LootStoreItem const * LootTemplate::LootGroup::Roll() const
LootStoreItem const* LootTemplate::LootGroup::Roll() const
{
if (!ExplicitlyChanced.empty()) // First explicitly chanced entries are checked
{
@@ -1007,7 +1007,7 @@ bool LootTemplate::LootGroup::HasQuestDrop() const
}
// True if group includes at least 1 quest drop entry for active quests of the player
bool LootTemplate::LootGroup::HasQuestDropForPlayer(Player const * player) const
bool LootTemplate::LootGroup::HasQuestDropForPlayer(Player const* player) const
{
for (LootStoreItemList::const_iterator i = ExplicitlyChanced.begin(); i != ExplicitlyChanced.end(); ++i)
if (player->HasQuestForItem(i->itemid))
+2 -2
View File
@@ -146,7 +146,7 @@ struct LootItem
explicit LootItem(LootStoreItem const& li);
// Basic checks for player/item compatibility - if false no chance to see the item in the loot
bool AllowedForPlayer(Player const * player) const;
bool AllowedForPlayer(Player const* player) const;
void AddAllowedLooter(Player const* player);
AllowedLooterSet* GetAllowedLooters() { return &allowedGUIDs; }
@@ -226,7 +226,7 @@ class LootTemplate
// True if template includes at least 1 quest drop entry
bool HasQuestDrop(LootTemplateMap const& store, uint8 groupId = 0) const;
// True if template includes at least 1 quest drop for an active quest of the player
bool HasQuestDropForPlayer(LootTemplateMap const& store, Player const * player, uint8 groupId = 0) const;
bool HasQuestDropForPlayer(LootTemplateMap const& store, Player const* player, uint8 groupId = 0) const;
// Checks integrity of the template
void Verify(LootStore const& store, uint32 Id) const;
+5 -5
View File
@@ -1866,7 +1866,7 @@ void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellPair cellpai
notifier.SendToSelf();
}
void Map::SendInitSelf(Player * player)
void Map::SendInitSelf(Player* player)
{
sLog->outDetail("Creating player data for himself %u", player->GetGUIDLow());
@@ -1898,7 +1898,7 @@ void Map::SendInitSelf(Player * player)
player->GetSession()->SendPacket(&packet);
}
void Map::SendInitTransports(Player * player)
void Map::SendInitTransports(Player* player)
{
// Hack to send out transports
MapManager::TransportMap& tmap = sMapMgr->m_TransportsByMap;
@@ -1925,7 +1925,7 @@ void Map::SendInitTransports(Player * player)
player->GetSession()->SendPacket(&packet);
}
void Map::SendRemoveTransports(Player * player)
void Map::SendRemoveTransports(Player* player)
{
// Hack to send out transports
MapManager::TransportMap& tmap = sMapMgr->m_TransportsByMap;
@@ -2583,7 +2583,7 @@ void BattlegroundMap::InitVisibilityDistance()
m_VisibilityNotifyPeriod = World::GetVisibilityNotifyPeriodInBGArenas();
}
bool BattlegroundMap::CanEnter(Player * player)
bool BattlegroundMap::CanEnter(Player* player)
{
if (player->GetMapRef().getTarget() == this)
{
@@ -2600,7 +2600,7 @@ bool BattlegroundMap::CanEnter(Player * player)
return Map::CanEnter(player);
}
bool BattlegroundMap::Add(Player * player)
bool BattlegroundMap::Add(Player* player)
{
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, Lock, false);
+4 -4
View File
@@ -309,7 +309,7 @@ class Map : public GridRefManager<NGridType>
static void InitStateMachine();
static void DeleteStateMachine();
Map const * GetParent() const { return m_parentMap; }
Map const* GetParent() const { return m_parentMap; }
// some calls like isInWater should not use vmaps due to processor power
// can return INVALID_HEIGHT if under z+2 z coord not found height
@@ -446,10 +446,10 @@ class Map : public GridRefManager<NGridType>
void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; }
void SendInitSelf(Player * player);
void SendInitSelf(Player* player);
void SendInitTransports(Player * player);
void SendRemoveTransports(Player * player);
void SendInitTransports(Player* player);
void SendRemoveTransports(Player* player);
bool CreatureCellRelocation(Creature *creature, Cell new_cell);
+2 -2
View File
@@ -107,7 +107,7 @@ void MapInstanced::UnloadAll()
- create the instance if it's not created already
- the player is not actually added to the instance (only in InstanceMap::Add)
*/
Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
Map* MapInstanced::CreateInstance(const uint32 mapId, Player* player)
{
if (GetId() != mapId || !player)
return NULL;
@@ -257,7 +257,7 @@ bool MapInstanced::DestroyInstance(InstancedMaps::iterator &itr)
return true;
}
bool MapInstanced::CanEnter(Player * /*player*/)
bool MapInstanced::CanEnter(Player* /*player*/)
{
//ASSERT(false);
return true;
+1 -1
View File
@@ -39,7 +39,7 @@ class MapInstanced : public Map
void UnloadAll();
bool CanEnter(Player* player);
Map* CreateInstance(const uint32 mapId, Player * player);
Map* CreateInstance(const uint32 mapId, Player* player);
Map* FindMap(uint32 InstanceId) const { return _FindMap(InstanceId); }
bool DestroyInstance(InstancedMaps::iterator &itr);
@@ -232,7 +232,7 @@ FleeingMovementGenerator<T>::_setMoveData(T &owner)
float cur_dist;
float angle_to_caster;
Unit * fright = ObjectAccessor::GetUnit(owner, i_frightGUID);
Unit* fright = ObjectAccessor::GetUnit(owner, i_frightGUID);
if (fright)
{
@@ -307,7 +307,7 @@ FleeingMovementGenerator<T>::Initialize(T &owner)
owner.SetUInt64Value(UNIT_FIELD_TARGET, 0);
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
if (Unit * fright = ObjectAccessor::GetUnit(owner, i_frightGUID))
if (Unit* fright = ObjectAccessor::GetUnit(owner, i_frightGUID))
{
i_caster_x = fright->GetPositionX();
i_caster_y = fright->GetPositionY();
+14 -14
View File
@@ -36,7 +36,7 @@ m_State(OBJECTIVESTATE_NEUTRAL), m_neutralValuePct(0), m_PvP(pvp)
{
}
bool OPvPCapturePoint::HandlePlayerEnter(Player * plr)
bool OPvPCapturePoint::HandlePlayerEnter(Player* plr)
{
if (m_capturePoint)
{
@@ -47,7 +47,7 @@ bool OPvPCapturePoint::HandlePlayerEnter(Player * plr)
return m_activePlayers[plr->GetTeamId()].insert(plr).second;
}
void OPvPCapturePoint::HandlePlayerLeave(Player * plr)
void OPvPCapturePoint::HandlePlayerLeave(Player* plr)
{
if (m_capturePoint)
plr->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 0);
@@ -239,12 +239,12 @@ OutdoorPvP::~OutdoorPvP()
DeleteSpawns();
}
void OutdoorPvP::HandlePlayerEnterZone(Player * plr, uint32 /*zone*/)
void OutdoorPvP::HandlePlayerEnterZone(Player* plr, uint32 /*zone*/)
{
m_players[plr->GetTeamId()].insert(plr);
}
void OutdoorPvP::HandlePlayerLeaveZone(Player * plr, uint32 /*zone*/)
void OutdoorPvP::HandlePlayerLeaveZone(Player* plr, uint32 /*zone*/)
{
// inform the objectives of the leaving
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
@@ -256,7 +256,7 @@ void OutdoorPvP::HandlePlayerLeaveZone(Player * plr, uint32 /*zone*/)
sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %s left an outdoorpvp zone", plr->GetName());
}
void OutdoorPvP::HandlePlayerResurrects(Player * /*plr*/, uint32 /*zone*/)
void OutdoorPvP::HandlePlayerResurrects(Player* /*plr*/, uint32 /*zone*/)
{
}
@@ -430,7 +430,7 @@ void OPvPCapturePoint::SendObjectiveComplete(uint32 id, uint64 guid)
(*itr)->KilledMonsterCredit(id, guid);
}
void OutdoorPvP::HandleKill(Player *killer, Unit * killed)
void OutdoorPvP::HandleKill(Player *killer, Unit* killed)
{
if (Group * pGroup = killer->GetGroup())
{
@@ -477,7 +477,7 @@ bool OPvPCapturePoint::IsInsideObjective(Player *plr) const
return m_activePlayers[plr->GetTeamId()].find(plr) != m_activePlayers[plr->GetTeamId()].end();
}
bool OutdoorPvP::HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go)
bool OutdoorPvP::HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go)
{
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if (itr->second->HandleCustomSpell(plr, spellId, go))
@@ -486,7 +486,7 @@ bool OutdoorPvP::HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go)
return false;
}
bool OPvPCapturePoint::HandleCustomSpell(Player *plr, uint32 /*spellId*/, GameObject * /*go*/)
bool OPvPCapturePoint::HandleCustomSpell(Player *plr, uint32 /*spellId*/, GameObject* /*go*/)
{
if (!plr->IsOutdoorPvPActive())
return false;
@@ -502,7 +502,7 @@ bool OutdoorPvP::HandleOpenGo(Player *plr, uint64 guid)
return false;
}
bool OutdoorPvP::HandleGossipOption(Player * plr, uint64 guid, uint32 id)
bool OutdoorPvP::HandleGossipOption(Player* plr, uint64 guid, uint32 id)
{
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if (itr->second->HandleGossipOption(plr, guid, id))
@@ -520,7 +520,7 @@ bool OutdoorPvP::CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso)
return false;
}
bool OutdoorPvP::HandleDropFlag(Player * plr, uint32 id)
bool OutdoorPvP::HandleDropFlag(Player* plr, uint32 id)
{
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if (itr->second->HandleDropFlag(plr, id))
@@ -529,7 +529,7 @@ bool OutdoorPvP::HandleDropFlag(Player * plr, uint32 id)
return false;
}
bool OPvPCapturePoint::HandleGossipOption(Player * /*plr*/, uint64 /*guid*/, uint32 /*id*/)
bool OPvPCapturePoint::HandleGossipOption(Player* /*plr*/, uint64 /*guid*/, uint32 /*id*/)
{
return false;
}
@@ -539,12 +539,12 @@ bool OPvPCapturePoint::CanTalkTo(Player* /*plr*/, Creature* /*c*/, GossipMenuIte
return false;
}
bool OPvPCapturePoint::HandleDropFlag(Player * /*plr*/, uint32 /*id*/)
bool OPvPCapturePoint::HandleDropFlag(Player* /*plr*/, uint32 /*id*/)
{
return false;
}
int32 OPvPCapturePoint::HandleOpenGo(Player * /*plr*/, uint64 guid)
int32 OPvPCapturePoint::HandleOpenGo(Player* /*plr*/, uint64 guid)
{
std::map<uint64, uint32>::iterator itr = m_ObjectTypes.find(guid);
if (itr != m_ObjectTypes.end())
@@ -554,7 +554,7 @@ int32 OPvPCapturePoint::HandleOpenGo(Player * /*plr*/, uint64 guid)
return -1;
}
bool OutdoorPvP::HandleAreaTrigger(Player * /*plr*/, uint32 /*trigger*/)
bool OutdoorPvP::HandleAreaTrigger(Player* /*plr*/, uint32 /*trigger*/)
{
return false;
}
+16 -16
View File
@@ -104,13 +104,13 @@ class OPvPCapturePoint
void SendObjectiveComplete(uint32 id, uint64 guid);
// used when player is activated/inactivated in the area
virtual bool HandlePlayerEnter(Player * plr);
virtual void HandlePlayerLeave(Player * plr);
virtual bool HandlePlayerEnter(Player* plr);
virtual void HandlePlayerLeave(Player* plr);
// checks if player is in range of a capture credit marker
bool IsInsideObjective(Player * plr) const;
bool IsInsideObjective(Player* plr) const;
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go);
virtual int32 HandleOpenGo(Player *plr, uint64 guid);
@@ -127,7 +127,7 @@ class OPvPCapturePoint
virtual bool CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso);
virtual bool HandleDropFlag(Player * plr, uint32 spellId);
virtual bool HandleDropFlag(Player* plr, uint32 spellId);
virtual void DeleteSpawns();
@@ -208,10 +208,10 @@ class OutdoorPvP : public ZoneScript
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
// called when a player triggers an areatrigger
virtual bool HandleAreaTrigger(Player * plr, uint32 trigger);
virtual bool HandleAreaTrigger(Player* plr, uint32 trigger);
// called on custom spell
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go);
// called on go use
virtual bool HandleOpenGo(Player *plr, uint64 guid);
@@ -230,18 +230,18 @@ class OutdoorPvP : public ZoneScript
virtual bool Update(uint32 diff);
// handle npc/player kill
virtual void HandleKill(Player * killer, Unit * killed);
virtual void HandleKillImpl(Player * /*killer*/, Unit * /*killed*/) {}
virtual void HandleKill(Player* killer, Unit* killed);
virtual void HandleKillImpl(Player* /*killer*/, Unit* /*killed*/) {}
// checks if player is in range of a capture credit marker
bool IsInsideObjective(Player * plr) const;
bool IsInsideObjective(Player* plr) const;
// awards rewards for player kill
virtual void AwardKillBonus(Player * /*plr*/) {}
virtual void AwardKillBonus(Player* /*plr*/) {}
uint32 GetTypeId() {return m_TypeId;}
virtual bool HandleDropFlag(Player * plr, uint32 spellId);
virtual bool HandleDropFlag(Player* plr, uint32 spellId);
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
@@ -261,14 +261,14 @@ class OutdoorPvP : public ZoneScript
bool m_sendUpdate;
// world state stuff
virtual void SendRemoveWorldStates(Player * /*plr*/) {}
virtual void SendRemoveWorldStates(Player* /*plr*/) {}
void BroadcastPacket(WorldPacket & data) const;
virtual void HandlePlayerEnterZone(Player * plr, uint32 zone);
virtual void HandlePlayerLeaveZone(Player * plr, uint32 zone);
virtual void HandlePlayerEnterZone(Player* plr, uint32 zone);
virtual void HandlePlayerLeaveZone(Player* plr, uint32 zone);
virtual void HandlePlayerResurrects(Player * plr, uint32 zone);
virtual void HandlePlayerResurrects(Player* plr, uint32 zone);
void AddCapturePoint(OPvPCapturePoint* cp)
{
+1 -1
View File
@@ -164,7 +164,7 @@ void OutdoorPvPMgr::Update(uint32 diff)
}
}
bool OutdoorPvPMgr::HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go)
bool OutdoorPvPMgr::HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go)
{
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
+7 -7
View File
@@ -50,22 +50,22 @@ class OutdoorPvPMgr
void InitOutdoorPvP();
// called when a player enters an outdoor pvp area
void HandlePlayerEnterZone(Player * plr, uint32 areaflag);
void HandlePlayerEnterZone(Player* plr, uint32 areaflag);
// called when player leaves an outdoor pvp area
void HandlePlayerLeaveZone(Player * plr, uint32 areaflag);
void HandlePlayerLeaveZone(Player* plr, uint32 areaflag);
// called when player resurrects
void HandlePlayerResurrects(Player * plr, uint32 areaflag);
void HandlePlayerResurrects(Player* plr, uint32 areaflag);
// return assigned outdoor pvp
OutdoorPvP * GetOutdoorPvPToZoneId(uint32 zoneid);
// handle custom (non-exist in dbc) spell if registered
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject* go);
bool HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go);
// handle custom go if registered
bool HandleOpenGo(Player * plr, uint64 guid);
bool HandleOpenGo(Player* plr, uint64 guid);
ZoneScript * GetZoneScript(uint32 zoneId);
@@ -73,11 +73,11 @@ class OutdoorPvPMgr
void Update(uint32 diff);
void HandleGossipOption(Player * player, uint64 guid, uint32 gossipid);
void HandleGossipOption(Player* player, uint64 guid, uint32 gossipid);
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso);
void HandleDropFlag(Player * plr, uint32 spellId);
void HandleDropFlag(Player* plr, uint32 spellId);
typedef std::vector<OutdoorPvP*> OutdoorPvPSet;
typedef std::map<uint32 /* zoneid */, OutdoorPvP*> OutdoorPvPMap;
+1 -1
View File
@@ -700,7 +700,7 @@ class PlayerScript : public ScriptObject
virtual void OnTextEmote(Player* /*player*/, uint32 /*text_emote*/, uint32 /*emoteNum*/, uint64 /*guid*/) { }
// Called in Spell::cast
virtual void OnSpellCast(Player* /*player*/, Spell * /*spell*/, bool /*skipCheck*/) { }
virtual void OnSpellCast(Player* /*player*/, Spell* /*spell*/, bool /*skipCheck*/) { }
// Called when a player logs in or out
virtual void OnLogin(Player* /*player*/) { }
@@ -548,7 +548,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
sLog->outDebug(LOG_FILTER_NETWORKIO, "Character creation %s (account %u) has unhandled tail data: [%u]", name.c_str(), GetAccountId(), unk);
}
Player * pNewChar = new Player(this);
Player* pNewChar = new Player(this);
if (!pNewChar->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PLAYER), name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId))
{
// Player not create (race/class/etc problem?)
@@ -776,7 +776,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
{
if (auramask & (uint64(1) << i))
{
AuraApplication const * aurApp = player->GetVisibleAura(i);
AuraApplication const* aurApp = player->GetVisibleAura(i);
*data << uint32(aurApp ? aurApp->GetBase()->GetId() : 0);
*data << uint8(1);
}
@@ -866,7 +866,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
{
if (auramask & (uint64(1) << i))
{
AuraApplication const * aurApp = player->GetVisibleAura(i);
AuraApplication const* aurApp = player->GetVisibleAura(i);
*data << uint32(aurApp ? aurApp->GetBase()->GetId() : 0);
*data << uint8(1);
}
@@ -491,7 +491,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data)
AllowedLooterSet* looters = item.GetAllowedLooters();
// not move item from loot to target inventory
Item * newitem = target->StoreNewItem(dest, item.itemid, true, item.randomPropertyId, (looters->size() > 1) ? looters : NULL);
Item* newitem = target->StoreNewItem(dest, item.itemid, true, item.randomPropertyId, (looters->size() > 1) ? looters : NULL);
target->SendNewItem(newitem, uint32(item.count), false, false, true);
target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item.itemid, item.count);
target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, pLoot->loot_type, item.count);
@@ -583,7 +583,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPacket & recv_data)
data << uint32(creator->GetDisplayId());
if (creator->GetTypeId() == TYPEID_PLAYER)
{
Player * pCreator = creator->ToPlayer();
Player* pCreator = creator->ToPlayer();
data << uint8(pCreator->getRace());
data << uint8(pCreator->getGender());
data << uint8(pCreator->getClass());
+1 -1
View File
@@ -297,7 +297,7 @@ class WorldSession
//used with item_page table
bool SendItemInfo(uint32 itemid, WorldPacket data);
//auction
void SendAuctionHello(uint64 guid, Creature * unit);
void SendAuctionHello(uint64 guid, Creature* unit);
void SendAuctionCommandResult(uint32 auctionId, uint32 Action, uint32 ErrorCode, uint32 bidError = 0);
void SendAuctionBidderNotification(uint32 location, uint32 auctionId, uint64 bidder, uint32 bidSum, uint32 diff, uint32 item_template);
void SendAuctionOwnerNotification(AuctionEntry * auction);
+1 -1
View File
@@ -114,7 +114,7 @@ void LoadSkillExtraItemTable()
sLog->outString();
}
bool canCreateExtraItems(Player * player, uint32 spellId, float &additionalChance, uint8 &additionalMax)
bool canCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax)
{
// get the info for the specified spell
SkillExtraItemMap::const_iterator ret = SkillExtraItemStore.find(spellId);
+1 -1
View File
@@ -24,7 +24,7 @@
// predef classes used in functions
class Player;
// returns true and sets the appropriate info if the player can create extra items with the given spellId
bool canCreateExtraItems(Player * player, uint32 spellId, float &additionalChance, uint8 &additionalMax);
bool canCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax);
// function to load the extra item creation info from DB
void LoadSkillExtraItemTable();
#endif
File diff suppressed because it is too large Load Diff
+158 -158
View File
@@ -9,24 +9,24 @@ class Aura;
#include "SpellAuras.h"
typedef void(AuraEffect::*pAuraEffectHandler)(AuraApplication const * aurApp, uint8 mode, bool apply) const;
typedef void(AuraEffect::*pAuraEffectHandler)(AuraApplication const* aurApp, uint8 mode, bool apply) const;
class AuraEffect
{
friend void Aura::_InitEffects(uint8 effMask, Unit * caster, int32 *baseAmount);
friend void Aura::_InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount);
friend Aura * Unit::_TryStackingOrRefreshingExistingAura(SpellEntry const* newAura, uint8 effMask, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID);
friend Aura::~Aura();
private:
~AuraEffect();
explicit AuraEffect(Aura * base, uint8 effIndex, int32 *baseAmount, Unit * caster);
explicit AuraEffect(Aura * base, uint8 effIndex, int32 *baseAmount, Unit* caster);
public:
Unit * GetCaster() const { return GetBase()->GetCaster(); }
Unit* GetCaster() const { return GetBase()->GetCaster(); }
uint64 GetCasterGUID() const { return GetBase()->GetCasterGUID(); }
Aura * GetBase() const { return m_base; }
void GetTargetList(std::list<Unit*> & targetList) const;
void GetApplicationList(std::list<AuraApplication*> & applicationList) const;
SpellEntry const * GetSpellProto() const { return m_spellProto; }
SpellEntry const* GetSpellProto() const { return m_spellProto; }
uint32 GetId() const { return m_spellProto->Id; }
uint32 GetEffIndex() const { return m_effIndex; }
int32 GetBaseAmount() const { return m_baseAmount; }
@@ -41,20 +41,20 @@ class AuraEffect
int32 GetPeriodicTimer() const { return m_periodicTimer; }
void SetPeriodicTimer(int32 periodicTimer) { m_periodicTimer = periodicTimer; }
int32 CalculateAmount(Unit * caster);
void CalculatePeriodic(Unit * caster, bool create = false, bool load = false);
int32 CalculateAmount(Unit* caster);
void CalculatePeriodic(Unit* caster, bool create = false, bool load = false);
void CalculateSpellMod();
void ChangeAmount(int32 newAmount, bool mark = true, bool onStackOrReapply = false);
void RecalculateAmount() { if (!CanBeRecalculated()) return; ChangeAmount(CalculateAmount(GetCaster()), false); }
void RecalculateAmount(Unit * caster) { if (!CanBeRecalculated()) return; ChangeAmount(CalculateAmount(caster), false); }
void RecalculateAmount(Unit* caster) { if (!CanBeRecalculated()) return; ChangeAmount(CalculateAmount(caster), false); }
bool CanBeRecalculated() const { return m_canBeRecalculated; }
void SetCanBeRecalculated(bool val) { m_canBeRecalculated = val; }
void HandleEffect(AuraApplication * aurApp, uint8 mode, bool apply);
void HandleEffect(Unit * target, uint8 mode, bool apply);
void ApplySpellMod(Unit * target, bool apply);
void HandleEffect(Unit* target, uint8 mode, bool apply);
void ApplySpellMod(Unit* target, bool apply);
void Update(uint32 diff, Unit * caster);
void UpdatePeriodic(Unit * caster);
void Update(uint32 diff, Unit* caster);
void UpdatePeriodic(Unit* caster);
uint32 GetTickNumber() const { return m_tickNumber; }
int32 GetTotalTicks() const { return m_amplitude ? (GetBase()->GetMaxDuration() / m_amplitude) : 1;}
@@ -64,21 +64,21 @@ class AuraEffect
void SetPeriodic(bool isPeriodic) { m_isPeriodic = isPeriodic; }
bool IsAffectedOnSpell(SpellEntry const *spell) const;
void SendTickImmune(Unit * target, Unit *caster) const;
void SendTickImmune(Unit* target, Unit *caster) const;
void PeriodicTick(AuraApplication * aurApp, Unit * caster) const;
void PeriodicDummyTick(Unit * target, Unit * caster) const;
void TriggerSpell(Unit * target, Unit * caster) const;
void TriggerSpellWithValue(Unit * target, Unit * caster) const;
void PeriodicTick(AuraApplication * aurApp, Unit* caster) const;
void PeriodicDummyTick(Unit* target, Unit* caster) const;
void TriggerSpell(Unit* target, Unit* caster) const;
void TriggerSpellWithValue(Unit* target, Unit* caster) const;
void CleanupTriggeredSpells(Unit * target);
void CleanupTriggeredSpells(Unit* target);
// add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras
void HandleShapeshiftBoosts(Unit * target, bool apply) const;
void HandleShapeshiftBoosts(Unit* target, bool apply) const;
private:
Aura * const m_base;
SpellEntry const * const m_spellProto;
SpellEntry const* const m_spellProto;
uint8 const m_effIndex;
int32 const m_baseAmount;
@@ -92,176 +92,176 @@ class AuraEffect
int32 m_amplitude;
uint32 m_tickNumber;
private:
bool IsPeriodicTickCrit(Unit * target, Unit const * caster) const;
bool IsPeriodicTickCrit(Unit* target, Unit const* caster) const;
public:
// aura effect handlers
void HandleNULL(AuraApplication const * /*aurApp*/, uint8 /*mode*/, bool /*apply*/) const
void HandleNULL(AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) const
{
// not implemented
}
void HandleUnused(AuraApplication const * /*aurApp*/, uint8 /*mode*/, bool /*apply*/) const
void HandleUnused(AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) const
{
// useless
}
void HandleNoImmediateEffect(AuraApplication const * /*aurApp*/, uint8 /*mode*/, bool /*apply*/) const
void HandleNoImmediateEffect(AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) const
{
// aura type not have immediate effect at add/remove and handled by ID in other code place
}
// visibility & phases
void HandleModInvisibilityDetect(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModInvisibility(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModStealth(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModStealthLevel(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModStealthDetect(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleSpiritOfRedemption(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraGhost(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandlePhase(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModInvisibilityDetect(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModInvisibility(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModStealth(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModStealthLevel(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModStealthDetect(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraGhost(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandlePhase(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// unit model
void HandleAuraModShapeshift(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraTransform(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModScale(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraCloneCaster(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraTransform(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModScale(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraCloneCaster(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// fight
void HandleFeignDeath(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModUnattackable(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModDisarm(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModSilence(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModPacify(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModPacifyAndSilence(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraAllowOnlyAbility(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModUnattackable(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModDisarm(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModSilence(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModPacify(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModPacifyAndSilence(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraAllowOnlyAbility(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// tracking
void HandleAuraTrackResources(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraTrackCreatures(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraTrackStealthed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModStalked(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraUntrackable(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraTrackResources(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraTrackCreatures(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraTrackStealthed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModStalked(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraUntrackable(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// skills & talents
void HandleAuraModPetTalentsPoints(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModSkill(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModPetTalentsPoints(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModSkill(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// movement
void HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraAllowFlight(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraWaterWalk(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraFeatherFall(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraHover(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleWaterBreathing(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleForceMoveForward(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraAllowFlight(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraWaterWalk(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraFeatherFall(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraHover(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleWaterBreathing(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleForceMoveForward(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// threat
void HandleModThreat(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModTotalThreat(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModTaunt(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModThreat(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModTotalThreat(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModTaunt(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// control
void HandleModConfuse(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModFear(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModStun(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModRoot(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandlePreventFleeing(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModConfuse(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModFear(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModStun(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModRoot(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandlePreventFleeing(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// charm
void HandleModPossess(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModPossessPet(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModCharm(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleCharmConvert(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraControlVehicle(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModPossess(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModPossessPet(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModCharm(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleCharmConvert(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// modify speed
void HandleAuraModIncreaseSpeed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseMountedSpeed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseFlightSpeed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseSwimSpeed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModDecreaseSpeed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModUseNormalSpeed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseMountedSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseFlightSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseSwimSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModDecreaseSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModUseNormalSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// immunity
void HandleModStateImmunityMask(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModMechanicImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModEffectImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModStateImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModSchoolImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModDmgImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModDispelImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModStateImmunityMask(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMechanicImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModEffectImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModStateImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModDmgImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModDispelImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// modify stats
// resistance
void HandleAuraModResistanceExclusive(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModResistance(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModBaseResistancePCT(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModResistancePercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModBaseResistance(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModTargetResistance(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModResistanceExclusive(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModResistance(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModBaseResistancePCT(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModResistancePercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModBaseResistance(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModTargetResistance(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// stat
void HandleAuraModStat(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModPercentStat(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModSpellDamagePercentFromStat(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModSpellHealingPercentFromStat(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModSpellDamagePercentFromAttackPower(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModSpellHealingPercentFromAttackPower(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModHealingDone(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModTotalPercentStat(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModResistenceOfStatPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModExpertise(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModPercentStat(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModSpellDamagePercentFromStat(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModSpellHealingPercentFromStat(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModSpellDamagePercentFromAttackPower(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModSpellHealingPercentFromAttackPower(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModHealingDone(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModTotalPercentStat(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModResistenceOfStatPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModExpertise(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// heal and energize
void HandleModPowerRegen(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModPowerRegenPCT(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModManaRegen(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseHealth(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseMaxHealth(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseEnergy(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseEnergyPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseHealthPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraIncreaseBaseHealthPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModPowerRegen(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModPowerRegenPCT(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModManaRegen(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseHealth(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseMaxHealth(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseEnergy(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseEnergyPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModIncreaseHealthPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraIncreaseBaseHealthPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// fight
void HandleAuraModParryPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModDodgePercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModBlockPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModRegenInterrupt(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModWeaponCritPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModHitChance(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModSpellHitChance(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModSpellCritChance(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModSpellCritChanceShool(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModCritPct(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModParryPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModDodgePercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModBlockPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModRegenInterrupt(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModWeaponCritPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModHitChance(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModSpellHitChance(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModSpellCritChance(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModSpellCritChanceShool(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModCritPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// attack speed
void HandleModCastingSpeed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModMeleeRangedSpeedPct(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModCombatSpeedPct(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModAttackSpeed(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModMeleeSpeedPct(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedHaste(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleRangedAmmoHaste(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModCastingSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeRangedSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModCombatSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModAttackSpeed(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModMeleeSpeedPct(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleRangedAmmoHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// combat rating
void HandleModRating(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModRatingFromStat(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModRating(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModRatingFromStat(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// attack power
void HandleAuraModAttackPower(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedAttackPower(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModAttackPowerPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedAttackPowerPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedAttackPowerOfStatPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModAttackPowerOfStatPercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModAttackPowerOfArmor(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModAttackPower(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedAttackPower(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModAttackPowerPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedAttackPowerPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModRangedAttackPowerOfStatPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModAttackPowerOfStatPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModAttackPowerOfArmor(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// damage bonus
void HandleModDamageDone(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModDamagePercentDone(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModOffhandDamagePercent(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleShieldBlockValue(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModDamageDone(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModOffhandDamagePercent(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleShieldBlockValue(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// power cost
void HandleModPowerCostPCT(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModPowerCost(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleArenaPreparation(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleNoReagentUseAura(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraRetainComboPoints(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleModPowerCostPCT(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleModPowerCost(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleArenaPreparation(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleNoReagentUseAura(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraRetainComboPoints(AuraApplication const* aurApp, uint8 mode, bool apply) const;
// others
void HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleChannelDeathItem(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleBindSight(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleForceReaction(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraEmpathy(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModFaction(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleComprehendLanguage(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraConvertRune(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraLinked(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraOpenStable(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraOverrideSpells(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraSetVehicle(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraModFakeInebriation(AuraApplication const * aurApp, uint8 mode, bool apply) const;
void HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleChannelDeathItem(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleBindSight(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleForceReaction(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraEmpathy(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModFaction(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleComprehendLanguage(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraConvertRune(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraOpenStable(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode, bool apply) const;
void HandleAuraModFakeInebriation(AuraApplication const* aurApp, uint8 mode, bool apply) const;
};
namespace Trinity
@@ -273,8 +273,8 @@ namespace Trinity
AbsorbAuraOrderPred() { }
bool operator() (AuraEffect * aurEffA, AuraEffect * aurEffB) const
{
SpellEntry const * spellProtoA = aurEffA->GetSpellProto();
SpellEntry const * spellProtoB = aurEffB->GetSpellProto();
SpellEntry const* spellProtoA = aurEffA->GetSpellProto();
SpellEntry const* spellProtoB = aurEffB->GetSpellProto();
// Wards
if ((spellProtoA->SpellFamilyName == SPELLFAMILY_MAGE) ||
+54 -54
View File
@@ -35,7 +35,7 @@
#include "ScriptMgr.h"
#include "SpellScript.h"
AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint8 effMask):
AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura * aura, uint8 effMask):
m_target(target), m_base(aura), m_slot(MAX_AURAS), m_flags(AFLAG_NONE),
m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(false)
{
@@ -53,7 +53,7 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa
}
else
{
Unit::VisibleAuraMap const * visibleAuras = GetTarget()->GetVisibleAuras();
Unit::VisibleAuraMap const* visibleAuras = GetTarget()->GetVisibleAuras();
// lookup for free slots in units visibleAuras
Unit::VisibleAuraMap::const_iterator itr = visibleAuras->find(0);
for (uint32 freeSlot = 0; freeSlot < MAX_AURAS; ++itr , ++freeSlot)
@@ -111,7 +111,7 @@ void AuraApplication::_Remove()
}
}
void AuraApplication::_InitFlags(Unit * caster, uint8 effMask)
void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
{
// mark as selfcasted if needed
m_flags |= (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) ? AFLAG_CASTER : AFLAG_NONE;
@@ -186,7 +186,7 @@ void AuraApplication::BuildUpdatePacket(ByteBuffer& data, bool remove) const
}
ASSERT(m_target->GetVisibleAura(m_slot));
Aura const * aura = GetBase();
Aura const* aura = GetBase();
data << uint32(aura->GetId());
uint32 flags = m_flags;
if (aura->GetMaxDuration() > 0 && !(aura->GetSpellProto()->AttributesEx5 & SPELL_ATTR5_HIDE_DURATION))
@@ -327,7 +327,7 @@ Aura* Aura::Create(SpellEntry const* spellproto, uint8 effMask, WorldObject* own
return aura;
}
Aura::Aura(SpellEntry const* spellproto, WorldObject * owner, Unit * caster, Item * castItem, uint64 casterGUID) :
Aura::Aura(SpellEntry const* spellproto, WorldObject * owner, Unit* caster, Item* castItem, uint64 casterGUID) :
m_spellProto(spellproto), m_casterGuid(casterGUID ? casterGUID : caster->GetGUID()),
m_castItemGuid(castItem ? castItem->GetGUID() : 0), m_applyTime(time(NULL)),
m_owner(owner), m_timeCla(0), m_updateTargetMapInterval(0),
@@ -342,7 +342,7 @@ m_isRemoved(false), m_isSingleTarget(false)
m_procCharges = CalcMaxCharges(caster);
}
void Aura::_InitEffects(uint8 effMask, Unit * caster, int32 *baseAmount)
void Aura::_InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount)
{
// shouldn't be in constructor - functions in AuraEffect::AuraEffect use polymorphism
for (uint8 i=0 ; i<MAX_SPELL_EFFECTS; ++i)
@@ -377,7 +377,7 @@ Unit* Aura::GetCaster() const
{
if (GetOwner()->GetGUID() == GetCasterGUID())
return GetUnitOwner();
if (AuraApplication const * aurApp = GetApplicationOfTarget(GetCasterGUID()))
if (AuraApplication const* aurApp = GetApplicationOfTarget(GetCasterGUID()))
return aurApp->GetTarget();
return ObjectAccessor::GetUnit(*GetOwner(), GetCasterGUID());
@@ -388,7 +388,7 @@ AuraObjectType Aura::GetType() const
return (m_owner->GetTypeId() == TYPEID_DYNAMICOBJECT) ? DYNOBJ_AURA_TYPE : UNIT_AURA_TYPE;
}
void Aura::_ApplyForTarget(Unit * target, Unit * caster, AuraApplication * auraApp)
void Aura::_ApplyForTarget(Unit* target, Unit* caster, AuraApplication * auraApp)
{
ASSERT(target);
ASSERT(auraApp);
@@ -408,7 +408,7 @@ void Aura::_ApplyForTarget(Unit * target, Unit * caster, AuraApplication * auraA
}
}
void Aura::_UnapplyForTarget(Unit * target, Unit * caster, AuraApplication * auraApp)
void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * auraApp)
{
ASSERT(target);
ASSERT(auraApp->GetRemoveMode());
@@ -449,13 +449,13 @@ void Aura::_Remove(AuraRemoveMode removeMode)
for (appItr = m_applications.begin(); appItr != m_applications.end();)
{
AuraApplication * aurApp = appItr->second;
Unit * target = aurApp->GetTarget();
Unit* target = aurApp->GetTarget();
target->_UnapplyAura(aurApp, removeMode);
appItr = m_applications.begin();
}
}
void Aura::UpdateTargetMap(Unit * caster, bool apply)
void Aura::UpdateTargetMap(Unit* caster, bool apply)
{
if (IsRemoved())
return;
@@ -537,7 +537,7 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply)
// this one prevents unwanted usefull buff loss because of stacking and prevents overriding auras periodicaly by 2 near area aura owners
for (Unit::AuraApplicationMap::iterator iter = itr->first->GetAppliedAuras().begin(); iter != itr->first->GetAppliedAuras().end(); ++iter)
{
Aura const * aura = iter->second->GetBase();
Aura const* aura = iter->second->GetBase();
if (!sSpellMgr->CanAurasStack(this, aura, aura->GetCasterGUID() == GetCasterGUID()))
{
addUnit = false;
@@ -604,11 +604,11 @@ void Aura::UpdateOwner(uint32 diff, WorldObject * owner)
{
ASSERT(owner == m_owner);
Unit * caster = GetCaster();
Unit* caster = GetCaster();
// Apply spellmods for channeled auras
// used for example when triggered spell of spell:10 is modded
Spell * modSpell = NULL;
Player * modOwner = NULL;
Spell* modSpell = NULL;
Player* modOwner = NULL;
if (caster)
{
modOwner = caster->GetSpellModOwner();
@@ -639,7 +639,7 @@ void Aura::UpdateOwner(uint32 diff, WorldObject * owner)
_DeleteRemovedApplications();
}
void Aura::Update(uint32 diff, Unit * caster)
void Aura::Update(uint32 diff, Unit* caster)
{
if (m_duration > 0)
{
@@ -710,8 +710,8 @@ void Aura::SetDuration(int32 duration, bool withMods)
{
if (withMods)
{
if (Unit * caster = GetCaster())
if (Player * modOwner = caster->GetSpellModOwner())
if (Unit* caster = GetCaster())
if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(GetId(), SPELLMOD_DURATION, duration);
}
m_duration = duration;
@@ -730,7 +730,7 @@ void Aura::RefreshTimers()
{
m_maxDuration = CalcMaxDuration();
RefreshDuration();
Unit * caster = GetCaster();
Unit* caster = GetCaster();
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (HasEffect(i))
GetEffect(i)->CalculatePeriodic(caster, false, false);
@@ -744,7 +744,7 @@ void Aura::SetCharges(uint8 charges)
SetNeedClientUpdateForTargets();
}
uint8 Aura::CalcMaxCharges(Unit * caster) const
uint8 Aura::CalcMaxCharges(Unit* caster) const
{
uint8 maxProcCharges = m_spellProto->procCharges;
@@ -779,7 +779,7 @@ bool Aura::ModCharges(int32 num, AuraRemoveMode removeMode)
void Aura::SetStackAmount(uint8 stackAmount)
{
m_stackAmount = stackAmount;
Unit * caster = GetCaster();
Unit* caster = GetCaster();
std::list<AuraApplication*> applications;
GetApplicationList(applications);
@@ -878,7 +878,7 @@ bool Aura::CanBeSentToClient() const
void Aura::UnregisterSingleTarget()
{
ASSERT(m_isSingleTarget);
Unit * caster = GetCaster();
Unit* caster = GetCaster();
// TODO: find a better way to do this.
if (!caster)
caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetCasterGUID(), (Unit*)NULL);
@@ -893,7 +893,7 @@ void Aura::SetLoadedState(int32 maxduration, int32 duration, int32 charges, uint
m_duration = duration;
m_procCharges = charges;
m_stackAmount = stackamount;
Unit * caster = GetCaster();
Unit* caster = GetCaster();
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (m_effects[i])
{
@@ -918,7 +918,7 @@ bool Aura::HasEffectType(AuraType type) const
void Aura::RecalculateAmountOfEffects()
{
ASSERT (!IsRemoved());
Unit * caster = GetCaster();
Unit* caster = GetCaster();
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (HasEffect(i))
m_effects[i]->RecalculateAmount(caster);
@@ -948,9 +948,9 @@ void Aura::SetNeedClientUpdateForTargets() const
}
// trigger effects on real aura apply/remove
void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, bool apply, bool onReapply)
void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, bool apply, bool onReapply)
{
Unit * target = aurApp->GetTarget();
Unit* target = aurApp->GetTarget();
AuraRemoveMode removeMode = aurApp->GetRemoveMode();
// spell_area table
SpellAreaForAreaMapBounds saBounds = sSpellMgr->GetSpellAreaForAuraMapBounds(GetId());
@@ -1057,7 +1057,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
case 12536: // Clearcasting
case 12043: // Presence of Mind
// Arcane Potency
if (AuraEffect const * aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_MAGE, 2120, 0))
if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_MAGE, 2120, 0))
{
uint32 spellId = 0;
@@ -1108,7 +1108,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
if (GetSpellProto()->SpellFamilyFlags[0] & 0x02000000 && GetEffect(0))
{
// Improved Devouring Plague
if (AuraEffect const * aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 3790, 1))
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 3790, 1))
{
int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * caster->SpellDamageBonus(target, GetSpellProto(), GetEffect(0)->GetAmount(), DOT) / 100;
int32 heal = int32(CalculatePctN(basepoints0, 15));
@@ -1120,7 +1120,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
else if (GetSpellProto()->SpellFamilyFlags[0] & 0x00000040 && GetEffect(0))
{
// Empowered Renew
if (AuraEffect const * aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 3021, 1))
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 3021, 1))
{
int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * caster->SpellHealingBonus(target, GetSpellProto(), GetEffect(0)->GetAmount(), HEAL) / 100;
caster->CastCustomSpell(target, 63544, &basepoints0, NULL, NULL, true, NULL, GetEffect(0));
@@ -1350,7 +1350,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
if (removeMode == AURA_REMOVE_BY_ENEMY_SPELL && (GetSpellProto()->SpellFamilyFlags[0] & 0x00008000 || GetSpellProto()->SpellFamilyFlags[1] & 0x00000400))
{
// Shadow Affinity
if (AuraEffect const * aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 178, 1))
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 178, 1))
{
int32 basepoints0 = aurEff->GetAmount() * caster->GetCreateMana() / 100;
caster->CastCustomSpell(caster, 64103, &basepoints0, NULL, NULL, true, NULL, GetEffect(0));
@@ -1360,7 +1360,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
else if (removeMode == AURA_REMOVE_BY_ENEMY_SPELL && GetSpellProto()->SpellFamilyFlags[0] & 0x00000001)
{
// Rapture
if (Aura const * aura = caster->GetAuraOfRankedSpell(47535))
if (Aura const* aura = caster->GetAuraOfRankedSpell(47535))
{
// check cooldown
if (caster->GetTypeId() == TYPEID_PLAYER)
@@ -1371,7 +1371,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
caster->ToPlayer()->AddSpellCooldown(aura->GetId(), 0, uint32(time(NULL) + 12));
}
// effect on caster
if (AuraEffect const * aurEff = aura->GetEffect(0))
if (AuraEffect const* aurEff = aura->GetEffect(0))
{
float multiplier = (float)aurEff->GetAmount();
if (aurEff->GetId() == 47535)
@@ -1383,7 +1383,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
caster->CastCustomSpell(caster, 47755, &basepoints0, NULL, NULL, true);
}
// effect on aura target
if (AuraEffect const * aurEff = aura->GetEffect(1))
if (AuraEffect const* aurEff = aura->GetEffect(1))
{
if (!roll_chance_i(aurEff->GetAmount()))
break;
@@ -1491,7 +1491,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
if (GetSpellProto()->SpellFamilyFlags[0] & 0x00400000)
{
// Master of subtlety
if (AuraEffect const * aurEff = target->GetAuraEffectOfRankedSpell(31221, 0))
if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(31221, 0))
{
if (!apply)
target->CastSpell(target, 31666, true);
@@ -1741,7 +1741,7 @@ bool Aura::CallScriptCheckAreaTargetHandlers(Unit* target)
return true;
}
bool Aura::CallScriptEffectApplyHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode)
bool Aura::CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
{
bool preventDefault = false;
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
@@ -1760,7 +1760,7 @@ bool Aura::CallScriptEffectApplyHandlers(AuraEffect const * aurEff, AuraApplicat
return preventDefault;
}
bool Aura::CallScriptEffectRemoveHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode)
bool Aura::CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
{
bool preventDefault = false;
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
@@ -1779,7 +1779,7 @@ bool Aura::CallScriptEffectRemoveHandlers(AuraEffect const * aurEff, AuraApplica
return preventDefault;
}
void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode)
void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1794,7 +1794,7 @@ void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const * aurEff, AuraApp
}
}
void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode)
void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1809,7 +1809,7 @@ void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const * aurEff, AuraAp
}
}
bool Aura::CallScriptEffectPeriodicHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp)
bool Aura::CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp)
{
bool preventDefault = false;
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
@@ -1843,7 +1843,7 @@ void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff)
}
}
void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const * aurEff, int32 & amount, bool & canBeRecalculated)
void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1858,7 +1858,7 @@ void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const * aurEff, int32 &
}
}
void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const * aurEff, bool & isPeriodic, int32 & amplitude)
void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool & isPeriodic, int32 & amplitude)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1873,7 +1873,7 @@ void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const * aurEff, bool
}
}
void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const * aurEff, SpellModifier *& spellMod)
void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellModifier *& spellMod)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1888,7 +1888,7 @@ void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const * aurEff, Spell
}
}
void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication const * aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/)
void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1903,7 +1903,7 @@ void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication c
}
}
void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplication const * aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount)
void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1918,7 +1918,7 @@ void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplicat
}
}
void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplication const * aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/)
void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1933,7 +1933,7 @@ void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplicati
}
}
void Aura::CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraApplication const * aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount)
void Aura::CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount)
{
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
{
@@ -1948,7 +1948,7 @@ void Aura::CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraAppl
}
}
UnitAura::UnitAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID)
UnitAura::UnitAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID)
: Aura(spellproto, owner, caster, castItem, casterGUID)
{
m_AuraDRGroup = DIMINISHING_NONE;
@@ -1957,7 +1957,7 @@ UnitAura::UnitAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * ow
GetUnitOwner()->_AddAura(this, caster);
};
void UnitAura::_ApplyForTarget(Unit * target, Unit * caster, AuraApplication * aurApp)
void UnitAura::_ApplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp)
{
Aura::_ApplyForTarget(target, caster, aurApp);
@@ -1966,7 +1966,7 @@ void UnitAura::_ApplyForTarget(Unit * target, Unit * caster, AuraApplication * a
target->ApplyDiminishingAura(group, true);
}
void UnitAura::_UnapplyForTarget(Unit * target, Unit * caster, AuraApplication * aurApp)
void UnitAura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp)
{
Aura::_UnapplyForTarget(target, caster, aurApp);
@@ -1982,9 +1982,9 @@ void UnitAura::Remove(AuraRemoveMode removeMode)
GetUnitOwner()->RemoveOwnedAura(this, removeMode);
}
void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit * caster)
void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster)
{
Player * modOwner = NULL;
Player* modOwner = NULL;
if (caster)
modOwner = caster->GetSpellModOwner();
@@ -2060,7 +2060,7 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit * caster)
}
}
DynObjAura::DynObjAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID)
DynObjAura::DynObjAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID)
: Aura(spellproto, owner, caster, castItem, casterGUID)
{
LoadScripts();
@@ -2078,9 +2078,9 @@ void DynObjAura::Remove(AuraRemoveMode removeMode)
_Remove(removeMode);
}
void DynObjAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit * /*caster*/)
void DynObjAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* /*caster*/)
{
Unit * dynObjOwnerCaster = GetDynobjOwner()->GetCaster();
Unit* dynObjOwnerCaster = GetDynobjOwner()->GetCaster();
float radius = GetDynobjOwner()->GetRadius();
for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
+42 -42
View File
@@ -43,7 +43,7 @@ class AuraApplication
friend void Unit::RemoveAura(AuraApplication * aurApp, AuraRemoveMode mode);
friend AuraApplication * Unit::_CreateAuraApplication(Aura * aura, uint8 effMask);
private:
Unit * const m_target;
Unit* const m_target;
Aura * const m_base;
uint8 m_slot; // Aura slot on unit
uint8 m_flags; // Aura info flag
@@ -51,14 +51,14 @@ class AuraApplication
AuraRemoveMode m_removeMode:8; // Store info for know remove aura reason
bool m_needClientUpdate:1;
explicit AuraApplication(Unit * target, Unit * caster, Aura * base, uint8 effMask);
explicit AuraApplication(Unit* target, Unit* caster, Aura * base, uint8 effMask);
void _Remove();
private:
void _InitFlags(Unit * caster, uint8 effMask);
void _InitFlags(Unit* caster, uint8 effMask);
void _HandleEffect(uint8 effIndex, bool apply);
public:
Unit * GetTarget() const { return m_target; }
Unit* GetTarget() const { return m_target; }
Aura * GetBase() const { return m_base; }
uint8 GetSlot() const { return m_slot; }
@@ -80,16 +80,16 @@ class AuraApplication
class Aura
{
friend Aura * Unit::_TryStackingOrRefreshingExistingAura(SpellEntry const * newAura, uint8 effMask, Unit* caster, int32 *baseAmount, Item * castItem, uint64 casterGUID);
friend Aura * Unit::_TryStackingOrRefreshingExistingAura(SpellEntry const* newAura, uint8 effMask, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
public:
typedef std::map<uint64, AuraApplication *> ApplicationMap;
static uint8 BuildEffectMaskForOwner(SpellEntry const* spellProto, uint8 avalibleEffectMask, WorldObject* owner);
static Aura* TryRefreshStackOrCreate(SpellEntry const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0, bool* refresh = NULL);
static Aura* TryCreate(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount = NULL, Item * castItem = NULL, uint64 casterGUID = 0);
static Aura* TryCreate(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0);
static Aura* Create(SpellEntry const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID);
explicit Aura(SpellEntry const* spellproto, WorldObject * owner, Unit * caster, Item * castItem, uint64 casterGUID);
void _InitEffects(uint8 effMask, Unit * caster, int32 *baseAmount);
explicit Aura(SpellEntry const* spellproto, WorldObject * owner, Unit* caster, Item* castItem, uint64 casterGUID);
void _InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount);
virtual ~Aura();
SpellEntry const* GetSpellProto() const { return m_spellProto; }
@@ -99,31 +99,31 @@ class Aura
uint64 const& GetCasterGUID() const { return m_casterGuid; }
Unit* GetCaster() const;
WorldObject * GetOwner() const { return m_owner; }
Unit * GetUnitOwner() const { ASSERT(GetType() == UNIT_AURA_TYPE); return (Unit*)m_owner; }
Unit* GetUnitOwner() const { ASSERT(GetType() == UNIT_AURA_TYPE); return (Unit*)m_owner; }
DynamicObject * GetDynobjOwner() const { ASSERT(GetType() == DYNOBJ_AURA_TYPE); return (DynamicObject*)m_owner; }
AuraObjectType GetType() const;
virtual void _ApplyForTarget(Unit * target, Unit * caster, AuraApplication * auraApp);
virtual void _UnapplyForTarget(Unit * target, Unit * caster, AuraApplication * auraApp);
virtual void _ApplyForTarget(Unit* target, Unit* caster, AuraApplication * auraApp);
virtual void _UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * auraApp);
void _Remove(AuraRemoveMode removeMode);
virtual void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) = 0;
virtual void FillTargetMap(std::map<Unit *, uint8> & targets, Unit * caster) = 0;
void UpdateTargetMap(Unit * caster, bool apply = true);
virtual void FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster) = 0;
void UpdateTargetMap(Unit* caster, bool apply = true);
void _RegisterForTargets() {Unit * caster = GetCaster(); UpdateTargetMap(caster, false);}
void ApplyForTargets() {Unit * caster = GetCaster(); UpdateTargetMap(caster, true);}
void _RegisterForTargets() {Unit* caster = GetCaster(); UpdateTargetMap(caster, false);}
void ApplyForTargets() {Unit* caster = GetCaster(); UpdateTargetMap(caster, true);}
void _ApplyEffectForTargets(uint8 effIndex);
void UpdateOwner(uint32 diff, WorldObject * owner);
void Update(uint32 diff, Unit * caster);
void Update(uint32 diff, Unit* caster);
time_t GetApplyTime() const { return m_applyTime; }
int32 GetMaxDuration() const { return m_maxDuration; }
void SetMaxDuration(int32 duration) { m_maxDuration = duration; }
int32 CalcMaxDuration() const { return CalcMaxDuration(GetCaster()); }
int32 CalcMaxDuration(Unit * caster) const;
int32 CalcMaxDuration(Unit* caster) const;
int32 GetDuration() const { return m_duration; }
void SetDuration(int32 duration, bool withMods = false);
void RefreshDuration();
@@ -133,7 +133,7 @@ class Aura
uint8 GetCharges() const { return m_procCharges; }
void SetCharges(uint8 charges);
uint8 CalcMaxCharges(Unit * caster) const;
uint8 CalcMaxCharges(Unit* caster) const;
uint8 CalcMaxCharges() const { return CalcMaxCharges(GetCaster()); }
bool ModCharges(int32 num, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
bool DropCharge(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) { return ModCharges(-1, removeMode); }
@@ -146,7 +146,7 @@ class Aura
bool IsPassive() const;
bool IsDeathPersistent() const;
bool IsRemovedOnShapeLost(Unit * target) const { return (GetCasterGUID() == target->GetGUID() && m_spellProto->Stances && !(m_spellProto->AttributesEx2 & SPELL_ATTR2_NOT_NEED_SHAPESHIFT) && !(m_spellProto->Attributes & SPELL_ATTR0_NOT_SHAPESHIFT)); }
bool IsRemovedOnShapeLost(Unit* target) const { return (GetCasterGUID() == target->GetGUID() && m_spellProto->Stances && !(m_spellProto->AttributesEx2 & SPELL_ATTR2_NOT_NEED_SHAPESHIFT) && !(m_spellProto->Attributes & SPELL_ATTR0_NOT_SHAPESHIFT)); }
bool CanBeSaved() const;
bool IsRemoved() const { return m_isRemoved; }
bool CanBeSentToClient() const;
@@ -173,31 +173,31 @@ class Aura
bool IsAppliedOnTarget(uint64 const & guid) const { return m_applications.find(guid) != m_applications.end(); }
void SetNeedClientUpdateForTargets() const;
void HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, bool apply, bool onReapply);
void HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, bool apply, bool onReapply);
bool CanBeAppliedOn(Unit *target);
bool CheckAreaTarget(Unit *target);
// AuraScript
void LoadScripts();
bool CallScriptCheckAreaTargetHandlers(Unit * target);
bool CallScriptEffectApplyHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode);
bool CallScriptEffectRemoveHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode);
void CallScriptAfterEffectApplyHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode);
void CallScriptAfterEffectRemoveHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode);
bool CallScriptEffectPeriodicHandlers(AuraEffect const * aurEff, AuraApplication const * aurApp);
bool CallScriptCheckAreaTargetHandlers(Unit* target);
bool CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode);
bool CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode);
void CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode);
void CallScriptAfterEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode);
bool CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp);
void CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff);
void CallScriptEffectCalcAmountHandlers(AuraEffect const * aurEff, int32 & amount, bool & canBeRecalculated);
void CallScriptEffectCalcPeriodicHandlers(AuraEffect const * aurEff, bool & isPeriodic, int32 & amplitude);
void CallScriptEffectCalcSpellModHandlers(AuraEffect const * aurEff, SpellModifier *& spellMod);
void CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication const * aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented);
void CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplication const * aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount);
void CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplication const * aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented);
void CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraApplication const * aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount);
void CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated);
void CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool & isPeriodic, int32 & amplitude);
void CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellModifier *& spellMod);
void CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented);
void CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount);
void CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented);
void CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount);
std::list<AuraScript *> m_loadedScripts;
private:
void _DeleteRemovedApplications();
protected:
SpellEntry const * const m_spellProto;
SpellEntry const* const m_spellProto;
uint64 const m_casterGuid;
uint64 const m_castItemGuid; // it is NOT safe to keep a pointer to the item because it may get deleted
time_t const m_applyTime;
@@ -224,16 +224,16 @@ class Aura
class UnitAura : public Aura
{
friend Aura * Aura::Create(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID);
friend Aura * Aura::Create(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
protected:
explicit UnitAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID);
explicit UnitAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
public:
void _ApplyForTarget(Unit * target, Unit * caster, AuraApplication * aurApp);
void _UnapplyForTarget(Unit * target, Unit * caster, AuraApplication * aurApp);
void _ApplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp);
void _UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp);
void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
void FillTargetMap(std::map<Unit *, uint8> & targets, Unit * caster);
void FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster);
// Allow Apply Aura Handler to modify and access m_AuraDRGroup
void SetDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; }
@@ -245,12 +245,12 @@ class UnitAura : public Aura
class DynObjAura : public Aura
{
friend Aura * Aura::Create(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID);
friend Aura * Aura::Create(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
protected:
explicit DynObjAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID);
explicit DynObjAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
public:
void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
void FillTargetMap(std::map<Unit *, uint8> & targets, Unit * caster);
void FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster);
};
#endif
+17 -17
View File
@@ -284,7 +284,7 @@ void SpellCastTargets::OutDebug()
sLog->outString("elevation: %f", m_elevation);
}
void SpellCastTargets::read (ByteBuffer & data, Unit * caster)
void SpellCastTargets::read (ByteBuffer & data, Unit* caster)
{
data >> m_targetMask;
@@ -801,7 +801,7 @@ void Spell::SelectSpellTargets()
}
}
void Spell::prepareDataForTriggerSystem(AuraEffect const * /*triggeredByAura*/)
void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
{
//==========================================================================================
// Now fill data for trigger system, need know:
@@ -913,7 +913,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
ihit->scaleAura = false;
if (m_auraScaleMask && ihit->effectMask == m_auraScaleMask && m_caster != pVictim)
{
SpellEntry const * auraSpell = sSpellStore.LookupEntry(sSpellMgr->GetFirstSpellInChain(m_spellInfo->Id));
SpellEntry const* auraSpell = sSpellStore.LookupEntry(sSpellMgr->GetFirstSpellInChain(m_spellInfo->Id));
if (uint32(pVictim->getLevel() + 10) >= auraSpell->spellLevel)
ihit->scaleAura = true;
}
@@ -934,7 +934,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
target.scaleAura = false;
if (m_auraScaleMask && target.effectMask == m_auraScaleMask && m_caster != pVictim)
{
SpellEntry const * auraSpell = sSpellStore.LookupEntry(sSpellMgr->GetFirstSpellInChain(m_spellInfo->Id));
SpellEntry const* auraSpell = sSpellStore.LookupEntry(sSpellMgr->GetFirstSpellInChain(m_spellInfo->Id));
if (uint32(pVictim->getLevel() + 10) >= auraSpell->spellLevel)
target.scaleAura = true;
}
@@ -1127,7 +1127,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
//Spells with this flag cannot trigger if effect is casted on self
// Slice and Dice, relentless strikes, eviscerate
bool canEffectTrigger = unitTarget->CanProc() && (m_spellInfo->AttributesEx4 & (SPELL_ATTR4_CANT_PROC_FROM_SELFCAST) ? m_caster != unitTarget : true);
Unit * spellHitTarget = NULL;
Unit* spellHitTarget = NULL;
if (missInfo == SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
spellHitTarget = unit;
@@ -1408,7 +1408,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
{
// Select rank for aura with level requirements only in specific cases
// Unit has to be target only of aura effect, both caster and target have to be players, target has to be other than unit target
SpellEntry const * aurSpellInfo = m_spellInfo;
SpellEntry const* aurSpellInfo = m_spellInfo;
int32 basePoints[3];
if (scaleAura)
{
@@ -1612,7 +1612,7 @@ bool Spell::UpdateChanneledTargetList()
if (channelAuraMask)
{
range = GetSpellMaxRange(m_spellInfo, IsPositiveSpell(m_spellInfo->Id));
if (Player * modOwner = m_caster->GetSpellModOwner())
if (Player* modOwner = m_caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
}
@@ -2299,7 +2299,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
AddItemTarget(m_targets.getItemTarget(), i);
break;
case TARGET_UNIT_DRIVER:
if (Unit * driver = m_targets.getUnitTarget())
if (Unit* driver = m_targets.getUnitTarget())
if (driver->IsOnVehicle(m_caster))
AddUnitTarget(driver, i);
break;
@@ -2736,7 +2736,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
}
}
void Spell::prepare(SpellCastTargets const* targets, AuraEffect const * triggeredByAura)
void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura)
{
if (m_CastItem)
m_castItemGUID = m_CastItem->GetGUID();
@@ -3927,7 +3927,7 @@ void Spell::WriteAmmoToPacket(WorldPacket * data)
{
if (uint32 item_id = m_caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + i))
{
if (ItemEntry const * itemEntry = sItemStore.LookupEntry(item_id))
if (ItemEntry const* itemEntry = sItemStore.LookupEntry(item_id))
{
if (itemEntry->Class == ITEM_CLASS_WEAPON)
{
@@ -4043,7 +4043,7 @@ void Spell::SendLogExecute()
m_caster->SendMessageToSet(&data, true);
}
void Spell::ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit * target, uint32 powerType, uint32 powerTaken, float gainMultiplier)
void Spell::ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit* target, uint32 powerType, uint32 powerTaken, float gainMultiplier)
{
InitEffectExecuteData(effIndex);
m_effectExecuteData[effIndex]->append(target->GetPackGUID());
@@ -4052,21 +4052,21 @@ void Spell::ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit * target, uint3
*m_effectExecuteData[effIndex] << float(gainMultiplier);
}
void Spell::ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit * victim, uint32 attCount)
void Spell::ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit* victim, uint32 attCount)
{
InitEffectExecuteData(effIndex);
m_effectExecuteData[effIndex]->append(victim->GetPackGUID());
*m_effectExecuteData[effIndex] << uint32(attCount);
}
void Spell::ExecuteLogEffectInterruptCast(uint8 effIndex, Unit * victim, uint32 spellId)
void Spell::ExecuteLogEffectInterruptCast(uint8 effIndex, Unit* victim, uint32 spellId)
{
InitEffectExecuteData(effIndex);
m_effectExecuteData[effIndex]->append(victim->GetPackGUID());
*m_effectExecuteData[effIndex] << uint32(spellId);
}
void Spell::ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit * victim, uint32 /*itemslot*/, uint32 damage)
void Spell::ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit* victim, uint32 /*itemslot*/, uint32 damage)
{
InitEffectExecuteData(effIndex);
m_effectExecuteData[effIndex]->append(victim->GetPackGUID());
@@ -4104,7 +4104,7 @@ void Spell::ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject * obj)
m_effectExecuteData[effIndex]->append(obj->GetPackGUID());
}
void Spell::ExecuteLogEffectResurrect(uint8 effIndex, Unit * target)
void Spell::ExecuteLogEffectResurrect(uint8 effIndex, Unit* target)
{
InitEffectExecuteData(effIndex);
m_effectExecuteData[effIndex]->append(target->GetPackGUID());
@@ -4615,7 +4615,7 @@ SpellCastResult Spell::CheckCast(bool strict)
// only allow triggered spells if at an ended battleground
if (!m_IsTriggeredSpell && m_caster->GetTypeId() == TYPEID_PLAYER)
if (Battleground * bg = m_caster->ToPlayer()->GetBattleground())
if (Battleground* bg = m_caster->ToPlayer()->GetBattleground())
if (bg->GetStatus() == STATUS_WAIT_LEAVE)
return SPELL_FAILED_DONT_REPORT;
@@ -5623,7 +5623,7 @@ SpellCastResult Spell::CheckCasterAuras() const
Unit::AuraApplicationMap const& auras = m_caster->GetAppliedAuras();
for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
Aura const * aura = itr->second->GetBase();
Aura const* aura = itr->second->GetBase();
if (GetAllSpellMechanicMask(aura->GetSpellProto()) & mechanic_immune)
continue;
if (GetSpellSchoolMask(aura->GetSpellProto()) & school_immune)
+13 -13
View File
@@ -162,7 +162,7 @@ class SpellCastTargets
return *this;
}
void read (ByteBuffer & data, Unit * caster);
void read (ByteBuffer & data, Unit* caster);
void write (ByteBuffer & data);
uint32 getTargetMask() const { return m_targetMask; }
@@ -285,7 +285,7 @@ enum SpellTargets
class Spell
{
friend struct Trinity::SpellNotifierCreatureAndPlayer;
friend void Unit::SetCurrentCastedSpell(Spell * pSpell);
friend void Unit::SetCurrentCastedSpell(Spell* pSpell);
friend class SpellScript;
public:
@@ -421,7 +421,7 @@ class Spell
Spell(Unit* Caster, SpellEntry const *info, bool triggered, uint64 originalCasterGUID = 0, bool skipCheck = false);
~Spell();
void prepare(SpellCastTargets const* targets, AuraEffect const * triggeredByAura = NULL);
void prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura = NULL);
void cancel();
void update(uint32 difftime);
void cast(bool skipCheck = false);
@@ -478,16 +478,16 @@ class Spell
void SendSpellGo();
void SendSpellCooldown();
void SendLogExecute();
void ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit * target, uint32 powerType, uint32 powerTaken, float gainMultiplier);
void ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit * victim, uint32 attCount);
void ExecuteLogEffectInterruptCast(uint8 effIndex, Unit * victim, uint32 spellId);
void ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit * victim, uint32 itemslot, uint32 damage);
void ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit* target, uint32 powerType, uint32 powerTaken, float gainMultiplier);
void ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit* victim, uint32 attCount);
void ExecuteLogEffectInterruptCast(uint8 effIndex, Unit* victim, uint32 spellId);
void ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit* victim, uint32 itemslot, uint32 damage);
void ExecuteLogEffectOpenLock(uint8 effIndex, Object * obj);
void ExecuteLogEffectCreateItem(uint8 effIndex, uint32 entry);
void ExecuteLogEffectDestroyItem(uint8 effIndex, uint32 entry);
void ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject * obj);
void ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject * obj);
void ExecuteLogEffectResurrect(uint8 effIndex, Unit * target);
void ExecuteLogEffectResurrect(uint8 effIndex, Unit* target);
void SendInterrupted(uint8 result);
void SendChannelUpdate(uint32 time);
void SendChannelStart(uint32 duration);
@@ -535,7 +535,7 @@ class Spell
Unit* GetCaster() const { return m_caster; }
Unit* GetOriginalCaster() const { return m_originalCaster; }
SpellEntry const * GetSpellInfo() const { return m_spellInfo; }
SpellEntry const* GetSpellInfo() const { return m_spellInfo; }
int32 GetPowerCost() const { return m_powerCost; }
void UpdatePointers(); // must be used at call Spell code after time delay (non triggered spell cast/update spell call/etc)
@@ -618,7 +618,7 @@ class Spell
uint32 m_procAttacker; // Attacker trigger flags
uint32 m_procVictim; // Victim trigger flags
uint32 m_procEx;
void prepareDataForTriggerSystem(AuraEffect const * triggeredByAura);
void prepareDataForTriggerSystem(AuraEffect const* triggeredByAura);
// *****************************************
// Spell target subsystem
@@ -745,14 +745,14 @@ namespace Trinity
SpellNotifyPushType i_push_type;
float i_radius;
SpellTargets i_TargetType;
const Unit * const i_source;
const Unit* const i_source;
uint32 i_entry;
const Position * const i_pos;
bool i_requireDeadTarget;
SpellEntry const * i_spellProto;
SpellEntry const* i_spellProto;
SpellNotifierCreatureAndPlayer(Unit *source, std::list<Unit*> &data, float radius, SpellNotifyPushType type,
SpellTargets TargetType = SPELL_TARGETS_ENEMY, const Position *pos = NULL, uint32 entry = 0, SpellEntry const * spellProto = NULL)
SpellTargets TargetType = SPELL_TARGETS_ENEMY, const Position *pos = NULL, uint32 entry = 0, SpellEntry const* spellProto = NULL)
: i_data(&data), i_push_type(type), i_radius(radius), i_TargetType(TargetType),
i_source(source), i_entry(entry), i_pos(pos), i_spellProto(spellProto)
{
+17 -17
View File
@@ -606,7 +606,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
else if (m_spellInfo->SpellFamilyFlags[0] & 0x00000001)
{
// Improved Insect Swarm
if (AuraEffect const * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DRUID, 1771, 0))
if (AuraEffect const* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DRUID, 1771, 0))
if (unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00200000, 0, 0))
AddPctN(damage, aurEff->GetAmount());
}
@@ -621,7 +621,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
if (uint32 combo = m_caster->ToPlayer()->GetComboPoints())
{
// Lookup for Deadly poison (only attacker applied)
if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0, 0, m_caster->GetGUID()))
if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0, 0, m_caster->GetGUID()))
{
// count consumed deadly poison doses at target
bool needConsume = true;
@@ -1321,14 +1321,14 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
unitTarget->ModifyHealth(-damage);
// Improved Life Tap mod
if (AuraEffect const * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 208, 0))
if (AuraEffect const* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 208, 0))
AddPctN(mana, aurEff->GetAmount());
m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, true);
// Mana Feed
int32 manaFeedVal = 0;
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, 1982, 0))
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, 1982, 0))
manaFeedVal = aurEff->GetAmount();
if (manaFeedVal > 0)
@@ -1459,7 +1459,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
uint32 count = unitTarget->GetDiseasesByCaster(m_caster->GetGUID());
int32 bp = int32(count * m_caster->CountPctFromMaxHealth(int32(m_spellInfo->EffectDamageMultiplier[0])));
// Improved Death Strike
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2751, 0))
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2751, 0))
AddPctN(bp, m_caster->CalculateSpellDamage(m_caster, aurEff->GetSpellProto(), 2));
m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, false);
return;
@@ -1576,7 +1576,7 @@ void Spell::EffectTriggerSpellWithValue(SpellEffIndex effIndex)
}
int32 bp = damage;
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
Unit* caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
caster->CastCustomSpell(unitTarget, triggered_spell_id, &bp, &bp, &bp, true);
}
@@ -1635,7 +1635,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
}
}
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
Unit* caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
caster->CastSpell(unitTarget, spellInfo, true, NULL, NULL, m_originalCasterGUID);
}
@@ -1656,7 +1656,7 @@ void Spell::EffectForceCastWithValue(SpellEffIndex effIndex)
return;
}
int32 bp = damage;
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
Unit* caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
caster->CastCustomSpell(unitTarget, spellInfo->Id, &bp, &bp, &bp, true, NULL, NULL, m_originalCasterGUID);
}
@@ -1808,7 +1808,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
// Note: not exist spells with weapon req. and IsSpellHaveCasterSourceTargets == true
// so this just for speedup places in else
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
Unit* caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
caster->CastSpell(unitTarget, spellInfo, true, 0, 0, (originalCaster ? originalCaster->GetGUID() : 0));
}
@@ -2219,7 +2219,7 @@ void Spell::SpellDamageHeal(SpellEffIndex /*effIndex*/)
{
// Amount of heal - depends from stacked Holy Energy
int damageAmount = 0;
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(45062, 0))
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(45062, 0))
{
damageAmount+= aurEff->GetAmount();
m_caster->RemoveAurasDueToSpell(45062);
@@ -3279,7 +3279,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex)
int32 heal_amount = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1);
m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true);
// Glyph of Felhunter
if (Unit * pOwner = m_caster->GetOwner())
if (Unit* pOwner = m_caster->GetOwner())
if (pOwner->GetAura(56249))
pOwner->CastCustomSpell(pOwner, 19658, &heal_amount, NULL, NULL, true);
}
@@ -4041,7 +4041,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex)
if (m_spellInfo->SpellFamilyFlags[EFFECT_0] & 0x1)
{
// Glyph of Plague Strike
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(58657, EFFECT_0))
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(58657, EFFECT_0))
AddPctN(totalDamagePercentMod, aurEff->GetAmount());
break;
}
@@ -4060,7 +4060,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex)
if (m_spellInfo->SpellFamilyFlags[EFFECT_0] & 0x10)
{
// Glyph of Death Strike
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(59336, EFFECT_0))
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(59336, EFFECT_0))
if (uint32 runic = std::min<uint32>(m_caster->GetPower(POWER_RUNIC_POWER), SpellMgr::CalculateSpellEffectAmount(aurEff->GetSpellProto(), EFFECT_1)))
AddPctN(totalDamagePercentMod, runic);
break;
@@ -4070,7 +4070,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex)
{
bool consumeDiseases = true;
// Annihilation
if (AuraEffect const * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 2710, EFFECT_0))
if (AuraEffect const* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 2710, EFFECT_0))
// Do not consume diseases if roll sucesses
if (roll_chance_i(aurEff->GetAmount()))
consumeDiseases = false;
@@ -4341,7 +4341,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
// Glyph of Backstab
case 63975:
{
if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00100000, 0, 0, m_caster->GetGUID()))
if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00100000, 0, 0, m_caster->GetGUID()))
{
uint32 countMin = aurEff->GetBase()->GetMaxDuration();
uint32 countMax = 12000;
@@ -5885,7 +5885,7 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
if (!factionEntry)
return;
if (RepRewardRate const * repData = sObjectMgr->GetRepRewardRate(faction_id))
if (RepRewardRate const* repData = sObjectMgr->GetRepRewardRate(faction_id))
{
rep_change = int32((float)rep_change * repData->spell_rate);
}
@@ -6649,7 +6649,7 @@ void Spell::EffectQuestStart(SpellEffIndex effIndex)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
Player * player = unitTarget->ToPlayer();
Player* player = unitTarget->ToPlayer();
if (Quest const* qInfo = sObjectMgr->GetQuestTemplate(m_spellInfo->EffectMiscValue[effIndex]))
{
if (player->CanTakeQuest(qInfo, false) && player->CanAddQuest(qInfo, false))
+20 -20
View File
@@ -312,7 +312,7 @@ uint32 GetDispelChance(Unit* auraCaster, Unit* target, uint32 spellId, bool offe
return 100 - resist_chance;
}
uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell * spell)
uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell* spell)
{
SpellCastTimesEntry const *spellCastTimeEntry = sSpellCastTimesStore.LookupEntry(spellInfo->CastingTimeIndex);
@@ -339,7 +339,7 @@ bool IsPassiveSpell(uint32 spellId)
return IsPassiveSpell(spellInfo);
}
bool IsPassiveSpell(SpellEntry const * spellInfo)
bool IsPassiveSpell(SpellEntry const* spellInfo)
{
if (spellInfo->Attributes & SPELL_ATTR0_PASSIVE)
return true;
@@ -363,7 +363,7 @@ bool IsHigherHankOfSpell(uint32 spellId_1, uint32 spellId_2)
return sSpellMgr->GetSpellRank(spellId_1) < sSpellMgr->GetSpellRank(spellId_2);
}
uint32 CalculatePowerCost(SpellEntry const * spellInfo, Unit const * caster, SpellSchoolMask schoolMask)
uint32 CalculatePowerCost(SpellEntry const* spellInfo, Unit const* caster, SpellSchoolMask schoolMask)
{
// Spell drain all exist power on cast (Only paladin lay of Hands)
if (spellInfo->AttributesEx & SPELL_ATTR1_DRAIN_ALL_POWER)
@@ -427,7 +427,7 @@ uint32 CalculatePowerCost(SpellEntry const * spellInfo, Unit const * caster, Spe
return powerCost;
}
bool IsSpellRequiringFocusedTarget(SpellEntry const * spellInfo)
bool IsSpellRequiringFocusedTarget(SpellEntry const* spellInfo)
{
for (uint8 i = 0 ; i < MAX_SPELL_EFFECTS; ++i)
{
@@ -442,7 +442,7 @@ bool IsSpellRequiringFocusedTarget(SpellEntry const * spellInfo)
return false;
}
Unit* GetTriggeredSpellCaster(SpellEntry const * spellInfo, Unit * caster, Unit * target)
Unit* GetTriggeredSpellCaster(SpellEntry const* spellInfo, Unit* caster, Unit* target)
{
if (IsSpellRequiringFocusedTarget(spellInfo))
return caster;
@@ -508,7 +508,7 @@ AuraState GetSpellAuraState(SpellEntry const* spellInfo)
return AURA_STATE_NONE;
}
SpellSpecific GetSpellSpecific(SpellEntry const * spellInfo)
SpellSpecific GetSpellSpecific(SpellEntry const* spellInfo)
{
switch(spellInfo->SpellFamilyName)
{
@@ -1207,7 +1207,7 @@ void SpellMgr::LoadSpellTargetPositions()
// Check all spells
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry const * spellInfo = sSpellStore.LookupEntry(i);
SpellEntry const* spellInfo = sSpellStore.LookupEntry(i);
if (!spellInfo)
continue;
@@ -1365,7 +1365,7 @@ void SpellMgr::LoadSpellBonusess()
sLog->outString();
}
bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active)
bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellProcEvent, uint32 EventProcFlag, SpellEntry const* procSpell, uint32 procFlags, uint32 procExtra, bool active)
{
// No extra req need
uint32 procEvent_procEx = PROC_EX_NONE;
@@ -1809,7 +1809,7 @@ bool SpellMgr::IsSkillTypeSpell(uint32 spellId, SkillType type) const
}
// basepoints provided here have to be valid basepoints (use SpellMgr::CalculateSpellEffectBaseAmount)
int32 SpellMgr::CalculateSpellEffectAmount(SpellEntry const * spellEntry, uint8 effIndex, Unit const * caster, int32 const * effBasePoints, Unit const * /*target*/)
int32 SpellMgr::CalculateSpellEffectAmount(SpellEntry const* spellEntry, uint8 effIndex, Unit const* caster, int32 const* effBasePoints, Unit const* /*target*/)
{
float basePointsPerLevel = spellEntry->EffectRealPointsPerLevel[effIndex];
int32 basePoints = effBasePoints ? *effBasePoints : spellEntry->EffectBasePoints[effIndex];
@@ -1871,7 +1871,7 @@ int32 SpellMgr::CalculateSpellEffectAmount(SpellEntry const * spellEntry, uint8
return int32(value);
}
int32 SpellMgr::CalculateSpellEffectBaseAmount(int32 value, SpellEntry const * spellEntry, uint8 effIndex)
int32 SpellMgr::CalculateSpellEffectBaseAmount(int32 value, SpellEntry const* spellEntry, uint8 effIndex)
{
if (spellEntry->EffectDieSides[effIndex] == 0)
return value;
@@ -1879,22 +1879,22 @@ int32 SpellMgr::CalculateSpellEffectBaseAmount(int32 value, SpellEntry const * s
return value - 1;
}
float SpellMgr::CalculateSpellEffectValueMultiplier(SpellEntry const * spellEntry, uint8 effIndex, Unit * caster, Spell * spell)
float SpellMgr::CalculateSpellEffectValueMultiplier(SpellEntry const* spellEntry, uint8 effIndex, Unit* caster, Spell* spell)
{
float multiplier = spellEntry->EffectValueMultiplier[effIndex];
if (caster)
if (Player * modOwner = caster->GetSpellModOwner())
if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(spellEntry->Id, SPELLMOD_VALUE_MULTIPLIER, multiplier, spell);
return multiplier;
}
float SpellMgr::CalculateSpellEffectDamageMultiplier(SpellEntry const * spellEntry, uint8 effIndex, Unit * caster, Spell * spell)
float SpellMgr::CalculateSpellEffectDamageMultiplier(SpellEntry const* spellEntry, uint8 effIndex, Unit* caster, Spell* spell)
{
float multiplier = spellEntry->EffectDamageMultiplier[effIndex];
if (caster)
if (Player * modOwner = caster->GetSpellModOwner())
if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(spellEntry->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplier, spell);
return multiplier;
}
@@ -3228,7 +3228,7 @@ bool SpellMgr::CanAurasStack(Aura const *aura1, Aura const *aura2, bool sameCast
return true;
}
bool CanSpellDispelAura(SpellEntry const * dispelSpell, SpellEntry const * aura)
bool CanSpellDispelAura(SpellEntry const* dispelSpell, SpellEntry const* aura)
{
// These auras (like ressurection sickness) can't be dispelled
if (aura->Attributes & SPELL_ATTR0_NEGATIVE_1)
@@ -3249,7 +3249,7 @@ bool CanSpellDispelAura(SpellEntry const * dispelSpell, SpellEntry const * aura)
return true;
}
bool CanSpellPierceImmuneAura(SpellEntry const * pierceSpell, SpellEntry const * aura)
bool CanSpellPierceImmuneAura(SpellEntry const* pierceSpell, SpellEntry const* aura)
{
// these spells pierce all avalible spells (Resurrection Sickness for example)
if (pierceSpell->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)
@@ -3336,13 +3336,13 @@ void SpellMgr::LoadSpellRequired()
uint32 spell_id = fields[0].GetUInt32();
uint32 spell_req = fields[1].GetUInt32();
// check if chain is made with valid first spell
SpellEntry const * spell = sSpellStore.LookupEntry(spell_id);
SpellEntry const* spell = sSpellStore.LookupEntry(spell_id);
if (!spell)
{
sLog->outErrorDb("spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id);
continue;
}
SpellEntry const * req_spell = sSpellStore.LookupEntry(spell_req);
SpellEntry const* req_spell = sSpellStore.LookupEntry(spell_req);
if (!req_spell)
{
sLog->outErrorDb("req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req);
@@ -3417,7 +3417,7 @@ void SpellMgr::LoadSpellRanks()
break;
}
// check if chain is made with valid first spell
SpellEntry const * first = sSpellStore.LookupEntry(lastSpell);
SpellEntry const* first = sSpellStore.LookupEntry(lastSpell);
if (!first)
{
sLog->outErrorDb("Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell);
@@ -3434,7 +3434,7 @@ void SpellMgr::LoadSpellRanks()
// check spells in chain
for (std::list<std::pair<int32, int32> >::iterator itr = rankChain.begin() ; itr!= rankChain.end(); ++itr)
{
SpellEntry const * spell = sSpellStore.LookupEntry(itr->first);
SpellEntry const* spell = sSpellStore.LookupEntry(itr->first);
if (!spell)
{
sLog->outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell);
+16 -16
View File
@@ -173,15 +173,15 @@ enum SpellLinkedType
SPELL_LINK_REMOVE = 0,
};
bool IsSpellRequiringFocusedTarget(SpellEntry const * spellInfo);
Unit * GetTriggeredSpellCaster(SpellEntry const * spellInfo, Unit * caster, Unit * target);
SpellSpecific GetSpellSpecific(SpellEntry const * spellInfo);
AuraState GetSpellAuraState(SpellEntry const * spellInfo);
bool IsSpellRequiringFocusedTarget(SpellEntry const* spellInfo);
Unit* GetTriggeredSpellCaster(SpellEntry const* spellInfo, Unit* caster, Unit* target);
SpellSpecific GetSpellSpecific(SpellEntry const* spellInfo);
AuraState GetSpellAuraState(SpellEntry const* spellInfo);
// Different spell properties
inline float GetSpellRadiusForHostile(SpellRadiusEntry const *radius) { return (radius ? radius->radiusHostile : 0); }
inline float GetSpellRadiusForFriend(SpellRadiusEntry const *radius) { return (radius ? radius->radiusFriend : 0); }
uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell * spell = NULL);
uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell* spell = NULL);
uint32 GetDispelChance(Unit* auraCaster, Unit* target, uint32 spellId, bool offensive, bool *result);
inline float GetSpellMinRangeForHostile(SpellRangeEntry const *range) { return (range ? range->minRangeHostile : 0); }
inline float GetSpellMaxRangeForHostile(SpellRangeEntry const *range) { return (range ? range->maxRangeHostile : 0); }
@@ -230,7 +230,7 @@ inline float GetSpellMaxRange(uint32 id, bool positive)
{
uint64 casterGuid;
uint32 spellId;
Unit * caster;
Unit* caster;
uint8 stackAmount;
bool operator < (const DispelEntry & _Right) const
@@ -293,10 +293,10 @@ bool IsHigherHankOfSpell(uint32 spellId_1, uint32 spellId_2);
bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1, SpellSpecific spellSpec2);
bool IsSingleFromSpellSpecificPerTarget(SpellSpecific spellSpec1, SpellSpecific spellSpec2);
bool IsPassiveSpell(uint32 spellId);
bool IsPassiveSpell(SpellEntry const * spellInfo);
bool IsPassiveSpell(SpellEntry const* spellInfo);
bool IsAutocastableSpell(uint32 spellId);
uint32 CalculatePowerCost(SpellEntry const * spellInfo, Unit const * caster, SpellSchoolMask schoolMask);
uint32 CalculatePowerCost(SpellEntry const* spellInfo, Unit const* caster, SpellSchoolMask schoolMask);
inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto)
{
@@ -334,8 +334,8 @@ inline bool IsNonCombatSpell(SpellEntry const *spellInfo)
bool IsPositiveSpell(uint32 spellId);
bool IsPositiveEffect(uint32 spellId, uint32 effIndex);
bool IsPositiveTarget(uint32 targetA, uint32 targetB);
bool CanSpellDispelAura(SpellEntry const * dispelSpell, SpellEntry const * aura);
bool CanSpellPierceImmuneAura(SpellEntry const * pierceSpell, SpellEntry const * aura);
bool CanSpellDispelAura(SpellEntry const* dispelSpell, SpellEntry const* aura);
bool CanSpellPierceImmuneAura(SpellEntry const* pierceSpell, SpellEntry const* aura);
bool IsSingleTargetSpell(SpellEntry const *spellInfo);
bool IsSingleTargetSpells(SpellEntry const *spellInfo1, SpellEntry const *spellInfo2);
@@ -1025,7 +1025,7 @@ class SpellMgr
return NULL;
}
bool IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active);
bool IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellProcEvent, uint32 EventProcFlag, SpellEntry const* procSpell, uint32 procFlags, uint32 procExtra, bool active);
SpellEnchantProcEntry const* GetSpellEnchantProcEvent(uint32 enchId) const
{
@@ -1261,13 +1261,13 @@ class SpellMgr
bool IsSkillBonusSpell(uint32 spellId) const;
bool IsSkillTypeSpell(uint32 spellId, SkillType type) const;
static int32 CalculateSpellEffectAmount(SpellEntry const * spellEntry, uint8 effIndex, Unit const * caster = NULL, int32 const * basePoints = NULL, Unit const * target = NULL);
static int32 CalculateSpellEffectBaseAmount(int32 value, SpellEntry const * spellEntry, uint8 effIndex);
static float CalculateSpellEffectValueMultiplier(SpellEntry const * spellEntry, uint8 effIndex, Unit * caster, Spell * spell = NULL);
static float CalculateSpellEffectDamageMultiplier(SpellEntry const * spellEntry, uint8 effIndex, Unit * caster, Spell * spell = NULL);
static int32 CalculateSpellEffectAmount(SpellEntry const* spellEntry, uint8 effIndex, Unit const* caster = NULL, int32 const* basePoints = NULL, Unit const* target = NULL);
static int32 CalculateSpellEffectBaseAmount(int32 value, SpellEntry const* spellEntry, uint8 effIndex);
static float CalculateSpellEffectValueMultiplier(SpellEntry const* spellEntry, uint8 effIndex, Unit* caster, Spell* spell = NULL);
static float CalculateSpellEffectDamageMultiplier(SpellEntry const* spellEntry, uint8 effIndex, Unit* caster, Spell* spell = NULL);
// Spell correctess for client using
static bool IsSpellValid(SpellEntry const * spellInfo, Player* pl = NULL, bool msg = true);
static bool IsSpellValid(SpellEntry const* spellInfo, Player* pl = NULL, bool msg = true);
SkillLineAbilityMapBounds GetSkillLineAbilityMapBounds(uint32 spell_id) const
{
+4 -4
View File
@@ -213,7 +213,7 @@ void SpellScript::UnitTargetHandler::Call(SpellScript* spellScript, std::list<Un
(spellScript->*pUnitTargetHandlerScript)(unitTargets);
}
bool SpellScript::_Validate(SpellEntry const * entry)
bool SpellScript::_Validate(SpellEntry const* entry)
{
for (std::list<EffectHandler>::iterator itr = OnEffect.begin(); itr != OnEffect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
@@ -467,7 +467,7 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result)
m_spell->m_customError = result;
}
bool AuraScript::_Validate(SpellEntry const * entry)
bool AuraScript::_Validate(SpellEntry const* entry)
{
for (std::list<CheckAreaTargetHandler>::iterator itr = DoCheckAreaTarget.begin(); itr != DoCheckAreaTarget.end(); ++itr)
if (!HasAreaAuraEffect(entry))
@@ -533,7 +533,7 @@ AuraScript::CheckAreaTargetHandler::CheckAreaTargetHandler(AuraCheckAreaTargetFn
pHandlerScript = _pHandlerScript;
}
bool AuraScript::CheckAreaTargetHandler::Call(AuraScript* auraScript, Unit * _target)
bool AuraScript::CheckAreaTargetHandler::Call(AuraScript* auraScript, Unit* _target)
{
return (auraScript->*pHandlerScript)(_target);
}
@@ -615,7 +615,7 @@ AuraScript::EffectApplyHandler::EffectApplyHandler(AuraEffectApplicationModeFnTy
mode = _mode;
}
void AuraScript::EffectApplyHandler::Call(AuraScript* auraScript, AuraEffect const * _aurEff, AuraEffectHandleModes _mode)
void AuraScript::EffectApplyHandler::Call(AuraScript* auraScript, AuraEffect const* _aurEff, AuraEffectHandleModes _mode)
{
if (_mode & mode)
(auraScript->*pEffectHandlerScript)(_aurEff, _mode);
+15 -15
View File
@@ -281,7 +281,7 @@ class SpellScript : public _SpellScript
// returns: target of current effect if it was Player otherwise NULL
Player* GetHitPlayer();
// returns: target of current effect if it was Item otherwise NULL
Item * GetHitItem();
Item* GetHitItem();
// returns: target of current effect if it was GameObject otherwise NULL
GameObject* GetHitGObj();
// setter/getter for for damage done by spell to target of spell hit
@@ -355,7 +355,7 @@ class AuraScript : public _SpellScript
public:
#define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \
typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit * target); \
typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit* target); \
typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const *, AuraEffectHandleModes); \
typedef void(CLASSNAME::*AuraEffectPeriodicFnType)(AuraEffect const *); \
typedef void(CLASSNAME::*AuraEffectUpdatePeriodicFnType)(AuraEffect *); \
@@ -370,7 +370,7 @@ class AuraScript : public _SpellScript
{
public:
CheckAreaTargetHandler(AuraCheckAreaTargetFnType pHandlerScript);
bool Call(AuraScript* auraScript, Unit * target);
bool Call(AuraScript* auraScript, Unit* target);
private:
AuraCheckAreaTargetFnType pHandlerScript;
};
@@ -379,13 +379,13 @@ class AuraScript : public _SpellScript
public:
EffectBase(uint8 _effIndex, uint16 _effName);
std::string ToString();
bool CheckEffect(SpellEntry const * spellEntry, uint8 effIndex);
bool CheckEffect(SpellEntry const* spellEntry, uint8 effIndex);
};
class EffectPeriodicHandler : public EffectBase
{
public:
EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
void Call(AuraScript * auraScript, AuraEffect const * _aurEff);
void Call(AuraScript * auraScript, AuraEffect const* _aurEff);
private:
AuraEffectPeriodicFnType pEffectHandlerScript;
};
@@ -425,7 +425,7 @@ class AuraScript : public _SpellScript
{
public:
EffectApplyHandler(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode);
void Call(AuraScript * auraScript, AuraEffect const * _aurEff, AuraEffectHandleModes _mode);
void Call(AuraScript * auraScript, AuraEffect const* _aurEff, AuraEffectHandleModes _mode);
private:
AuraEffectApplicationModeFnType pEffectHandlerScript;
AuraEffectHandleModes mode;
@@ -463,23 +463,23 @@ class AuraScript : public _SpellScript
public:
AuraScript() : _SpellScript(), m_aura(NULL), m_auraApplication(NULL), m_defaultActionPrevented(false)
{}
bool _Validate(SpellEntry const * entry);
bool _Validate(SpellEntry const* entry);
bool _Load(Aura * aura);
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const * aurApp = NULL);
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const* aurApp = NULL);
void _FinishScriptCall();
bool _IsDefaultActionPrevented();
private:
Aura * m_aura;
AuraApplication const * m_auraApplication;
AuraApplication const* m_auraApplication;
bool m_defaultActionPrevented;
class ScriptStateStore
{
public:
uint8 _currentScriptState;
AuraApplication const * _auraApplication;
AuraApplication const* _auraApplication;
bool _defaultActionPrevented;
ScriptStateStore(uint8 currentScriptState, AuraApplication const * auraApplication, bool defaultActionPrevented)
ScriptStateStore(uint8 currentScriptState, AuraApplication const* auraApplication, bool defaultActionPrevented)
: _currentScriptState(currentScriptState), _auraApplication(auraApplication), _defaultActionPrevented(defaultActionPrevented)
{}
};
@@ -493,7 +493,7 @@ class AuraScript : public _SpellScript
//
// executed when area aura checks if it can be applied on target
// example: OnEffectApply += AuraEffectApplyFn(class::function);
// where function is: bool function (Unit * target);
// where function is: bool function (Unit* target);
HookList<CheckAreaTargetHandler> DoCheckAreaTarget;
#define AuraCheckAreaTargetFn(F) CheckAreaTargetFunction(&F)
// executed when aura effect is applied with specified mode to target
@@ -589,7 +589,7 @@ class AuraScript : public _SpellScript
// returns object on which aura was casted, target for non-area auras, area aura source for area auras
WorldObject * GetOwner() const;
// returns owner if it's unit or unit derived object, NULL otherwise (only for persistent area auras NULL is returned)
Unit * GetUnitOwner() const;
Unit* GetUnitOwner() const;
// returns owner if it's dynobj, NULL otherwise
DynamicObject * GetDynobjOwner() const;
@@ -647,9 +647,9 @@ class AuraScript : public _SpellScript
// returns currently processed target of an aura
// Return value does not need to be NULL-checked, the only situation this will (always)
// return NULL is when the call happens in an unsupported hook, in other cases, it is always valid
Unit * GetTarget() const;
Unit* GetTarget() const;
// returns AuraApplication object of currently processed target
AuraApplication const * GetTargetApplication() const;
AuraApplication const* GetTargetApplication() const;
};
//
+1 -1
View File
@@ -732,7 +732,7 @@ public:
handler->PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName(), target->GetGUIDLow());
while (ref)
{
if (Unit * unit = ref->getSource()->getOwner())
if (Unit* unit = ref->getSource()->getOwner())
{
++cnt;
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", cnt, unit->GetName(), unit->GetGUIDLow(), ref->getThreat());
+1 -1
View File
@@ -143,7 +143,7 @@ public:
uint32 id = fields[6].GetUInt32();
// if creature is in same map with caster go at its current location
if (Creature * creature = sObjectAccessor->GetCreature(*_player, MAKE_NEW_GUID(guid, id, HIGHGUID_UNIT)))
if (Creature* creature = sObjectAccessor->GetCreature(*_player, MAKE_NEW_GUID(guid, id, HIGHGUID_UNIT)))
{
x = creature->GetPositionX();
y = creature->GetPositionY();
+1 -1
View File
@@ -556,7 +556,7 @@ public:
float z = fields[4].GetFloat();
uint16 mapid = fields[5].GetUInt16();
GameObjectTemplate const * gInfo = sObjectMgr->GetGameObjectTemplate(entry);
GameObjectTemplate const* gInfo = sObjectMgr->GetGameObjectTemplate(entry);
if (!gInfo)
continue;
+2 -2
View File
@@ -208,7 +208,7 @@ public:
return false;
}
MapEntry const * map = sMapStore.LookupEntry(tele->mapId);
MapEntry const* map = sMapStore.LookupEntry(tele->mapId);
if (!map || map->IsBattlegroundOrArena())
{
handler->SendSysMessage(LANG_CANNOT_TELE_TO_BG);
@@ -289,7 +289,7 @@ public:
return false;
}
MapEntry const * map = sMapStore.LookupEntry(tele->mapId);
MapEntry const* map = sMapStore.LookupEntry(tele->mapId);
if (!map || map->IsBattlegroundOrArena())
{
handler->SendSysMessage(LANG_CANNOT_TELE_TO_BG);
+3 -3
View File
@@ -69,7 +69,7 @@ public:
return false;
}
Player * target = handler->getSelectedPlayer();
Player* target = handler->getSelectedPlayer();
if (!target)
{
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
@@ -114,7 +114,7 @@ public:
return false;
}
Player * target = handler->getSelectedPlayer();
Player* target = handler->getSelectedPlayer();
if (!target)
{
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
@@ -161,7 +161,7 @@ public:
return false;
}
Player * target = handler->getSelectedPlayer();
Player* target = handler->getSelectedPlayer();
if (!target)
{
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
@@ -120,7 +120,7 @@ public:
Summons.DespawnAll();
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -67,7 +67,7 @@ public:
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -58,7 +58,7 @@ public:
uiResetTimer = 5*IN_MILLISECONDS;
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -63,7 +63,7 @@ public:
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -53,7 +53,7 @@ public:
Spirit_Timer = 24000;
}
void EnterCombat(Unit * /*who*/) {}
void EnterCombat(Unit* /*who*/) {}
void SummonSpirits(Unit* victim)
{
@@ -63,7 +63,7 @@ public:
EnvelopingWeb_Timer = 16000;
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
}
@@ -62,7 +62,7 @@ public:
//Counter= 0;
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
me->CallForHelp(VISIBLE_RANGE);
@@ -61,7 +61,7 @@ public:
Medics = false;
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
}
@@ -54,7 +54,7 @@ public:
MortalStrike_Timer = 22000;
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
}
@@ -54,7 +54,7 @@ public:
Frenzy_Timer =0;
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
}
@@ -60,7 +60,7 @@ public:
ShadowShield_Timer = 8000;
}
void EnterCombat(Unit * /*who*/)
void EnterCombat(Unit* /*who*/)
{
}

Some files were not shown because too many files have changed in this diff Show More