mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Added decompression/compression of packets. Cleaned up handshaking.
This commit is contained in:
44
FFXIVClassic Proxy Server/Packets/Send/_0x2Packet.cs
Normal file
44
FFXIVClassic Proxy Server/Packets/Send/_0x2Packet.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using FFXIVClassic.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_World_Server.Packets.Send
|
||||
{
|
||||
class _0x2Packet
|
||||
{
|
||||
public const ushort OPCODE = 0x0002;
|
||||
public const uint PACKET_SIZE = 0x38;
|
||||
|
||||
public static SubPacket BuildPacket(uint actorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
try
|
||||
{
|
||||
binWriter.Write((UInt32)actorID);
|
||||
}
|
||||
catch (Exception)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
byte[] reply2Data = {
|
||||
0x66, 0x00, 0x00, 0x00, 0xC8, 0xD6, 0xAF, 0x2B, 0x38, 0x2B, 0x5F, 0x26, 0xB8, 0x8D, 0xF0, 0x2B,
|
||||
0xC8, 0xFD, 0x85, 0xFE, 0xA8, 0x7C, 0x5B, 0x09, 0x38, 0x2B, 0x5F, 0x26, 0xC8, 0xD6, 0xAF, 0x2B,
|
||||
0xB8, 0x8D, 0xF0, 0x2B, 0x88, 0xAF, 0x5E, 0x26
|
||||
};
|
||||
|
||||
data = reply2Data;
|
||||
|
||||
return new SubPacket(false, OPCODE, 0, 0, data);
|
||||
}
|
||||
}
|
||||
}
|
37
FFXIVClassic Proxy Server/Packets/Send/_0x7Packet.cs
Normal file
37
FFXIVClassic Proxy Server/Packets/Send/_0x7Packet.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using FFXIVClassic.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_World_Server.Packets.Send
|
||||
{
|
||||
class _0x7Packet
|
||||
{
|
||||
public const ushort OPCODE = 0x0007;
|
||||
public const uint PACKET_SIZE = 0x18;
|
||||
|
||||
public static SubPacket BuildPacket(uint actorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
try
|
||||
{
|
||||
binWriter.Write((UInt32)actorID);
|
||||
binWriter.Write((UInt32)Utils.UnixTimeStampUTC());
|
||||
}
|
||||
catch (Exception)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(false, OPCODE, 0, 0, data);
|
||||
}
|
||||
}
|
||||
}
|
@@ -4,7 +4,7 @@ using System.IO;
|
||||
|
||||
namespace FFXIVClassic_World_Server.Packets.Send.Login
|
||||
{
|
||||
class Login0x7ResponsePacket
|
||||
class _0x8PingPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0008;
|
||||
public const uint PACKET_SIZE = 0x18;
|
Reference in New Issue
Block a user