From 3126ac721dd1e1e614f48dc4e0d19b866c63d9ee Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 24 Dec 2021 20:51:13 -0500 Subject: [PATCH] Core/SAI: silence wrong SAI error when using SMART_ACTION_SET_DATA on a creature using CreatureAI. Port From (https://github.com/TrinityCore/TrinityCore/commit/e8c1adcf8f28a7ce90113175c732b98556c6bbb8) --- Source/Game/AI/SmartScripts/SmartScript.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/AI/SmartScripts/SmartScript.cs b/Source/Game/AI/SmartScripts/SmartScript.cs index d44802023..08b1f4fc1 100644 --- a/Source/Game/AI/SmartScripts/SmartScript.cs +++ b/Source/Game/AI/SmartScripts/SmartScript.cs @@ -1100,7 +1100,7 @@ namespace Game.AI if (cTarget != null) { CreatureAI ai = cTarget.GetAI(); - if (IsSmart(cTarget)) + if (IsSmart(cTarget, true)) ((SmartAI)ai).SetData(e.Action.setData.field, e.Action.setData.data, _me); else ai.SetData(e.Action.setData.field, e.Action.setData.data); @@ -1111,7 +1111,7 @@ namespace Game.AI if (oTarget != null) { GameObjectAI ai = oTarget.GetAI(); - if (IsSmart(oTarget)) + if (IsSmart(oTarget, true)) ((SmartGameObjectAI)ai).SetData(e.Action.setData.field, e.Action.setData.data, _me); else ai.SetData(e.Action.setData.field, e.Action.setData.data);