mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-13 19:14:35 +01:00
cursed but proper packet handling
This commit is contained in:
@@ -54,6 +54,13 @@ namespace PemukulPaku.GameServer
|
||||
return SerializedBody;
|
||||
}
|
||||
|
||||
public static bool IsValid(byte[] data)
|
||||
{
|
||||
string hexString = BitConverter.ToString(data).Replace("-", "");
|
||||
return hexString.StartsWith("01234567", StringComparison.OrdinalIgnoreCase) &&
|
||||
hexString.EndsWith("89ABCDEF", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public static Packet FromProto<T>(T proto, CmdId cmdId)
|
||||
{
|
||||
MemoryStream stream = new ();
|
||||
|
||||
Reference in New Issue
Block a user