Import and Retainer lists now sent.

This commit is contained in:
Filip Maj 2015-09-10 00:52:31 -04:00
parent 443212830a
commit d90cf6d953
8 changed files with 192 additions and 29 deletions

View file

@ -13,10 +13,12 @@ namespace FFXIVClassic_Lobby_Server.packets
public const ushort OPCODE = 0x15;
public const ushort MAXPERPACKET = 6;
private UInt64 sequence;
private List<World> worldList;
public WorldListPacket(List<World> serverList)
public WorldListPacket(UInt64 sequence, List<World> serverList)
{
this.sequence = sequence;
this.worldList = serverList;
}
@ -38,7 +40,7 @@ namespace FFXIVClassic_Lobby_Server.packets
binWriter = new BinaryWriter(memStream);
//Write List Info
binWriter.Write((UInt64)0);
binWriter.Write((UInt64)sequence);
binWriter.Write(worldList.Count - totalCount <= MAXPERPACKET ? (byte)(worldList.Count + 1) : (byte)0);
binWriter.Write(worldList.Count - totalCount <= MAXPERPACKET ? (UInt32)(worldList.Count - totalCount) : (UInt32)MAXPERPACKET);
binWriter.Write((byte)0);
@ -77,7 +79,7 @@ namespace FFXIVClassic_Lobby_Server.packets
binWriter = new BinaryWriter(memStream);
//Write Empty List Info
binWriter.Write((UInt64)0);
binWriter.Write((UInt64)sequence);
binWriter.Write((byte)1);
binWriter.Write((UInt32)0);
binWriter.Write((byte)0);