mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 22:19:54 -04:00
Core/SAI: Implement new action to set movement speed
This commit is contained in:
@@ -1492,6 +1492,22 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_MOVEMENT_SPEED:
|
||||
{
|
||||
if (e.action.movementSpeed.movementType >= MAX_MOVE_TYPE)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses invalid movementType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.movementSpeed.movementType);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!e.action.movementSpeed.speedInteger && !e.action.movementSpeed.speedFraction)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses speed 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_START_CLOSEST_WAYPOINT:
|
||||
case SMART_ACTION_FOLLOW:
|
||||
case SMART_ACTION_SET_ORIENTATION:
|
||||
|
||||
Reference in New Issue
Block a user