mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Spells/Scripts: Allow OnEffectAbsorb to call PreventDefaultAction in AuraScripts
closes #6172 Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
@@ -2243,7 +2243,7 @@ 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)
|
||||
{
|
||||
@@ -2254,6 +2254,7 @@ void Aura::CallScriptEffectAbsorbHandlers(AuraEffect* aurEff, AuraApplication co
|
||||
if ((*effItr).IsEffectAffected(m_spellInfo, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
}
|
||||
defaultPrevented = (*scritr)->_IsDefaultActionPrevented();
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -787,6 +787,7 @@ void AuraScript::PreventDefaultAction()
|
||||
case AURA_SCRIPT_HOOK_EFFECT_APPLY:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_REMOVE:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_ABSORB:
|
||||
m_defaultActionPrevented = true;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user