aboutsummaryrefslogtreecommitdiff
path: root/src/game/PoolHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-16 11:19:59 -0500
committermegamage <none@none>2009-06-16 11:19:59 -0500
commit3cf2be604275ec1ae7321b78dc6b62e559a5d7c7 (patch)
treed119d51bcee396d8fe913fa6b709ff45da2a2c2e /src/game/PoolHandler.cpp
parentaaec3c819167afb3f40410142654ed4d57926b10 (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/PoolHandler.cpp')
-rw-r--r--src/game/PoolHandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp
index 753b6a249e6..09a1d4293b7 100644
--- a/src/game/PoolHandler.cpp
+++ b/src/game/PoolHandler.cpp
@@ -233,7 +233,7 @@ bool PoolGroup<Creature>::Spawn1Object(uint32 guid)
objmgr.AddCreatureToGrid(guid, data);
// Spawn if necessary (loaded grids only)
- Map* map = const_cast<Map*>(MapManager::Instance().GetBaseMap(data->mapid));
+ Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(data->mapid));
// We use spawn coords to spawn
if (!map->Instanceable() && !map->IsRemovalGrid(data->posX, data->posY))
{
@@ -263,7 +263,7 @@ bool PoolGroup<GameObject>::Spawn1Object(uint32 guid)
objmgr.AddGameobjectToGrid(guid, data);
// Spawn if necessary (loaded grids only)
// this base map checked as non-instanced and then only existed
- Map* map = const_cast<Map*>(MapManager::Instance().GetBaseMap(data->mapid));
+ Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(data->mapid));
// We use current coords to unspawn, not spawn coords since creature can have changed grid
if (!map->Instanceable() && !map->IsRemovalGrid(data->posX, data->posY))
{