diff options
Diffstat (limited to 'src/game/Object.h')
-rw-r--r-- | src/game/Object.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/game/Object.h b/src/game/Object.h index 83189f30b23..93cf0d40e85 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -93,6 +93,15 @@ enum PhaseMasks PHASEMASK_ANYWHERE = 0xFFFFFFFF }; +enum NotifyFlags +{ + NOTIFY_NONE = 0x00, + NOTIFY_AI_RELOCATION = 0x01, + NOTIFY_VISIBILITY_CHANGED = 0x02, + NOTIFY_PLAYER_VISIBILITY = 0x04, + NOTIFY_ALL = 0xFF +}; + class WorldPacket; class UpdateData; class ByteBuffer; @@ -620,6 +629,17 @@ class TRINITY_DLL_SPEC WorldObject : public Object, public WorldLocation void DestroyForNearbyPlayers(); + //new relocation and visibility system functions + void AddToNotify(uint16 f) { m_notifyflags |= f;} + void RemoveFromNotify(uint16 f) { m_notifyflags &= ~f;} + bool isNeedNotify(uint16 f) const { return m_notifyflags & f;} + + bool NotifyExecuted(uint16 f) const { return m_executed_notifies & f;} + void SetNotified(uint16 f) { m_executed_notifies |= f;} + void ResetNotifies(uint16 f) { m_executed_notifies |= ~f;} + void ResetAllNotifies() { m_notifyflags = 0; m_executed_notifies = 0; } + void ResetAllNotifiesbyMask(uint16 f) { m_notifyflags &= ~f; m_executed_notifies &= ~f; } + bool isActiveObject() const { return m_isActive; } void setActive(bool isActiveObject); void SetWorldObject(bool apply); @@ -654,5 +674,8 @@ class TRINITY_DLL_SPEC WorldObject : public Object, public WorldLocation //uint32 m_mapId; // object at map with map_id uint32 m_InstanceId; // in map copy with instance id uint32 m_phaseMask; // in area phase state + + uint16 m_notifyflags; + uint16 m_executed_notifies; }; #endif |