feat(Core/SAI): Implement SMART_ACTION_DISMOUNT (206) (#20899)

This commit is contained in:
Andrew
2024-12-12 02:11:42 -03:00
committed by GitHub
parent 4c54f7e171
commit d94dda9d93
4 changed files with 18 additions and 1 deletions

View File

@@ -2605,6 +2605,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
ProcessEventsFor((SMART_EVENT)SMART_EVENT_TIMED_EVENT_TRIGGERED, nullptr, eventId);
break;
}
case SMART_ACTION_DISMOUNT:
{
for (WorldObject* const target : targets)
if (IsUnit(target))
target->ToUnit()->Dismount();
break;
}
case SMART_ACTION_SET_HOVER:
{
for (WorldObject* target : targets)

View File

@@ -2015,6 +2015,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_FLEE:
case SMART_ACTION_ADD_THREAT:
case SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT:
case SMART_ACTION_DISMOUNT:
case SMART_ACTION_SET_HOVER:
case SMART_ACTION_ADD_IMMUNITY:
case SMART_ACTION_REMOVE_IMMUNITY:

View File

@@ -705,7 +705,7 @@ enum SMART_ACTION
SMART_ACTION_EXIT_VEHICLE = 203, // none
SMART_ACTION_SET_UNIT_MOVEMENT_FLAGS = 204, // flags
SMART_ACTION_SET_COMBAT_DISTANCE = 205, // combatDistance
// UNUSED = 206,
SMART_ACTION_DISMOUNT = 206,
SMART_ACTION_SET_HOVER = 207, // 0/1
SMART_ACTION_ADD_IMMUNITY = 208, // type, id, value
SMART_ACTION_REMOVE_IMMUNITY = 209, // type, id, value