Decompiled source of MoreSparks v1.0.0

MoreSparks/com.github.daioutzu.moresparks.dll

Decompiled 4 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyCompany("com.github.daioutzu.moresparks")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MoreSparks")]
[assembly: AssemblyTitle("com.github.daioutzu.moresparks")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace MoreSparks
{
	[BepInPlugin("com.github.daioutzu.moresparks", "MoreSparks", "1.0.0")]
	public class MainMoreSparks : BaseUnityPlugin
	{
		internal static ManualLogSource Logger;

		private Harmony harmony = new Harmony("com.github.daioutzu.moresparks");

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Logger.LogInfo((object)"Plugin com.github.daioutzu.moresparks is loaded!");
			harmony.PatchAll();
		}
	}
	[HarmonyPatch(typeof(EPCDKLCABNC), "PGIEGPGNBHJ")]
	public class ProgressNewMaxCurrencyPatch
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Ldc_I4 && (int)list[i].operand == 9999)
				{
					MainMoreSparks.Logger.LogInfo((object)"Progress PATCHED");
					list[i].operand = 99999;
					break;
				}
			}
			return list.AsEnumerable();
		}
	}
	[HarmonyPatch(typeof(OEAINNHEMKA), "BKHKFPANINH")]
	public class GameResultsNewMaxCurrencyPatch
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Ldc_I4 && (int)list[i].operand == 9999)
				{
					MainMoreSparks.Logger.LogInfo((object)"OpenResults PATCHED");
					list[i].operand = 99999;
					break;
				}
			}
			return list.AsEnumerable();
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class ScreenGameResultsNewMaxCurrencyPatch
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			List<CodeInstruction> list = new List<CodeInstruction>(instructions);
			for (int i = 0; i < list.Count; i++)
			{
				if (list[i].opcode == OpCodes.Ldc_I4 && (int)list[i].operand == 9999)
				{
					MainMoreSparks.Logger.LogInfo((object)"ScreenGameResults PATCHED");
					list[i].operand = 99999;
					break;
				}
			}
			return list.AsEnumerable();
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "com.github.daioutzu.moresparks";

		public const string PLUGIN_NAME = "MoreSparks";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}