aboutsummaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-29 17:14:47 -0500
committermegamage <none@none>2009-08-29 17:14:47 -0500
commit69c487abe51ac655b1f9cd4bc7388fb01e30fb0e (patch)
tree41714f3abf1ecbd78f2fdc8c5f1adce57e06b7c7 /src/bindings
parent13eda038fd1c31565672191da20bac9cd392e60e (diff)
*Handle creature rotation using movement generator. Please tell me if this breaks any script.
--HG-- branch : trunk
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
index fcc9c70a0f7..81df36cf986 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
@@ -163,6 +163,12 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
}
}
+ void MovementInform(uint32 type, uint32 id)
+ {
+ if(type == ROTATE_MOTION_TYPE)
+ me->SetReactState(REACT_AGGRESSIVE);
+ }
+
void UpdateAI(const uint32 diff)
{
if(!CanStartEvent)//boss is invisible, don't attack
@@ -216,10 +222,8 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
if (SpoutTimer < diff)
{
m_creature->MonsterTextEmote(EMOTE_SPOUT,0,true);
- if(rand()%2)
- m_creature->StartAutoRotate(CREATURE_ROTATE_LEFT,20000);
- else
- m_creature->StartAutoRotate(CREATURE_ROTATE_RIGHT,20000);
+ me->SetReactState(REACT_PASSIVE);
+ me->GetMotionMaster()->MoveRotate(20000, rand()%2 ? ROTATE_DIRECTION_LEFT : ROTATE_DIRECTION_RIGHT);
SpoutTimer = 45000;
WhirlTimer = 20000;//whirl directly after spout
RotTimer = 20000;
@@ -298,7 +302,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
}else WaterboltTimer -= diff;
}
- if (!UpdateVictim())
+ if (!UpdateCombatState())
return;
DoMeleeAttackIfReady();