aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-05-01 15:41:32 +0200
committerGitHub <noreply@github.com>2020-05-01 15:41:32 +0200
commit57a5969c2672b36160fea1b7c38c424de562a57b (patch)
treeee52f8ddaa8d37297142e59029df461d3000ce31 /src/server/game/AI/CreatureAI.h
parentfbd74eb5d8b5aa3a6874ee99044054e097b5ef21 (diff)
parent05ba662d5daaa3428cc01cdaa3794bf5a073ef17 (diff)
Merge pull request #24500 from funjoker/cherry-picks
Diffstat (limited to 'src/server/game/AI/CreatureAI.h')
-rw-r--r--src/server/game/AI/CreatureAI.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index 5fe93e7675a..edc09a650c7 100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -83,7 +83,6 @@ class TC_GAME_API CreatureAI : public UnitAI
bool CheckBoundary(Position const* who = nullptr) const;
- void SetBoundary(CreatureBoundary const* boundary);
public:
enum EvadeReason
{
@@ -211,11 +210,12 @@ class TC_GAME_API CreatureAI : public UnitAI
virtual PlayerAI* GetAIForCharmedPlayer(Player* /*who*/) { return nullptr; }
// intended for encounter design/debugging. do not use for other purposes. expensive.
- int32 VisualizeBoundary(uint32 duration, Unit* owner=nullptr, bool fill=false) const;
+ int32 VisualizeBoundary(uint32 duration, Unit* owner = nullptr, bool fill = false) const;
virtual bool CheckInRoom();
CreatureBoundary const* GetBoundary() const { return _boundary; }
+ void SetBoundary(CreatureBoundary const* boundary, bool negativeBoundaries = false);
- static bool IsInBounds(CreatureBoundary const* boundary, Position const* who);
+ static bool IsInBounds(CreatureBoundary const& boundary, Position const* who);
protected:
virtual void MoveInLineOfSight(Unit* /*who*/);
@@ -223,6 +223,7 @@ class TC_GAME_API CreatureAI : public UnitAI
bool _EnterEvadeMode(EvadeReason why = EVADE_REASON_OTHER);
CreatureBoundary const* _boundary;
+ bool _negateBoundary;
private:
bool m_MoveInLineOfSight_locked;