aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.h
diff options
context:
space:
mode:
authormegamage <none@none.none>2011-10-18 10:53:34 -0400
committermegamage <none@none.none>2011-10-18 10:53:34 -0400
commitc29ff410015be2ef8c8c55ba3015940962ff56c3 (patch)
treed2b5b36bbf32bbb695ef0f1456a461294609fd06 /src/server/game/Maps/Map.h
parente3f8588a227cbf9108f396131a199d75868bf539 (diff)
Rename some classes in grid system.
Note: The naming of classes is still confusing. "cell" usually refers to class "Grid", and "grid" usually refers to class "NGrid". But it requires a lot of changes to clean this up.
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rwxr-xr-xsrc/server/game/Maps/Map.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 0fff299feff..7dd7faedec2 100755
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -263,18 +263,18 @@ class Map : public GridRefManager<NGridType>
bool IsRemovalGrid(float x, float y) const
{
- GridPair p = Trinity::ComputeGridPair(x, y);
+ GridCoord p = Trinity::ComputeGridCoord(x, y);
return !getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL;
}
bool IsLoaded(float x, float y) const
{
- GridPair p = Trinity::ComputeGridPair(x, y);
+ GridCoord p = Trinity::ComputeGridCoord(x, y);
return loaded(p);
}
- bool GetUnloadLock(const GridPair &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
- void SetUnloadLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
+ bool GetUnloadLock(const GridCoord &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
+ void SetUnloadLock(const GridCoord &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
void LoadGrid(float x, float y);
bool UnloadGrid(const uint32 x, const uint32 y, bool pForce);
virtual void UnloadAll();
@@ -371,8 +371,8 @@ class Map : public GridRefManager<NGridType>
void AddObjectToSwitchList(WorldObject* obj, bool on);
virtual void DelayedUpdate(const uint32 diff);
- void UpdateObjectVisibility(WorldObject* obj, Cell cell, CellPair cellpair);
- void UpdateObjectsVisibilityFor(Player* player, Cell cell, CellPair cellpair);
+ 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); }
@@ -447,8 +447,8 @@ class Map : public GridRefManager<NGridType>
bool _creatureToMoveLock;
std::vector<Creature*> _creaturesToMove;
- bool loaded(const GridPair &) const;
- void EnsureGridCreated(const GridPair &);
+ bool loaded(const GridCoord &) const;
+ void EnsureGridCreated(const GridCoord &);
bool EnsureGridLoaded(Cell const&);
void EnsureGridLoadedAtEnter(Cell const&, Player* player = NULL);
@@ -471,7 +471,7 @@ class Map : public GridRefManager<NGridType>
void UpdateActiveCells(const float &x, const float &y, const uint32 t_diff);
protected:
- void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
+ void SetUnloadReferenceLock(const GridCoord &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
ACE_Thread_Mutex Lock;
@@ -624,7 +624,7 @@ Map::Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor)
const uint32 cell_x = cell.CellX();
const uint32 cell_y = cell.CellY();
- if (!cell.NoCreate() || loaded(GridPair(x, y)))
+ if (!cell.NoCreate() || loaded(GridCoord(x, y)))
{
EnsureGridLoaded(cell);
getNGrid(x, y)->Visit(cell_x, cell_y, visitor);
@@ -635,7 +635,7 @@ template<class NOTIFIER>
inline void
Map::VisitAll(const float &x, const float &y, float radius, NOTIFIER &notifier)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
@@ -651,7 +651,7 @@ template<class NOTIFIER>
inline void
Map::VisitFirstFound(const float &x, const float &y, float radius, NOTIFIER &notifier)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
@@ -669,7 +669,7 @@ template<class NOTIFIER>
inline void
Map::VisitWorld(const float &x, const float &y, float radius, NOTIFIER &notifier)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
@@ -682,7 +682,7 @@ template<class NOTIFIER>
inline void
Map::VisitGrid(const float &x, const float &y, float radius, NOTIFIER &notifier)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();