From 042f5515e4f3e52b0d2e23d9b9e147041849ce12 Mon Sep 17 00:00:00 2001 From: Treeston Date: Thu, 23 Aug 2018 14:33:28 +0200 Subject: Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans --- src/server/scripts/Commands/cs_debug.cpp | 4 +--- src/server/scripts/Commands/cs_npc.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/server/scripts/Commands') 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); -- cgit v1.2.3