aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/ScriptedAI
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-08-23 14:33:28 +0200
committerShauren <shauren.trinity@gmail.com>2021-10-22 23:47:51 +0200
commite4e8c1c59c8b37216814526b4d2551f23934f465 (patch)
treea135fb3fc2adff0bded65f29d0e165b668a63c5c /src/server/game/AI/ScriptedAI
parent6a91fe3fbe28e3bf36ab6107b9c6cbb842f65262 (diff)
Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans
(cherry picked from commit 042f5515e4f3e52b0d2e23d9b9e147041849ce12)
Diffstat (limited to 'src/server/game/AI/ScriptedAI')
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp4
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp7
2 files changed, 2 insertions, 9 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index 88fd051f2aa..69681e171aa 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -47,7 +47,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);
@@ -111,7 +111,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 a3231bc79b3..adbfa359177 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -151,13 +151,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