aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/World.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 9fe7f77fd5c..aa5222b707a 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -1638,7 +1638,7 @@ void World::SetInitialWorldSettings()
local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec);
loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime, revision) VALUES('%u', " UI64FMTD ", '%s', 0, '%s')",
- realmID, sGameTime, isoDate, _FULLVERSION);
+ realmID, m_startTime, isoDate, _FULLVERSION);
static uint32 abtimer = 0;
abtimer = sConfig.GetIntDefault("AutoBroadcast.Timer", 60000);
@@ -1915,7 +1915,7 @@ void World::Update(uint32 diff)
uint32 maxClientsNum = GetMaxActiveSessionCount();
m_timers[WUPDATE_UPTIME].Reset();
- loginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " UI64FMTD, tmpDiff, maxClientsNum, realmID, sGameTime);
+ loginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " UI64FMTD, tmpDiff, maxClientsNum, realmID, m_startTime);
}
/// <li> Clean logs table
@@ -1923,6 +1923,7 @@ void World::Update(uint32 diff)
{
if (m_timers[WUPDATE_CLEANDB].Passed())
{
+ uint32 tmpDiff = (m_gameTime - m_startTime);
uint32 maxClientsNum = sWorld.GetMaxActiveSessionCount();
m_timers[WUPDATE_CLEANDB].Reset();