Prevent an issue that stopped Aura AfterEffect handlers being called on default handler prevention. (#20001)

Fixes #19996.
This commit is contained in:
Treeston
2017-07-09 13:58:59 +02:00
committed by GitHub
parent 9bacaf15b6
commit ed241a2fd6

View File

@@ -665,13 +665,15 @@ void AuraEffect::HandleEffect(AuraApplication * aurApp, uint8 mode, bool apply)
else
prevented = GetBase()->CallScriptEffectRemoveHandlers(this, aurApp, (AuraEffectHandleModes)mode);
// check if script events have removed the aura or if default effect prevention was requested
if ((apply && aurApp->GetRemoveMode()) || prevented)
// check if script events have removed the aura already
if (apply && aurApp->GetRemoveMode())
return;
(*this.*AuraEffectHandler[GetAuraType()])(aurApp, mode, apply);
// call default effect handler if it wasn't prevented
if (!prevented)
(*this.*AuraEffectHandler[GetAuraType()])(aurApp, mode, apply);
// check if script events have removed the aura or if default effect prevention was requested
// check if the default handler reemoved the aura
if (apply && aurApp->GetRemoveMode())
return;