using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using Battle.Enemies;
using Battle.StatusEffects;
using BepInEx;
using On.Battle.Enemies;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
[assembly: AssemblyCompany("MirrorsNotWindows")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MirrorsNotWindows")]
[assembly: AssemblyTitle("MirrorsNotWindows")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace MirrorsNotWindows;
[BepInPlugin("com.glerplin.nowindows", "Mirrors Not Windows", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
[CompilerGenerated]
private static class <>O
{
public static hook_ApplyStatusEffect <0>__OnStatusApply;
}
public void Awake()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
object obj = <>O.<0>__OnStatusApply;
if (obj == null)
{
hook_ApplyStatusEffect val = OnStatusApply;
<>O.<0>__OnStatusApply = val;
obj = (object)val;
}
Enemy.ApplyStatusEffect += (hook_ApplyStatusEffect)obj;
}
public void OnDestroy()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
object obj = <>O.<0>__OnStatusApply;
if (obj == null)
{
hook_ApplyStatusEffect val = OnStatusApply;
<>O.<0>__OnStatusApply = val;
obj = (object)val;
}
Enemy.ApplyStatusEffect -= (hook_ApplyStatusEffect)obj;
}
private static void OnStatusApply(orig_ApplyStatusEffect orig, Enemy self, StatusEffect statusEffect, StatusEffectSource source, bool allowKnockOnEffects, bool ignorestats)
{
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Invalid comparison between Unknown and I4
if ((!(self.enemyName == "CastleMirrorEnemy") && !(self.enemyName == "MinesMirrorEnemy") && !(self.enemyName == "ResistanceKnightMiniboss")) || (int)statusEffect.EffectType != 33)
{
orig.Invoke(self, statusEffect, source, allowKnockOnEffects, ignorestats);
}
}
}