mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
[7207] Phase system development continue for DB/in_game objects
* Store phase mask for creatures/gameobjects/corpse in DB * Propertly set phase for summoned creatures/gameobjects/pets/corpses/spell related dynobjects * Select proper phase for spawned creature/gameobjects and save it in DB TODO: in game commands.
This commit is contained in:
parent
b5da610388
commit
aa24bd836e
29 changed files with 204 additions and 82 deletions
|
|
@ -349,7 +349,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
|||
|
||||
virtual void Update ( uint32 /*time_diff*/ ) { }
|
||||
|
||||
void _Create( uint32 guidlow, HighGuid guidhigh, uint32 mapid );
|
||||
void _Create( uint32 guidlow, HighGuid guidhigh, uint32 mapid, uint32 phaseMask);
|
||||
|
||||
void Relocate(float x, float y, float z, float orientation)
|
||||
{
|
||||
|
|
@ -407,7 +407,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
|||
void SetMapId(uint32 newMap) { m_mapId = newMap; }
|
||||
uint32 GetMapId() const { return m_mapId; }
|
||||
|
||||
void SetPhaseMask(uint32 newPhaseMask) { m_phaseMask = newPhaseMask; }
|
||||
virtual void SetPhaseMask(uint32 newPhaseMask, bool update);
|
||||
uint32 GetPhaseMask() const { return m_phaseMask; }
|
||||
bool InSamePhase(WorldObject const* obj) const { return InSamePhase(obj->GetPhaseMask()); }
|
||||
bool InSamePhase(uint32 phasemask) const { return GetPhaseMask()==0 && phasemask==0 || (GetPhaseMask() & phasemask); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue