mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Prevent an issue that stopped Aura AfterEffect handlers being called on default handler prevention. (#20001)
Fixes #19996.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user