From 971f4ccab87ba95e584d5761f686cc2a86f5af9d Mon Sep 17 00:00:00 2001 From: r00ty-tc Date: Mon, 14 Mar 2016 20:16:42 +0000 Subject: 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 --- src/server/scripts/Commands/cs_debug.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index b937fc4e0a4..a1a60befd9f 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1409,10 +1409,7 @@ public: map = player->GetMap(); handler->PSendSysMessage("Loading all cells (mapId: %u). Current next GameObject %u, Creature %u", map->GetId(), map->GetMaxLowGuid(), map->GetMaxLowGuid()); - 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) After load - Next GameObject %u, Creature %u", map->GetId(), map->GetMaxLowGuid(), map->GetMaxLowGuid()); return true; } -- cgit v1.2.3