2016-06-08 22:29:04 +01:00
|
|
|
|
using System;
|
2015-12-13 22:16:40 -05:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
2016-08-22 10:43:04 -04:00
|
|
|
|
using FFXIVClassic.Common;
|
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_Map_Server.packets.send.actor
|
2015-12-13 22:16:40 -05:00
|
|
|
|
{
|
|
|
|
|
class SetGrandCompanyPacket
|
|
|
|
|
{
|
|
|
|
|
public const ushort OPCODE = 0x0194;
|
|
|
|
|
public const uint PACKET_SIZE = 0x28;
|
|
|
|
|
|
2017-06-27 13:23:05 -04:00
|
|
|
|
public static SubPacket BuildPacket(uint sourceActorId, ushort currentAllegiance, ushort rankLimsa, ushort rankGridania, ushort rankUldah)
|
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))
|
2016-01-16 11:26:35 -05:00
|
|
|
|
{
|
|
|
|
|
binWriter.Write((Byte)currentAllegiance);
|
|
|
|
|
binWriter.Write((Byte)rankLimsa);
|
|
|
|
|
binWriter.Write((Byte)rankGridania);
|
|
|
|
|
binWriter.Write((Byte)rankUldah);
|
2015-12-13 22:16:40 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-27 13:23:05 -04:00
|
|
|
|
return new SubPacket(OPCODE, sourceActorId, data);
|
2015-12-13 22:16:40 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|