mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/SAI: Add action SMART_ACTION_JUMP_TO_POS.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user