mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 08:16:08 +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());
|
||||
|
||||
@@ -319,6 +319,7 @@ class Map : public GridRefManager<NGridType>
|
||||
}
|
||||
|
||||
void LoadGrid(float x, float y);
|
||||
void LoadAllCells();
|
||||
bool UnloadGrid(NGridType& ngrid);
|
||||
virtual void UnloadAll();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user