Implement new visibility system, based on Silverice patch for mangos
--HG-- branch : trunk
This commit is contained in:
1 parent
7a3e524df2
commit
243f33b5ea
15 files changed
+553
-165
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user