diff options
author | megamage <none@none> | 2009-03-26 14:02:11 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-26 14:02:11 -0600 |
commit | 1ac13728a70fccf9180a7065b04c9dd9c83a9498 (patch) | |
tree | 48476df9c3caa90820269a0536c86a28a2c0e20f /src/game/World.cpp | |
parent | 68c3039715d8b68aa1b33a44bae3dd5d59eb5e5f (diff) |
[7545] Fixed exploration achievements for certian areas Author: DonTomika
[7546] move uptime table to Realm database, use realmid column. Author: Triply
--HG--
branch : trunk
Diffstat (limited to 'src/game/World.cpp')
-rw-r--r-- | src/game/World.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp index e84a6cbaddc..d771b210ae9 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1472,8 +1472,8 @@ void World::SetInitialWorldSettings() sprintf( isoDate, "%04d-%02d-%02d %02d:%02d:%02d", local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec); - WorldDatabase.PExecute("INSERT INTO uptime (startstring, starttime, uptime) VALUES('%s', " I64FMTD ", 0)", - isoDate, uint64(m_startTime)); + loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " I64FMTD ", '%s', 0)", + realmID, uint64(m_startTime), isoDate); m_timers[WUPDATE_OBJECTS].SetInterval(0); m_timers[WUPDATE_SESSIONS].SetInterval(0); @@ -1707,10 +1707,10 @@ void World::Update(uint32 diff) if (m_timers[WUPDATE_UPTIME].Passed()) { uint32 tmpDiff = (m_gameTime - m_startTime); - uint32 maxClientsNum = sWorld.GetMaxActiveSessionCount(); + uint32 maxClientsNum = GetMaxActiveSessionCount(); m_timers[WUPDATE_UPTIME].Reset(); - WorldDatabase.PExecute("UPDATE uptime SET uptime = %d, maxplayers = %d WHERE starttime = " I64FMTD, tmpDiff, maxClientsNum, uint64(m_startTime)); + loginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " I64FMTD, tmpDiff, maxClientsNum, realmID, uint64(m_startTime)); } /// <li> Clean logs table |