aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorr00ty-tc <r00ty-tc@users.noreply.github.com>2016-03-14 20:16:42 +0000
committerShauren <shauren.trinity@gmail.com>2016-04-09 17:08:41 +0200
commit0bf70423f822f1f27c56eeda5c950a333c06d0c8 (patch)
treeb0af8da274d88fffab03a2019fe4d03be2a032af /src/server/scripts
parent1ef3b524334c660162ccff52faa3c93b2e6d61d5 (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 (cherry picked from commit 971f4ccab87ba95e584d5761f686cc2a86f5af9d)
Diffstat (limited to 'src/server/scripts')
-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 05686aa9828..b2094df08ef 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -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;
}