This repository has been archived on 2026-05-30. You can view files and clone it, but cannot push or open issues or pull requests.
Files
undead-universal-patch-il2cpp/Patches/SignalRHandshakeFix.cs

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("'", "\"");
}
}
}
}