aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.h
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2009-12-19 10:12:40 +0100
committern0n4m3 <none@none>2009-12-19 10:12:40 +0100
commit243f33b5eae4e5dc96e8134c650ea74daa07ee35 (patch)
tree39d943868b1bbe0116000f748bd72b7b76087683 /src/game/Object.h
parent7a3e524df2c57cb8625f08f3b8bef5befe641142 (diff)
Implement new visibility system, based on Silverice patch for mangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/Object.h')
-rw-r--r--src/game/Object.h23
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