aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Object.h')
-rw-r--r--src/game/Object.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Object.h b/src/game/Object.h
index e19d9be41ce..3840337e437 100644
--- a/src/game/Object.h
+++ b/src/game/Object.h
@@ -480,8 +480,8 @@ class TRINITY_DLL_SPEC WorldObject : public Object
// Low Level Packets
void SendPlaySound(uint32 Sound, bool OnlySelf);
- Map * GetMap() const;
- Map * FindMap() const;
+ Map * GetMap() const { return m_map ? m_map : const_cast<WorldObject*>(this)->_getMap(); }
+ Map * FindMap() const { return m_map ? m_map : const_cast<WorldObject*>(this)->_findMap(); }
Map const* GetBaseMap() const;
Creature* SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime);
GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime);
@@ -504,6 +504,9 @@ class TRINITY_DLL_SPEC WorldObject : public Object
uint32 m_InstanceId;
Map *m_map;
+ Map* _getMap();
+ Map* _findMap();
+
float m_positionX;
float m_positionY;
float m_positionZ;