Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of HornsofHealing v1.0.0
plugins/hornsofhealing.dll
Decompiled 2 weeks agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using Jotunn; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("boromir2")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("boromir2")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("aae7871a-546c-4c4a-8506-9b81da9b2191")] [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 TrinketMod; [BepInPlugin("quentin.valheim.trinketmod", "Horn of healing", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class TrinketModPlugin : BaseUnityPlugin { public const string PluginGUID = "quentin.valheim.trinketmod"; public const string PluginName = "Horn of healing"; public const string PluginVersion = "1.0.0"; private void Awake() { PrefabManager.OnVanillaPrefabsAvailable += CreateTrinket; } private void CreateTrinket() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown PrefabManager.OnVanillaPrefabsAvailable -= CreateTrinket; ItemConfig val = new ItemConfig { Name = "Horn of Hope", Description = "Become the beacon of hope and guide them through the darkness.", CraftingStation = CraftingStations.Forge }; val.AddRequirement(new RequirementConfig("Iron", 5, 0, true)); val.AddRequirement(new RequirementConfig("WitheredBone", 5, 0, true)); val.AddRequirement(new RequirementConfig("TrophyDraugrElite", 1, 0, true)); CustomItem val2 = new CustomItem("TrinketOfHope", "TrinketIronHealth", val); ItemManager.Instance.AddItem(val2); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_maxAdrenaline = 50f; GameObject prefab = PrefabManager.Instance.GetPrefab("TankardOdin"); if ((Object)(object)prefab != (Object)null) { SharedData shared2 = prefab.GetComponent<ItemDrop>().m_itemData.m_shared; shared.m_icons = shared2.m_icons; } SE_TrinketHealBurst sE_TrinketHealBurst = ScriptableObject.CreateInstance<SE_TrinketHealBurst>(); ((Object)sE_TrinketHealBurst).name = "SE_TrinketHealBurst"; ((StatusEffect)sE_TrinketHealBurst).m_name = "Horn of Hope"; ((StatusEffect)sE_TrinketHealBurst).m_tooltip = "40 Healing to all nearby allies."; ((StatusEffect)sE_TrinketHealBurst).m_icon = shared.m_icons[0]; ((StatusEffect)sE_TrinketHealBurst).m_ttl = 45f; ((SE_Stats)sE_TrinketHealBurst).m_healthRegenMultiplier = 1.1f; ((SE_Stats)sE_TrinketHealBurst).m_staminaRegenMultiplier = 1.1f; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect((StatusEffect)(object)sE_TrinketHealBurst, false)); shared.m_fullAdrenalineSE = (StatusEffect)(object)sE_TrinketHealBurst; HideEquippedVisual(val2.ItemPrefab); } private void HideEquippedVisual(GameObject itemPrefab) { if ((Object)(object)itemPrefab == (Object)null) { return; } Transform val = itemPrefab.transform.Find("attach"); if ((Object)(object)val != (Object)null) { Renderer[] componentsInChildren = ((Component)val).GetComponentsInChildren<Renderer>(true); foreach (Renderer val2 in componentsInChildren) { val2.enabled = false; } } else { Logger.LogWarning((object)"[TrinketMod] Aucun enfant 'attach' trouvé sur le prefab."); } } } public class SE_TrinketHealBurst : SE_Stats { private const float HealAmount = 40f; private const float Radius = 15f; private static bool s_isPropagating; public override void Setup(Character character) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) ((SE_Stats)this).Setup(character); Player val = (Player)(object)((character is Player) ? character : null); if (val == null) { return; } ((Character)val).Heal(40f, true); if (s_isPropagating) { return; } s_isPropagating = true; foreach (Player allPlayer in Player.GetAllPlayers()) { if (!((Object)(object)allPlayer == (Object)(object)val) && Vector3.Distance(((Component)allPlayer).transform.position, ((Component)val).transform.position) <= 15f) { ((Character)allPlayer).Heal(40f, true); ((Character)allPlayer).GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)this).name), true, 0, 0f, (short)(-1)); } } s_isPropagating = false; } }