Core/SAI: Remove SMART_ACTION_INSTALL_AI_TEMPLATE
Port From (https://github.com/TrinityCore/TrinityCore/commit/7d9088e9cf1104c5c21d350a9d7e93c1a8fe8ef5)
This commit is contained in:
@@ -448,9 +448,6 @@ namespace Game.AI
|
||||
if (Math.Abs(e.Target.o) > 2 * MathFunctions.PI)
|
||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} has abs(`target.o` = {e.Target.o}) > 2*PI (orientation is expressed in radians)");
|
||||
|
||||
if (e.GetActionType() == SmartActions.InstallAiTemplate)
|
||||
return true; // AI template has special handling
|
||||
|
||||
switch (e.GetTargetType())
|
||||
{
|
||||
case SmartTargets.CreatureDistance:
|
||||
@@ -747,7 +744,6 @@ namespace Game.AI
|
||||
SmartActions.WpStop => Marshal.SizeOf(typeof(SmartAction.WpStop)),
|
||||
SmartActions.AddItem => Marshal.SizeOf(typeof(SmartAction.Item)),
|
||||
SmartActions.RemoveItem => Marshal.SizeOf(typeof(SmartAction.Item)),
|
||||
SmartActions.InstallAiTemplate => Marshal.SizeOf(typeof(SmartAction.InstallTtemplate)),
|
||||
SmartActions.SetRun => Marshal.SizeOf(typeof(SmartAction.SetRun)),
|
||||
SmartActions.SetDisableGravity => Marshal.SizeOf(typeof(SmartAction.SetDisableGravity)),
|
||||
SmartActions.SetSwim => Marshal.SizeOf(typeof(SmartAction.SetSwim)),
|
||||
@@ -1677,13 +1673,6 @@ namespace Game.AI
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SmartActions.InstallAiTemplate:
|
||||
if (e.Action.installTtemplate.id >= (uint)SmartAITemplate.End)
|
||||
{
|
||||
Log.outError(LogFilter.ScriptsAi, "SmartAIMgr: Creature {0} Event {1} Action {2} uses non-existent AI template id {3}, skipped.", e.EntryOrGuid, e.EventId, e.GetActionType(), e.Action.installTtemplate.id);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SmartActions.WpStop:
|
||||
if (e.Action.wpStop.quest != 0 && !IsQuestValid(e, e.Action.wpStop.quest))
|
||||
return false;
|
||||
@@ -3040,9 +3029,6 @@ namespace Game.AI
|
||||
[FieldOffset(4)]
|
||||
public Item item;
|
||||
|
||||
[FieldOffset(4)]
|
||||
public InstallTtemplate installTtemplate;
|
||||
|
||||
[FieldOffset(4)]
|
||||
public SetRun setRun;
|
||||
|
||||
@@ -3471,15 +3457,6 @@ namespace Game.AI
|
||||
public uint entry;
|
||||
public uint count;
|
||||
}
|
||||
public struct InstallTtemplate
|
||||
{
|
||||
public uint id;
|
||||
public uint param1;
|
||||
public uint param2;
|
||||
public uint param3;
|
||||
public uint param4;
|
||||
public uint param5;
|
||||
}
|
||||
public struct SetRun
|
||||
{
|
||||
public uint run;
|
||||
|
||||
Reference in New Issue
Block a user