diff options
| author | megamage <none@none> | 2008-11-21 15:41:18 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2008-11-21 15:41:18 -0600 |
| commit | e9d6f1b23a14ee50437b5949deca7ae97b388bb2 (patch) | |
| tree | 37768b93ed2182cbad2634d6f7eec250374c6fb6 /src/game/Map.h | |
| parent | 71707df1dec2aa77864d9a853c34108bb6021138 (diff) | |
*Move object update from objectaccessor to map
*Move activeobject list from objectaccessor to map
*Open grid for all active creatures (previously only for possessed ones)
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.h')
| -rw-r--r-- | src/game/Map.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/Map.h b/src/game/Map.h index 6e0e9cb37a9..cd476f5e3c6 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -242,6 +242,10 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O bool HavePlayers() const { return !m_mapRefManager.isEmpty(); } uint32 GetPlayersCountExceptGMs() const; bool PlayersNearGrid(uint32 x,uint32 y) const; + bool ActiveObjectsNearGrid(uint32 x, uint32 y) const; + + void AddActiveObject(WorldObject* obj) { i_activeObjects.insert(obj); } + void RemoveActiveObject(WorldObject* obj) { i_activeObjects.erase(obj); } void SendToPlayers(WorldPacket const* data) const; @@ -287,6 +291,7 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O inline void setNGrid(NGridType* grid, uint32 x, uint32 y); + void UpdateActiveCells(const float &x, const float &y, const uint32 &t_diff); protected: typedef Trinity::ObjectLevelLockable<Map, ZThread::Mutex>::Lock Guard; @@ -307,6 +312,7 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O time_t i_gridExpiry; + std::set<WorldObject *> i_activeObjects; std::set<WorldObject *> i_objectsToRemove; // Type specific code for add/remove to/from grid |
