[Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions)
This commit is contained in:
@@ -390,7 +390,7 @@ AuraEffect::~AuraEffect()
|
||||
delete m_spellmod;
|
||||
}
|
||||
|
||||
void AuraEffect::GetTargetList(std::list<Unit *> & targetList) const
|
||||
void AuraEffect::GetTargetList(std::list<Unit*> & targetList) const
|
||||
{
|
||||
Aura::ApplicationMap const & targetMap = GetBase()->GetApplicationMap();
|
||||
// remove all targets which were not added to new list - they no longer deserve area aura
|
||||
@@ -1278,7 +1278,7 @@ bool AuraEffect::IsAffectedOnSpell(SpellInfo const* spell) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void AuraEffect::SendTickImmune(Unit* target, Unit *caster) const
|
||||
void AuraEffect::SendTickImmune(Unit* target, Unit* caster) const
|
||||
{
|
||||
if (caster)
|
||||
caster->SendSpellDamageImmune(target, m_spellInfo->Id);
|
||||
@@ -5664,7 +5664,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
||||
// Mirror Image
|
||||
if (GetId() == 55342)
|
||||
// Set name of summons to name of caster
|
||||
target->CastSpell((Unit *)NULL, m_spellInfo->Effects[m_effIndex].TriggerSpell, true);
|
||||
target->CastSpell((Unit* )NULL, m_spellInfo->Effects[m_effIndex].TriggerSpell, true);
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARLOCK:
|
||||
|
||||
@@ -30,15 +30,15 @@ typedef void(AuraEffect::*pAuraEffectHandler)(AuraApplication const* aurApp, uin
|
||||
class AuraEffect
|
||||
{
|
||||
friend void Aura::_InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount);
|
||||
friend Aura * Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID);
|
||||
friend Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo 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(); }
|
||||
uint64 GetCasterGUID() const { return GetBase()->GetCasterGUID(); }
|
||||
Aura * GetBase() const { return m_base; }
|
||||
Aura* GetBase() const { return m_base; }
|
||||
void GetTargetList(std::list<Unit*> & targetList) const;
|
||||
void GetApplicationList(std::list<AuraApplication*> & applicationList) const;
|
||||
SpellModifier* GetSpellModifier() const { return m_spellmod; }
|
||||
@@ -79,9 +79,9 @@ class AuraEffect
|
||||
|
||||
bool IsPeriodic() const { return m_isPeriodic; }
|
||||
void SetPeriodic(bool isPeriodic) { m_isPeriodic = isPeriodic; }
|
||||
bool IsAffectedOnSpell(SpellInfo const *spell) const;
|
||||
bool IsAffectedOnSpell(SpellInfo 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 HandleProc(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
@@ -91,7 +91,7 @@ class AuraEffect
|
||||
// add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras
|
||||
void HandleShapeshiftBoosts(Unit* target, bool apply) const;
|
||||
private:
|
||||
Aura * const m_base;
|
||||
Aura* const m_base;
|
||||
|
||||
SpellInfo const* const m_spellInfo;
|
||||
uint8 const m_effIndex;
|
||||
@@ -100,7 +100,7 @@ class AuraEffect
|
||||
int32 m_amount;
|
||||
bool m_canBeRecalculated;
|
||||
|
||||
SpellModifier *m_spellmod;
|
||||
SpellModifier* m_spellmod;
|
||||
|
||||
bool m_isPeriodic;
|
||||
int32 m_periodicTimer;
|
||||
@@ -307,7 +307,7 @@ namespace Trinity
|
||||
{
|
||||
public:
|
||||
AbsorbAuraOrderPred() { }
|
||||
bool operator() (AuraEffect * aurEffA, AuraEffect * aurEffB) const
|
||||
bool operator() (AuraEffect* aurEffA, AuraEffect* aurEffB) const
|
||||
{
|
||||
SpellInfo const* spellProtoA = aurEffA->GetSpellInfo();
|
||||
SpellInfo const* spellProtoB = aurEffB->GetSpellInfo();
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "SpellScript.h"
|
||||
#include "Vehicle.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)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
|
||||
|
||||
void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
|
||||
{
|
||||
AuraEffect * aurEff = GetBase()->GetEffect(effIndex);
|
||||
AuraEffect* aurEff = GetBase()->GetEffect(effIndex);
|
||||
ASSERT(aurEff);
|
||||
ASSERT(HasEffect(effIndex) == (!apply));
|
||||
ASSERT((1<<effIndex) & m_effectsToApply);
|
||||
@@ -330,7 +330,7 @@ Aura* Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owne
|
||||
return aura;
|
||||
}
|
||||
|
||||
Aura::Aura(SpellInfo const* spellproto, WorldObject * owner, Unit* caster, Item* castItem, uint64 casterGUID) :
|
||||
Aura::Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, uint64 casterGUID) :
|
||||
m_spellInfo(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),
|
||||
@@ -364,7 +364,7 @@ Aura::~Aura()
|
||||
// unload scripts
|
||||
while(!m_loadedScripts.empty())
|
||||
{
|
||||
std::list<AuraScript *>::iterator itr = m_loadedScripts.begin();
|
||||
std::list<AuraScript*>::iterator itr = m_loadedScripts.begin();
|
||||
(*itr)->_Unload();
|
||||
delete (*itr);
|
||||
m_loadedScripts.erase(itr);
|
||||
@@ -469,7 +469,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
|
||||
|
||||
// fill up to date target list
|
||||
// target, effMask
|
||||
std::map<Unit *, uint8> targets;
|
||||
std::map<Unit* , uint8> targets;
|
||||
|
||||
FillTargetMap(targets, caster);
|
||||
|
||||
@@ -478,7 +478,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
|
||||
// mark all auras as ready to remove
|
||||
for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end();++appIter)
|
||||
{
|
||||
std::map<Unit *, uint8>::iterator existing = targets.find(appIter->second->GetTarget());
|
||||
std::map<Unit* , uint8>::iterator existing = targets.find(appIter->second->GetTarget());
|
||||
// not found in current area - remove the aura
|
||||
if (existing == targets.end())
|
||||
targetsToRemove.push_back(appIter->second->GetTarget());
|
||||
@@ -495,7 +495,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
|
||||
}
|
||||
|
||||
// register auras for units
|
||||
for (std::map<Unit *, uint8>::iterator itr = targets.begin(); itr!= targets.end();)
|
||||
for (std::map<Unit* , uint8>::iterator itr = targets.begin(); itr!= targets.end();)
|
||||
{
|
||||
// aura mustn't be already applied on target
|
||||
if (AuraApplication * aurApp = GetApplicationOfTarget(itr->first->GetGUID()))
|
||||
@@ -572,7 +572,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
|
||||
return;
|
||||
|
||||
// apply aura effects for units
|
||||
for (std::map<Unit *, uint8>::iterator itr = targets.begin(); itr!= targets.end();++itr)
|
||||
for (std::map<Unit* , uint8>::iterator itr = targets.begin(); itr!= targets.end();++itr)
|
||||
{
|
||||
if (AuraApplication * aurApp = GetApplicationOfTarget(itr->first->GetGUID()))
|
||||
{
|
||||
@@ -605,7 +605,7 @@ void Aura::_ApplyEffectForTargets(uint8 effIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
void Aura::UpdateOwner(uint32 diff, WorldObject * owner)
|
||||
void Aura::UpdateOwner(uint32 diff, WorldObject* owner)
|
||||
{
|
||||
ASSERT(owner == m_owner);
|
||||
|
||||
@@ -853,7 +853,7 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode)
|
||||
void Aura::RefreshSpellMods()
|
||||
{
|
||||
for (Aura::ApplicationMap::const_iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
|
||||
if (Player * player = appIter->second->GetTarget()->ToPlayer())
|
||||
if (Player* player = appIter->second->GetTarget()->ToPlayer())
|
||||
player->RestoreAllSpellMods(0, this);
|
||||
}
|
||||
|
||||
@@ -1256,7 +1256,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
if (GetCasterGUID() == target->GetGUID())
|
||||
break;
|
||||
|
||||
AuraEffect * aurEff = NULL;
|
||||
AuraEffect* aurEff = NULL;
|
||||
// Ebon Plaguebringer / Crypt Fever
|
||||
Unit::AuraEffectList const& TalentAuras = caster->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (Unit::AuraEffectList::const_iterator itr = TalentAuras.begin(); itr != TalentAuras.end(); ++itr)
|
||||
@@ -1490,7 +1490,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
|
||||
Player* player = caster->ToPlayer();
|
||||
// Glyph of Guardian Spirit
|
||||
if (AuraEffect * aurEff = player->GetAuraEffect(63231, 0))
|
||||
if (AuraEffect* aurEff = player->GetAuraEffect(63231, 0))
|
||||
{
|
||||
if (!player->HasSpellCooldown(47788))
|
||||
break;
|
||||
@@ -1638,9 +1638,9 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
if (GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_PRESENCE)
|
||||
{
|
||||
AuraEffect *bloodPresenceAura=0; // healing by damage done
|
||||
AuraEffect *frostPresenceAura=0; // increased health
|
||||
AuraEffect *unholyPresenceAura=0; // increased movement speed, faster rune recovery
|
||||
AuraEffect* bloodPresenceAura=0; // healing by damage done
|
||||
AuraEffect* frostPresenceAura=0; // increased health
|
||||
AuraEffect* unholyPresenceAura=0; // increased movement speed, faster rune recovery
|
||||
|
||||
// Improved Presences
|
||||
Unit::AuraEffectList const& vDummyAuras = target->GetAuraEffectsByType(SPELL_AURA_DUMMY);
|
||||
@@ -1958,7 +1958,7 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI
|
||||
if (eventInfo.GetDamageInfo())
|
||||
{
|
||||
WeaponAttackType attType = eventInfo.GetDamageInfo()->GetAttackType();
|
||||
Item *item = NULL;
|
||||
Item* item = NULL;
|
||||
if (attType == BASE_ATTACK)
|
||||
item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
|
||||
else if (attType == OFF_ATTACK)
|
||||
@@ -1973,7 +1973,7 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI
|
||||
else if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_ARMOR)
|
||||
{
|
||||
// Check if player is wearing shield
|
||||
Item *item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
|
||||
Item* item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
|
||||
if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_ARMOR || !((1<<item->GetTemplate()->SubClass) & GetSpellInfo()->EquippedItemSubClassMask))
|
||||
return false;
|
||||
}
|
||||
@@ -1987,7 +1987,7 @@ float Aura::CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& event
|
||||
float chance = procEntry.chance;
|
||||
// calculate chances depending on unit with caster's data
|
||||
// so talents modifying chances and judgements will have properly calculated proc chance
|
||||
if (Unit * caster = GetCaster())
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
// calculate ppm chance if present and we're using weapon
|
||||
if (eventInfo.GetDamageInfo() && procEntry.ratePerMinute != 0)
|
||||
@@ -2028,11 +2028,11 @@ void Aura::LoadScripts()
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts");
|
||||
sScriptMgr->CreateAuraScripts(m_spellInfo->Id, m_loadedScripts);
|
||||
for (std::list<AuraScript *>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;)
|
||||
for (std::list<AuraScript*>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;)
|
||||
{
|
||||
if (!(*itr)->_Load(this))
|
||||
{
|
||||
std::list<AuraScript *>::iterator bitr = itr;
|
||||
std::list<AuraScript*>::iterator bitr = itr;
|
||||
++itr;
|
||||
m_loadedScripts.erase(bitr);
|
||||
continue;
|
||||
@@ -2059,7 +2059,7 @@ bool Aura::CallScriptCheckAreaTargetHandlers(Unit* target)
|
||||
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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_APPLY, aurApp);
|
||||
std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->OnEffectApply.end(), effItr = (*scritr)->OnEffectApply.begin();
|
||||
@@ -2078,7 +2078,7 @@ bool Aura::CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplicati
|
||||
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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_REMOVE, aurApp);
|
||||
std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->OnEffectRemove.end(), effItr = (*scritr)->OnEffectRemove.begin();
|
||||
@@ -2096,7 +2096,7 @@ bool Aura::CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplicat
|
||||
|
||||
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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_APPLY, aurApp);
|
||||
std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->AfterEffectApply.end(), effItr = (*scritr)->AfterEffectApply.begin();
|
||||
@@ -2111,7 +2111,7 @@ void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraAppl
|
||||
|
||||
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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_REMOVE, aurApp);
|
||||
std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->AfterEffectRemove.end(), effItr = (*scritr)->AfterEffectRemove.begin();
|
||||
@@ -2127,7 +2127,7 @@ void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const* aurEff, AuraApp
|
||||
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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_PERIODIC, aurApp);
|
||||
std::list<AuraScript::EffectPeriodicHandler>::iterator effEndItr = (*scritr)->OnEffectPeriodic.end(), effItr = (*scritr)->OnEffectPeriodic.begin();
|
||||
@@ -2143,9 +2143,9 @@ bool Aura::CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplic
|
||||
return preventDefault;
|
||||
}
|
||||
|
||||
void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff)
|
||||
void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect* aurEff)
|
||||
{
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_UPDATE_PERIODIC);
|
||||
std::list<AuraScript::EffectUpdatePeriodicHandler>::iterator effEndItr = (*scritr)->OnEffectUpdatePeriodic.end(), effItr = (*scritr)->OnEffectUpdatePeriodic.begin();
|
||||
@@ -2160,7 +2160,7 @@ void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff)
|
||||
|
||||
void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated)
|
||||
{
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_AMOUNT);
|
||||
std::list<AuraScript::EffectCalcAmountHandler>::iterator effEndItr = (*scritr)->DoEffectCalcAmount.end(), effItr = (*scritr)->DoEffectCalcAmount.begin();
|
||||
@@ -2175,7 +2175,7 @@ void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 &
|
||||
|
||||
void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool & isPeriodic, int32 & amplitude)
|
||||
{
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_PERIODIC);
|
||||
std::list<AuraScript::EffectCalcPeriodicHandler>::iterator effEndItr = (*scritr)->DoEffectCalcPeriodic.end(), effItr = (*scritr)->DoEffectCalcPeriodic.begin();
|
||||
@@ -2188,9 +2188,9 @@ 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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_SPELLMOD);
|
||||
std::list<AuraScript::EffectCalcSpellModHandler>::iterator effEndItr = (*scritr)->DoEffectCalcSpellMod.end(), effItr = (*scritr)->DoEffectCalcSpellMod.begin();
|
||||
@@ -2203,9 +2203,9 @@ void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellM
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_ABSORB, aurApp);
|
||||
std::list<AuraScript::EffectAbsorbHandler>::iterator effEndItr = (*scritr)->OnEffectAbsorb.end(), effItr = (*scritr)->OnEffectAbsorb.begin();
|
||||
@@ -2218,9 +2218,9 @@ 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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB, aurApp);
|
||||
std::list<AuraScript::EffectAbsorbHandler>::iterator effEndItr = (*scritr)->AfterEffectAbsorb.end(), effItr = (*scritr)->AfterEffectAbsorb.begin();
|
||||
@@ -2233,9 +2233,9 @@ 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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_MANASHIELD, aurApp);
|
||||
std::list<AuraScript::EffectManaShieldHandler>::iterator effEndItr = (*scritr)->OnEffectManaShield.end(), effItr = (*scritr)->OnEffectManaShield.begin();
|
||||
@@ -2248,9 +2248,9 @@ 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)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD, aurApp);
|
||||
std::list<AuraScript::EffectManaShieldHandler>::iterator effEndItr = (*scritr)->AfterEffectManaShield.end(), effItr = (*scritr)->AfterEffectManaShield.begin();
|
||||
@@ -2263,7 +2263,7 @@ void Aura::CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraAppl
|
||||
}
|
||||
}
|
||||
|
||||
UnitAura::UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID)
|
||||
UnitAura::UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID)
|
||||
: Aura(spellproto, owner, caster, castItem, casterGUID)
|
||||
{
|
||||
m_AuraDRGroup = DIMINISHING_NONE;
|
||||
@@ -2297,7 +2297,7 @@ void UnitAura::Remove(AuraRemoveMode removeMode)
|
||||
GetUnitOwner()->RemoveOwnedAura(this, removeMode);
|
||||
}
|
||||
|
||||
void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster)
|
||||
void UnitAura::FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster)
|
||||
{
|
||||
for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS ; ++effIndex)
|
||||
{
|
||||
@@ -2355,7 +2355,7 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster)
|
||||
|
||||
for (UnitList::iterator itr = targetList.begin(); itr!= targetList.end();++itr)
|
||||
{
|
||||
std::map<Unit *, uint8>::iterator existing = targets.find(*itr);
|
||||
std::map<Unit* , uint8>::iterator existing = targets.find(*itr);
|
||||
if (existing != targets.end())
|
||||
existing->second |= 1<<effIndex;
|
||||
else
|
||||
@@ -2364,7 +2364,7 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster)
|
||||
}
|
||||
}
|
||||
|
||||
DynObjAura::DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID)
|
||||
DynObjAura::DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID)
|
||||
: Aura(spellproto, owner, caster, castItem, casterGUID)
|
||||
{
|
||||
LoadScripts();
|
||||
@@ -2382,7 +2382,7 @@ void DynObjAura::Remove(AuraRemoveMode removeMode)
|
||||
_Remove(removeMode);
|
||||
}
|
||||
|
||||
void DynObjAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* /*caster*/)
|
||||
void DynObjAura::FillTargetMap(std::map<Unit* , uint8> & targets, Unit* /*caster*/)
|
||||
{
|
||||
Unit* dynObjOwnerCaster = GetDynobjOwner()->GetCaster();
|
||||
float radius = GetDynobjOwner()->GetRadius();
|
||||
@@ -2408,7 +2408,7 @@ void DynObjAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* /*caster
|
||||
|
||||
for (UnitList::iterator itr = targetList.begin(); itr!= targetList.end();++itr)
|
||||
{
|
||||
std::map<Unit *, uint8>::iterator existing = targets.find(*itr);
|
||||
std::map<Unit* , uint8>::iterator existing = targets.find(*itr);
|
||||
if (existing != targets.end())
|
||||
existing->second |= 1<<effIndex;
|
||||
else
|
||||
|
||||
@@ -42,19 +42,19 @@ class AuraApplication
|
||||
{
|
||||
friend void Unit::_ApplyAura(AuraApplication * aurApp, uint8 effMask);
|
||||
friend void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMode);
|
||||
friend void Unit::_ApplyAuraEffect(Aura * aura, uint8 effIndex);
|
||||
friend void Unit::_ApplyAuraEffect(Aura* aura, uint8 effIndex);
|
||||
friend void Unit::RemoveAura(AuraApplication * aurApp, AuraRemoveMode mode);
|
||||
friend AuraApplication * Unit::_CreateAuraApplication(Aura * aura, uint8 effMask);
|
||||
friend AuraApplication * Unit::_CreateAuraApplication(Aura* aura, uint8 effMask);
|
||||
private:
|
||||
Unit* const m_target;
|
||||
Aura * const m_base;
|
||||
Aura* const m_base;
|
||||
uint8 m_slot; // Aura slot on unit
|
||||
uint8 m_flags; // Aura info flag
|
||||
uint8 m_effectsToApply; // Used only at spell hit to determine which effect should be applied
|
||||
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);
|
||||
@@ -62,7 +62,7 @@ class AuraApplication
|
||||
public:
|
||||
|
||||
Unit* GetTarget() const { return m_target; }
|
||||
Aura * GetBase() const { return m_base; }
|
||||
Aura* GetBase() const { return m_base; }
|
||||
|
||||
uint8 GetSlot() const { return m_slot; }
|
||||
uint8 GetFlags() const { return m_flags; }
|
||||
@@ -83,15 +83,15 @@ class AuraApplication
|
||||
|
||||
class Aura
|
||||
{
|
||||
friend Aura * Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
|
||||
friend Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
|
||||
public:
|
||||
typedef std::map<uint64, AuraApplication *> ApplicationMap;
|
||||
|
||||
static uint8 BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleEffectMask, WorldObject* owner);
|
||||
static Aura* TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0, bool* refresh = NULL);
|
||||
static Aura* TryCreate(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0);
|
||||
static Aura* TryCreate(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0);
|
||||
static Aura* Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID);
|
||||
explicit Aura(SpellInfo const* spellproto, WorldObject * owner, Unit* caster, Item* castItem, uint64 casterGUID);
|
||||
explicit Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, uint64 casterGUID);
|
||||
void _InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount);
|
||||
virtual ~Aura();
|
||||
|
||||
@@ -101,9 +101,9 @@ class Aura
|
||||
uint64 GetCastItemGUID() const { return m_castItemGuid; }
|
||||
uint64 GetCasterGUID() const { return m_casterGuid; }
|
||||
Unit* GetCaster() const;
|
||||
WorldObject * GetOwner() const { return m_owner; }
|
||||
WorldObject* GetOwner() const { return 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; }
|
||||
DynamicObject* GetDynobjOwner() const { ASSERT(GetType() == DYNOBJ_AURA_TYPE); return (DynamicObject*)m_owner; }
|
||||
|
||||
AuraObjectType GetType() const;
|
||||
|
||||
@@ -112,14 +112,14 @@ class Aura
|
||||
void _Remove(AuraRemoveMode removeMode);
|
||||
virtual void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) = 0;
|
||||
|
||||
virtual void FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster) = 0;
|
||||
virtual void FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster) = 0;
|
||||
void UpdateTargetMap(Unit* caster, bool apply = true);
|
||||
|
||||
void _RegisterForTargets() {Unit* caster = GetCaster(); UpdateTargetMap(caster, false);}
|
||||
void ApplyForTargets() {Unit* caster = GetCaster(); UpdateTargetMap(caster, true);}
|
||||
void _ApplyEffectForTargets(uint8 effIndex);
|
||||
|
||||
void UpdateOwner(uint32 diff, WorldObject * owner);
|
||||
void UpdateOwner(uint32 diff, WorldObject* owner);
|
||||
void Update(uint32 diff, Unit* caster);
|
||||
|
||||
time_t GetApplyTime() const { return m_applyTime; }
|
||||
@@ -167,7 +167,7 @@ class Aura
|
||||
// helpers for aura effects
|
||||
bool HasEffect(uint8 effIndex) const { return bool(GetEffect(effIndex)); }
|
||||
bool HasEffectType(AuraType type) const;
|
||||
AuraEffect * GetEffect(uint8 effIndex) const { ASSERT (effIndex < MAX_SPELL_EFFECTS); return m_effects[effIndex]; }
|
||||
AuraEffect* GetEffect(uint8 effIndex) const { ASSERT (effIndex < MAX_SPELL_EFFECTS); return m_effects[effIndex]; }
|
||||
uint8 GetEffectMask() const { uint8 effMask = 0; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) if (m_effects[i]) effMask |= 1<<i; return effMask; }
|
||||
void RecalculateAmountOfEffects();
|
||||
void HandleAllEffects(AuraApplication * aurApp, uint8 mode, bool apply);
|
||||
@@ -203,15 +203,15 @@ class Aura
|
||||
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 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);
|
||||
std::list<AuraScript *> m_loadedScripts;
|
||||
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:
|
||||
@@ -219,7 +219,7 @@ class Aura
|
||||
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;
|
||||
WorldObject * const m_owner; //
|
||||
WorldObject* const m_owner; //
|
||||
|
||||
int32 m_maxDuration; // Max aura duration
|
||||
int32 m_duration; // Current time
|
||||
@@ -230,7 +230,7 @@ class Aura
|
||||
uint8 m_procCharges; // Aura charges (0 for infinite)
|
||||
uint8 m_stackAmount; // Aura stack amount
|
||||
|
||||
AuraEffect * m_effects[3];
|
||||
AuraEffect* m_effects[3];
|
||||
ApplicationMap m_applications;
|
||||
|
||||
bool m_isRemoved:1;
|
||||
@@ -243,16 +243,16 @@ class Aura
|
||||
|
||||
class UnitAura : public Aura
|
||||
{
|
||||
friend Aura * Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
|
||||
friend Aura* Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
|
||||
protected:
|
||||
explicit UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
|
||||
explicit UnitAura(SpellInfo 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 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; }
|
||||
@@ -264,12 +264,12 @@ class UnitAura : public Aura
|
||||
|
||||
class DynObjAura : public Aura
|
||||
{
|
||||
friend Aura * Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
|
||||
friend Aura* Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
|
||||
protected:
|
||||
explicit DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID);
|
||||
explicit DynObjAura(SpellInfo 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
|
||||
|
||||
Reference in New Issue
Block a user