Core/SAI: Add SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER

Port From (https://github.com/TrinityCore/TrinityCore/commit/f383c0ea214cc4da2d02b81e26297d77ff59c7ed)
This commit is contained in:
hondacrx
2022-02-27 14:29:40 -05:00
parent a36cc8ba2e
commit 6df3ca3a3b
5 changed files with 65 additions and 6 deletions
@@ -1588,6 +1588,15 @@ namespace Game.AI
case SmartActions.DespawnSpawngroup:
case SmartActions.AddToStoredTargetList:
break;
case SmartActions.BecomePersonalCloneForPlayer:
{
if (e.Action.becomePersonalClone.type < (uint)TempSummonType.TimedOrDeadDespawn || e.Action.becomePersonalClone.type > (uint)TempSummonType.ManualDespawn)
{
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} uses incorrect TempSummonType {e.Action.becomePersonalClone.type}, skipped.");
return false;
}
break;
}
default:
Log.outError(LogFilter.ScriptsAi, "SmartAIMgr: Not handled action_type({0}), event_type({1}), Entry {2} SourceType {3} Event {4}, skipped.", e.GetActionType(), e.GetEventType(), e.EntryOrGuid, e.GetScriptType(), e.EventId);
return false;
@@ -2619,6 +2628,9 @@ namespace Game.AI
[FieldOffset(4)]
public AddToStoredTargets addToStoredTargets;
[FieldOffset(4)]
public BecomePersonalClone becomePersonalClone;
[FieldOffset(4)]
public Raw raw;
@@ -3162,6 +3174,11 @@ namespace Game.AI
{
public uint id;
}
public struct BecomePersonalClone
{
public uint type;
public uint duration;
}
public struct Raw
{
public uint param1;