aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2017-07-09 13:58:59 +0200
committerShauren <shauren.trinity@gmail.com>2020-08-18 18:53:13 +0200
commit2c3a107bee6f600c1f4ab6124727fc58fdb48199 (patch)
tree1cb3be1a58844731dc92ae1f7be82e225b239a8b /src
parent1e6480ee358977cdb6596a0dba8b2a1c4ef04a0b (diff)
Prevent an issue that stopped Aura AfterEffect handlers being called on default handler prevention. (#20001)
Fixes #19996. (cherry picked from commit ed241a2fd6c8fd419d350210aa61eb1ad05b27bb)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 18d68a7f0fe..5c618b76954 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -830,13 +830,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()].Value)(aurApp, mode, apply);
+ // call default effect handler if it wasn't prevented
+ if (!prevented)
+ (*this.*AuraEffectHandler[GetAuraType()].Value)(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;