Core/SAI: Add action SMART_ACTION_JUMP_TO_POS.

This commit is contained in:
Jesper Meyer
2011-07-02 07:52:03 +02:00
parent b7ed8b7c66
commit b216522b3d
3 changed files with 15 additions and 1 deletions

View File

@@ -1776,6 +1776,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
delete targets;
break;
}
case SMART_ACTION_JUMP_TO_POS:
{
me->GetMotionMaster()->MoveJump(e.target.x, e.target.y , e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz);
break;
}
default:
sLog->outErrorDb("SmartScript::ProcessAction: Unhandled Action type %u", e.GetActionType());
break;

View File

@@ -774,6 +774,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_ACTION_SET_DYNAMIC_FLAG:
case SMART_ACTION_ADD_DYNAMIC_FLAG:
case SMART_ACTION_REMOVE_DYNAMIC_FLAG:
case SMART_ACTION_JUMP_TO_POS:
break;
default:
sLog->outErrorDb("SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);

View File

@@ -461,8 +461,9 @@ enum SMART_ACTION
SMART_ACTION_SET_DYNAMIC_FLAG = 94, // Flags
SMART_ACTION_ADD_DYNAMIC_FLAG = 95, // Flags
SMART_ACTION_REMOVE_DYNAMIC_FLAG = 96, // Flags
SMART_ACTION_JUMP_TO_POS = 97, // speedXY, speedZ, targetX, targetY, targetZ
SMART_ACTION_END = 97,
SMART_ACTION_END = 98,
};
struct SmartAction
@@ -844,6 +845,13 @@ struct SmartAction
{
uint32 anim;
} sendGoCustomAnim;
struct
{
uint32 speedxy;
uint32 speedz;
} jump;
struct
{
uint32 param1;