using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using TMPro;
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("Expulsion.Erenshor.VendorInfo")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+483155e6a671334455adef82a379f1fbcf0913c2")]
[assembly: AssemblyProduct("Expulsion.Erenshor.VendorInfo")]
[assembly: AssemblyTitle("Expulsion.Erenshor.VendorInfo")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Expulsion.Erenshor.VendorInfo
{
[BepInPlugin("Expulsion.Erenshor.VendorInfo", "VendorInfo", "1.0.2")]
public class Plugin : BaseUnityPlugin
{
private const string PluginGuid = "Expulsion.Erenshor.VendorInfo";
private const string PluginName = "VendorInfo";
private const string PluginVersion = "1.0.2";
private Harmony _harmonyInstance;
private void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
_harmonyInstance = new Harmony("Expulsion.Erenshor.VendorInfo");
_harmonyInstance.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin VendorInfo is loaded!");
}
private void OnDestroy()
{
_harmonyInstance.UnpatchSelf();
}
}
}
namespace Expulsion.Erenshor.VendorInfo.Patches
{
[HarmonyPatch(typeof(ItemIcon), "OnPointerEnter")]
public class ItemIcon_OnPointerEnter
{
public static void Postfix(ItemIcon __instance)
{
((TMP_Text)GameData.Misc.IDTitle).text = (__instance.VendorSlot ? $"{__instance.MyItem.ItemName}\n{__instance.MyItem.ItemValue} Gold" : $"{__instance.MyItem.ItemName}\n{Mathf.RoundToInt((float)__instance.MyItem.ItemValue * 0.65f)} Gold");
}
}
}