[8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests.

Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
Ambal 2009-06-16 12:20:11 +04:00 committed by AlexDereka
parent 1187c8698c
commit b76c4c2f3c
29 changed files with 99 additions and 99 deletions

View file

@ -2315,7 +2315,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());
@ -2408,7 +2408,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())
{
@ -2483,7 +2483,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());