mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +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:
@@ -243,10 +243,14 @@ namespace VMAP
|
||||
if (!result.File)
|
||||
{
|
||||
int32 parentMapId = vm->getParentMapId(mapID);
|
||||
if (parentMapId != -1)
|
||||
while (parentMapId != -1)
|
||||
{
|
||||
result.Name = basePath + getTileFileName(parentMapId, tileX, tileY);
|
||||
result.File = fopen(result.Name.c_str(), "rb");
|
||||
if (result.File)
|
||||
break;
|
||||
|
||||
parentMapId = vm->getParentMapId(uint32(parentMapId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user