diff options
| author | megamage <none@none> | 2009-04-20 18:05:32 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-04-20 18:05:32 -0500 |
| commit | 95a0928190ddb06371e3f2378ae1ee04dbefc56b (patch) | |
| tree | d7804bcffee75f19f6ba89f8693441712828c4ac /src/game/Object.cpp | |
| parent | 6b801a2df8d7d9ea2dbb72b6ad6524ddf0fdf14d (diff) | |
| parent | 922453f36233835536a5a71d7b679bdf3b9d8568 (diff) | |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
| -rw-r--r-- | src/game/Object.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 015bb6d3479..3ec11e83f81 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1145,6 +1145,7 @@ WorldObject::WorldObject() m_mapId = 0; m_InstanceId = 0; + m_map = NULL; m_name = ""; @@ -1674,12 +1675,14 @@ void WorldObject::SendObjectDeSpawnAnim(uint64 guid) Map* WorldObject::GetMap() const { - return MapManager::Instance().GetMap(GetMapId(), this); + if(m_map) return m_map; + else return const_cast<Map*>(m_map) = MapManager::Instance().GetMap(GetMapId(), this); } Map* WorldObject::FindMap() const { - return MapManager::Instance().FindMap(GetMapId(), GetInstanceId()); + if(m_map) return m_map; + else return const_cast<Map*>(m_map) = MapManager::Instance().FindMap(GetMapId(), GetInstanceId()); } Map const* WorldObject::GetBaseMap() const |
