Decompiled source of ShowBossInventory v1.0.0

plugins/ShowBossInventory.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using Mdh.RoR2.BossGroup;
using Mdh.RoR2.UI.HUD;
using Mdh.RoR2.UI.ItemInventoryDisplay;
using Mdh.RoR2.UI.ScoreboardController;
using Microsoft.CodeAnalysis;
using MiscFixes.Modules;
using Mono.Cecil.Cil;
using MonoDetour;
using MonoDetour.Cil;
using MonoDetour.DetourTypes;
using MonoDetour.HookGen;
using MonoMod.Cil;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.UI;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LordVGames.ShowBossInventory")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+5576f835305bc46881362acfd1ec52bf610f4cbf")]
[assembly: AssemblyProduct("LordVGames.ShowBossInventory")]
[assembly: AssemblyTitle("ShowBossInventory")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[CompilerGenerated]
internal sealed class <>z__ReadOnlyArray<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T>
{
	int ICollection.Count => _items.Length;

	bool ICollection.IsSynchronized => false;

	object ICollection.SyncRoot => this;

	object IList.this[int index]
	{
		get
		{
			return _items[index];
		}
		set
		{
			throw new NotSupportedException();
		}
	}

	bool IList.IsFixedSize => true;

	bool IList.IsReadOnly => true;

	int IReadOnlyCollection<T>.Count => _items.Length;

	T IReadOnlyList<T>.this[int index] => _items[index];

	int ICollection<T>.Count => _items.Length;

	bool ICollection<T>.IsReadOnly => true;

	T IList<T>.this[int index]
	{
		get
		{
			return _items[index];
		}
		set
		{
			throw new NotSupportedException();
		}
	}

	public <>z__ReadOnlyArray(T[] items)
	{
		_items = items;
	}

	IEnumerator IEnumerable.GetEnumerator()
	{
		return ((IEnumerable)_items).GetEnumerator();
	}

	void ICollection.CopyTo(Array array, int index)
	{
		((ICollection)_items).CopyTo(array, index);
	}

	int IList.Add(object value)
	{
		throw new NotSupportedException();
	}

	void IList.Clear()
	{
		throw new NotSupportedException();
	}

	bool IList.Contains(object value)
	{
		return ((IList)_items).Contains(value);
	}

	int IList.IndexOf(object value)
	{
		return ((IList)_items).IndexOf(value);
	}

	void IList.Insert(int index, object value)
	{
		throw new NotSupportedException();
	}

	void IList.Remove(object value)
	{
		throw new NotSupportedException();
	}

	void IList.RemoveAt(int index)
	{
		throw new NotSupportedException();
	}

	IEnumerator<T> IEnumerable<T>.GetEnumerator()
	{
		return ((IEnumerable<T>)_items).GetEnumerator();
	}

	void ICollection<T>.Add(T item)
	{
		throw new NotSupportedException();
	}

	void ICollection<T>.Clear()
	{
		throw new NotSupportedException();
	}

	bool ICollection<T>.Contains(T item)
	{
		return ((ICollection<T>)_items).Contains(item);
	}

	void ICollection<T>.CopyTo(T[] array, int arrayIndex)
	{
		((ICollection<T>)_items).CopyTo(array, arrayIndex);
	}

	bool ICollection<T>.Remove(T item)
	{
		throw new NotSupportedException();
	}

	int IList<T>.IndexOf(T item)
	{
		return ((IList<T>)_items).IndexOf(item);
	}

	void IList<T>.Insert(int index, T item)
	{
		throw new NotSupportedException();
	}

	void IList<T>.RemoveAt(int index)
	{
		throw new NotSupportedException();
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[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 Mdh.RoR2.UI.HUD
{
	internal static class OnDisable
	{
		public delegate void PrefixSignature(HUD self);

		public delegate void PostfixSignature(HUD self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(HUD).GetMethod("OnDisable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HUD", "OnDisable");
		}
	}
	internal static class Awake
	{
		public delegate void PrefixSignature(HUD self);

		public delegate void PostfixSignature(HUD self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(HUD).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.HUD", "Awake");
		}
	}
	internal static class _cctor
	{
	}
	internal static class OnUICameraPreRender
	{
	}
	internal static class OnUICameraPostRender
	{
	}
	internal static class SetScoreboardActive
	{
	}
	internal static class IsScoreboardActive
	{
	}
	internal static class OnEnable
	{
	}
	internal static class get_targetBodyObject
	{
	}
	internal static class get_targetMaster
	{
	}
	internal static class set_targetMaster
	{
	}
	internal static class get_localUserViewer
	{
	}
	internal static class set_localUserViewer
	{
	}
	internal static class get_mainContainerCanvas
	{
	}
	internal static class set_mainContainerCanvas
	{
	}
	internal static class get_scoreboardPostProcessVolume
	{
	}
	internal static class set_scoreboardPostProcessVolume
	{
	}
	internal static class get_gameModeUiInstance
	{
	}
	internal static class set_gameModeUiInstance
	{
	}
	internal static class OnDestroy
	{
	}
	internal static class Update
	{
	}
	internal static class SetScoreboardState
	{
	}
	internal static class ActivateScoreboard
	{
	}
	internal static class DeactivateScoreboard
	{
	}
	internal static class UpdateHudVisibility
	{
	}
	internal static class add_onHudTargetChangedGlobal
	{
	}
	internal static class remove_onHudTargetChangedGlobal
	{
	}
	internal static class add_shouldHudDisplay
	{
	}
	internal static class remove_shouldHudDisplay
	{
	}
	internal static class SetTooltipProviderState
	{
	}
	internal static class _ctor
	{
	}
	internal static class ShouldHudDisplayDelegate
	{
		internal static class _ctor
		{
		}

		internal static class Invoke
		{
		}

		internal static class BeginInvoke
		{
		}

		internal static class EndInvoke
		{
		}
	}
}
namespace Mdh.RoR2.UI.ItemInventoryDisplay
{
	internal static class OnInventoryChanged
	{
		public delegate void PrefixSignature(ItemInventoryDisplay self);

		public delegate void PostfixSignature(ItemInventoryDisplay self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(ItemInventoryDisplay).GetMethod("OnInventoryChanged", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ItemInventoryDisplay", "OnInventoryChanged");
		}
	}
	internal static class SetSubscribedInventory
	{
		public delegate void PrefixSignature(ItemInventoryDisplay self, ref Inventory newInventory);

		public delegate void PostfixSignature(ItemInventoryDisplay self, ref Inventory newInventory);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(ItemInventoryDisplay).GetMethod("SetSubscribedInventory", (BindingFlags)(-1), null, new Type[1] { typeof(Inventory) }, null) ?? throw new MissingMethodException("RoR2.UI.ItemInventoryDisplay", "SetSubscribedInventory");
		}
	}
	internal static class Awake
	{
		public delegate void PrefixSignature(ItemInventoryDisplay self);

		public delegate void PostfixSignature(ItemInventoryDisplay self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(ItemInventoryDisplay).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ItemInventoryDisplay", "Awake");
		}
	}
	internal static class get_isUninitialized
	{
	}
	internal static class get_eventSystem
	{
	}
	internal static class GetTotalVisibleItemCount
	{
	}
	internal static class FixedUpdate
	{
	}
	internal static class ItemIsVisible
	{
	}
	internal static class AllocateIcons
	{
	}
	internal static class CalculateIconScale
	{
	}
	internal static class OnIconCountChanged
	{
	}
	internal static class OnIconScaleChanged
	{
	}
	internal static class CalculateLayoutValues
	{
	}
	internal static class LayoutAllIcons
	{
	}
	internal static class LayoutIndividualIcon
	{
	}
	internal static class CacheComponents
	{
	}
	internal static class OnDestroy
	{
	}
	internal static class OnEnable
	{
	}
	internal static class RequestUpdateDisplay
	{
	}
	internal static class UpdateDisplay
	{
	}
	internal static class SetItems_System_Collections_Generic_List_1_Array_System_Int32
	{
	}
	internal static class SetItems_Array_RoR2_ItemIndex_System_Int32_Array_System_Int32
	{
	}
	internal static class ResetItems
	{
	}
	internal static class OnRectTransformDimensionsChange
	{
	}
	internal static class CalculateLayoutInputHorizontal
	{
	}
	internal static class CalculateLayoutInputVertical
	{
	}
	internal static class get_minWidth
	{
	}
	internal static class get_preferredWidth
	{
	}
	internal static class get_flexibleWidth
	{
	}
	internal static class get_minHeight
	{
	}
	internal static class get_preferredHeight
	{
	}
	internal static class set_preferredHeight
	{
	}
	internal static class get_flexibleHeight
	{
	}
	internal static class get_layoutPriority
	{
	}
	internal static class OnValidate
	{
	}
	internal static class SelectFirstItemIcon
	{
	}
	internal static class GetItemCount
	{
	}
	internal static class _ctor
	{
	}
	internal static class _AllocateIcons_b__29_0
	{
	}
	internal static class LayoutValues
	{
		internal static class _ctor
		{
		}
	}
}
namespace Mdh.RoR2.UI.ScoreboardController
{
	internal static class OnInventoryChanged
	{
		public delegate void PrefixSignature(ScoreboardController self);

		public delegate void PostfixSignature(ScoreboardController self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(ScoreboardController).GetMethod("OnInventoryChanged", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ScoreboardController", "OnInventoryChanged");
		}
	}
	internal static class OnDisable
	{
		public delegate void PrefixSignature(ScoreboardController self);

		public delegate void PostfixSignature(ScoreboardController self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(ScoreboardController).GetMethod("OnDisable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ScoreboardController", "OnDisable");
		}
	}
	internal static class Rebuild
	{
		public delegate void PrefixSignature(ScoreboardController self);

		public delegate void PostfixSignature(ScoreboardController self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(ScoreboardController).GetMethod("Rebuild", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ScoreboardController", "Rebuild");
		}
	}
	internal static class Awake
	{
		public delegate void PrefixSignature(ScoreboardController self);

		public delegate void PostfixSignature(ScoreboardController self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(ScoreboardController).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.UI.ScoreboardController", "Awake");
		}
	}
	internal static class add_onScoreboardOpen
	{
	}
	internal static class remove_onScoreboardOpen
	{
	}
	internal static class SetStripCount
	{
	}
	internal static class HandleInspectorPanel
	{
	}
	internal static class HandleOnScoreboardStripOnSelect
	{
	}
	internal static class PlayerEventToRebuild
	{
	}
	internal static class OnEnable
	{
	}
	internal static class SelectFirstScoreboardStrip
	{
	}
	internal static class _ctor
	{
	}
	internal static class __c
	{
		internal static class _cctor
		{
		}

		internal static class _ctor
		{
		}

		internal static class _Rebuild_b__11_0
		{
		}
	}
	internal static class __c__DisplayClass12_0
	{
		internal static class _ctor
		{
		}

		internal static class _HandleInspectorPanel_b__0
		{
		}

		internal static class _HandleInspectorPanel_b__1
		{
		}
	}
}
namespace Mdh.RoR2.BossGroup
{
	internal static class UpdateObservations
	{
		public delegate void PrefixSignature(BossGroup self, ref BossMemory memory);

		public delegate void PostfixSignature(BossGroup self, ref BossMemory memory);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(BossGroup).GetMethod("UpdateObservations", (BindingFlags)(-1), null, new Type[1] { typeof(BossMemory).MakeByRefType() }, null) ?? throw new MissingMethodException("RoR2.BossGroup", "UpdateObservations");
		}
	}
	internal static class OnDisable
	{
		public delegate void PrefixSignature(BossGroup self);

		public delegate void PostfixSignature(BossGroup self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(BossGroup).GetMethod("OnDisable", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.BossGroup", "OnDisable");
		}
	}
	internal static class Awake
	{
		public delegate void PrefixSignature(BossGroup self);

		public delegate void PostfixSignature(BossGroup self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			return typeof(BossGroup).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.BossGroup", "Awake");
		}
	}
	internal static class get_hasThresholdController
	{
	}
	internal static class get_fixedAge
	{
	}
	internal static class get_fixedTimeSinceEnabled
	{
	}
	internal static class get_bonusRewardCount
	{
	}
	internal static class set_bonusRewardCount
	{
	}
	internal static class get_combatSquad
	{
	}
	internal static class set_combatSquad
	{
	}
	internal static class Start
	{
	}
	internal static class OnEnable
	{
	}
	internal static class FixedUpdate
	{
	}
	internal static class OnDefeatedServer
	{
	}
	internal static class OnMemberAddedServer
	{
	}
	internal static class OnMemberDefeatedServer
	{
	}
	internal static class OnMemberDiscovered
	{
	}
	internal static class OnMemberLost
	{
	}
	internal static class DropRewards
	{
	}
	internal static class add_onBossGroupStartServer
	{
	}
	internal static class remove_onBossGroupStartServer
	{
	}
	internal static class add_onBossGroupDefeatedServer
	{
	}
	internal static class remove_onBossGroupDefeatedServer
	{
	}
	internal static class FindBossMemoryIndex
	{
	}
	internal static class RememberBoss
	{
	}
	internal static class ForgetBoss
	{
	}
	internal static class ResetBossBar
	{
	}
	internal static class AddBossMemory
	{
	}
	internal static class get_bestObservedName
	{
	}
	internal static class set_bestObservedName
	{
	}
	internal static class get_bestObservedSubtitle
	{
	}
	internal static class set_bestObservedSubtitle
	{
	}
	internal static class get_totalMaxObservedMaxHealth
	{
	}
	internal static class set_totalMaxObservedMaxHealth
	{
	}
	internal static class get_totalObservedHealth
	{
	}
	internal static class set_totalObservedHealth
	{
	}
	internal static class UpdateBossMemories
	{
	}
	internal static class GetTotalBossCount
	{
	}
	internal static class FindBossGroup
	{
	}
	internal static class ReportObjective
	{
	}
	internal static class _ctor
	{
	}
	internal static class _cctor
	{
	}
	internal static class BossMemory
	{
		internal static class _ctor
		{
		}
	}
	internal static class DefeatBossObjectiveTracker
	{
		internal static class _ctor
		{
		}
	}
	internal static class EnableHudHealthBarState
	{
		internal static class OnEnter
		{
		}

		internal static class OnExit
		{
		}

		internal static class _ctor
		{
		}
	}
}
namespace MonoDetour.HookGen
{
	internal static class DefaultMonoDetourManager
	{
		internal static MonoDetourManager Instance { get; } = New();

		internal static MonoDetourManager New()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			return new MonoDetourManager(typeof(DefaultMonoDetourManager).Assembly.GetName().Name);
		}
	}
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
	internal class MonoDetourTargetsAttribute(Type? targetType = null) : Attribute(), IMonoDetourTargets
	{
		public Type? TargetType { get; } = targetType;

		public bool IncludeNestedTypes { get; set; } = true;

		public string[]? Members { get; set; }

		public string[]? MemberNamePrefixes { get; set; }

		public string[]? MemberNameSuffixes { get; set; }

		public bool GenerateControlFlowVariants { get; set; }
	}
}
namespace BepInEx
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	[Embedded]
	internal sealed class BepInAutoPluginAttribute : Attribute
	{
		public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace BepInEx.Preloader.Core.Patching
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	[Embedded]
	internal sealed class PatcherAutoPluginAttribute : Attribute
	{
		public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace Microsoft.CodeAnalysis
{
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace ShowBossInventory
{
	[MonoDetourTargets(typeof(ScoreboardController))]
	[MonoDetourTargets(typeof(BossGroup))]
	[MonoDetourTargets(typeof(ItemInventoryDisplay))]
	internal static class BossInventoryBehavior
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static Manipulator <0>__UpdateObservations;

			public static Mdh.RoR2.UI.ItemInventoryDisplay.OnInventoryChanged.PostfixSignature <1>__OnSubscribedInventoryChanged;

			public static Mdh.RoR2.BossGroup.OnDisable.PostfixSignature <2>__OnBossBarDisable;

			public static Rebuild.PostfixSignature <3>__OnBringUpTabMenu;

			public static Mdh.RoR2.UI.ScoreboardController.OnDisable.PostfixSignature <4>__OnTabMenuGone;
		}

		[MonoDetourHookInitialize]
		private static void Setup()
		{
			//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)
			//IL_001b: Expected O, but got Unknown
			object obj = <>O.<0>__UpdateObservations;
			if (obj == null)
			{
				Manipulator val = UpdateObservations;
				<>O.<0>__UpdateObservations = val;
				obj = (object)val;
			}
			Mdh.RoR2.BossGroup.UpdateObservations.ILHook((Manipulator)obj);
			Mdh.RoR2.UI.ItemInventoryDisplay.OnInventoryChanged.Postfix(OnSubscribedInventoryChanged);
			Mdh.RoR2.BossGroup.OnDisable.Postfix(OnBossBarDisable);
			Rebuild.Postfix(OnBringUpTabMenu);
			Mdh.RoR2.UI.ScoreboardController.OnDisable.Postfix(OnTabMenuGone);
		}

		private static void UpdateObservations(ILManipulationInfo info)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			ILWeaver w = new ILWeaver(info);
			w.MatchRelaxed(new Predicate<Instruction>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetSubtitle"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<BossGroup>(x, "set_bestObservedSubtitle") && w.SetCurrentTo(x)
			}).ThrowIfFailure().InsertAfterCurrent((IEnumerable<InstructionOrEnumerable>)new <>z__ReadOnlyArray<InstructionOrEnumerable>((InstructionOrEnumerable[])(object)new InstructionOrEnumerable[3]
			{
				InstructionOrEnumerable.op_Implicit(w.Create(OpCodes.Ldarg_0)),
				InstructionOrEnumerable.op_Implicit(w.Create(OpCodes.Ldarg_1)),
				InstructionOrEnumerable.op_Implicit(w.CreateDelegateCall<<>A{00000008}<BossGroup, BossMemory>>((<>A{00000008}<BossGroup, BossMemory>)delegate(BossGroup self, ref BossMemory memory)
				{
					if (!((Object)(object)Main.ItemInventoryDisplayClone == (Object)null) && !((Object)(object)Main.InventoryClone == (Object)null) && !((Object)(object)memory.cachedBody == (Object)null) && !((Object)(object)memory.cachedBody.inventory == (Object)null))
					{
						Main.ItemInventoryDisplayClone.SetSubscribedInventory(memory.cachedBody.inventory);
					}
				}))
			}));
		}

		private static void OnSubscribedInventoryChanged(ItemInventoryDisplay self)
		{
			if ((Object)(object)self == (Object)null || (Object)(object)self.inventory == (Object)null || (Object)(object)self._characterBody == (Object)null || ((Object)self).name != "BossItemInventory")
			{
				return;
			}
			Log.Debug("checking");
			if (!Main.InventoryClone.activeSelf)
			{
				if (Main.HasAnyNotHiddenItems(self.inventory))
				{
					Log.Debug("setting true");
					Main.InventoryClone.SetActive(true);
					Main.ShouldShowInventoryOnTabMenuGone = true;
				}
			}
			else if (!ConfigOptions.ShowInventoryWithNoRealItems.Value && !Main.HasAnyNotHiddenItems(self.inventory))
			{
				Log.Debug("setting false");
				Main.InventoryClone.SetActive(false);
				Main.ShouldShowInventoryOnTabMenuGone = false;
			}
		}

		private static void OnBossBarDisable(BossGroup self)
		{
			if (!((Object)(object)Main.InventoryClone == (Object)null) && !((Object)(object)Main.ItemInventoryDisplayClone == (Object)null) && InstanceTracker.GetInstancesList<BossGroup>().Count <= 0)
			{
				Log.Debug("unsetting active");
				Main.InventoryClone.SetActive(false);
				Main.ShouldShowInventoryOnTabMenuGone = false;
			}
		}

		private static void OnTabMenuGone(ScoreboardController self)
		{
			if (!((Object)(object)Main.InventoryClone == (Object)null) && !((Object)(object)Main.ItemInventoryDisplayClone == (Object)null))
			{
				Log.Debug($"tab menu down, setting active to show bool ({Main.ShouldShowInventoryOnTabMenuGone})");
				Main.IsTabMenuUp = false;
				Main.InventoryClone.SetActive(Main.ShouldShowInventoryOnTabMenuGone);
			}
		}

		private static void OnBringUpTabMenu(ScoreboardController self)
		{
			if (!((Object)(object)Main.InventoryClone == (Object)null) && !((Object)(object)Main.ItemInventoryDisplayClone == (Object)null) && ConfigOptions.HideInventoryWhenTabMenuOpened.Value)
			{
				Log.Debug("tab menu up, setting active false");
				Main.IsTabMenuUp = true;
				Main.InventoryClone.SetActive(false);
			}
		}
	}
	public static class ConfigOptions
	{
		private const string _sectionName = "Config Options";

		public static ConfigEntry<float> InventoryTransparency;

		public static ConfigEntry<bool> HideInventoryWhenTabMenuOpened;

		public static ConfigEntry<bool> ShowInventoryWithNoRealItems;

		private static void InventoryTransparency_SettingChanged(object sender, EventArgs e)
		{
			if (!((Object)(object)Main.InventoryClone == (Object)null))
			{
				Extensions.GetOrAddComponent<CanvasGroup>(Main.InventoryClone).alpha = InventoryTransparency.Value;
			}
		}

		private static void ShowInventoryDespiteNoRealItems_SettingChanged(object sender, EventArgs e)
		{
			if (!((Object)(object)Main.InventoryClone == (Object)null) && !((Object)(object)Main.ItemInventoryDisplayClone == (Object)null) && !((Object)(object)Main.ItemInventoryDisplayClone._characterBody == (Object)null) && !((Object)(object)Main.ItemInventoryDisplayClone.inventory == (Object)null))
			{
				if (ShowInventoryWithNoRealItems.Value)
				{
					Main.InventoryClone.SetActive(true);
					Main.ShouldShowInventoryOnTabMenuGone = true;
				}
				else if (!Main.HasAnyNotHiddenItems(Main.ItemInventoryDisplayClone.inventory))
				{
					Main.InventoryClone.SetActive(false);
					Main.ShouldShowInventoryOnTabMenuGone = false;
				}
			}
		}

		internal static void BindConfigOptions(ConfigFile config)
		{
			InventoryTransparency = Extensions.BindOptionSlider<float>(config, "Config Options", "Inventory transparency", "Set the transparency/alpha of the boss inventory UI.", 0.6f, 0f, 1f, (ConfigFlags)0);
			InventoryTransparency.SettingChanged += InventoryTransparency_SettingChanged;
			HideInventoryWhenTabMenuOpened = Extensions.BindOption<bool>(config, "Config Options", "Hide inventory while the tab menu is open", "The tab menu inventory overlaps with the boss inventory, so it's best to leave this on unless you're trying to hover over any items a boss has.", true, (ConfigFlags)0);
			ShowInventoryWithNoRealItems = Extensions.BindOption<bool>(config, "Config Options", "Show boss inventory even if there is only hidden/no tier items", "Enemies sometimes get some hidden items and/or some no tier items that you're not meant to see. Enable this if you want to see the inventory when those types of items are the only ones a boss has.", false, (ConfigFlags)0);
			ShowInventoryWithNoRealItems.SettingChanged += ShowInventoryDespiteNoRealItems_SettingChanged;
		}

		internal static void BindAllConfigOptions(ConfigFile config)
		{
			BindConfigOptions(config);
		}
	}
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	internal static class Main
	{
		internal const string BossInventoryName = "BossItemInventory";

		internal static HUD HUD;

		internal static Transform BossHealthBarRootContainer;

		internal static bool IsTabMenuUp;

		internal static bool ShouldShowInventoryOnTabMenuGone;

		internal static ItemInventoryDisplay ItemInventoryDisplayClone;

		private static GameObject _inventoryClone;

		internal static GameObject InventoryClone
		{
			get
			{
				return _inventoryClone;
			}
			set
			{
				_inventoryClone = value;
				ItemInventoryDisplayClone = value.GetComponent<ItemInventoryDisplay>();
			}
		}

		internal static bool HasAnyNotHiddenItems(Inventory inventory)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Invalid comparison between Unknown and I4
			if ((Object)(object)inventory == (Object)null)
			{
				return false;
			}
			if (ConfigOptions.ShowInventoryWithNoRealItems.Value)
			{
				return true;
			}
			ItemIndex val = (ItemIndex)0;
			for (ItemIndex val2 = (ItemIndex)ItemCatalog.itemCount; val < val2; val = (ItemIndex)(val + 1))
			{
				ItemDef itemDef = ItemCatalog.GetItemDef(val);
				if ((Object)(object)itemDef != (Object)null && !itemDef.hidden && (int)itemDef.tier != 5 && inventory.GetItemCountEffective(itemDef) > 0)
				{
					return true;
				}
			}
			return false;
		}
	}
	internal static class ModSupport
	{
		internal static class CleanestHudMod
		{
			private static bool? _modexists;

			internal static bool ModIsRunning
			{
				get
				{
					bool valueOrDefault = _modexists == true;
					if (!_modexists.HasValue)
					{
						valueOrDefault = Chainloader.PluginInfos.ContainsKey("LordVGames.CleanestHud");
						_modexists = valueOrDefault;
					}
					return _modexists.Value;
				}
			}
		}
	}
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("LordVGames.ShowBossInventory", "ShowBossInventory", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string Id = "LordVGames.ShowBossInventory";

		public static string Name => "ShowBossInventory";

		public static string Version => "1.0.0";

		public void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			ConfigOptions.BindAllConfigOptions(((BaseUnityPlugin)this).Config);
			MonoDetourManager.InvokeHookInitializers(typeof(Plugin).Assembly);
		}
	}
	[MonoDetourTargets(typeof(HUD))]
	internal static class SetupInventory
	{
		[MonoDetourHookInitialize]
		private static void Setup()
		{
			Mdh.RoR2.UI.HUD.Awake.Postfix(HudAwake);
		}

		private static void HudAwake(HUD hud)
		{
			((MonoBehaviour)hud).StartCoroutine(WaitForShitToNotBeNull(hud));
		}

		private static IEnumerator WaitForShitToNotBeNull(HUD hud)
		{
			Main.HUD = hud;
			int num = 0;
			if ((Object)(object)hud.itemInventoryDisplay == (Object)null || (Object)(object)((Component)hud.itemInventoryDisplay).gameObject == (Object)null)
			{
				num++;
				if (num > 10)
				{
					Log.Error("Couldn't find the HUD's inventory display in 10 attempts!");
					yield break;
				}
				yield return (object)new WaitForFixedUpdate();
			}
			Main.InventoryClone = PrefabAPI.InstantiateClone(((Component)hud.itemInventoryDisplay).gameObject, "BossItemInventory", false);
			Main.InventoryClone.SetActive(false);
			yield return (object)new WaitForSeconds(0.25f);
			EditInventoryDisplayUI();
		}

		private static void EditInventoryDisplayUI()
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			Main.InventoryClone.transform.SetParent(((Component)Main.HUD.itemInventoryDisplay).transform.parent);
			Main.BossHealthBarRootContainer = ((Component)Main.HUD).GetComponent<ChildLocator>().FindChild("TopCenterCluster").Find("BossHealthBarRoot/Container");
			Transform val = Main.BossHealthBarRootContainer.Find("BossHealthBarContainer/BackgroundPanel");
			RectTransform component = ((Component)val).GetComponent<RectTransform>();
			RectTransform component2 = Main.InventoryClone.GetComponent<RectTransform>();
			float x = component2.sizeDelta.x;
			Rect rect = component2.rect;
			float width = ((Rect)(ref rect)).width;
			rect = component.rect;
			component2.sizeDelta = new Vector2(x - (width - ((Rect)(ref rect)).width), component2.sizeDelta.y);
			Main.InventoryClone.transform.localScale = Vector3.one;
			Main.InventoryClone.transform.position = new Vector3(0f, val.position.y, val.position.z);
			int num = ((!ModSupport.CleanestHudMod.ModIsRunning) ? 75 : 50);
			Main.InventoryClone.transform.localPosition = new Vector3(Main.InventoryClone.transform.localPosition.x - 440f, Main.InventoryClone.transform.localPosition.y - (float)num, Main.InventoryClone.transform.localPosition.z);
			Extensions.GetOrAddComponent<CanvasGroup>(Main.InventoryClone).alpha = ConfigOptions.InventoryTransparency.Value;
			if (ModSupport.CleanestHudMod.ModIsRunning)
			{
				((Behaviour)Main.InventoryClone.GetComponent<Image>()).enabled = false;
			}
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}