mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
Moved table uptime from world database to character database.
Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
parent
4f17a6a4e2
commit
68ec6ae8ab
7 changed files with 49 additions and 28 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue