Core/AuraScripts: Fix runtime error messages appearing in aura scripts when one hook is called from inside of another one.
This commit is contained in:
@@ -1753,7 +1753,7 @@ void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const * aurEff, AuraApp
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_APPLY, aurApp);
|
||||
(*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)
|
||||
{
|
||||
@@ -1768,7 +1768,7 @@ void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const * aurEff, AuraAp
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_REMOVE, aurApp);
|
||||
(*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)
|
||||
{
|
||||
@@ -1869,8 +1869,6 @@ void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication c
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
}
|
||||
if (!defaultPrevented)
|
||||
defaultPrevented = (*scritr)->_IsDefaultActionPrevented();
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
}
|
||||
@@ -1901,8 +1899,6 @@ void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplicati
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
}
|
||||
if (!defaultPrevented)
|
||||
defaultPrevented = (*scritr)->_IsDefaultActionPrevented();
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user