Core/SAI: Added Action SMART_ACTION_DO_ACTION for calling DoAction on target AI

Port From (https://github.com/TrinityCore/TrinityCore/commit/a4eafbd3f6a4d4ea4934dca564cd6c4beae54280)
This commit is contained in:
hondacrx
2022-06-14 17:57:47 -04:00
parent f95aec30d8
commit 793fbda3cd
3 changed files with 27 additions and 0 deletions
@@ -805,6 +805,7 @@ namespace Game.AI
SmartActions.AddToStoredTargetList => Marshal.SizeOf(typeof(SmartAction.AddToStoredTargets)),
SmartActions.BecomePersonalCloneForPlayer => Marshal.SizeOf(typeof(SmartAction.BecomePersonalClone)),
SmartActions.TriggerGameEvent => Marshal.SizeOf(typeof(SmartAction.TriggerGameEvent)),
SmartActions.DoAction => Marshal.SizeOf(typeof(SmartAction.DoAction)),
_ => Marshal.SizeOf(typeof(SmartAction.Raw)),
};
@@ -2071,6 +2072,7 @@ namespace Game.AI
case SmartActions.TriggerRandomTimedEvent:
case SmartActions.SpawnSpawngroup:
case SmartActions.AddToStoredTargetList:
case SmartActions.DoAction:
break;
case SmartActions.BecomePersonalCloneForPlayer:
{
@@ -3136,6 +3138,9 @@ namespace Game.AI
[FieldOffset(4)]
public TriggerGameEvent triggerGameEvent;
[FieldOffset(4)]
public DoAction doAction;
[FieldOffset(4)]
public Raw raw;
@@ -3674,6 +3679,10 @@ namespace Game.AI
public uint eventId;
public uint useSaiTargetAsGameEventSource;
}
public struct DoAction
{
public uint actionId;
}
public struct Raw
{
public uint param1;