Core: Continued cleanup
If and for whitespaces.
This commit is contained in:
@@ -495,13 +495,13 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
||||
DoneActualBenefit = caster->ApplyEffectModifiers(GetSpellProto(), m_effIndex, DoneActualBenefit);
|
||||
}
|
||||
// Fire Ward
|
||||
else if(GetSpellProto()->SpellFamilyFlags[0] & 0x8 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
else if (GetSpellProto()->SpellFamilyFlags[0] & 0x8 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
{
|
||||
// +80.68% from sp bonus
|
||||
DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
|
||||
}
|
||||
// Frost Ward
|
||||
else if(GetSpellProto()->SpellFamilyFlags[0] & 0x100 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
else if (GetSpellProto()->SpellFamilyFlags[0] & 0x100 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
{
|
||||
// +80.68% from sp bonus
|
||||
DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
|
||||
@@ -2896,7 +2896,7 @@ void AuraEffect::HandleModStealth(AuraApplication const* aurApp, uint8 mode, boo
|
||||
|
||||
if (apply)
|
||||
{
|
||||
target->m_stealth.AddFlag( type);
|
||||
target->m_stealth.AddFlag(type);
|
||||
target->m_stealth.AddValue(type, GetAmount());
|
||||
|
||||
target->SetStandFlags(UNIT_STAND_FLAGS_CREEP);
|
||||
@@ -3283,7 +3283,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
// Disarm handling
|
||||
// If druid shifts while being disarmed we need to deal with that since forms aren't affected by disarm
|
||||
// and also HandleAuraModDisarm is not triggered
|
||||
if(!target->CanUseAttackType(BASE_ATTACK))
|
||||
if (!target->CanUseAttackType(BASE_ATTACK))
|
||||
{
|
||||
if (Item *pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
|
||||
{
|
||||
@@ -6626,7 +6626,7 @@ void AuraEffect::HandleAuraModFakeInebriation(AuraApplication const* aurApp, uin
|
||||
|
||||
if (apply)
|
||||
{
|
||||
target->m_invisibilityDetect.AddFlag( INVISIBILITY_DRUNK);
|
||||
target->m_invisibilityDetect.AddFlag(INVISIBILITY_DRUNK);
|
||||
target->m_invisibilityDetect.AddValue(INVISIBILITY_DRUNK, GetAmount());
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
@@ -807,7 +807,7 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode)
|
||||
if ((num > 0) && (stackAmount > int32(m_spellProto->StackAmount)))
|
||||
{
|
||||
// not stackable aura - set stack amount to 1
|
||||
if(!m_spellProto->StackAmount)
|
||||
if (!m_spellProto->StackAmount)
|
||||
stackAmount = 1;
|
||||
else
|
||||
stackAmount = m_spellProto->StackAmount;
|
||||
@@ -1713,7 +1713,7 @@ void Aura::LoadScripts()
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts");
|
||||
sScriptMgr->CreateAuraScripts(m_spellProto->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))
|
||||
{
|
||||
@@ -1729,12 +1729,12 @@ void Aura::LoadScripts()
|
||||
|
||||
bool Aura::CallScriptCheckAreaTargetHandlers(Unit* target)
|
||||
{
|
||||
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_CHECK_AREA_TARGET);
|
||||
std::list<AuraScript::CheckAreaTargetHandler>::iterator hookItrEnd = (*scritr)->DoCheckAreaTarget.end(), hookItr = (*scritr)->DoCheckAreaTarget.begin();
|
||||
for (; hookItr != hookItrEnd ; ++hookItr)
|
||||
if(!(*hookItr).Call(*scritr, target))
|
||||
if (!(*hookItr).Call(*scritr, target))
|
||||
return false;
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
@@ -1744,11 +1744,11 @@ 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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, mode);
|
||||
@@ -1763,11 +1763,11 @@ 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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, mode);
|
||||
@@ -1781,11 +1781,11 @@ 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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, mode);
|
||||
@@ -1796,11 +1796,11 @@ 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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, mode);
|
||||
@@ -1812,11 +1812,11 @@ 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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff);
|
||||
@@ -1830,11 +1830,11 @@ bool Aura::CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplic
|
||||
|
||||
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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff);
|
||||
@@ -1845,11 +1845,11 @@ 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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, amount, canBeRecalculated);
|
||||
@@ -1860,11 +1860,11 @@ 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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, isPeriodic, amplitude);
|
||||
@@ -1875,11 +1875,11 @@ void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool &
|
||||
|
||||
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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, spellMod);
|
||||
@@ -1890,11 +1890,11 @@ void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellM
|
||||
|
||||
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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
@@ -1905,11 +1905,11 @@ void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication c
|
||||
|
||||
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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
@@ -1920,11 +1920,11 @@ void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplicat
|
||||
|
||||
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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
@@ -1935,11 +1935,11 @@ void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplicati
|
||||
|
||||
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();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
|
||||
Reference in New Issue
Block a user