mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
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:
@@ -15,7 +15,6 @@
|
||||
#include "World.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "GameTime.h"
|
||||
#include "WorldSession.h"
|
||||
#include "BigNumber.h"
|
||||
#include "SHA1.h"
|
||||
@@ -219,7 +218,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_WHO Message");
|
||||
|
||||
time_t now = GameTime::GetGameTime();
|
||||
time_t now = time(NULL);
|
||||
if (now < timeWhoCommandAllowed)
|
||||
return;
|
||||
timeWhoCommandAllowed = now + 3;
|
||||
@@ -467,7 +466,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
|
||||
GetPlayer()->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||
}
|
||||
|
||||
LogoutRequest(GameTime::GetGameTime());
|
||||
LogoutRequest(time(NULL));
|
||||
}
|
||||
|
||||
void WorldSession::HandlePlayerLogoutOpcode(WorldPacket & /*recv_data*/)
|
||||
@@ -818,7 +817,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
|
||||
return;
|
||||
|
||||
// prevent resurrect before 30-sec delay after body release not finished
|
||||
if (time_t(corpse->GetGhostTime() + _player->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP)) > time_t(GameTime::GetGameTime()))
|
||||
if (time_t(corpse->GetGhostTime() + _player->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP)) > time_t(time(NULL)))
|
||||
return;
|
||||
|
||||
if (!corpse->IsWithinDistInMap(_player, CORPSE_RECLAIM_RADIUS, true))
|
||||
@@ -1525,7 +1524,7 @@ void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data)
|
||||
{
|
||||
uint32 counter, clientTicks;
|
||||
recv_data >> counter >> clientTicks;
|
||||
//uint32 ourTicks = clientTicks + (GameTime::GetGameTimeMS() - _player->m_timeSyncServer);
|
||||
//uint32 ourTicks = clientTicks + (World::GetGameTimeMS() - _player->m_timeSyncServer);
|
||||
_player->m_timeSyncClient = clientTicks;
|
||||
}
|
||||
|
||||
@@ -1859,7 +1858,7 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/)
|
||||
#endif
|
||||
|
||||
WorldPacket data(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4);
|
||||
data << uint32(GameTime::GetGameTime());
|
||||
data << uint32(time(NULL));
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user