aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorOvah <dreadkiller@gmx.de>2020-10-03 00:48:32 +0200
committerGitHub <noreply@github.com>2020-10-03 00:48:32 +0200
commit77aa058504e1ee99b560176d70bcf452c7e3d4f7 (patch)
treeaff058c699d92d7c138fba3aea435913b1a434e9 /src/server/scripts
parent53cb57b864d6b67bd2807cdb1eff93487502fb73 (diff)
Core/Spells: unify OnSpellCastInterrupt and OnSuccessfulSpellCast hooks into OnSpellCastFinished (#25522)
* added support for calling the hook when completing a channeled spell as well
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp9
1 files changed, 3 insertions, 6 deletions
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
+}