Moved table uptime from world database to character database.

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
invliD 2009-03-26 16:23:57 +01:00 committed by Triply
parent 4f17a6a4e2
commit 68ec6ae8ab
7 changed files with 49 additions and 28 deletions

View file

@ -1365,7 +1365,7 @@ 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)",
loginDatabase.PExecute("INSERT INTO uptime (startstring, starttime, uptime) VALUES('%s', " I64FMTD ", 0)",
isoDate, uint64(m_startTime));
m_timers[WUPDATE_OBJECTS].SetInterval(0);
@ -1532,10 +1532,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 = %d, maxplayers = %d WHERE starttime = " I64FMTD, tmpDiff, maxClientsNum, uint64(m_startTime));
}
/// <li> Handle all other objects