mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 07:06:23 +00:00
refactor(Core/Grids): Ported cmangos/mangos-wotlk@ea99457 (#6113)
* refactor(Core/Grids): Ported cmangos/mangos-wotlk@ea99457
(cherry picked from commit d6201e5dbb)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: SilverIce <slifeleaf@gmail.com>
* Update CellImpl.h
* w
* more more brackets
* ew
* fix build
This commit is contained in:
@@ -406,9 +406,6 @@ public:
|
||||
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); }
|
||||
@@ -440,10 +437,6 @@ public:
|
||||
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& notifier);
|
||||
template<class NOTIFIER> void VisitFirstFound(const float& x, const float& y, float radius, NOTIFIER& notifier);
|
||||
template<class NOTIFIER> void VisitWorld(const float& x, const float& y, float radius, NOTIFIER& notifier);
|
||||
template<class NOTIFIER> void VisitGrid(const float& x, const float& y, float radius, NOTIFIER& notifier);
|
||||
CreatureGroupHolderType CreatureGroupHolder;
|
||||
|
||||
void UpdateIteratorBack(Player* player);
|
||||
@@ -812,55 +805,4 @@ inline void Map::Visit(Cell const& cell, TypeContainerVisitor<T, CONTAINER>& vis
|
||||
}
|
||||
}
|
||||
|
||||
template<class NOTIFIER>
|
||||
inline void Map::VisitAll(float const& x, float const& y, float radius, NOTIFIER& notifier)
|
||||
{
|
||||
CellCoord p(Acore::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& notifier)
|
||||
{
|
||||
CellCoord p(Acore::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& notifier)
|
||||
{
|
||||
CellCoord p(Acore::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& notifier)
|
||||
{
|
||||
CellCoord p(Acore::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
|
||||
|
||||
Reference in New Issue
Block a user