aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/World.cpp5
-rw-r--r--src/trinitycore/Master.cpp2
-rw-r--r--src/trinitycore/WorldRunnable.cpp2
3 files changed, 5 insertions, 4 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();
diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp
index ba293ec841a..f62168fa9be 100644
--- a/src/trinitycore/Master.cpp
+++ b/src/trinitycore/Master.cpp
@@ -39,7 +39,7 @@
#include "Master.h"
#include "RASocket.h"
#include "ScriptCalls.h"
-#include "Timer.h"
+#include "TimeMgr.h"
#include "Util.h"
#include "sockets/TcpSocket.h"
diff --git a/src/trinitycore/WorldRunnable.cpp b/src/trinitycore/WorldRunnable.cpp
index 67ffe7c474e..2125ba435db 100644
--- a/src/trinitycore/WorldRunnable.cpp
+++ b/src/trinitycore/WorldRunnable.cpp
@@ -30,7 +30,7 @@
#include "BattleGroundMgr.h"
#include "MapManager.h"
-#include "Timer.h"
+#include "TimeMgr.h"
#include "WorldRunnable.h"
#define WORLD_SLEEP_CONST 50