Core/Maps: Implement optional pre-loading of maps.

- Option to preload basemaps upon server load (BaseMapLoadAllGrids)
- Option to preload instance maps upon map load (InstanceMapLoadAllGrids)
- Change default logging to only log mmap errors to server log
- Add new public to map to load all cells in map
- change debug loadcells to use new function instead

(cherry picked from commit 971f4ccab87ba95e584d5761f686cc2a86f5af9d)
This commit is contained in:
r00ty-tc
2016-04-09 17:08:41 +02:00
committed by Shauren
parent 1ef3b52433
commit 0bf70423f8
7 changed files with 61 additions and 6 deletions
+1 -4
View File
@@ -1414,10 +1414,7 @@ public:
if (!map)
map = player->GetMap();
for (uint32 cellX = 0; cellX < TOTAL_NUMBER_OF_CELLS_PER_MAP; cellX++)
for (uint32 cellY = 0; cellY < TOTAL_NUMBER_OF_CELLS_PER_MAP; cellY++)
map->LoadGrid((cellX + 0.5f - CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL, (cellY + 0.5f - CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL);
map->LoadAllCells();
handler->PSendSysMessage("Cells loaded (mapId: %u)", map->GetId());
return true;
}