mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
Merge commit 'origin/master' into 310
This commit is contained in:
commit
bb9e2ab658
46 changed files with 410 additions and 386 deletions
|
|
@ -40,7 +40,7 @@
|
|||
#include "ObjectMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Database/DBCStores.h"
|
||||
#include "DBCStores.h"
|
||||
#include "LootMgr.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
#include "MapManager.h"
|
||||
|
|
@ -1367,8 +1367,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);
|
||||
|
|
@ -1534,10 +1534,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> Handle all other objects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue