mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user