aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureEventAI.cpp
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-11-13 16:26:01 +0100
committerKudlaty <none@none>2009-11-13 16:26:01 +0100
commitf04da1b620c3510cb9329d8efdb4efeebd83cf48 (patch)
treef2e87018e7591d8a02f7a78d4449c9aa2f09987d /src/game/CreatureEventAI.cpp
parent18576dab740033c4b096b2482cb4d2e17692fb18 (diff)
Apply #239
EventAI: New Actions: *ACTION_T_MOVE_RANDOM_POINT: _param1, determines the range that can be the random point. *ACTION_T_SET_STAND_STATE: _param1, determines the stand state using the enum UnitStandStateType. *ACTION_T_SET_PHASE_MASK: _param1, determines the phase mask. *ACTION_T_SET_VISIBILITY: _param1, determines the visibility state using the enum UnitVisibility. patch by manuel --HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureEventAI.cpp')
-rw-r--r--src/game/CreatureEventAI.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index 444e4981ab1..f50f7e4128b 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -755,6 +755,22 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
break;
// TRINITY ONLY
+ case ACTION_T_MOVE_RANDOM_POINT: //dosen't work in combat
+ {
+ float x,y,z;
+ me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, action.raw.param1);
+ me->GetMotionMaster()->MovePoint(0,x,y,z);
+ break;
+ }
+ case ACTION_T_SET_STAND_STATE:
+ me->SetStandState(UnitStandStateType(action.raw.param1));
+ break;
+ case ACTION_T_SET_PHASE_MASK:
+ me->SetPhaseMask(action.raw.param1, true);
+ break;
+ case ACTION_T_SET_VISIBILITY:
+ me->SetVisibility(UnitVisibility(action.raw.param1));
+ break;
case ACTION_T_SET_ACTIVE:
me->setActive(action.raw.param1 ? true : false);
break;