Core/Garrisons: Basics for garrisons

This commit is contained in:
Shauren
2015-05-08 00:03:15 +02:00
parent 0972552e84
commit 5b725db033
39 changed files with 2100 additions and 100 deletions

View File

@@ -448,8 +448,7 @@ bool Map::EnsureGridLoaded(const Cell &cell)
setGridObjectDataLoaded(true, cell.GridX(), cell.GridY());
ObjectGridLoader loader(*grid, this, cell);
loader.LoadN();
LoadGridObjects(grid, cell);
// Add resurrectable corpses to world object list in grid
sObjectAccessor->AddCorpsesToGrid(GridCoord(cell.GridX(), cell.GridY()), grid->GetGridType(cell.CellX(), cell.CellY()), this);
@@ -460,6 +459,12 @@ bool Map::EnsureGridLoaded(const Cell &cell)
return false;
}
void Map::LoadGridObjects(NGridType* grid, Cell const& cell)
{
ObjectGridLoader loader(*grid, this, cell);
loader.LoadN();
}
void Map::LoadGrid(float x, float y)
{
EnsureGridLoaded(Cell(x, y));