diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 4984293df..5d51acd8c 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -443,7 +443,7 @@ void Map::Update(const uint32 &t_diff) WorldSession * pSession = plr->GetSession(); MapSessionFilter updater(pSession); - pSession->Update(t_diff, updater); + pSession->Update(updater); } } diff --git a/src/game/World.cpp b/src/game/World.cpp index 5c7763554..45eab78f6 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1305,8 +1305,6 @@ void World::SetInitialWorldSettings() LoginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " UI64FMTD ", '%s', 0)", realmID, uint64(m_startTime), isoDate); - m_timers[WUPDATE_OBJECTS].SetInterval(0); - m_timers[WUPDATE_SESSIONS].SetInterval(0); m_timers[WUPDATE_WEATHERS].SetInterval(1*IN_MILLISECONDS); m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE*IN_MILLISECONDS); m_timers[WUPDATE_UPTIME].SetInterval(getConfig(CONFIG_UINT32_UPTIME_UPDATE)*MINUTE*IN_MILLISECONDS); @@ -1456,13 +1454,8 @@ void World::Update(uint32 diff) sAuctionMgr.Update(); } - ///
  • Handle session updates when the timer has passed - if (m_timers[WUPDATE_SESSIONS].Passed()) - { - m_timers[WUPDATE_SESSIONS].Reset(); - - UpdateSessions(diff); - } + ///
  • Handle session updates + UpdateSessions(diff); ///
  • Handle weather updates when the timer has passed if (m_timers[WUPDATE_WEATHERS].Passed()) @@ -1494,14 +1487,9 @@ void World::Update(uint32 diff) } ///
  • Handle all other objects - if (m_timers[WUPDATE_OBJECTS].Passed()) - { - m_timers[WUPDATE_OBJECTS].Reset(); - ///- Update objects when the timer has passed (maps, transport, creatures,...) - sMapMgr.Update(diff); // As interval = 0 - - sBattleGroundMgr.Update(diff); - } + ///- Update objects (maps, transport, creatures,...) + sMapMgr.Update(diff); + sBattleGroundMgr.Update(diff); ///- Delete all characters which have been deleted X days before if (m_timers[WUPDATE_DELETECHARS].Passed()) @@ -1917,7 +1905,7 @@ void World::UpdateSessions( uint32 diff ) WorldSession * pSession = itr->second; WorldSessionFilter updater(pSession); - if(!pSession->Update(diff, updater)) // As interval = 0 + if(!pSession->Update(updater)) { RemoveQueuedSession(pSession); m_sessions.erase(itr); diff --git a/src/game/World.h b/src/game/World.h index 14274c267..df6072199 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -71,15 +71,13 @@ enum ShutdownExitCode /// Timers for different object refresh rates enum WorldTimers { - WUPDATE_OBJECTS = 0, - WUPDATE_SESSIONS = 1, - WUPDATE_AUCTIONS = 2, - WUPDATE_WEATHERS = 3, - WUPDATE_UPTIME = 4, - WUPDATE_CORPSES = 5, - WUPDATE_EVENTS = 6, - WUPDATE_DELETECHARS = 7, - WUPDATE_COUNT = 8 + WUPDATE_AUCTIONS = 0, + WUPDATE_WEATHERS = 1, + WUPDATE_UPTIME = 2, + WUPDATE_CORPSES = 3, + WUPDATE_EVENTS = 4, + WUPDATE_DELETECHARS = 5, + WUPDATE_COUNT = 6 }; /// Configuration elements diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 78e3f86d8..37014e903 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -197,7 +197,7 @@ void WorldSession::LogUnprocessedTail(WorldPacket *packet) } /// Update the WorldSession (triggered by World update) -bool WorldSession::Update(uint32 diff, PacketFilter& updater) +bool WorldSession::Update(PacketFilter& updater) { ///- Retrieve packets from the receive queue and call the appropriate handlers /// not process packets if socket already closed diff --git a/src/game/WorldSession.h b/src/game/WorldSession.h index 4d73a19f2..2234beb33 100644 --- a/src/game/WorldSession.h +++ b/src/game/WorldSession.h @@ -285,7 +285,7 @@ class MANGOS_DLL_SPEC WorldSession void QueuePacket(WorldPacket* new_packet); - bool Update(uint32 diff, PacketFilter& updater); + bool Update(PacketFilter& updater); /// Handle the authentication waiting queue (to be completed) void SendAuthWaitQue(uint32 position); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8fd597f5a..489d50249 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11397" + #define REVISION_NR "11398" #endif // __REVISION_NR_H__