aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorr00ty-tc <r00ty-tc@users.noreply.github.com>2016-03-14 20:16:42 +0000
committerr00ty-tc <r00ty-tc@users.noreply.github.com>2016-03-15 02:05:13 +0100
commit971f4ccab87ba95e584d5761f686cc2a86f5af9d (patch)
tree98e5fe5b7a05fe3e004003cce016ef490dc0c7e4 /src/server/scripts/Commands
parent9a01b47d485640afc12470f3314a9b4e176a9ee0 (diff)
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
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp5
1 files changed, 1 insertions, 4 deletions
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<HighGuid::GameObject>(), map->GetMaxLowGuid<HighGuid::Unit>());
- 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<HighGuid::GameObject>(), map->GetMaxLowGuid<HighGuid::Unit>());
return true;
}