Decompiled source of PEAK FixPostGamePassport v1.0.0

PEAK_FixPostGamePassport.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("PEAK_FixCustomizationAfterGame")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PEAK_FixCustomizationAfterGame")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("12769083-61d3-42ee-9efe-f4d7e7c6a78a")]
[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")]
[BepInPlugin("com.kaosz.FixPostGamePassport", "PEAK_FixPostGamePassport", "1.0.2")]
public class PEAK_FixPostGamePassport : BaseUnityPlugin
{
	private const string LOG_PREF = "[FixCustom] ";

	internal static ManualLogSource Log;

	private Harmony _harmony;

	private void Awake()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Expected O, but got Unknown
		Log = ((BaseUnityPlugin)this).Logger;
		_harmony = new Harmony("com.kaosz.FixPostGamePassport");
		_harmony.Patch((MethodBase)AccessTools.Method(typeof(CharacterCustomization), "OnPlayerDataChange", (Type[])null, (Type[])null), new HarmonyMethod(typeof(PEAK_FixPostGamePassport), "OnPlayerDataChange_Patched", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
		Log.LogInfo((object)"[FixCustom]  loaded and patched private methods.");
	}

	private static bool OnPlayerDataChange_Patched(CharacterCustomization __instance, PersistentPlayerData playerData)
	{
		Debug.Log((object)("OnPlayerDataChange_Patched CharacterCustomization __instance is " + (((Object)(object)__instance == (Object)null) ? "NULL" : "Not Null")));
		if (!Object.op_Implicit((Object)(object)__instance))
		{
			return false;
		}
		return true;
	}
}