Core/Grid: Fix infinity-loop in grid loading (patch by SilverIce)

--HG--
branch : trunk
This commit is contained in:
click
2010-10-22 03:39:27 +02:00
parent 8ad97b1a47
commit caf8bbbe0a

View File

@@ -370,13 +370,13 @@ bool Map::EnsureGridLoaded(const Cell &cell)
{
sLog.outDebug("Loading grid[%u,%u] for map %u instance %u", cell.GridX(), cell.GridY(), GetId(), i_InstanceId);
setGridObjectDataLoaded(true,cell.GridX(), cell.GridY());
ObjectGridLoader loader(*grid, this, cell);
loader.LoadN();
// Add resurrectable corpses to world object list in grid
sObjectAccessor.AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this);
setGridObjectDataLoaded(true,cell.GridX(), cell.GridY());
return true;
}