diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-05-13 19:37:33 +0200 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 13:16:13 -0300 |
commit | d6201e5dbb7fa7ca8b47ffa6c0d30fa38dceada5 (patch) | |
tree | 24f77462be2079c892dd604b4a1979f476e56e3c /src/server/game/Maps/Map.h | |
parent | 7874bee7bfb70e0e039f91173cff212e9572de09 (diff) |
Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50790acde8928aa0f3dc4a9c096b4a8c
(cherry picked from commit 9299e9bde087af7e5d777d5a55a3b79d2b63c48e)
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rw-r--r-- | src/server/game/Maps/Map.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 5f55fc4f8f4..1a61e65bade 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -440,9 +440,6 @@ class TC_GAME_API Map : public GridRefManager<NGridType> void AddObjectToSwitchList(WorldObject* obj, bool on); virtual void DelayedUpdate(const uint32 diff); - void UpdateObjectVisibility(WorldObject* obj, Cell cell, CellCoord cellpair); - void UpdateObjectsVisibilityFor(Player* player, Cell cell, CellCoord cellpair); - void resetMarkedCells() { marked_cells.reset(); } bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); } void markCell(uint32 pCellId) { marked_cells.set(pCellId); } @@ -472,10 +469,6 @@ class TC_GAME_API Map : public GridRefManager<NGridType> void RemoveFromActive(T* obj); template<class T> void SwitchGridContainers(T* obj, bool on); - template<class NOTIFIER> void VisitAll(const float &x, const float &y, float radius, NOTIFIER ¬ifier); - template<class NOTIFIER> void VisitFirstFound(const float &x, const float &y, float radius, NOTIFIER ¬ifier); - template<class NOTIFIER> void VisitWorld(const float &x, const float &y, float radius, NOTIFIER ¬ifier); - template<class NOTIFIER> void VisitGrid(const float &x, const float &y, float radius, NOTIFIER ¬ifier); CreatureGroupHolderType CreatureGroupHolder; void UpdateIteratorBack(Player* player); @@ -858,56 +851,4 @@ inline void Map::Visit(Cell const& cell, TypeContainerVisitor<T, CONTAINER>& vis getNGrid(x, y)->VisitGrid(cell_x, cell_y, visitor); } } - -template<class NOTIFIER> -inline void Map::VisitAll(float const& x, float const& y, float radius, NOTIFIER& notifier) -{ - CellCoord p(Trinity::ComputeCellCoord(x, y)); - Cell cell(p); - cell.SetNoCreate(); - - TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier); - cell.Visit(p, world_object_notifier, *this, radius, x, y); - TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier); - cell.Visit(p, grid_object_notifier, *this, radius, x, y); -} - -// should be used with Searcher notifiers, tries to search world if nothing found in grid -template<class NOTIFIER> -inline void Map::VisitFirstFound(const float &x, const float &y, float radius, NOTIFIER ¬ifier) -{ - CellCoord p(Trinity::ComputeCellCoord(x, y)); - Cell cell(p); - cell.SetNoCreate(); - - TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier); - cell.Visit(p, world_object_notifier, *this, radius, x, y); - if (!notifier.i_object) - { - TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier); - cell.Visit(p, grid_object_notifier, *this, radius, x, y); - } -} - -template<class NOTIFIER> -inline void Map::VisitWorld(const float &x, const float &y, float radius, NOTIFIER ¬ifier) -{ - CellCoord p(Trinity::ComputeCellCoord(x, y)); - Cell cell(p); - cell.SetNoCreate(); - - TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier); - cell.Visit(p, world_object_notifier, *this, radius, x, y); -} - -template<class NOTIFIER> -inline void Map::VisitGrid(const float &x, const float &y, float radius, NOTIFIER ¬ifier) -{ - CellCoord p(Trinity::ComputeCellCoord(x, y)); - Cell cell(p); - cell.SetNoCreate(); - - TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier); - cell.Visit(p, grid_object_notifier, *this, radius, x, y); -} #endif |