From 410caaae4111aed1b0c4c55db3fed3dd65258b2e Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 30 May 2022 13:11:20 -0400 Subject: [PATCH] Core/SAI: Make 'no, thanks' actions deprecated Port From (https://github.com/TrinityCore/TrinityCore/commit/6ac4e9dd4a9fbe74113810d0f4942ebdb9946d8a) --- Source/Game/AI/SmartScripts/SmartAIManager.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/Game/AI/SmartScripts/SmartAIManager.cs b/Source/Game/AI/SmartScripts/SmartAIManager.cs index 37a84fafb..13aa16c41 100644 --- a/Source/Game/AI/SmartScripts/SmartAIManager.cs +++ b/Source/Game/AI/SmartScripts/SmartAIManager.cs @@ -2166,6 +2166,24 @@ namespace Game.AI return false; } + // Additional check for deprecated + switch (e.GetActionType()) + { + // Deprecated + case SmartActions.SetSwim: + case SmartActions.OverrideScriptBaseObject: + case SmartActions.ResetScriptBaseObject: + case SmartActions.SetCanFly: + case SmartActions.RemoveAurasByType: + case SmartActions.SetSightDist: + case SmartActions.Flee: + case SmartActions.RemoveAllGameobjects: + Log.outWarn(LogFilter.Sql, $"SmartAIMgr: Deprecated action_type: {e}, it might be removed in the future, loaded for now."); + break; + default: + break; + } + if (!CheckUnusedActionParams(e)) return false;