mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids * Handle child maps being entered * Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
This commit is contained in:
@@ -248,7 +248,7 @@ public:
|
||||
else
|
||||
player->SaveRecallPosition();
|
||||
|
||||
Map const* map = sMapMgr->CreateBaseMap(mapId);
|
||||
Map* map = sMapMgr->CreateBaseMap(mapId);
|
||||
float z = std::max(map->GetStaticHeight(PhasingHandler::GetEmptyPhaseShift(), x, y, MAX_HEIGHT), map->GetWaterLevel(PhasingHandler::GetEmptyPhaseShift(), x, y));
|
||||
|
||||
player->TeleportTo(mapId, x, y, z, player->GetOrientation());
|
||||
@@ -370,7 +370,7 @@ public:
|
||||
else
|
||||
player->SaveRecallPosition();
|
||||
|
||||
Map const* map = sMapMgr->CreateBaseMap(mapId);
|
||||
Map* map = sMapMgr->CreateBaseMap(mapId);
|
||||
z = std::max(map->GetStaticHeight(PhasingHandler::GetEmptyPhaseShift(), x, y, MAX_HEIGHT), map->GetWaterLevel(PhasingHandler::GetEmptyPhaseShift(), x, y));
|
||||
|
||||
player->TeleportTo(mapId, x, y, z, 0.0f);
|
||||
@@ -506,7 +506,7 @@ public:
|
||||
AreaTableEntry const* zoneEntry = areaEntry->ParentAreaID ? sAreaTableStore.LookupEntry(areaEntry->ParentAreaID) : areaEntry;
|
||||
ASSERT(zoneEntry);
|
||||
|
||||
Map const* map = sMapMgr->CreateBaseMap(zoneEntry->ContinentID);
|
||||
Map* map = sMapMgr->CreateBaseMap(zoneEntry->ContinentID);
|
||||
|
||||
if (map->Instanceable())
|
||||
{
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
Map const* map = sMapMgr->CreateBaseMap(mapId);
|
||||
Map* map = sMapMgr->CreateBaseMap(mapId);
|
||||
z = std::max(map->GetStaticHeight(PhasingHandler::GetEmptyPhaseShift(), x, y, MAX_HEIGHT), map->GetWaterLevel(PhasingHandler::GetEmptyPhaseShift(), x, y));
|
||||
}
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
|
||||
sDB2Manager.Map2ZoneCoordinates(zoneId, zoneX, zoneY);
|
||||
|
||||
Map const* map = object->GetMap();
|
||||
Map* map = object->GetMap();
|
||||
float groundZ = map->GetHeight(object->GetPhaseShift(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
|
||||
float floorZ = map->GetHeight(object->GetPhaseShift(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user