Decompiled source of JPLangMod v1.0.6

JPLangMod.dll

Decompiled 2 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using On.RoR2;
using On.RoR2.UI;
using RoR2;
using RoR2.UI;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("JPFontMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JPFontMod")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fb60a9b5-06a1-4228-b141-0b50fcef0e2e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace JPLangMod;

[BepInPlugin("com.yourname.jpfontmod", "JPLangMod", "1.0.0")]
public class JPLangMod : BaseUnityPlugin
{
	private TMP_FontAsset jpFont;

	private TMP_FontAsset fallbackFont;

	public const string PluginGUID = "com.yourname.detaileditemessages";

	public const string PluginName = "Detailed Item Messages";

	public const string PluginVersion = "1.0.0";

	private ConfigEntry<bool> enableDetailedMessages;

	private ConfigEntry<bool> showItemTier;

	private ConfigEntry<bool> showStackCount;

	private ConfigEntry<bool> showItemDescription;

	private ConfigEntry<float> messageDuration;

	private Dictionary<ItemIndex, string> itemDescriptions = new Dictionary<ItemIndex, string>();

	private void Awake()
	{
		//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Expected O, but got Unknown
		//IL_0187: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Expected O, but got Unknown
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Expected O, but got Unknown
		//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b5: Expected O, but got Unknown
		string location = Assembly.GetExecutingAssembly().Location;
		string directoryName = Path.GetDirectoryName(location);
		string text = Path.Combine(directoryName, "jpfontbundle");
		AssetBundle val = AssetBundle.LoadFromFile(text);
		if ((Object)(object)val == (Object)null)
		{
			((BaseUnityPlugin)this).Logger.LogError((object)("AssetBundle load failed: " + text));
			return;
		}
		jpFont = val.LoadAsset<TMP_FontAsset>("LogoTypeGothicC");
		fallbackFont = val.LoadAsset<TMP_FontAsset>("LogoTypeGothicR");
		if ((Object)(object)jpFont == (Object)null)
		{
			((BaseUnityPlugin)this).Logger.LogError((object)"JPFont アセットが AssetBundle 内に見つかりません");
			return;
		}
		((BaseUnityPlugin)this).Logger.LogInfo((object)"日本語フォント読み込み成功");
		HGTextMeshProUGUI.Awake += new hook_Awake(ReplaceFontHook);
		ApplyFontToAllExistingTMPText();
		SceneManager.sceneLoaded += delegate
		{
			ApplyFontToAllExistingTMPText();
		};
		enableDetailedMessages = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "EnableDetailedMessages", true, "詳細なアイテムメッセージを有効にする");
		showItemTier = ((BaseUnityPlugin)this).Config.Bind<bool>("Display", "ShowItemTier", true, "アイテムの階級を表示する");
		showStackCount = ((BaseUnityPlugin)this).Config.Bind<bool>("Display", "ShowStackCount", true, "現在のスタック数を表示する");
		showItemDescription = ((BaseUnityPlugin)this).Config.Bind<bool>("Display", "ShowItemDescription", true, "アイテムの説明を表示する");
		messageDuration = ((BaseUnityPlugin)this).Config.Bind<float>("Display", "MessageDuration", 10f, "メッセージの表示時間(秒)");
		Inventory.GiveItem_ItemIndex_int += new hook_GiveItem_ItemIndex_int(Inventory_GiveItem);
		Inventory.SetEquipmentIndex += new hook_SetEquipmentIndex(Inventory_SetEquipmentIndex);
		Chat.AddPickupMessage += new hook_AddPickupMessage(Chat_AddPickupMessage);
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Detailed Item Messages loaded successfully!");
	}

	private void ReplaceFontHook(orig_Awake orig, HGTextMeshProUGUI self)
	{
		orig.Invoke(self);
		ApplyFont((TMP_Text)(object)self);
	}

	private void ApplyFontToAllExistingTMPText()
	{
		Object[] array = Resources.FindObjectsOfTypeAll<Object>();
		foreach (Object val in array)
		{
			TMP_Text val2 = (TMP_Text)(object)((val is TMP_Text) ? val : null);
			if (val2 != null)
			{
				ApplyFont(val2);
			}
		}
	}

	private void ApplyFont(TMP_Text text)
	{
		if (!((Object)(object)jpFont == (Object)null))
		{
			text.font = jpFont;
			text.fontSharedMaterial = ((TMP_Asset)jpFont).material;
			if ((Object)(object)fallbackFont != (Object)null)
			{
				text.font.fallbackFontAssetTable = new List<TMP_FontAsset> { fallbackFont };
			}
			else
			{
				text.font.fallbackFontAssetTable?.Clear();
			}
			text.ForceMeshUpdate(false, false);
		}
	}

	private void Inventory_GiveItem(orig_GiveItem_ItemIndex_int orig, Inventory self, ItemIndex itemIndex, int count)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self, itemIndex, count);
		if (!enableDetailedMessages.Value)
		{
			return;
		}
		CharacterMaster component = ((Component)self).GetComponent<CharacterMaster>();
		if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.playerCharacterMasterController))
		{
			LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
			if (firstLocalUser != null && (Object)(object)firstLocalUser.cachedMasterController == (Object)(object)component.playerCharacterMasterController)
			{
				DisplayDetailedItemMessage(itemIndex, component);
			}
		}
	}

	private void Inventory_SetEquipmentIndex(orig_SetEquipmentIndex orig, Inventory self, EquipmentIndex newEquipmentIndex)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Invalid comparison between Unknown and I4
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		EquipmentIndex currentEquipmentIndex = self.currentEquipmentIndex;
		orig.Invoke(self, newEquipmentIndex);
		if (!enableDetailedMessages.Value || (int)newEquipmentIndex == -1 || newEquipmentIndex == currentEquipmentIndex)
		{
			return;
		}
		CharacterMaster component = ((Component)self).GetComponent<CharacterMaster>();
		if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.playerCharacterMasterController))
		{
			LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
			if (firstLocalUser != null && (Object)(object)firstLocalUser.cachedMasterController == (Object)(object)component.playerCharacterMasterController)
			{
				DisplayDetailedEquipmentMessage(newEquipmentIndex, component);
			}
		}
	}

	private void DisplayDetailedEquipmentMessage(EquipmentIndex equipmentIndex, CharacterMaster master)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(equipmentIndex);
		if (Object.op_Implicit((Object)(object)equipmentDef))
		{
			string @string = Language.GetString(equipmentDef.nameToken);
			string string2 = Language.GetString(equipmentDef.descriptionToken);
			float cooldown = equipmentDef.cooldown;
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append("<color=#FFA500>[装備取得] " + @string + "</color>");
			if (showItemDescription.Value && !string.IsNullOrEmpty(string2))
			{
				stringBuilder.AppendLine();
				stringBuilder.AppendLine("<color=#CCCCCC>効果: " + string2 + "</color>");
			}
			if (cooldown > 0f)
			{
				stringBuilder.AppendLine();
				stringBuilder.Append($"<color=#87CEEB>クールダウン: {cooldown}秒</color>");
			}
			string equipmentInfo = GetEquipmentInfo(equipmentIndex);
			if (!string.IsNullOrEmpty(equipmentInfo))
			{
				stringBuilder.AppendLine();
				stringBuilder.Append("<color=#FFD700>" + equipmentInfo + "</color>");
			}
			Chat.AddMessage(stringBuilder.ToString());
		}
	}

	private void Chat_AddPickupMessage(orig_AddPickupMessage orig, CharacterBody body, string pickupToken, Color32 pickupColor, uint pickupQuantity)
	{
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		if (enableDetailedMessages.Value && (Object)(object)body != (Object)null)
		{
			LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
			if (firstLocalUser != null && (Object)(object)firstLocalUser.cachedBody == (Object)(object)body)
			{
				return;
			}
		}
		orig.Invoke(body, pickupToken, pickupColor, pickupQuantity);
	}

	private string GetEquipmentInfo(EquipmentIndex equipmentIndex)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: 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_0115: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0131: Unknown result type (might be due to invalid IL or missing references)
		//IL_0147: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0163: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		if (equipmentIndex == Equipment.Jetpack.equipmentIndex)
		{
			return "持続時間: 15秒、燃料消費で飛行";
		}
		if (equipmentIndex == Equipment.GoldGat.equipmentIndex)
		{
			return "持続時間: 14秒、お金を消費して攻撃";
		}
		if (equipmentIndex == Equipment.BFG.equipmentIndex)
		{
			return "チャージ時間: 2秒、貫通レーザー";
		}
		if (equipmentIndex == Equipment.Scanner.equipmentIndex)
		{
			return "持続時間: 10秒、敵とアイテムを透視";
		}
		if (equipmentIndex == Equipment.CritOnUse.equipmentIndex)
		{
			return "持続時間: 8秒、クリティカル率100%";
		}
		if (equipmentIndex == Equipment.DroneBackup.equipmentIndex)
		{
			return "持続時間: 25秒、4体のドローン召喚";
		}
		if (equipmentIndex == Equipment.Lightning.equipmentIndex)
		{
			return "範囲: 35m、4体まで連鎖";
		}
		if (equipmentIndex == Equipment.BurnNearby.equipmentIndex)
		{
			return "範囲: 15m、12秒間燃焼";
		}
		if (equipmentIndex == Equipment.Blackhole.equipmentIndex)
		{
			return "持続時間: 10秒、重力フィールド生成";
		}
		if (equipmentIndex == Equipment.Gateway.equipmentIndex)
		{
			return "持続時間: 30秒、2つのポータル設置";
		}
		if (equipmentIndex == Equipment.Fruit.equipmentIndex)
		{
			return "最大HPの50%を即座に回復";
		}
		if (equipmentIndex == Equipment.Meteor.equipmentIndex)
		{
			return "範囲: 16m、落下まで3秒";
		}
		if (equipmentIndex == Equipment.Saw.equipmentIndex)
		{
			return "持続時間: 3秒、回転ノコギリ射出";
		}
		return "";
	}

	private void DisplayDetailedItemMessage(ItemIndex itemIndex, CharacterMaster master)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex);
		if (!Object.op_Implicit((Object)(object)itemDef))
		{
			return;
		}
		Inventory inventory = master.inventory;
		int itemCount = inventory.GetItemCount(itemIndex);
		string text = BuildDetailedMessage(itemDef, itemCount);
		if (Object.op_Implicit((Object)(object)master.playerCharacterMasterController))
		{
			NetworkUser networkUser = master.playerCharacterMasterController.networkUser;
			if (Object.op_Implicit((Object)(object)networkUser))
			{
				Chat.AddMessage("<color=#FFA500>[アイテム取得]</color>\n" + text);
			}
		}
	}

	private string BuildDetailedMessage(ItemDef itemDef, int stackCount)
	{
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.Append("<color=" + GetTierColor(itemDef.tier) + ">" + Language.GetString(itemDef.nameToken) + "</color>");
		if (showItemTier.Value)
		{
			string tierName = GetTierName(itemDef.tier);
			stringBuilder.Append(" (" + tierName + ")");
		}
		if (showStackCount.Value && stackCount > 1)
		{
			stringBuilder.Append($" [スタック: {stackCount}]");
		}
		stringBuilder.AppendLine();
		if (showItemDescription.Value)
		{
			string @string = Language.GetString(itemDef.descriptionToken);
			if (!string.IsNullOrEmpty(@string))
			{
				stringBuilder.AppendLine("<color=#CCCCCC>効果: " + @string + "</color>");
			}
		}
		string stackInfo = GetStackInfo(itemDef, stackCount);
		if (!string.IsNullOrEmpty(stackInfo))
		{
			stringBuilder.AppendLine("<color=#FFD700>" + stackInfo + "</color>");
		}
		return stringBuilder.ToString().TrimEnd(Array.Empty<char>());
	}

	private string GetTierColor(ItemTier tier)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected I4, but got Unknown
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: 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_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_011c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_013a: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		return (int)tier switch
		{
			0 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)1))), 
			1 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)2))), 
			2 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)3))), 
			4 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)13))), 
			3 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)4))), 
			6 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)25))), 
			7 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)25))), 
			8 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)25))), 
			9 => "#" + ColorUtility.ToHtmlStringRGB(Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)25))), 
			_ => "#FFFFFF", 
		};
	}

	private string GetTierName(ItemTier tier)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected I4, but got Unknown
		return (int)tier switch
		{
			0 => "コモン", 
			1 => "アンコモン", 
			2 => "レジェンダリー", 
			4 => "ボス", 
			3 => "ルナ", 
			6 => "コモン(ボイド)", 
			7 => "アンコモン(ボイド)", 
			8 => "レジェンダリー(ボイド)", 
			9 => "ボス(ボイド)", 
			_ => "不明", 
		};
	}

	private string GetStackInfo(ItemDef itemDef, int stackCount)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: 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_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_012d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0137: Unknown result type (might be due to invalid IL or missing references)
		//IL_0177: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Unknown result type (might be due to invalid IL or missing references)
		//IL_020d: Unknown result type (might be due to invalid IL or missing references)
		//IL_023d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0247: Unknown result type (might be due to invalid IL or missing references)
		//IL_026c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0276: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02af: Unknown result type (might be due to invalid IL or missing references)
		//IL_02df: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0319: Unknown result type (might be due to invalid IL or missing references)
		//IL_0323: Unknown result type (might be due to invalid IL or missing references)
		//IL_035b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0365: Unknown result type (might be due to invalid IL or missing references)
		//IL_0395: Unknown result type (might be due to invalid IL or missing references)
		//IL_039f: Unknown result type (might be due to invalid IL or missing references)
		//IL_03cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0409: Unknown result type (might be due to invalid IL or missing references)
		//IL_0413: Unknown result type (might be due to invalid IL or missing references)
		//IL_0443: Unknown result type (might be due to invalid IL or missing references)
		//IL_044d: Unknown result type (might be due to invalid IL or missing references)
		//IL_047d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0487: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0520: Unknown result type (might be due to invalid IL or missing references)
		//IL_052a: Unknown result type (might be due to invalid IL or missing references)
		//IL_054f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0559: Unknown result type (might be due to invalid IL or missing references)
		//IL_0591: Unknown result type (might be due to invalid IL or missing references)
		//IL_059b: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_05dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_060d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0617: Unknown result type (might be due to invalid IL or missing references)
		//IL_063c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0646: Unknown result type (might be due to invalid IL or missing references)
		//IL_067e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0688: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_06d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0702: Unknown result type (might be due to invalid IL or missing references)
		//IL_071c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0726: Unknown result type (might be due to invalid IL or missing references)
		//IL_073d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0747: Unknown result type (might be due to invalid IL or missing references)
		//IL_075e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0768: Unknown result type (might be due to invalid IL or missing references)
		if (itemDef.itemIndex == Items.Syringe.itemIndex)
		{
			float num = 15f * (float)stackCount;
			return $"攻撃速度: +{num}% ({15f}% × {stackCount})";
		}
		if (itemDef.itemIndex == Items.FlatHealth.itemIndex)
		{
			float num2 = 25f * (float)stackCount;
			return $"最大HP: +{num2} ({25f} × {stackCount})";
		}
		if (itemDef.itemIndex == Items.Mushroom.itemIndex)
		{
			float num3 = 1.5f + (float)(stackCount - 1) * 1.5f;
			float num4 = 4.5f * (float)stackCount;
			return $"治療効果: 毎秒{num4}HP回復 (範囲: {num3}m)";
		}
		if (itemDef.itemIndex == Items.CritGlasses.itemIndex)
		{
			float num5 = 10f * (float)stackCount;
			return $"クリティカル率: +{num5}% ({10f}% × {stackCount})";
		}
		if (itemDef.itemIndex == Items.Medkit.itemIndex)
		{
			float num6 = 20f + (float)(stackCount - 1) * 10f;
			return $"回復量: {num6}HP (基本20HP + {stackCount - 1} × 10HP)";
		}
		if (itemDef.itemIndex == Items.PersonalShield.itemIndex)
		{
			float num7 = 25f + (float)(stackCount - 1) * 25f;
			return $"シールド: {num7} (基本25 + {stackCount - 1} × 25)";
		}
		if (itemDef.itemIndex == Items.Crowbar.itemIndex)
		{
			float num8 = 75f + (float)(stackCount - 1) * 75f;
			return $"90%以上HPの敵に +{num8}% ダメージ";
		}
		if (itemDef.itemIndex == Items.Hoof.itemIndex)
		{
			float num9 = 14f * (float)stackCount;
			return $"移動速度: +{num9}%";
		}
		if (itemDef.itemIndex == Items.Feather.itemIndex)
		{
			return $"追加ジャンプ: +{stackCount}回";
		}
		if (itemDef.itemIndex == Items.ChainLightning.itemIndex)
		{
			int num10 = 2 + (stackCount - 1) * 2;
			return $"連鎖対象数: {num10}体";
		}
		if (itemDef.itemIndex == Items.Seed.itemIndex)
		{
			float num11 = 1f * (float)stackCount;
			return $"ダメージ時回復: {num11}HP";
		}
		if (itemDef.itemIndex == Items.Icicle.itemIndex)
		{
			float num12 = 10f * (float)stackCount;
			return $"減速確率: +{num12}%";
		}
		if (itemDef.itemIndex == Items.GhostOnKill.itemIndex)
		{
			float num13 = 7f + (float)(stackCount - 1) * 7f;
			return $"ゴースト持続時間: {num13}秒";
		}
		if (itemDef.itemIndex == Items.StunChanceOnHit.itemIndex)
		{
			float num14 = 5f * (float)stackCount;
			return $"スタン確率: +{num14}%";
		}
		if (itemDef.itemIndex == Items.Tooth.itemIndex)
		{
			float num15 = 3f * (float)stackCount;
			return $"キル時回復: {num15}HP";
		}
		if (itemDef.itemIndex == Items.IgniteOnKill.itemIndex)
		{
			float num16 = 10f * (float)stackCount;
			return $"燃焼確率: +{num16}%";
		}
		if (itemDef.itemIndex == Items.Bandolier.itemIndex)
		{
			float num17 = 18f * (float)stackCount;
			return $"弾薬ドロップ確率: {num17}%";
		}
		if (itemDef.itemIndex == Items.ArmorPlate.itemIndex)
		{
			float num18 = 5f * (float)stackCount;
			return $"アーマー: +{num18}";
		}
		if (itemDef.itemIndex == Items.BleedOnHit.itemIndex)
		{
			float num19 = 10f * (float)stackCount;
			return $"出血確率: +{num19}%";
		}
		if (itemDef.itemIndex == Items.SprintArmor.itemIndex)
		{
			float num20 = 30f * (float)stackCount;
			return $"ダッシュ中アーマー: +{num20}";
		}
		if (itemDef.itemIndex == Items.SecondarySkillMagazine.itemIndex)
		{
			return $"セカンダリスキルチャージ: +{stackCount}";
		}
		if (itemDef.itemIndex == Items.UtilitySkillMagazine.itemIndex)
		{
			return $"ユーティリティスキルチャージ: +{stackCount}";
		}
		if (itemDef.itemIndex == Items.Dagger.itemIndex)
		{
			float num21 = 150f + (float)(stackCount - 1) * 150f;
			return $"低HP時追加ダメージ: +{num21}%";
		}
		if (itemDef.itemIndex == Items.Behemoth.itemIndex)
		{
			float num22 = 4f + (float)(stackCount - 1) * 2.5f;
			return $"爆発範囲: {num22}m";
		}
		if (itemDef.itemIndex == Items.Missile.itemIndex)
		{
			float num23 = 300f * (float)stackCount;
			return $"ミサイルダメージ: {num23}%";
		}
		if (itemDef.itemIndex == Items.ExtraLife.itemIndex)
		{
			return $"復活回数: {stackCount}回";
		}
		if (itemDef.itemIndex == Items.KillEliteFrenzy.itemIndex)
		{
			float num24 = 4f + (float)(stackCount - 1) * 4f;
			return $"フレンジー持続時間: {num24}秒";
		}
		if (itemDef.itemIndex == Items.Knurl.itemIndex)
		{
			float num25 = 40f * (float)stackCount;
			float num26 = 1.6f * (float)stackCount;
			return $"最大HP: +{num25}, HP回復: +{num26}/秒";
		}
		if (itemDef.itemIndex == Items.BeetleGland.itemIndex)
		{
			return $"ビートルガード召喚数: {stackCount}体";
		}
		if (itemDef.itemIndex == Items.LunarPrimaryReplacement.itemIndex)
		{
			return "プライマリスキルが「Visions of Heresy」に置換";
		}
		if (itemDef.itemIndex == Items.LunarSecondaryReplacement.itemIndex)
		{
			return "セカンダリスキルが「Hooks of Heresy」に置換";
		}
		if (itemDef.itemIndex == Items.LunarUtilityReplacement.itemIndex)
		{
			return "ユーティリティスキルが「Strides of Heresy」に置換";
		}
		if (itemDef.itemIndex == Items.LunarSpecialReplacement.itemIndex)
		{
			return "スペシャルスキルが「Essence of Heresy」に置換";
		}
		if (stackCount > 1)
		{
			return $"現在のスタック数: {stackCount}";
		}
		return "";
	}

	public void OnDestroy()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Expected O, but got Unknown
		Inventory.GiveItem_ItemIndex_int -= new hook_GiveItem_ItemIndex_int(Inventory_GiveItem);
		Inventory.SetEquipmentIndex -= new hook_SetEquipmentIndex(Inventory_SetEquipmentIndex);
		Chat.AddPickupMessage -= new hook_AddPickupMessage(Chat_AddPickupMessage);
	}
}