using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Assets.Scripts.Actors.Player;
using Assets.Scripts.Camera;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("MegabonkShowBossArrow")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("My first plugin")]
[assembly: AssemblyTitle("MegabonkShowBossArrow")]
[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 MegabonkShowBossArrowBepInEx
{
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "MegabonkShowBossArrow";
public const string PLUGIN_NAME = "My first plugin";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace MegabonkShowBossArrow
{
[BepInPlugin("MegabonkShowBossArrow", "MegabonkShowBossArrow", "0.1.0")]
public class ShowBossArrow : BasePlugin
{
[HarmonyPatch]
private static class ShowBossArrowPatches
{
[HarmonyPatch(typeof(SpawnPlayerPortal), "Update")]
[HarmonyPostfix]
private static void SpawnPlayerPortal_Update_Postfix(SpawnPlayerPortal __instance)
{
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
if (!__instance.open)
{
MinimapCamera componentInChildren = ((Component)MyPlayer.Instance).gameObject.GetComponentInChildren<MinimapCamera>(false);
if (!((Object)(object)componentInChildren.bossSpawner == (Object)null) && !componentInChildren.arrowDict.ContainsKey(componentInChildren.bossSpawner))
{
Logger.LogInfo((object)"Added minimap boss arrow");
componentInChildren.bossSpotted = true;
componentInChildren.AddArrow(componentInChildren.bossSpawner, componentInChildren.bossColor);
}
}
}
}
internal static ManualLogSource Logger;
public override void Load()
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
Logger = ((BasePlugin)this).Log;
Harmony val = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
ManualLogSource logger = Logger;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val2 = new BepInExInfoLogInterpolatedStringHandler(26, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Initialized with ");
((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(val.GetPatchedMethods().Count());
((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" patches.");
}
logger.LogInfo(val2);
}
}
}