Core/SAI: Added Action SMART_ACTION_DO_ACTION for calling DoAction on target AI (#27964)

This commit is contained in:
Antonio Martín Berti
2022-06-08 10:50:44 -03:00
committed by GitHub
parent be800a983f
commit a4eafbd3f6
3 changed files with 27 additions and 1 deletions
@@ -1006,6 +1006,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_ADD_TO_STORED_TARGET_LIST: return sizeof(SmartAction::addToStoredTargets);
case SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER: return sizeof(SmartAction::becomePersonalClone);
case SMART_ACTION_TRIGGER_GAME_EVENT: return sizeof(SmartAction::triggerGameEvent);
case SMART_ACTION_DO_ACTION: return sizeof(SmartAction::doAction);
default:
TC_LOG_WARN("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
@@ -2299,6 +2300,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SPAWN_SPAWNGROUP:
case SMART_ACTION_DESPAWN_SPAWNGROUP:
case SMART_ACTION_ADD_TO_STORED_TARGET_LIST:
case SMART_ACTION_DO_ACTION:
break;
case SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER:
{