From 80c2025cd9a250a215849f3c79a4ea037706cde3 Mon Sep 17 00:00:00 2001 From: Poszer <41213210+poszer@users.noreply.github.com> Date: Tue, 23 Apr 2019 23:47:53 +0200 Subject: [PATCH] fix(CORE/Spells): Shadowmourne spell effect (#1731) - Remove SM aura (Soul Fragment) if the item is unequiped --- src/server/scripts/Spells/spell_item.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 3d5b2c787..dda05d894 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -2517,11 +2517,17 @@ class spell_item_shadowmourne : public SpellScriptLoader } } } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(SPELL_SHADOWMOURNE_SOUL_FRAGMENT); + } void Register() { DoCheckProc += AuraCheckProcFn(spell_item_shadowmourne_AuraScript::CheckProc); OnEffectProc += AuraEffectProcFn(spell_item_shadowmourne_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + AfterEffectRemove += AuraEffectRemoveFn(spell_item_shadowmourne_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } };