Reimplemented server list using BInaryWriter.

This commit is contained in:
Filip Maj 2015-09-03 22:20:53 -04:00
parent a65e81273b
commit e7e267bd44
5 changed files with 165 additions and 86 deletions

View file

@ -22,27 +22,6 @@ namespace FFXIVClassic_Lobby_Server.packets
public String session;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct WorldListPacket
{
public UInt64 sequence;
public uint isEndListANDNumWorlds;
public uint unknown1;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
public WorldListEntry[] worlds;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct WorldListEntry
{
public ushort id;
public ushort listPosition;
public uint population;
public UInt64 unknown;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x40)]
public String name;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct CharacterRequestPacket
{
@ -92,17 +71,6 @@ namespace FFXIVClassic_Lobby_Server.packets
public String errorMessage;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct ErrorPacket
{
public UInt64 sequence;
public uint errorCode;
public uint statusCode;
public uint errorId;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x2BB)]
public String errorMessage;
}
public static unsafe CharacterRequestPacket toCharacterRequestStruct(byte[] bytes)
{
fixed (byte* pdata = &bytes[0])