2016-08-23 16:57:24 -04:00
|
|
|
|
using FFXIVClassic.Common;
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_World_Server.Packets.Send.Login
|
|
|
|
|
{
|
2016-08-24 15:41:54 -04:00
|
|
|
|
class _0x8PingPacket
|
2016-08-23 16:57:24 -04:00
|
|
|
|
{
|
2016-08-24 14:18:37 -04:00
|
|
|
|
public const ushort OPCODE = 0x0008;
|
|
|
|
|
public const uint PACKET_SIZE = 0x18;
|
|
|
|
|
|
2016-08-23 16:57:24 -04:00
|
|
|
|
public static SubPacket BuildPacket(uint actorID)
|
|
|
|
|
{
|
2016-08-24 14:18:37 -04:00
|
|
|
|
byte[] data = new byte[PACKET_SIZE];
|
2016-08-23 16:57:24 -04:00
|
|
|
|
|
|
|
|
|
using (MemoryStream mem = new MemoryStream(data))
|
|
|
|
|
{
|
|
|
|
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
binWriter.Write((UInt32)actorID);
|
2016-08-24 14:18:37 -04:00
|
|
|
|
binWriter.Write((UInt32)Utils.UnixTimeStampUTC());
|
2016-08-23 16:57:24 -04:00
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
2016-08-24 14:18:37 -04:00
|
|
|
|
{}
|
2016-08-23 16:57:24 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-27 17:31:17 -04:00
|
|
|
|
return new SubPacket(false, OPCODE, 0, data);
|
2016-08-23 16:57:24 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|