Core/SAI: Implemented new action SMART_ACTION_TRIGGER_GAME_EVENT
Port From (https://github.com/TrinityCore/TrinityCore/commit/9d0187dd5669d73bcb94ffe76b4fc3975a5455cc)
This commit is contained in:
@@ -804,6 +804,7 @@ namespace Game.AI
|
||||
SmartActions.ActivateGameobject => Marshal.SizeOf(typeof(SmartAction.ActivateGameObject)),
|
||||
SmartActions.AddToStoredTargetList => Marshal.SizeOf(typeof(SmartAction.AddToStoredTargets)),
|
||||
SmartActions.BecomePersonalCloneForPlayer => Marshal.SizeOf(typeof(SmartAction.BecomePersonalClone)),
|
||||
SmartActions.TriggerGameEvent => Marshal.SizeOf(typeof(SmartAction.TriggerGameEvent)),
|
||||
_ => Marshal.SizeOf(typeof(SmartAction.Raw)),
|
||||
};
|
||||
|
||||
@@ -2088,6 +2089,11 @@ namespace Game.AI
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SmartActions.TriggerGameEvent:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.Action.triggerGameEvent.useSaiTargetAsGameEventSource);
|
||||
break;
|
||||
}
|
||||
// No longer supported
|
||||
case SmartActions.SetUnitFlag:
|
||||
case SmartActions.RemoveUnitFlag:
|
||||
@@ -3135,6 +3141,9 @@ namespace Game.AI
|
||||
[FieldOffset(4)]
|
||||
public BecomePersonalClone becomePersonalClone;
|
||||
|
||||
[FieldOffset(4)]
|
||||
public TriggerGameEvent triggerGameEvent;
|
||||
|
||||
[FieldOffset(4)]
|
||||
public Raw raw;
|
||||
|
||||
@@ -3668,6 +3677,11 @@ namespace Game.AI
|
||||
public uint type;
|
||||
public uint duration;
|
||||
}
|
||||
public struct TriggerGameEvent
|
||||
{
|
||||
public uint eventId;
|
||||
public uint useSaiTargetAsGameEventSource;
|
||||
}
|
||||
public struct Raw
|
||||
{
|
||||
public uint param1;
|
||||
|
||||
Reference in New Issue
Block a user