diff options
author | _manuel_ <manue.l@live.com.ar> | 2010-03-11 16:42:40 -0300 |
---|---|---|
committer | _manuel_ <manue.l@live.com.ar> | 2010-03-11 16:42:40 -0300 |
commit | 02a9cd6a43a18f2350801bd9473c2346b36b0575 (patch) | |
tree | 63e92bcbaa7c5d46d0bcdc72e61fe4828027543c /src | |
parent | 01ee5399a700b5b67e4f64a8847178c8ff62af5a (diff) |
Improvements in boss_four_horsemen script.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/scripts/northrend/naxxramas/boss_four_horsemen.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 43ca22e7a21..acb0d9e6eed 100644 --- a/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -88,7 +88,7 @@ struct boss_four_horsemenAI : public BossAI } Horsemen id; - Unit *eventStarter; + uint64 uiEventStarterGUID; uint8 nextWP; uint32 punishTimer; bool caster; @@ -105,7 +105,7 @@ struct boss_four_horsemenAI : public BossAI DoEncounterAction(NULL, false, true, false); me->SetReactState(REACT_AGGRESSIVE); - eventStarter = NULL; + uiEventStarterGUID = 0; nextWP = 0; punishTimer = 2000; nextMovementStarted = false; @@ -210,7 +210,9 @@ struct boss_four_horsemenAI : public BossAI movementCompleted = true; me->SetReactState(REACT_AGGRESSIVE); - if (me->canAttack(eventStarter)) + Unit *eventStarter = Unit::GetUnit(*me, uiEventStarterGUID); + + if (eventStarter && me->canAttack(eventStarter)) AttackStart(eventStarter); else if (!UpdateVictim()) { @@ -242,7 +244,7 @@ struct boss_four_horsemenAI : public BossAI { if (!movementCompleted && !movementStarted) { - eventStarter = who; + uiEventStarterGUID = who->GetGUID(); BeginFourHorsemenMovement(); if (!encounterActionAttack) |