mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Error and server list packets added. Reserve will send error to client if a character name is take for a server. Code to send out server list on GetCharacters added.
This commit is contained in:
parent
c982493d66
commit
091166b41a
8 changed files with 216 additions and 223 deletions
|
@ -17,7 +17,7 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||
public uint sourceId;
|
||||
public uint targetId;
|
||||
public uint unknown1;
|
||||
public ushort unknown4; //Always 0x13
|
||||
public ushort unknown4; //Always 0x14
|
||||
public ushort opcode;
|
||||
public uint unknown5;
|
||||
public uint timestamp;
|
||||
|
@ -50,6 +50,27 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||
offset += header.subpacketSize;
|
||||
}
|
||||
|
||||
public SubPacket(ushort opcode, uint sourceId, uint targetId, byte[] data)
|
||||
{
|
||||
this.header = new SubPacketHeader();
|
||||
header.opcode = opcode;
|
||||
header.sourceId = sourceId;
|
||||
header.targetId = targetId;
|
||||
|
||||
UInt32 unixTimestamp = (UInt32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||
header.timestamp = unixTimestamp;
|
||||
|
||||
header.unknown0 = 0x03;
|
||||
header.unknown1 = 0x00;
|
||||
header.unknown4 = 0x14;
|
||||
header.unknown5 = 0x00;
|
||||
header.unknown6 = 0x00;
|
||||
|
||||
this.data = data;
|
||||
|
||||
header.subpacketSize = (ushort)(0x20 + data.Length);
|
||||
}
|
||||
|
||||
public byte[] getHeaderBytes()
|
||||
{
|
||||
int size = Marshal.SizeOf(header);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue