Revert "Core/Misc: Replace time(NULL) with GameTime::GetGameTime()"
This reverts commit 5fe3a1f7f9.
This commit is contained in:
1 parent
4dc27b53eb
commit
c074c3a9c6
69 files changed
+258
-357
No files matched your search
@@ -28,7 +28,6 @@
|
||||
#include "Common.h"
|
||||
#include "Config.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GameTime.h"
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
@@ -249,7 +248,7 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
|
||||
static uint64 sendLastPacketCount = 0;
|
||||
static uint64 sendLastPacketBytes = 0;
|
||||
|
||||
time_t cur_time = GameTime::GetGameTime();
|
||||
time_t cur_time = time(nullptr);
|
||||
|
||||
if ((cur_time - lastTime) < 60)
|
||||
{
|
||||
@@ -320,7 +319,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
bool deletePacket = true;
|
||||
std::vector<WorldPacket*> requeuePackets;
|
||||
uint32 processedPackets = 0;
|
||||
time_t currentTime = GameTime::GetGameTime();
|
||||
time_t currentTime = time(nullptr);
|
||||
|
||||
while (m_Socket && _recvQueue.next(packet, updater))
|
||||
{
|
||||
@@ -456,8 +455,9 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
//logout procedure should happen only in World::UpdateSessions() method!!!
|
||||
if (updater.ProcessUnsafe())
|
||||
{
|
||||
time_t currTime = time(nullptr);
|
||||
///- If necessary, log the player out
|
||||
if (ShouldLogOut(currentTime) && !m_playerLoading)
|
||||
if (ShouldLogOut(currTime) && !m_playerLoading)
|
||||
LogoutPlayer(true);
|
||||
|
||||
if (m_Socket && GetPlayer() && _warden)
|
||||
@@ -810,7 +810,7 @@ void WorldSession::SetAccountData(AccountDataType type, time_t tm, std::string c
|
||||
void WorldSession::SendAccountDataTimes(uint32 mask)
|
||||
{
|
||||
WorldPacket data(SMSG_ACCOUNT_DATA_TIMES, 4 + 1 + 4 + NUM_ACCOUNT_DATA_TYPES * 4);
|
||||
data << uint32(GameTime::GetGameTime()); // Server time
|
||||
data << uint32(time(nullptr)); // Server time
|
||||
data << uint8(1);
|
||||
data << uint32(mask); // type mask
|
||||
for (uint32 i = 0; i < NUM_ACCOUNT_DATA_TYPES; ++i)
|
||||
|
||||
Reference in new issue
Block a user