From 864ce5d3a2876460103b8597707303ed52cda510 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 23 Jun 2018 18:57:33 +0200 Subject: [PATCH] Core/Spells: switching Death Knight Presences will now remove all stored Runic Power --- src/server/scripts/Spells/spell_dk.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 65b7cb6a6f..c377b9e5a0 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1153,6 +1153,11 @@ class spell_dk_presence : public SpellScriptLoader }); } + void HandleRunicPowerLoss(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->SetPower(POWER_RUNIC_POWER, 0); + } + void HandleImprovedBloodPresence(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); @@ -1231,6 +1236,7 @@ class spell_dk_presence : public SpellScriptLoader void Register() override { + AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleRunicPowerLoss, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedBloodPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedFrostPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedUnholyPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);