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/game/AI/ScriptedAI | |
| 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/game/AI/ScriptedAI')
| -rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 7 |
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 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 |
