aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Argus
diff options
context:
space:
mode:
authorOvah <dreadkiller@gmx.de>2020-10-03 00:48:32 +0200
committerShauren <shauren.trinity@gmail.com>2022-02-28 14:21:08 +0100
commitd1594c7295f1ca3f21a63a13895abf371d8bd3e0 (patch)
tree25c77ee204a7ea4b5a5fdb45d2652221efb1775b /src/server/scripts/Argus
parent58ce0904aa08411570bb600c1604dc1fc0d01ac3 (diff)
Core/Spells: unify OnSpellCastInterrupt and OnSuccessfulSpellCast hooks into OnSpellCastFinished (#25522)
* added support for calling the hook when completing a channeled spell as well (cherry picked from commit 77aa058504e1ee99b560176d70bcf452c7e3d4f7)
Diffstat (limited to 'src/server/scripts/Argus')
-rw-r--r--src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp b/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp
index b8c45975ff8..aa6f2630ddf 100644
--- a/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp
+++ b/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp
@@ -24,6 +24,7 @@
#include "ObjectAccessor.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Spell.h"
#include "SpellAuras.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
@@ -246,8 +247,11 @@ struct boss_garothi_worldbreaker : public BossAI
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
}
- void OnSuccessfulSpellCast(SpellInfo const* spell) override
+ void OnSpellCastFinished(SpellInfo const* spell, SpellFinishReason reason) override
{
+ if (reason != SPELL_FINISHED_SUCCESSFUL_CAST)
+ return;
+
switch (spell->Id)
{
case SPELL_APOCALYPSE_DRIVE_FINAL_DAMAGE: