Revert "feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)" (#1471)

This reverts commit 51b8773528.
This commit is contained in:
Nefertumm
2019-02-15 15:14:49 -03:00
committed by GitHub
parent 23e7ae6a2f
commit c15206fc15
108 changed files with 509 additions and 933 deletions

View File

@@ -22,7 +22,6 @@
#include "GuildMgr.h"
#include "Group.h"
#include "Guild.h"
#include "GameTime.h"
#include "World.h"
#include "ObjectAccessor.h"
#include "BattlegroundMgr.h"
@@ -198,13 +197,13 @@ void WorldSession::SendPacket(WorldPacket const* packet)
static uint64 sendPacketCount = 0;
static uint64 sendPacketBytes = 0;
static time_t firstTime = GameTime::GetGameTime();
static time_t firstTime = time(NULL);
static time_t lastTime = firstTime; // next 60 secs start time
static uint64 sendLastPacketCount = 0;
static uint64 sendLastPacketBytes = 0;
time_t cur_time = GameTime::GetGameTime();
time_t cur_time = time(NULL);
if ((cur_time - lastTime) < 60)
{
@@ -390,7 +389,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
if (updater.ProcessLogout())
{
time_t currTime = GameTime::GetGameTime();
time_t currTime = time(NULL);
if (ShouldLogOut(currTime) && !m_playerLoading)
LogoutPlayer(true);
@@ -427,7 +426,7 @@ void WorldSession::HandleTeleportTimeout(bool updateInSessions)
// pussywizard: handle teleport ack timeout
if (m_Socket && !m_Socket->IsClosed() && GetPlayer() && GetPlayer()->IsBeingTeleported())
{
time_t currTime = GameTime::GetGameTime();
time_t currTime = time(NULL);
if (updateInSessions) // session update from World::UpdateSessions
{
if (GetPlayer()->IsBeingTeleportedFar() && GetPlayer()->GetSemaphoreTeleportFar()+sWorld->getIntConfig(CONFIG_TELEPORT_TIMEOUT_FAR) < currTime)
@@ -770,7 +769,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 + 8 * 4); // changed in WotLK
data << uint32(GameTime::GetGameTime()); // unix time of something
data << uint32(time(NULL)); // unix time of something
data << uint8(1);
data << uint32(mask); // type mask
for (uint32 i = 0; i < NUM_ACCOUNT_DATA_TYPES; ++i)