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
This commit is contained in:
Kudlaty
2009-11-13 16:26:01 +01:00
parent 18576dab74
commit f04da1b620
3 changed files with 27 additions and 3 deletions

View File

@@ -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;