diff options
| author | DanVS <33371360+DanVS@users.noreply.github.com> | 2018-03-31 15:13:33 +0300 |
|---|---|---|
| committer | Keader <keader.android@gmail.com> | 2018-03-31 09:13:33 -0300 |
| commit | c2f16579888bb7973c1d32ad9efe6058acafb8d6 (patch) | |
| tree | a34d2e2b870b43808592c022ea3590847bfd5cc3 /src | |
| parent | 88130d86b0aba2e33f8006cf5db938b321d0a854 (diff) | |
[3.3.5] Scripts/Spells: handle auras on unequipping scripted items (#21643)
Ref: #20415
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 490f31b55b8..d1c4ad3135f 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -256,9 +256,15 @@ class spell_item_anger_capacitor : public SpellScriptLoader caster->CastSpell(target, spellId, aurEff); } + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(SPELL_MOTE_OF_ANGER); + } + void Register() override { OnEffectProc += AuraEffectProcFn(spell_item_anger_capacitor_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + AfterEffectRemove += AuraEffectRemoveFn(spell_item_anger_capacitor_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } }; @@ -1785,10 +1791,16 @@ class spell_item_shadowmourne : public AuraScript } } + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(SPELL_SHADOWMOURNE_SOUL_FRAGMENT); + } + void Register() override { DoCheckProc += AuraCheckProcFn(spell_item_shadowmourne::CheckProc); OnEffectProc += AuraEffectProcFn(spell_item_shadowmourne::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + AfterEffectRemove += AuraEffectRemoveFn(spell_item_shadowmourne::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } }; @@ -3456,9 +3468,15 @@ public: caster->CastSpell(target, _triggerSpell, aurEff); } + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(_stackSpell); + } + void Register() override { OnEffectProc += AuraEffectProcFn(spell_item_trinket_stack_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + AfterEffectRemove += AuraEffectRemoveFn(spell_item_trinket_stack_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); } uint32 _stackSpell; |
