using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using On.RoR2;
using RoR2;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("NoLevelupHeal")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NoLevelupHeal")]
[assembly: AssemblyTitle("NoLevelupHeal")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace NoLevelupHeal
{
[BepInPlugin("com.Moffein.NoLevelupHeal", "No Levelup Heal", "1.0.5")]
public class NoLevelupHeal : BaseUnityPlugin
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static hook_RecalculateStats <>9__0_0;
internal void <Awake>b__0_0(orig_RecalculateStats orig, CharacterBody self)
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Invalid comparison between Unknown and I4
float level = self.level;
float health = self.healthComponent.health;
float shield = self.healthComponent.shield;
orig.Invoke(self);
if (self.level > level && (int)self.teamComponent.teamIndex != 1 && self.healthComponent.combinedHealthFraction < 1f)
{
if (self.healthComponent.health > health)
{
self.healthComponent.health = health;
}
if (self.healthComponent.shield > shield)
{
self.healthComponent.shield = shield;
}
}
}
}
public void Awake()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
object obj = <>c.<>9__0_0;
if (obj == null)
{
hook_RecalculateStats val = delegate(orig_RecalculateStats orig, CharacterBody self)
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Invalid comparison between Unknown and I4
float level = self.level;
float health = self.healthComponent.health;
float shield = self.healthComponent.shield;
orig.Invoke(self);
if (self.level > level && (int)self.teamComponent.teamIndex != 1 && self.healthComponent.combinedHealthFraction < 1f)
{
if (self.healthComponent.health > health)
{
self.healthComponent.health = health;
}
if (self.healthComponent.shield > shield)
{
self.healthComponent.shield = shield;
}
}
};
<>c.<>9__0_0 = val;
obj = (object)val;
}
CharacterBody.RecalculateStats += (hook_RecalculateStats)obj;
}
}
}
namespace R2API.Utils
{
[AttributeUsage(AttributeTargets.Assembly)]
public class ManualNetworkRegistrationAttribute : Attribute
{
}
}