aboutsummaryrefslogtreecommitdiff
path: root/src/game/World.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-06-10 08:45:45 +0200
committerMachiavelli <none@none>2009-06-10 08:45:45 +0200
commitee9beadbc20d24ec11346858db36c029c9c04b90 (patch)
treead8d5f89f9b7e1418c5bc00990370224b91453f3 /src/game/World.cpp
parentf137dc02ecadb515928655dd6603f33187731fec (diff)
parentc9d9ae1e491243f82be5ac84dc2ad51dfbae35eb (diff)
Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/World.cpp')
-rw-r--r--src/game/World.cpp42
1 files changed, 18 insertions, 24 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 5ab3c46a036..92453ce1f52 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -1500,7 +1500,7 @@ 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_OBJECTS].SetInterval(IN_MILISECONDS/2);
m_timers[WUPDATE_SESSIONS].SetInterval(0);
m_timers[WUPDATE_WEATHERS].SetInterval(1*IN_MILISECONDS);
m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE*IN_MILISECONDS);
@@ -1698,14 +1698,9 @@ void World::Update(uint32 diff)
auctionmgr.Update();
}
- RecordTimeDiff(NULL);
/// <li> Handle session updates when the timer has passed
- if (m_timers[WUPDATE_SESSIONS].Passed())
- {
- m_timers[WUPDATE_SESSIONS].Reset();
-
- UpdateSessions(diff);
- }
+ RecordTimeDiff(NULL);
+ UpdateSessions(diff);
RecordTimeDiff("UpdateSessions");
/// <li> Handle weather updates when the timer has passed
@@ -1754,26 +1749,29 @@ void World::Update(uint32 diff)
}
/// <li> Handle all other objects
- if (m_timers[WUPDATE_OBJECTS].Passed())
+ ///- Update objects when the timer has passed (maps, transport, creatures,...)
+ MapManager::Instance().Update(diff); // As interval = 0
+
+ if(m_timers[WUPDATE_OBJECTS].Passed())
{
m_timers[WUPDATE_OBJECTS].Reset();
- ///- Update objects when the timer has passed (maps, transport, creatures,...)
- MapManager::Instance().Update(diff); // As interval = 0
+ MapManager::Instance().DoDelayedMovesAndRemoves();
+ }
+ ///- Process necessary scripts
+ if (!m_scriptSchedule.empty())
+ {
RecordTimeDiff(NULL);
- ///- Process necessary scripts
- if (!m_scriptSchedule.empty())
- ScriptsProcess();
+ ScriptsProcess();
RecordTimeDiff("UpdateScriptsProcess");
+ }
- sBattleGroundMgr.Update(diff);
- RecordTimeDiff("UpdateBattleGroundMgr");
+ sBattleGroundMgr.Update(diff);
+ RecordTimeDiff("UpdateBattleGroundMgr");
- sOutdoorPvPMgr.Update(diff);
- RecordTimeDiff("UpdateOutdoorPvPMgr");
- }
+ sOutdoorPvPMgr.Update(diff);
+ RecordTimeDiff("UpdateOutdoorPvPMgr");
- RecordTimeDiff(NULL);
// execute callbacks from sql queries that were queued recently
UpdateResultQueue();
RecordTimeDiff("UpdateResultQueue");
@@ -1795,10 +1793,6 @@ void World::Update(uint32 diff)
m_timers[WUPDATE_EVENTS].Reset();
}
- /// </ul>
- ///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove"
- //MapManager::Instance().DoDelayedMovesAndRemoves();
-
// update the instance reset times
sInstanceSaveManager.Update();