using BestHTTP; using System.Collections.Generic; using undead_universal_patch_il2cpp.Core.Config; using undead_universal_patch_il2cpp.Patches; using UnityEngine; namespace undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CheatManager; public class CustomCheatManager : MonoBehaviour { public void Start() { if (ServerPatchesConfig.CustomKnownDlls.Value) RecNetInteractions.postNameServerActions.Add(DownloadKnownDlls); } void Patch(HTTPResponse _res, List dlls) { UniversalPatchPlugin.Log.LogInfo("Setting new KnownDlls (server)"); HilePatch.Patch([.. dlls]); } void OnFailed(HTTPResponse _res) { if (PatchConfig.HilePatch.Value) { UniversalPatchPlugin.Log.LogInfo("Setting new KnownDlls (local fallback)"); HilePatch.Patch(); } } void DownloadKnownDlls() { RecNetInteractions.SendRequest>(HTTPMethods.Get, RecNet.Service.API, "/api/undead/v1/knowndlls", Patch, OnFailed); } }