Core/Packets: Added CMSG_TIME_SYNC_REQ and SMSG_TIME_SYNC_RESP packets

This commit is contained in:
Intel
2014-11-15 18:21:06 +02:00
parent cd9be92395
commit eb7f4e79d6
6 changed files with 48 additions and 15 deletions
+4 -3
View File
@@ -86,6 +86,7 @@
#include "WorldPacket.h"
#include "WorldSession.h"
#include "WorldStatePackets.h"
#include "MiscPackets.h"
#define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS)
@@ -26163,9 +26164,9 @@ void Player::SendTimeSync()
{
m_timeSyncQueue.push(m_movementCounter++);
WorldPacket data(SMSG_TIME_SYNC_REQ, 4);
data << uint32(m_timeSyncQueue.back());
GetSession()->SendPacket(&data);
WorldPackets::Misc::TimeSyncRequest packet;
packet.SequenceIndex = m_timeSyncQueue.back();
GetSession()->SendPacket(packet.Write());
// Schedule next sync in 10 sec
m_timeSyncTimer = 10000;