Decompiled source of FixKjaroRunald v1.0.3

FixKjaroRunald.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Microsoft.CodeAnalysis;
using On.RoR2;
using RoR2;
using UnityEngine;

[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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("FixKjaroRunald")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FixKjaroRunald")]
[assembly: AssemblyTitle("FixKjaroRunald")]
[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 HACT
{
	[BepInPlugin("HIFU.FixKjaroRunald", "FixKjaroRunald", "1.0.3")]
	public class Main : BaseUnityPlugin
	{
		public const string PluginGUID = "HIFU.FixKjaroRunald";

		public const string PluginAuthor = "HIFU";

		public const string PluginName = "FixKjaroRunald";

		public const string PluginVersion = "1.0.3";

		public static BodyIndex elderLemurianBodyIndex;

		public void Awake()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			CharacterBody.onBodyStartGlobal += CharacterBody_onBodyStartGlobal;
			BodyCatalog.Init += new hook_Init(BodyCatalog_Init);
		}

		private IEnumerator BodyCatalog_Init(orig_Init orig)
		{
			yield return orig.Invoke();
			elderLemurianBodyIndex = BodyCatalog.FindBodyIndex("LemurianBruiserBody(Clone)");
		}

		public void CharacterBody_onBodyStartGlobal(CharacterBody body)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)((Component)body).GetComponent<ElementalRingsBehavior>() != (Object)null && body.bodyIndex == elderLemurianBodyIndex && Object.op_Implicit((Object)(object)body.inventory))
			{
				body.inventory.GiveItem(Items.UseAmbientLevel, 1);
			}
		}
	}
}