diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-05-18 23:52:58 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-05-18 23:53:25 +0200 |
commit | c5d3dd90bea3889ef5fcd33c9ef0d59d7c544f8a (patch) | |
tree | aa7fde6f924fc39da54908bd6eeeb0be422e5fc3 /src/server/game/AI/CreatureAI.cpp | |
parent | 74456703146194de72424ec98c4ea76402077be6 (diff) |
Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
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()) |