2016-08-22 10:43:04 -04:00
|
|
|
|
using FFXIVClassic.Common;
|
|
|
|
|
using System;
|
2015-09-25 18:52:25 -04:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_Map_Server.packets.receive
|
|
|
|
|
{
|
|
|
|
|
class PongPacket
|
|
|
|
|
{
|
|
|
|
|
public const ushort OPCODE = 0x0001;
|
|
|
|
|
public const uint PACKET_SIZE = 0x40;
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public static SubPacket BuildPacket(uint playerActorID, uint pingTicks)
|
2015-09-25 18:52:25 -04:00
|
|
|
|
{
|
|
|
|
|
byte[] data = new byte[PACKET_SIZE-0x20];
|
|
|
|
|
|
|
|
|
|
using (MemoryStream mem = new MemoryStream(data))
|
|
|
|
|
{
|
|
|
|
|
using(BinaryWriter binWriter = new BinaryWriter(mem))
|
2016-01-28 23:25:11 -05:00
|
|
|
|
{
|
|
|
|
|
binWriter.Write((UInt32)pingTicks);
|
|
|
|
|
binWriter.Write((UInt32)0x14D);
|
2015-09-25 18:52:25 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SubPacket subpacket = new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
|
|
|
|
return subpacket;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|