diff options
author | megamage <none@none> | 2009-06-16 11:19:59 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-16 11:19:59 -0500 |
commit | 3cf2be604275ec1ae7321b78dc6b62e559a5d7c7 (patch) | |
tree | d119d51bcee396d8fe913fa6b709ff45da2a2c2e /src/game/ObjectMgr.cpp | |
parent | aaec3c819167afb3f40410142654ed4d57926b10 (diff) |
[8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests. Author: Ambal
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 867da4401d3..682c91a1f3b 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1405,7 +1405,7 @@ uint32 ObjectMgr::AddGameObject(uint32 entry, uint32 mapId, float x, float y, fl AddGameobjectToGrid(guid, &data); // Spawn if necessary (loaded grids only) - if(Map* map = const_cast<Map*>(MapManager::Instance().GetBaseMap(mapId))) + if(Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(mapId))) { // We use spawn coords to spawn if(!map->Instanceable() && !map->IsRemovalGrid(x, y)) @@ -1454,7 +1454,7 @@ uint32 ObjectMgr::AddCreature(uint32 entry, uint32 team, uint32 mapId, float x, AddCreatureToGrid(guid, &data); // Spawn if necessary (loaded grids only) - if(Map* map = const_cast<Map*>(MapManager::Instance().GetBaseMap(mapId))) + if(Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(mapId))) { // We use spawn coords to spawn if(!map->Instanceable() && !map->IsRemovalGrid(x, y)) |