19 #ifndef TRINITY_NGRID_H
20 #define TRINITY_NGRID_H
30 #define DEFAULT_VISIBILITY_NOTIFY_PERIOD 1000
74 class WORLD_OBJECT_TYPES,
75 class GRID_OBJECT_TYPES
145 template<
class T,
class TT>
154 template<
class T,
class TT>
179 count +=
i_cells[
x][
y].
template GetWorldObjectCountInGrid<T>();
grid_state_t i_cellstate
Definition: NGrid.h:189
void UpdateTimeTracker(time_t diff)
Definition: NGrid.h:50
void setUnloadExplicitLock(bool on)
Definition: NGrid.h:115
bool getUnloadLock() const
Definition: NGrid.h:114
bool i_unloadExplicitLock
Definition: NGrid.h:57
Definition: TypeContainerVisitor.h:32
int32 i_y
Definition: NGrid.h:188
void decUnloadActiveLock()
Definition: NGrid.h:118
void SetGridId(const uint32 id) const
Definition: NGrid.h:99
grid_state_t GetGridState(void) const
Definition: NGrid.h:100
void setGridObjectDataLoaded(bool pLoaded)
Definition: NGrid.h:110
uint16 i_unloadActiveLockCount
Definition: NGrid.h:56
void setUnloadExplicitLock(bool on)
Definition: NGrid.h:43
void UpdateTimeTracker(time_t diff)
Definition: NGrid.h:120
GridReference< NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > > i_Reference
Definition: NGrid.h:186
void ResetTimeTracker(time_t interval)
Definition: NGrid.h:119
TimeTracker i_timer
Definition: NGrid.h:53
#define DEFAULT_VISIBILITY_NOTIFY_PERIOD
Definition: NGrid.h:30
#define false
Definition: CascPort.h:18
const TimeTracker & getTimeTracker() const
Definition: NGrid.h:113
grid_state_t
Definition: NGrid.h:61
void incUnloadActiveLock()
Definition: NGrid.h:45
void decUnloadActiveLock()
Definition: NGrid.h:46
NGrid(uint32 id, int32 x, int32 y, time_t expiry, bool unload=true)
Definition: NGrid.h:81
void Reset(time_t interval)
Definition: Timer.h:119
bool i_GridObjectDataLoaded
Definition: NGrid.h:191
GridType & GetGridType(const uint32 x, const uint32 y)
Definition: NGrid.h:86
Definition: TypeContainer.h:86
GridType i_cells[N][N]
Definition: NGrid.h:190
int32 i_x
Definition: NGrid.h:187
uint32 GetWorldObjectCountInNGrid() const
Definition: NGrid.h:174
int32 irand(int32 min, int32 max)
Definition: Random.cpp:39
void setUnloadReferenceLock(bool on)
Definition: NGrid.h:116
const TimeTracker & getTimeTracker() const
Definition: NGrid.h:41
GridInfo()
Definition: NGrid.h:35
GridInfo(time_t expiry, bool unload=true)
Definition: NGrid.h:38
Definition: GridReference.h:25
void VisitGrid(const uint32 x, const uint32 y, TypeContainerVisitor< T, TypeMapContainer< TT > > &visitor)
Definition: NGrid.h:155
void VisitAllGrids(TypeContainerVisitor< T, TypeMapContainer< TT > > &visitor)
Definition: NGrid.h:146
bool i_unloadReferenceLock
Definition: NGrid.h:58
int32_t int32
Definition: Define.h:146
void Update(time_t diff)
Definition: Timer.h:109
void ResetTimeTracker(time_t interval)
Definition: NGrid.h:49
uint32_t uint32
Definition: Define.h:150
G3D::int16 y
Definition: Vector2int16.h:38
uint16_t uint16
Definition: Define.h:151
void SetGridState(grid_state_t s)
Definition: NGrid.h:101
GridInfo * getGridInfoRef()
Definition: NGrid.h:112
PeriodicTimer vis_Update
Definition: NGrid.h:54
uint32 i_gridId
Definition: NGrid.h:184
void incUnloadActiveLock()
Definition: NGrid.h:117
void link(TO *toObj, FROM *fromObj)
Definition: Reference.h:46
Definition: GridReference.h:28
int32 getY() const
Definition: NGrid.h:103
void Visit(TypeContainerVisitor< T, TypeMapContainer< GRID_OBJECT_TYPES > > &visitor)
Definition: Grid.h:89
bool getUnloadLock() const
Definition: NGrid.h:42
int32 getX() const
Definition: NGrid.h:102
PeriodicTimer & getRelocationTimer()
Definition: NGrid.h:51
void setUnloadReferenceLock(bool on)
Definition: NGrid.h:44
void link(GridRefManager< NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > > *pTo)
Definition: NGrid.h:105
#define ASSERT
Definition: Errors.h:55
GridType const & GetGridType(const uint32 x, const uint32 y) const
Definition: NGrid.h:92
G3D::int16 x
Definition: Vector2int16.h:37
GridInfo i_GridInfo
Definition: NGrid.h:185
bool isGridObjectDataLoaded() const
Definition: NGrid.h:109
uint32 GetGridId(void) const
Definition: NGrid.h:98
void setTimer(const TimeTracker &pTimer)
Definition: NGrid.h:48
Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > GridType
Definition: NGrid.h:80