Clean up grid system. Get rid of GridLoader. This patch should not change any logic, except the incorrect calculation of the number of loaded corpse (which only affects log).

This commit is contained in:
megamage
2011-10-18 14:31:34 -04:00
parent bb64e64463
commit 7231ab959f
8 changed files with 78 additions and 171 deletions
+3 -2
View File
@@ -35,8 +35,9 @@ ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 x, co
{
if (grid.ActiveObjectsInGrid() == 0 && !m.ActiveObjectsNearGrid(x, y))
{
ObjectGridStoper stoper(grid);
stoper.StopN();
ObjectGridStoper worker;
TypeContainerVisitor<ObjectGridStoper, GridTypeMapContainer> visitor(worker);
grid.VisitAllGrids(visitor);
grid.SetGridState(GRID_STATE_IDLE);
sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u, %u] on map %u moved to IDLE state", x, y, m.GetId());
}