[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
This commit is contained in:
megamage committed 2009-06-16 11:19:59 -05:00
1 parent aaec3c8191
commit 3cf2be6042
26 files changed
+104 -100

No files matched your search

+3 -3
View File
@@ -2757,7 +2757,7 @@ bool ChatHandler::HandleGoXYCommand(const char* args)
else
_player->SaveRecallPosition();
Map const *map = MapManager::Instance().GetBaseMap(mapid);
Map const *map = MapManager::Instance().CreateBaseMap(mapid);
float z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y));
_player->TeleportTo(mapid, x, y, z, _player->GetOrientation());
@@ -2850,7 +2850,7 @@ bool ChatHandler::HandleGoZoneXYCommand(const char* args)
// update to parent zone if exist (client map show only zones without parents)
AreaTableEntry const* zoneEntry = areaEntry->zone ? GetAreaEntryByAreaID(areaEntry->zone) : areaEntry;
Map const *map = MapManager::Instance().GetBaseMap(zoneEntry->mapid);
Map const *map = MapManager::Instance().CreateBaseMap(zoneEntry->mapid);
if(map->Instanceable())
{
@@ -2925,7 +2925,7 @@ bool ChatHandler::HandleGoGridCommand(const char* args)
else
_player->SaveRecallPosition();
Map const *map = MapManager::Instance().GetBaseMap(mapid);
Map const *map = MapManager::Instance().CreateBaseMap(mapid);
float z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y));
_player->TeleportTo(mapid, x, y, z, _player->GetOrientation());