From 249533b899cd360f9da795a4c1e2632a48200467 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Mon, 13 May 2019 00:56:17 +0200 Subject: [PATCH] Core/Spells: improved handling for Glyph of Lightning Shield --- src/server/scripts/Spells/spell_shaman.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 5d338f78ecc..3e3a1fd6fcd 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -2053,18 +2053,16 @@ class spell_sha_lightning_shield : public AuraScript { PrepareAuraScript(spell_sha_lightning_shield); - bool CheckProc(ProcEventInfo& /*eventInfo*/) + void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) { if (GetTarget()->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, SHAMAN_ICON_ID_GLYPH_OF_LIGHTNING_SHIELD, EFFECT_0)) - if (GetCharges() == 3) - SetCharges(GetCharges() + 1); - - return true; + if (GetCharges() < 3) + SetCharges(3); } void Register() override { - DoCheckProc += AuraCheckProcFn(spell_sha_lightning_shield::CheckProc); + AfterEffectProc += AuraEffectProcFn(spell_sha_lightning_shield::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); } };