diff options
author | megamage <none@none.none> | 2011-12-22 10:15:17 -0500 |
---|---|---|
committer | megamage <none@none.none> | 2011-12-22 10:15:17 -0500 |
commit | ce0dfa88a670f65f8bff6457ffd7075b942d43b9 (patch) | |
tree | dd41f4de64e1e723376df2a317d952aed451adb4 /src | |
parent | e84fffe5886085a58ecdf1418bde214e83df7711 (diff) |
Revert "Temp fix for *nix build."
It builds in *nix without this patch.
This reverts commit e84fffe5886085a58ecdf1418bde214e83df7711.
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Grids/GridStates.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Grids/NGrid.h | 22 | ||||
-rwxr-xr-x | src/server/game/Maps/Map.cpp | 2 |
3 files changed, 2 insertions, 24 deletions
diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp index d7973655b9b..4e63388c356 100755 --- a/src/server/game/Grids/GridStates.cpp +++ b/src/server/game/Grids/GridStates.cpp @@ -31,7 +31,7 @@ void ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 info.UpdateTimeTracker(t_diff); if (info.getTimeTracker().Passed()) { - if (!grid.GetPlayerCountInNGrid() && !m.ActiveObjectsNearGrid(grid)) + if (!grid.GetWorldObjectCountInNGrid<Player>() && !m.ActiveObjectsNearGrid(grid)) { ObjectGridStoper worker; TypeContainerVisitor<ObjectGridStoper, GridTypeMapContainer> visitor(worker); diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h index d0c575da1d6..c87fd7e6129 100755 --- a/src/server/game/Grids/NGrid.h +++ b/src/server/game/Grids/NGrid.h @@ -171,8 +171,6 @@ class NGrid } */ - //TODO: This does not compile in *nix. Hope somebody can find out how to write such template function. - /* template<class T> uint32 GetWorldObjectCountInNGrid() const { @@ -182,26 +180,6 @@ class NGrid count += i_cells[x][y].template GetWorldObjectCountInGrid<T>(); return count; } - */ - - //These two temporarily replace GetWorldObjectCountInNGrid - uint32 GetPlayerCountInNGrid() const - { - uint32 count = 0; - for (uint32 x = 0; x < N; ++x) - for (uint32 y = 0; y < N; ++y) - count += i_cells[x][y].GetWorldObjectCountInGrid<Player>(); - return count; - } - - uint32 GetWorldCreatureCountInNGrid() const - { - uint32 count = 0; - for (uint32 x = 0; x < N; ++x) - for (uint32 y = 0; y < N; ++y) - count += i_cells[x][y].GetWorldObjectCountInGrid<Creature>(); - return count; - } private: uint32 i_gridId; diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index d0153d036c1..34a7b60bcbd 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -915,7 +915,7 @@ bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll) if (!unloadAll) { //pets, possessed creatures (must be active), transport passengers - if (ngrid.GetWorldCreatureCountInNGrid()) + if (ngrid.GetWorldObjectCountInNGrid<Creature>()) return false; if (ActiveObjectsNearGrid(ngrid)) |