aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-05-27 00:39:32 -0300
committerfunjoker <funjoker109@gmail.com>2020-06-14 23:49:03 +0200
commitb161447b47ffa2b37a640ee403fdddd32fdca57f (patch)
tree1beeb0172105911c719ad3383f02ae8b6053380d
parenta3439b6555759f533194ed0da98c5b08ae58cf4a (diff)
Scripts/VioletHold: fix stack overflow when reflecting 'Splash'
Closes #19514 (cherry picked from commit d9a1c82ab44254c280083e6297b8aec6350ab363)
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index 042b8dad906..8d7231d2ea3 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -243,7 +243,7 @@ class npc_ichor_globule : public CreatureScript
struct npc_ichor_globuleAI : public ScriptedAI
{
- npc_ichor_globuleAI(Creature* creature) : ScriptedAI(creature)
+ npc_ichor_globuleAI(Creature* creature) : ScriptedAI(creature), _splashTriggered(false)
{
_instance = creature->GetInstanceScript();
creature->SetReactState(REACT_PASSIVE);
@@ -275,14 +275,21 @@ class npc_ichor_globule : public CreatureScript
// this feature should be still implemented
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
{
+ if (_splashTriggered)
+ return;
+
if (damage >= me->GetHealth())
+ {
+ _splashTriggered = true;
DoCastAOE(SPELL_SPLASH);
+ }
}
void UpdateAI(uint32 /*diff*/) override { }
private:
InstanceScript* _instance;
+ bool _splashTriggered;
};
CreatureAI* GetAI(Creature* creature) const override