diff options
author | Wyrserth <wyrserth@protonmail.com> | 2019-06-25 18:06:20 +0200 |
---|---|---|
committer | Wyrserth <wyrserth@protonmail.com> | 2019-06-25 18:06:20 +0200 |
commit | c95531595e666c64829499d2bc920cf5b848bbe2 (patch) | |
tree | c35f4ca07986ce63e6834cf9a6175c692f225550 | |
parent | c0b25c9a83126bfd26da8245a31ea684008d804d (diff) |
Core/SAI: silence wrong SAI error when using SMART_ACTION_SET_DATA on a creature using CreatureAI.
This behavior is fully allowed and should not report any kind of error.
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 0f90e4299a1..ef9a92c8f92 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1152,7 +1152,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (Creature* cTarget = target->ToCreature()) { CreatureAI* ai = cTarget->AI(); - if (IsSmart(cTarget)) + if (IsSmart(cTarget, true)) ENSURE_AI(SmartAI, ai)->SetData(e.action.setData.field, e.action.setData.data, me); else ai->SetData(e.action.setData.field, e.action.setData.data); @@ -1160,7 +1160,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u else if (GameObject* oTarget = target->ToGameObject()) { GameObjectAI* ai = oTarget->AI(); - if (IsSmart(oTarget)) + if (IsSmart(oTarget, true)) ENSURE_AI(SmartGameObjectAI, ai)->SetData(e.action.setData.field, e.action.setData.data, me); else ai->SetData(e.action.setData.field, e.action.setData.data); |