31 lines
809 B
C#
31 lines
809 B
C#
using System.Reflection;
|
|
using HarmonyLib;
|
|
using undead_universal_patch_il2cpp.Core;
|
|
using undead_universal_patch_il2cpp.Core.Config;
|
|
|
|
namespace undead_universal_patch_il2cpp.Patches
|
|
{
|
|
[HarmonyPatch]
|
|
public class SignalRHandshakeFix
|
|
{
|
|
static PatchTypesResult patchResult = Util.ConfigPreparePatchTypes(
|
|
PatchConfig.SignalRHandshakeFix,
|
|
"SignalR Handshake Fix (quotes vs apostrophes)",
|
|
"JsonProtocol",
|
|
"WithSeparator"
|
|
);
|
|
|
|
static bool Prepare() => patchResult.Success;
|
|
|
|
static MethodBase TargetMethod() => patchResult.Method;
|
|
|
|
static void Prefix(ref string str)
|
|
{
|
|
if (str.Contains("protocol':"))
|
|
{
|
|
str = str.Replace("'", "\"");
|
|
}
|
|
}
|
|
}
|
|
}
|