From 77aa058504e1ee99b560176d70bcf452c7e3d4f7 Mon Sep 17 00:00:00 2001 From: Ovah Date: Sat, 3 Oct 2020 00:48:32 +0200 Subject: Core/Spells: unify OnSpellCastInterrupt and OnSuccessfulSpellCast hooks into OnSpellCastFinished (#25522) * added support for calling the hook when completing a channeled spell as well --- .../scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index f7a49f7a0e7..22adbf3e4dc 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -1344,12 +1344,9 @@ struct npc_shambling_horror_icc : public ScriptedAI DoMeleeAttackIfReady(); } - void OnSpellCastInterrupt(SpellInfo const* spell) override + void OnSpellCastFinished(SpellInfo const* spell, SpellFinishReason reason) override { - ScriptedAI::OnSpellCastInterrupt(spell); - - // When enrage is interrupted, reschedule the event - if (spell->Id == ENRAGE) + if (reason == SPELL_FINISHED_CANCELED && spell->Id == ENRAGE) _events.RescheduleEvent(EVENT_ENRAGE, 1s); } @@ -2895,4 +2892,4 @@ void AddSC_boss_the_lich_king() // Achievements new achievement_been_waiting_long_time(); new achievement_neck_deep_in_vile(); -} \ No newline at end of file +} -- cgit v1.2.3