Decompiled source of OneClickCheckout v1.0.0

BepInEx/plugins/OneClickCheckout.dll

Decompiled 2 weeks ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Unity.Netcode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OneClickCheckout")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OneClickCheckout")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("f2e63419-8147-4cfa-b7c3-2dfe3ebd682b")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[HarmonyPatch(typeof(CheckoutItem), "DestroyServerRpc")]
public class CheckoutItemPatch
{
	private static bool Prefix(CheckoutItem __instance, ServerRpcParams serverRpcParams)
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Expected O, but got Unknown
		FieldInfo fieldInfo = AccessTools.Field(typeof(CheckoutItem), "checkout");
		Checkout val = (Checkout)fieldInfo.GetValue(__instance);
		if ((Object)(object)val == (Object)null)
		{
			return true;
		}
		List<CheckoutItem> checkoutItems = val.GetCheckoutItems();
		if (checkoutItems.Count <= 1)
		{
			return true;
		}
		foreach (CheckoutItem item in checkoutItems.ToList())
		{
			if ((Object)(object)item != (Object)(object)__instance && ((NetworkBehaviour)item).IsSpawned)
			{
				((NetworkBehaviour)item).NetworkObject.Despawn(true);
			}
		}
		return true;
	}
}
[BepInPlugin("com.lan.OneClickCheckOut", "一键结账", "1.0.0")]
public class ExpirationPatcher : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("com.lan.OneClickCheckOut");
		val.PatchAll();
		Debug.LogWarning((object)"一键结账 --作者:她说缝上都不给我");
	}
}