2016-06-08 22:29:04 +01:00
|
|
|
|
using System;
|
2015-12-13 22:16:40 -05:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_Map_Server.packets.send.list
|
|
|
|
|
{
|
|
|
|
|
class ListBeginPacket
|
|
|
|
|
{
|
|
|
|
|
public const ushort OPCODE = 0x017D;
|
|
|
|
|
public const uint PACKET_SIZE = 0x40;
|
|
|
|
|
|
2015-12-29 01:20:46 -05:00
|
|
|
|
public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, int numEntries)
|
2015-12-13 22:16:40 -05:00
|
|
|
|
{
|
|
|
|
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
|
|
|
|
|
|
|
|
|
using (MemoryStream mem = new MemoryStream(data))
|
|
|
|
|
{
|
|
|
|
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
|
|
|
|
{
|
|
|
|
|
//Write List Header
|
|
|
|
|
binWriter.Write((UInt64)locationCode);
|
2015-12-29 01:20:46 -05:00
|
|
|
|
binWriter.Write((UInt64)sequenceId);
|
2015-12-13 22:16:40 -05:00
|
|
|
|
//Write List Info
|
|
|
|
|
binWriter.Write((UInt64)listId);
|
|
|
|
|
binWriter.Write((UInt32)numEntries);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|