mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 13:34:38 +02:00
More work on the world server.
This commit is contained in:
parent
e24a6f99cb
commit
a1ca960543
7 changed files with 248 additions and 15 deletions
|
@ -72,26 +72,38 @@ namespace FFXIVClassic.Common
|
|||
offset += header.subpacketSize;
|
||||
}
|
||||
|
||||
public SubPacket(ushort opcode, uint sourceId, uint targetId, byte[] data)
|
||||
public SubPacket(ushort opcode, uint sourceId, uint targetId, byte[] data) : this(true, opcode, sourceId, targetId, data) { }
|
||||
|
||||
public SubPacket(bool isGameMessage, ushort opcode, uint sourceId, uint targetId, byte[] data)
|
||||
{
|
||||
header = new SubPacketHeader();
|
||||
gameMessage = new GameMessageHeader();
|
||||
|
||||
gameMessage.opcode = opcode;
|
||||
if (isGameMessage)
|
||||
{
|
||||
gameMessage = new GameMessageHeader();
|
||||
gameMessage.opcode = opcode;
|
||||
gameMessage.timestamp = Utils.UnixTimeStampUTC();
|
||||
gameMessage.unknown4 = 0x14;
|
||||
gameMessage.unknown5 = 0x00;
|
||||
gameMessage.unknown6 = 0x00;
|
||||
}
|
||||
|
||||
header.sourceId = sourceId;
|
||||
header.targetId = targetId;
|
||||
|
||||
gameMessage.timestamp = Utils.UnixTimeStampUTC();
|
||||
if (isGameMessage)
|
||||
header.type = 0x03;
|
||||
else
|
||||
header.type = opcode;
|
||||
|
||||
header.type = 0x03;
|
||||
header.unknown1 = 0x00;
|
||||
gameMessage.unknown4 = 0x14;
|
||||
gameMessage.unknown5 = 0x00;
|
||||
gameMessage.unknown6 = 0x00;
|
||||
|
||||
this.data = data;
|
||||
|
||||
header.subpacketSize = (ushort) (SUBPACKET_SIZE + GAMEMESSAGE_SIZE + data.Length);
|
||||
header.subpacketSize = (ushort) (SUBPACKET_SIZE + data.Length);
|
||||
|
||||
if (isGameMessage)
|
||||
header.subpacketSize += GAMEMESSAGE_SIZE;
|
||||
}
|
||||
|
||||
public SubPacket(SubPacket original, uint newTargetId)
|
||||
|
@ -158,6 +170,6 @@ namespace FFXIVClassic.Common
|
|||
ConsoleOutputColor.DarkMagenta);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue