From 5daba83c705973c22230a03c4296e267c56002ee Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 10 Jun 2009 16:33:09 -0500 Subject: *Move relocation notify back to map class so that mtmap can work better. --HG-- branch : trunk --- src/game/Map.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/game/Map.cpp') diff --git a/src/game/Map.cpp b/src/game/Map.cpp index f3835a851d3..26c94d820d8 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -194,6 +194,8 @@ Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode) i_gridExpiry(expiry) , i_lock(true) { + m_notifyTimer.SetInterval(IN_MILISECONDS/2); + for(unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx) { for(unsigned int j=0; j < MAX_NUMBER_OF_GRIDS; ++j) @@ -757,6 +759,12 @@ void Map::Update(const uint32 &t_diff) MoveAllCreaturesInMoveList(); RemoveAllObjectsInRemoveList(); + if(m_notifyTimer.Passed()) + { + m_notifyTimer.Reset(); + RelocationNotify(); + } + // Don't unload grids if it's battleground, since we may have manually added GOs,creatures, those doesn't load from DB at grid re-load ! // This isn't really bother us, since as soon as we have instanced BG-s, the whole map unloads as the BG gets ended if (IsBattleGroundOrArena()) -- cgit v1.2.3 From 5ad8284841af267a45f5099f391e1aba9f57576a Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 10 Jun 2009 16:38:19 -0500 Subject: *A missing part of the last rev. --HG-- branch : trunk --- src/game/Map.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/game/Map.cpp') diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 26c94d820d8..ee8dc1c9cac 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -759,6 +759,7 @@ void Map::Update(const uint32 &t_diff) MoveAllCreaturesInMoveList(); RemoveAllObjectsInRemoveList(); + m_notifyTimer.Update(t_diff); if(m_notifyTimer.Passed()) { m_notifyTimer.Reset(); -- cgit v1.2.3