![]() |
TrinityCore
|
#include <NGrid.h>
Public Types | |
| typedef Grid< WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER > | GridType |
Public Member Functions | |
| NGrid (uint32 id, int32 x, int32 y, time_t expiry, bool unload=true) | |
| GridType & | GetGridType (const uint32 x, const uint32 y) |
| GridType const & | GetGridType (const uint32 x, const uint32 y) const |
| uint32 | GetGridId (void) const |
| grid_state_t | GetGridState (void) const |
| void | SetGridState (grid_state_t s) |
| int32 | getX () const |
| int32 | getY () const |
| void | link (GridRefManager< NGrid > *pTo) |
| bool | isGridObjectDataLoaded () const |
| void | setGridObjectDataLoaded (bool pLoaded) |
| GridInfo * | getGridInfoRef () |
| TimeTracker const & | getTimeTracker () const |
| bool | getUnloadLock () const |
| void | setUnloadExplicitLock (bool on) |
| void | incUnloadActiveLock () |
| void | decUnloadActiveLock () |
| void | ResetTimeTracker (time_t interval) |
| void | UpdateTimeTracker (time_t diff) |
| template<class VISITOR > | |
| void | VisitAllGrids (TypeContainerVisitor< VISITOR, WORLD_OBJECT_CONTAINER > &visitor) |
| template<class VISITOR > | |
| void | VisitAllGrids (TypeContainerVisitor< VISITOR, GRID_OBJECT_CONTAINER > &visitor) |
| template<class VISITOR > | |
| void | VisitGrid (uint32 x, uint32 y, TypeContainerVisitor< VISITOR, WORLD_OBJECT_CONTAINER > &visitor) |
| template<class VISITOR > | |
| void | VisitGrid (uint32 x, uint32 y, TypeContainerVisitor< VISITOR, GRID_OBJECT_CONTAINER > &visitor) |
| template<class T > | |
| std::size_t | GetWorldObjectCountInNGrid () const |
| template<class T > | |
| std::size_t | GetGridObjectCountInNGrid () const |
| template<class T > | |
| bool | HasWorldObjectsInNGrid () const |
| template<class T > | |
| bool | HasGridObjectsInNGrid () const |
Private Attributes | |
| uint32 | i_gridId |
| GridInfo | i_GridInfo |
| GridReference< NGrid > | i_Reference |
| int32 | i_x |
| int32 | i_y |
| grid_state_t | i_cellstate |
| GridType | i_cells [N][N] |
| bool | i_GridObjectDataLoaded |
| typedef Grid<WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER> NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GridType |
|
inline |
Definition at line 108 of file NGrid.h.
References GridInfo::decUnloadActiveLock(), and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo.
Referenced by Map::RemoveFromActive().
|
inline |
Definition at line 90 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_gridId.
Referenced by PersonalPhaseGridLoader::Load(), MultiPersonalPhaseTracker::LoadGrid(), GarrisonGridLoader::LoadN(), ObjectGridLoader::LoadN(), and MultiPersonalPhaseTracker::UnloadGrid().
|
inline |
Definition at line 103 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo.
Referenced by Map::ProcessRelocationNotifies().
|
inline |
Definition at line 175 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cells.
|
inline |
Definition at line 91 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cellstate.
Referenced by Map::DelayedUpdate(), Map::EnsureGridLoadedForActiveObject(), and Map::ProcessRelocationNotifies().
|
inline |
Definition at line 78 of file NGrid.h.
References ASSERT, and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cells.
Referenced by Map::AddToGrid(), Map::AddToGrid(), Map::SwitchGridContainers(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitAllGrids(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitAllGrids(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitGrid(), and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitGrid().
|
inline |
Definition at line 84 of file NGrid.h.
References ASSERT, and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cells.
|
inline |
Definition at line 104 of file NGrid.h.
References GridInfo::getTimeTracker(), and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo.
|
inline |
Definition at line 105 of file NGrid.h.
References GridInfo::getUnloadLock(), and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo.
|
inline |
Definition at line 165 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cells.
|
inline |
Definition at line 93 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_x.
Referenced by Map::ActiveObjectsNearGrid(), MultiPersonalPhaseTracker::LoadGrid(), Map::ProcessRelocationNotifies(), Map::UnloadGrid(), ActiveState::Update(), IdleState::Update(), and RemovalState::Update().
|
inline |
Definition at line 94 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_y.
Referenced by Map::ActiveObjectsNearGrid(), MultiPersonalPhaseTracker::LoadGrid(), Map::ProcessRelocationNotifies(), Map::UnloadGrid(), ActiveState::Update(), IdleState::Update(), and RemovalState::Update().
|
inline |
Definition at line 195 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cells.
|
inline |
Definition at line 185 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cells.
Referenced by Map::UnloadGrid(), and ActiveState::Update().
|
inline |
Definition at line 107 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo, and GridInfo::incUnloadActiveLock().
Referenced by Map::AddToActive().
|
inline |
Definition at line 100 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridObjectDataLoaded.
Referenced by Map::AddToGrid(), Map::EnsureGridLoaded(), Map::IsGridLoaded(), and Map::Visit().
|
inline |
Definition at line 96 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_Reference, and Reference< TO, FROM, Derived >::link().
Referenced by Map::buildNGridLinkage().
|
inline |
Definition at line 109 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo, and GridInfo::ResetTimeTracker().
Referenced by Map::ResetGridExpiry().
|
inline |
Definition at line 101 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridObjectDataLoaded.
Referenced by Map::EnsureGridLoaded().
|
inline |
Definition at line 92 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cellstate.
Referenced by Map::EnsureGridCreated(), Map::EnsureGridLoadedForActiveObject(), ActiveState::Update(), and IdleState::Update().
|
inline |
Definition at line 106 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo, and GridInfo::setUnloadExplicitLock().
Referenced by Map::GridMarkNoUnload(), and Map::GridUnmarkNoUnload().
|
inline |
Definition at line 110 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo, and GridInfo::UpdateTimeTracker().
|
inline |
Definition at line 144 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridType(), and Grid< WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::Visit().
|
inline |
Definition at line 136 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridType(), and Grid< WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::Visit().
Referenced by Map::UnloadGrid(), and ActiveState::Update().
|
inline |
Definition at line 159 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridType(), and Grid< WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::Visit().
|
inline |
Definition at line 153 of file NGrid.h.
References NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridType(), and Grid< WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::Visit().
Referenced by Map::Visit().
|
private |
Definition at line 211 of file NGrid.h.
Referenced by NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridObjectCountInNGrid(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridType(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridType(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetWorldObjectCountInNGrid(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::HasGridObjectsInNGrid(), and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::HasWorldObjectsInNGrid().
|
private |
Definition at line 210 of file NGrid.h.
Referenced by NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridState(), and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::SetGridState().
|
private |
Definition at line 205 of file NGrid.h.
Referenced by NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridId().
|
private |
Definition at line 206 of file NGrid.h.
Referenced by NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::decUnloadActiveLock(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::getGridInfoRef(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::getTimeTracker(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::getUnloadLock(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::incUnloadActiveLock(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::ResetTimeTracker(), NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::setUnloadExplicitLock(), and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::UpdateTimeTracker().
|
private |
Definition at line 212 of file NGrid.h.
Referenced by NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::isGridObjectDataLoaded(), and NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::setGridObjectDataLoaded().
|
private |
Definition at line 207 of file NGrid.h.
Referenced by NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::link().
|
private |
Definition at line 208 of file NGrid.h.
Referenced by NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::getX().
|
private |
Definition at line 209 of file NGrid.h.
Referenced by NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::getY().