mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
feat(Core/Config): Add parameter to load all grids of all non-instanced maps on server start (#2283)
This commit is contained in:
@@ -469,6 +469,13 @@ void Map::LoadGrid(float x, float y)
|
||||
EnsureGridLoaded(Cell(x, y));
|
||||
}
|
||||
|
||||
void Map::LoadAllCells()
|
||||
{
|
||||
for (uint32 cellX = 0; cellX < TOTAL_NUMBER_OF_CELLS_PER_MAP; cellX++)
|
||||
for (uint32 cellY = 0; cellY < TOTAL_NUMBER_OF_CELLS_PER_MAP; cellY++)
|
||||
LoadGrid((cellX + 0.5f - CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL, (cellY + 0.5f - CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL);
|
||||
}
|
||||
|
||||
bool Map::AddPlayerToMap(Player* player)
|
||||
{
|
||||
CellCoord cellCoord = Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY());
|
||||
|
||||
Reference in New Issue
Block a user