From 348116f6f8c115c1505dc6521551618f9c5cbbcf Mon Sep 17 00:00:00 2001 From: Rat Date: Wed, 12 Aug 2009 23:45:02 +0200 Subject: *fix Teron Gorefiend reset-loop bug --HG-- branch : trunk --- .../scripts/zone/black_temple/boss_teron_gorefiend.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp index 4382be2c8ca..583c5ed85ad 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp @@ -203,6 +203,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI uint64 GhostGUID; // Player that gets killed by Shadow of Death and gets turned into a ghost bool Intro; + bool Done; void Reset() { @@ -223,6 +224,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI AggroTimer = 20000; AggroTargetGUID = 0; Intro = false; + Done = false; } void EnterCombat(Unit *who) {} @@ -244,8 +246,8 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI Intro = true; } } - - ScriptedAI::MoveInLineOfSight(pWho); + if(Done) + ScriptedAI::MoveInLineOfSight(pWho); } void KilledUnit(Unit *victim) @@ -344,7 +346,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(Intro) + if(Intro && !Done) { if(AggroTimer < diff) { @@ -352,7 +354,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); DoScriptText(SAY_AGGRO, m_creature); m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); - Intro = false; + Done = true; if(AggroTargetGUID) { Unit* pUnit = Unit::GetUnit((*m_creature), AggroTargetGUID); @@ -369,7 +371,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI }else AggroTimer -= diff; } - if(!UpdateVictim() || Intro) + if(!UpdateVictim() || !Done) return; if(SummonShadowsTimer < diff) -- cgit v1.2.3