aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.h
diff options
context:
space:
mode:
authormegamage <none@none.none>2011-10-18 11:51:30 -0400
committermegamage <none@none.none>2011-10-18 11:51:30 -0400
commitffdfd9252ba04075a0662cb1eba4383409fd8a60 (patch)
treeac8b7872d42d3c7fad90642cf2522af45b152ffe /src/server/game/Maps/Map.h
parente27ef595485ab0d5a0c9e5d6e7d3b0e1d1d4c0f9 (diff)
More clean up of grid system.
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rwxr-xr-xsrc/server/game/Maps/Map.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 7dd7faedec2..33d898d1af7 100755
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -267,10 +267,9 @@ class Map : public GridRefManager<NGridType>
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
+ bool IsGridLoaded(float x, float y) const
{
- GridCoord p = Trinity::ComputeGridCoord(x, y);
- return loaded(p);
+ return IsGridLoaded(Trinity::ComputeGridCoord(x, y));
}
bool GetUnloadLock(const GridCoord &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
@@ -447,10 +446,10 @@ class Map : public GridRefManager<NGridType>
bool _creatureToMoveLock;
std::vector<Creature*> _creaturesToMove;
- bool loaded(const GridCoord &) const;
+ bool IsGridLoaded(const GridCoord &) const;
void EnsureGridCreated(const GridCoord &);
bool EnsureGridLoaded(Cell const&);
- void EnsureGridLoadedAtEnter(Cell const&, Player* player = NULL);
+ void EnsureGridLoadedForActiveObject(Cell const&, WorldObject* object);
void buildNGridLinkage(NGridType* pNGridType) { pNGridType->link(this); }
@@ -524,10 +523,10 @@ class Map : public GridRefManager<NGridType>
// Type specific code for add/remove to/from grid
template<class T>
- void AddToGrid(T*, NGridType *, Cell const&);
+ void AddToGrid(T* object, Cell const& cell);
template<class T>
- void RemoveFromGrid(T*, NGridType *, Cell const&);
+ void RemoveFromGrid(T* object, Cell const& cell);
template<class T>
void DeleteFromWorld(T*);
@@ -624,7 +623,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(GridCoord(x, y)))
+ if (!cell.NoCreate() || IsGridLoaded(GridCoord(x, y)))
{
EnsureGridLoaded(cell);
getNGrid(x, y)->Visit(cell_x, cell_y, visitor);