diff options
author | Wyrserth <wyrserth@protonmail.com> | 2019-06-25 18:06:20 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-13 00:42:16 +0100 |
commit | e8c1adcf8f28a7ce90113175c732b98556c6bbb8 (patch) | |
tree | 676be14d2b7becb4c373c6e8d9a47744b4b4dba9 | |
parent | 4c2cad4301c88ee879c812a4bf5d69ceb46d96bc (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.
(cherry picked from commit c95531595e666c64829499d2bc920cf5b848bbe2)
-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 23f19558f52..164ef1fa927 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1190,7 +1190,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); @@ -1198,7 +1198,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); |