From 4aa4509db09d8d389a82537b36446c9f639571aa Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 29 May 2022 16:24:09 -0400 Subject: [PATCH] Core/SAI: Remove SMART_ACTION_SET_DYNAMIC_FLAG Port From (https://github.com/TrinityCore/TrinityCore/commit/842eb3bdd7e18e7f069e8aafd99145a62f82900c) --- Source/Framework/Constants/SmartAIConst.cs | 2 +- Source/Game/AI/SmartScripts/SmartAIManager.cs | 2 -- Source/Game/AI/SmartScripts/SmartScript.cs | 7 ------- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Source/Framework/Constants/SmartAIConst.cs b/Source/Framework/Constants/SmartAIConst.cs index 687137bd2..4c6963c75 100644 --- a/Source/Framework/Constants/SmartAIConst.cs +++ b/Source/Framework/Constants/SmartAIConst.cs @@ -348,7 +348,7 @@ namespace Framework.Constants RemoveUnitFieldBytes1 = 91, // Bytes, Target InterruptSpell = 92, SendGoCustomAnim = 93, // Anim Id - SetDynamicFlag = 94, // Flags + //Unused94 = 94, // do not reuse 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 ceb2485eb..51829cec6 100644 --- a/Source/Game/AI/SmartScripts/SmartAIManager.cs +++ b/Source/Game/AI/SmartScripts/SmartAIManager.cs @@ -783,7 +783,6 @@ namespace Game.AI SmartActions.RemoveUnitFieldBytes1 => Marshal.SizeOf(typeof(SmartAction.DelunitByte)), SmartActions.InterruptSpell => Marshal.SizeOf(typeof(SmartAction.InterruptSpellCasting)), SmartActions.SendGoCustomAnim => Marshal.SizeOf(typeof(SmartAction.SendGoCustomAnim)), - SmartActions.SetDynamicFlag => Marshal.SizeOf(typeof(SmartAction.Flag)), SmartActions.AddDynamicFlag => Marshal.SizeOf(typeof(SmartAction.Flag)), SmartActions.RemoveDynamicFlag => Marshal.SizeOf(typeof(SmartAction.Flag)), SmartActions.JumpToPos => Marshal.SizeOf(typeof(SmartAction.Jump)), @@ -2140,7 +2139,6 @@ namespace Game.AI case SmartActions.SetUnitFieldBytes1: case SmartActions.RemoveUnitFieldBytes1: case SmartActions.SendGoCustomAnim: - case SmartActions.SetDynamicFlag: case SmartActions.AddDynamicFlag: case SmartActions.RemoveDynamicFlag: case SmartActions.JumpToPos: diff --git a/Source/Game/AI/SmartScripts/SmartScript.cs b/Source/Game/AI/SmartScripts/SmartScript.cs index 1ae45b5ca..05fcff099 100644 --- a/Source/Game/AI/SmartScripts/SmartScript.cs +++ b/Source/Game/AI/SmartScripts/SmartScript.cs @@ -1914,13 +1914,6 @@ namespace Game.AI target.ToGameObject().SendCustomAnim(e.Action.sendGoCustomAnim.anim); break; } - case SmartActions.SetDynamicFlag: - { - foreach (var target in targets) - if (IsUnit(target)) - target.ToUnit().SetDynamicFlags((UnitDynFlags)e.Action.flag.flag); - break; - } case SmartActions.AddDynamicFlag: { foreach (var target in targets)