Updated to latest PTR build.

This commit is contained in:
tomrus88 2010-03-10 20:21:18 +03:00
parent 32168d697b
commit 393d46f9f6
13 changed files with 103 additions and 46 deletions

View file

@ -1374,13 +1374,20 @@ void WorldSession::HandleTimeSyncResp( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_TIME_SYNC_RESP");
uint32 counter, time_;
recv_data >> counter >> time_;
uint32 counter, clientTicks;
recv_data >> counter >> clientTicks;
// time_ seems always more than getMSTime()
uint32 diff = getMSTimeDiff(getMSTime(), time_);
if(counter != _player->m_timeSyncCounter - 1)
sLog.outDebug("Wrong time sync counter from player %s (cheater?)", _player->GetName());
sLog.outDebug("response sent: counter %u, time %u (HEX: %X), ms. time %u, diff %u", counter, time_, time_, getMSTime(), diff);
sLog.outDebug("Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient);
uint32 ourTicks = clientTicks + (getMSTime() - _player->m_timeSyncServer);
// diff should be small
sLog.outDebug("Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency());
_player->m_timeSyncClient = clientTicks;
}
void WorldSession::HandleResetInstancesOpcode( WorldPacket & /*recv_data*/ )