diff options
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 175c2784654..faac3ad6767 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -41,6 +41,14 @@ void CreatureAI::OnCharmed(bool apply) AISpellInfoType* UnitAI::AISpellInfo; AISpellInfoType* GetAISpellInfo(uint32 i) { return &CreatureAI::AISpellInfo[i]; } +CreatureAI::CreatureAI(Creature* creature) : UnitAI(creature), me(creature), _boundary(nullptr), m_MoveInLineOfSight_locked(false) +{ +} + +CreatureAI::~CreatureAI() +{ +} + void CreatureAI::Talk(uint8 id, WorldObject const* whisperTarget /*= nullptr*/) { sCreatureTextMgr->SendChat(me, id, whisperTarget); @@ -363,6 +371,12 @@ bool CreatureAI::CheckBoundary(Position const* who) const return true; } +void CreatureAI::SetBoundary(CreatureBoundary const* boundary) +{ + _boundary = boundary; + me->DoImmediateBoundaryCheck(); +} + bool CreatureAI::CheckInRoom() { if (CheckBoundary()) |