aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRat <none@none>2009-08-12 23:45:02 +0200
committerRat <none@none>2009-08-12 23:45:02 +0200
commit348116f6f8c115c1505dc6521551618f9c5cbbcf (patch)
tree2730a88c05c9e5a2e54f19af60b486d0714ea948
parentc2b2611a42e16d67883416a7f334ec30b3531fff (diff)
*fix Teron Gorefiend reset-loop bug
--HG-- branch : trunk
-rw-r--r--src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp12
1 files changed, 7 insertions, 5 deletions
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)