diff --git a/Source/Framework/Constants/SmartAIConst.cs b/Source/Framework/Constants/SmartAIConst.cs index 80e0aaaff..e264d36ba 100644 --- a/Source/Framework/Constants/SmartAIConst.cs +++ b/Source/Framework/Constants/SmartAIConst.cs @@ -301,7 +301,7 @@ namespace Framework.Constants WpStop = 55, // Despawntime, Quest, Fail? AddItem = 56, // Itemid, Count RemoveItem = 57, // Itemid, Count - //Unused58 = 58, // do not reuse + InstallAITemplate = 58, // do not use SetRun = 59, // 0/1 SetDisableGravity = 60, // 0/1 SetSwim = 61, // 0/1 @@ -337,7 +337,7 @@ namespace Framework.Constants RemoveUnitFieldBytes1 = 91, // Bytes, Target InterruptSpell = 92, SendGoCustomAnim = 93, // Anim Id - //Unused94 = 94, // do not reuse + SetDynamicFlag = 94, // do not use AddDynamicFlag = 95, // Flags RemoveDynamicFlag = 96, // Flags JumpToPos = 97, // Speedxy, Speedz, Targetx, Targety, Targetz diff --git a/Source/Game/AI/SmartScripts/SmartAIManager.cs b/Source/Game/AI/SmartScripts/SmartAIManager.cs index 224ff2a7c..85b402c19 100644 --- a/Source/Game/AI/SmartScripts/SmartAIManager.cs +++ b/Source/Game/AI/SmartScripts/SmartAIManager.cs @@ -1362,6 +1362,19 @@ namespace Game.AI Log.outError(LogFilter.ScriptsAi, "SmartAIMgr: Not handled event_type({0}), Entry {1} SourceType {2} Event {3} Action {4}, skipped.", e.GetEventType(), e.EntryOrGuid, e.GetScriptType(), e.EventId, e.GetActionType()); return false; } + + // Additional check for deprecated + switch (e.GetEventType()) + { + // Deprecated + case SmartEvents.FriendlyHealth: + case SmartEvents.TargetHealthPct: + case SmartEvents.IsBehindTarget: + Log.outWarn(LogFilter.Sql, $"SmartAIMgr: Deprecated event_type({e.GetEventType()}), {e}, it might be removed in the future, loaded for now."); + break; + default: + break; + } } if (!CheckUnusedEventParams(e)) @@ -2148,6 +2161,11 @@ namespace Game.AI } break; } + // No longer supported + case SmartActions.InstallAITemplate: + case SmartActions.SetDynamicFlag: + Log.outError(LogFilter.Sql, $"SmartAIMgr: No longer supported action_type: {e} Skipped."); + return false; 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;