Decompiled source of BossAddFix v1.0.0

BossAddFix.dll

Decompiled 12 hours ago
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using HarmonyLib;

[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace BubBossAddFix;

[BepInPlugin("bub.bossaddfix", "BossAdd Fix", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
	public const string Guid = "bub.bossaddfix";

	public const string Version = "1.0.0";

	private void Awake()
	{
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Expected O, but got Unknown
		MethodInfo methodInfo = AccessTools.Method("bossadd.Patches.EikthyrSummonHelper:DespawnSummons", (Type[])null, (Type[])null);
		if (methodInfo == null)
		{
			((BaseUnityPlugin)this).Logger.LogWarning((object)"BossAdd (EikthyrSummonHelper.DespawnSummons) não encontrado — nada a corrigir.");
			return;
		}
		new Harmony("bub.bossaddfix").Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(Plugin).GetMethod("SkipDespawn", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Limpeza de invocações do Eikthyr desligada: nenhuma criatura é removida quando um jogador morre.");
	}

	private static bool SkipDespawn()
	{
		return false;
	}
}