diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2019-08-01 18:32:26 +0200 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2019-08-01 18:32:26 +0200 |
| commit | 3d4bebd8d9210fbb84f8fc75742e248071192b09 (patch) | |
| tree | 452512b8057b62be3f5387aa054f9cccf8bd9ed7 /src/server/game/AI/CreatureAI.h | |
| parent | 3ffe570b219d31d1f2747c9a78826353fc817d3e (diff) | |
Scripts/FollowerAI: Some cleanup:
- FollowerAI properly resumes follow after evading.
- Removed duplicated getters from CreatureAI (IsEscorted vs IsEscortNPC), they were used to do the same thing
- FollowerAI properly assists in combat.
- FollowerAI properly despawns if quest is abandoned.
- FollowerAI now supports dynamic respawning for escort NPCs.
Diffstat (limited to 'src/server/game/AI/CreatureAI.h')
| -rw-r--r-- | src/server/game/AI/CreatureAI.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index 1d3f7736d17..ea021f44347 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -146,6 +146,7 @@ class TC_GAME_API CreatureAI : public UnitAI virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spellInfo*/) { } virtual void SpellHitTargetGameObject(GameObject* /*target*/, SpellInfo const* /*spellInfo*/) { } + // Should return true if the NPC is currently being escorted virtual bool IsEscorted() const { return false; } // Called when creature appears in the world (spawn, respawn, grid load etc...) @@ -228,9 +229,6 @@ class TC_GAME_API CreatureAI : public UnitAI // If a PlayerAI* is returned, that AI is placed on the player instead of the default charm AI // Object destruction is handled by Unit::RemoveCharmedBy virtual PlayerAI* GetAIForCharmedPlayer(Player* /*who*/) { return nullptr; } - // Should return true if the NPC is target of an escort quest - // If onlyIfActive is set, should return true only if the escort quest is currently active - virtual bool IsEscortNPC(bool /*onlyIfActive*/) const { return false; } // intended for encounter design/debugging. do not use for other purposes. expensive. int32 VisualizeBoundary(uint32 duration, Unit* owner = nullptr, bool fill = false) const; |
