[F] DecryptNetPacketBody

This commit is contained in:
Clansty 2025-11-12 01:28:54 +08:00
parent 35937bed03
commit d869f5cee8
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134

View File

@ -64,7 +64,13 @@ public static class Shim
public static byte[] DecryptNetPacketBody(byte[] encrypted)
{
var methods = AccessTools.TypeByName("Net.CipherAES").GetMethods();
var type = AccessTools.TypeByName("Net.CipherAES");
if (type == null)
{
MelonLogger.Warning("No matching Net.CipherAES class found");
return encrypted;
}
var methods = type.GetMethods();
var method = methods.FirstOrDefault(it => it.Name == "Decrypt" && it.GetParameters().Length <= 2);
if (method == null)
{