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/game/AI/ScriptedAI/ScriptedCreature.cpp | 4 ++-- src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src/server/game/AI/ScriptedAI') diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index f58cd12829f..d57dc6c4c24 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -54,7 +54,7 @@ void SummonList::DoZoneInCombat(uint32 entry) { Creature* summon = ObjectAccessor::GetCreature(*me, *i); ++i; - if (summon && summon->IsAIEnabled + if (summon && summon->IsAIEnabled() && (!entry || summon->GetEntry() == entry)) { summon->AI()->DoZoneInCombat(nullptr); @@ -118,7 +118,7 @@ void SummonList::DoActionImpl(int32 action, StorageType const& summons) for (auto const& guid : summons) { Creature* summon = ObjectAccessor::GetCreature(*me, guid); - if (summon && summon->IsAIEnabled) + if (summon && summon->IsAIEnabled()) summon->AI()->DoAction(action); } } diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index c82ad99911a..56675f48218 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -154,13 +154,6 @@ void EscortAI::MovementInform(uint32 type, uint32 id) } } -///@todo investigate whether if its necessary to handle anything on charm -/* -void EscortAI::OnCharmed(bool apply) -{ -} -*/ - void EscortAI::UpdateAI(uint32 diff) { // Waypoint Updating -- cgit v1.2.3