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)
This commit is contained in:
@@ -1100,7 +1100,7 @@ namespace Game.AI
|
|||||||
if (cTarget != null)
|
if (cTarget != null)
|
||||||
{
|
{
|
||||||
CreatureAI ai = cTarget.GetAI();
|
CreatureAI ai = cTarget.GetAI();
|
||||||
if (IsSmart(cTarget))
|
if (IsSmart(cTarget, true))
|
||||||
((SmartAI)ai).SetData(e.Action.setData.field, e.Action.setData.data, _me);
|
((SmartAI)ai).SetData(e.Action.setData.field, e.Action.setData.data, _me);
|
||||||
else
|
else
|
||||||
ai.SetData(e.Action.setData.field, e.Action.setData.data);
|
ai.SetData(e.Action.setData.field, e.Action.setData.data);
|
||||||
@@ -1111,7 +1111,7 @@ namespace Game.AI
|
|||||||
if (oTarget != null)
|
if (oTarget != null)
|
||||||
{
|
{
|
||||||
GameObjectAI ai = oTarget.GetAI();
|
GameObjectAI ai = oTarget.GetAI();
|
||||||
if (IsSmart(oTarget))
|
if (IsSmart(oTarget, true))
|
||||||
((SmartGameObjectAI)ai).SetData(e.Action.setData.field, e.Action.setData.data, _me);
|
((SmartGameObjectAI)ai).SetData(e.Action.setData.field, e.Action.setData.data, _me);
|
||||||
else
|
else
|
||||||
ai.SetData(e.Action.setData.field, e.Action.setData.data);
|
ai.SetData(e.Action.setData.field, e.Action.setData.data);
|
||||||
|
|||||||
Reference in New Issue
Block a user