diff options
| author | Shauren <shauren.trinity@gmail.com> | 2015-09-19 17:41:24 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2015-09-19 17:41:24 +0200 |
| commit | 3b52fcc7693f14f2b7e6f2130a73379ec33bd5c0 (patch) | |
| tree | 5e9aad7a3564e7d3d74a1ffd91579db41bb0c388 /src/server/game/Entities/Object | |
| parent | 10b068ce5dbf9da7be6a727e0cdb0360f5c4b615 (diff) | |
| parent | f34bae89d3869ddc5f74a85d9a6fa44f67ca4635 (diff) | |
Merge remote-tracking branch 'origin/6.x_implement_taxi' into 6.x
Diffstat (limited to 'src/server/game/Entities/Object')
| -rw-r--r-- | src/server/game/Entities/Object/Object.h | 33 | ||||
| -rw-r--r-- | src/server/game/Entities/Object/Position.h | 33 |
2 files changed, 33 insertions, 33 deletions
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 42e5137e6f9..54b6677f714 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -351,39 +351,6 @@ struct MovementInfo void OutDebug(); }; -#define MAPID_INVALID 0xFFFFFFFF - -class WorldLocation : public Position -{ - public: - explicit WorldLocation(uint32 _mapId = MAPID_INVALID, float _x = 0.f, float _y = 0.f, float _z = 0.f, float _o = 0.f) - : Position(_x, _y, _z, _o), m_mapId(_mapId) { } - - WorldLocation(WorldLocation const& loc) - : Position(loc), m_mapId(loc.GetMapId()) { } - - void WorldRelocate(WorldLocation const& loc) - { - m_mapId = loc.GetMapId(); - Relocate(loc); - } - - void WorldRelocate(uint32 _mapId = MAPID_INVALID, float _x = 0.f, float _y = 0.f, float _z = 0.f, float _o = 0.f) - { - m_mapId = _mapId; - Relocate(_x, _y, _z, _o); - } - - WorldLocation GetWorldLocation() const - { - return *this; - } - - uint32 GetMapId() const { return m_mapId; } - - uint32 m_mapId; -}; - template<class T> class GridObject { diff --git a/src/server/game/Entities/Object/Position.h b/src/server/game/Entities/Object/Position.h index 5bd37567811..109ff09d66c 100644 --- a/src/server/game/Entities/Object/Position.h +++ b/src/server/game/Entities/Object/Position.h @@ -215,6 +215,39 @@ public: } }; +#define MAPID_INVALID 0xFFFFFFFF + +class WorldLocation : public Position +{ +public: + explicit WorldLocation(uint32 mapId = MAPID_INVALID, float x = 0.f, float y = 0.f, float z = 0.f, float o = 0.f) + : Position(x, y, z, o), m_mapId(mapId) { } + + WorldLocation(WorldLocation const& loc) + : Position(loc), m_mapId(loc.GetMapId()) { } + + void WorldRelocate(WorldLocation const& loc) + { + m_mapId = loc.GetMapId(); + Relocate(loc); + } + + void WorldRelocate(uint32 mapId = MAPID_INVALID, float x = 0.f, float y = 0.f, float z = 0.f, float o = 0.f) + { + m_mapId = mapId; + Relocate(x, y, z, o); + } + + WorldLocation GetWorldLocation() const + { + return *this; + } + + uint32 GetMapId() const { return m_mapId; } + + uint32 m_mapId; +}; + ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYStreamer const& streamer); ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYStreamer const& streamer); ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); |
