diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2018-08-23 14:33:28 +0200 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2018-08-23 16:34:42 +0200 |
| commit | 042f5515e4f3e52b0d2e23d9b9e147041849ce12 (patch) | |
| tree | e9bd421089edfd6098a96300393d086875f9a054 /src/server/scripts/Commands | |
| parent | 0e4a49b0a4c86eb4a2d0d128e24bc8aaabb47e31 (diff) | |
Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 90785c53017..59ea2cde03c 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1615,10 +1615,8 @@ public: if (!player) return false; Creature* target = handler->getSelectedCreature(); - if (!target || !target->IsAIEnabled || !target->AI()) - { + if (!target || !target->IsAIEnabled()) return false; - } char* fill_str = args ? strtok((char*)args, " ") : nullptr; char* duration_str = args ? strtok(nullptr, " ") : nullptr; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index edfa6d15d89..db606da8c86 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -1502,7 +1502,7 @@ public: return false; } - if (!creatureTarget->IsAIEnabled) + if (!creatureTarget->IsAIEnabled()) { handler->PSendSysMessage(LANG_CREATURE_NOT_AI_ENABLED); handler->SetSentErrorMessage(true); |
