Please disclose if your mod was created primarily 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 PotionPlus v4.2.9
PotionsPlus.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using Groups; using HarmonyLib; using ItemManager; using JetBrains.Annotations; using LocalizationManager; using Microsoft.CodeAnalysis; using PieceManager; using ServerSync; using SkillManager; using TMPro; using UnityEngine; using UnityEngine.UI; using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Core.ObjectPool; using YamlDotNet.Core.Tokens; using YamlDotNet.Helpers; using YamlDotNet.Serialization; using YamlDotNet.Serialization.BufferedDeserialization; using YamlDotNet.Serialization.BufferedDeserialization.TypeDiscriminators; using YamlDotNet.Serialization.Callbacks; using YamlDotNet.Serialization.Converters; using YamlDotNet.Serialization.EventEmitters; using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NodeDeserializers; using YamlDotNet.Serialization.NodeTypeResolvers; using YamlDotNet.Serialization.ObjectFactories; using YamlDotNet.Serialization.ObjectGraphTraversalStrategies; using YamlDotNet.Serialization.ObjectGraphVisitors; using YamlDotNet.Serialization.Schemas; using YamlDotNet.Serialization.TypeInspectors; using YamlDotNet.Serialization.TypeResolvers; using YamlDotNet.Serialization.Utilities; using YamlDotNet.Serialization.ValueDeserializers; [assembly: Guid("150BFDAF-FF35-4302-B7CC-BEDCE69118D5")] [assembly: ComVisible(false)] [assembly: AssemblyTrademark("")] [assembly: AssemblyCopyright("Copyright © 2022")] [assembly: AssemblyProduct("PotionsPlus")] [assembly: AssemblyCompany("")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyDescription("https://valheim.thunderstore.io/package/OdinPlus/PotionPlus")] [assembly: AssemblyTitle("PotionsPlus")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyConfiguration("")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: <c284e320-2992-417b-978a-97a2ba5fda46>RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [<885483e3-7bd7-4b25-84f4-034871ffcd8f>Embedded] internal sealed class <885483e3-7bd7-4b25-84f4-034871ffcd8f>EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [<885483e3-7bd7-4b25-84f4-034871ffcd8f>Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class <a2876065-12a4-46f7-ae92-efd5abf656f5>NullableAttribute : Attribute { public readonly byte[] NullableFlags; public <a2876065-12a4-46f7-ae92-efd5abf656f5>NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public <a2876065-12a4-46f7-ae92-efd5abf656f5>NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] [<885483e3-7bd7-4b25-84f4-034871ffcd8f>Embedded] [CompilerGenerated] internal sealed class <fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContextAttribute : Attribute { public readonly byte Flag; public <fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [<885483e3-7bd7-4b25-84f4-034871ffcd8f>Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class <c284e320-2992-417b-978a-97a2ba5fda46>RefSafetyRulesAttribute : Attribute { public readonly int Version; public <c284e320-2992-417b-978a-97a2ba5fda46>RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SkillManager { [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] [PublicAPI] public class Skill { [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] public static class LocalizationCache { private static readonly Dictionary<string, Localization> localizations = new Dictionary<string, Localization>(); internal static void LocalizationPostfix(Localization __instance, string language) { string key = localizations.FirstOrDefault([<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (KeyValuePair<string, Localization> l) => l.Value == __instance).Key; if (key != null) { localizations.Remove(key); } if (!localizations.ContainsKey(language)) { localizations.Add(language, __instance); } } public static Localization ForLanguage([<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] string language = null) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown if (localizations.TryGetValue(language ?? PlayerPrefs.GetString("language", "English"), out var value)) { return value; } value = new Localization(); if (language != null) { value.SetupLanguage(language); } return value; } } [PublicAPI] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] public class LocalizeKey { private static readonly List<LocalizeKey> keys = new List<LocalizeKey>(); public readonly string Key; public readonly Dictionary<string, string> Localizations = new Dictionary<string, string>(); public LocalizeKey(string key) { Key = key.Replace("$", ""); keys.Add(this); } public void Alias(string alias) { Localizations.Clear(); if (!alias.Contains("$")) { alias = "$" + alias; } Localizations["alias"] = alias; if (Localization.m_instance != null) { Localization.instance.AddWord(Key, Localization.instance.Localize(alias)); } } public LocalizeKey English(string key) { return addForLang("English", key); } public LocalizeKey Swedish(string key) { return addForLang("Swedish", key); } public LocalizeKey French(string key) { return addForLang("French", key); } public LocalizeKey Italian(string key) { return addForLang("Italian", key); } public LocalizeKey German(string key) { return addForLang("German", key); } public LocalizeKey Spanish(string key) { return addForLang("Spanish", key); } public LocalizeKey Russian(string key) { return addForLang("Russian", key); } public LocalizeKey Romanian(string key) { return addForLang("Romanian", key); } public LocalizeKey Bulgarian(string key) { return addForLang("Bulgarian", key); } public LocalizeKey Macedonian(string key) { return addForLang("Macedonian", key); } public LocalizeKey Finnish(string key) { return addForLang("Finnish", key); } public LocalizeKey Danish(string key) { return addForLang("Danish", key); } public LocalizeKey Norwegian(string key) { return addForLang("Norwegian", key); } public LocalizeKey Icelandic(string key) { return addForLang("Icelandic", key); } public LocalizeKey Turkish(string key) { return addForLang("Turkish", key); } public LocalizeKey Lithuanian(string key) { return addForLang("Lithuanian", key); } public LocalizeKey Czech(string key) { return addForLang("Czech", key); } public LocalizeKey Hungarian(string key) { return addForLang("Hungarian", key); } public LocalizeKey Slovak(string key) { return addForLang("Slovak", key); } public LocalizeKey Polish(string key) { return addForLang("Polish", key); } public LocalizeKey Dutch(string key) { return addForLang("Dutch", key); } public LocalizeKey Portuguese_European(string key) { return addForLang("Portuguese_European", key); } public LocalizeKey Portuguese_Brazilian(string key) { return addForLang("Portuguese_Brazilian", key); } public LocalizeKey Chinese(string key) { return addForLang("Chinese", key); } public LocalizeKey Japanese(string key) { return addForLang("Japanese", key); } public LocalizeKey Korean(string key) { return addForLang("Korean", key); } public LocalizeKey Hindi(string key) { return addForLang("Hindi", key); } public LocalizeKey Thai(string key) { return addForLang("Thai", key); } public LocalizeKey Abenaki(string key) { return addForLang("Abenaki", key); } public LocalizeKey Croatian(string key) { return addForLang("Croatian", key); } public LocalizeKey Georgian(string key) { return addForLang("Georgian", key); } public LocalizeKey Greek(string key) { return addForLang("Greek", key); } public LocalizeKey Serbian(string key) { return addForLang("Serbian", key); } public LocalizeKey Ukrainian(string key) { return addForLang("Ukrainian", key); } private LocalizeKey addForLang(string lang, string value) { Localizations[lang] = value; if (Localization.m_instance != null) { if (Localization.instance.GetSelectedLanguage() == lang) { Localization.instance.AddWord(Key, value); } else if (lang == "English" && !Localization.instance.m_translations.ContainsKey(Key)) { Localization.instance.AddWord(Key, value); } } return this; } [HarmonyPriority(300)] internal static void AddLocalizedKeys(Localization __instance, string language) { foreach (LocalizeKey key in keys) { string value2; if (key.Localizations.TryGetValue(language, out var value) || key.Localizations.TryGetValue("English", out value)) { __instance.AddWord(key.Key, value); } else if (key.Localizations.TryGetValue("alias", out value2)) { __instance.AddWord(key.Key, Localization.instance.Localize(value2)); } } } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] private class ConfigurationManagerAttributes { [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] [UsedImplicitly] public string Category; } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] [HarmonyPatch(typeof(Skills), "IsSkillValid")] private static class Patch_Skills_IsSkillValid { private static void Postfix(SkillType type, ref bool __result) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (!__result && skills.ContainsKey(type)) { __result = true; } } } private static readonly Dictionary<SkillType, Skill> skills; internal static readonly Dictionary<string, Skill> skillByName; private readonly string skillName; private readonly string internalSkillName; private readonly SkillDef skillDef; public readonly LocalizeKey Name; public readonly LocalizeKey Description; private float skillEffectFactor = 1f; private int skillLoss = 5; public bool Configurable = false; private static bool InitializedTerminal; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] private static Localization _english; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] private static BaseUnityPlugin _plugin; private static bool hasConfigSync; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] private static object _configSync; public float SkillGainFactor { get { return skillDef.m_increseStep; } set { skillDef.m_increseStep = value; this.SkillGainFactorChanged?.Invoke(value); } } public float SkillEffectFactor { get { return skillEffectFactor; } set { skillEffectFactor = value; this.SkillEffectFactorChanged?.Invoke(value); } } public int SkillLoss { get { return skillLoss; } set { skillLoss = value; this.SkillLossChanged?.Invoke(value); } } private static Localization english => _english ?? (_english = LocalizationCache.ForLanguage("English")); private static BaseUnityPlugin plugin { get { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown object obj = _plugin; if (obj == null) { BaseUnityPlugin val = (BaseUnityPlugin)Chainloader.ManagerObject.GetComponent((Type)Assembly.GetExecutingAssembly().DefinedTypes.First([<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (TypeInfo t) => t.IsClass && typeof(BaseUnityPlugin).IsAssignableFrom(t))); _plugin = val; obj = (object)val; } return (BaseUnityPlugin)obj; } } [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] private static object configSync { [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(2)] get { if (_configSync == null && hasConfigSync) { Type type = Assembly.GetExecutingAssembly().GetType("ServerSync.ConfigSync"); if ((object)type != null) { _configSync = Activator.CreateInstance(type, plugin.Info.Metadata.GUID + " SkillManager"); type.GetField("CurrentVersion").SetValue(_configSync, plugin.Info.Metadata.Version.ToString()); type.GetProperty("IsLocked").SetValue(_configSync, true); } else { hasConfigSync = false; } } return _configSync; } } [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] [method: <fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(2)] [field: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] public event Action<float> SkillGainFactorChanged; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] [method: <fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(2)] [field: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] public event Action<float> SkillEffectFactorChanged; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] [method: <fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(2)] [field: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] public event Action<float> SkillLossChanged; public Skill(string englishName, string icon) : this(englishName, loadSprite(icon, 64, 64)) { } public Skill(string englishName, Sprite icon) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_0059: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_008d: Expected O, but got Unknown SkillType val = fromName(englishName); string text = new Regex("[^a-zA-Z]").Replace(englishName, "_"); skills[val] = this; skillByName[englishName] = this; skillDef = new SkillDef { m_description = "$skilldesc_" + text, m_icon = icon, m_increseStep = 1f, m_skill = val }; internalSkillName = text; skillName = englishName; Name = new LocalizeKey("skill_" + ((object)(SkillType)(ref val)).ToString()).English(englishName); Description = new LocalizeKey("skilldesc_" + text); } public static SkillType fromName(string englishName) { return (SkillType)Math.Abs(StringExtensionMethods.GetStableHashCode(englishName)); } static Skill() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_01ad: Expected O, but got Unknown //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Expected O, but got Unknown //IL_023f: Expected O, but got Unknown skills = new Dictionary<SkillType, Skill>(); skillByName = new Dictionary<string, Skill>(); InitializedTerminal = false; hasConfigSync = true; Harmony val = new Harmony("org.bepinex.helpers.skillmanager"); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(FejdStartup), "Awake", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_FejdStartup", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Skills), "GetSkillDef", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_GetSkillDef", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Skills), "CheatRaiseSkill", (Type[])null, (Type[])null), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_CheatRaiseskill", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Skills), "CheatResetSkill", (Type[])null, (Type[])null), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_CheatResetSkill", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Localization), "LoadCSV", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(LocalizeKey), "AddLocalizedKeys", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Terminal), "InitTerminal", (Type[])null, (Type[])null), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Terminal_InitTerminal_Prefix", (Type[])null, (Type[])null)), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Terminal_InitTerminal", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Localization), "SetupLanguage", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(LocalizationCache), "LocalizationPostfix", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Skills), "OnDeath", (Type[])null, (Type[])null), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_OnDeath_Prefix", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_OnDeath_Finalizer", (Type[])null, (Type[])null)), (HarmonyMethod)null); } private static void Patch_FejdStartup() { //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Expected O, but got Unknown foreach (Skill skill in skills.Values) { if (skill.Configurable) { string key = skill.Name.Key; string group = new Regex("['[\"\\]]").Replace(english.Localize(key), "").Trim(); string category = Localization.instance.Localize(key).Trim(); ConfigEntry<float> skillGain = config(group, "Skill gain factor", skill.SkillGainFactor, new ConfigDescription("The rate at which you gain experience for the skill.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.01f, 5f), new object[1] { new ConfigurationManagerAttributes { Category = category } })); skill.SkillGainFactor = skillGain.Value; skillGain.SettingChanged += [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (object _, EventArgs _) => { skill.SkillGainFactor = skillGain.Value; }; ConfigEntry<float> skillEffect = config(group, "Skill effect factor", skill.SkillEffectFactor, new ConfigDescription("The power of the skill, based on the default power.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.01f, 5f), new object[1] { new ConfigurationManagerAttributes { Category = category } })); skill.SkillEffectFactor = skillEffect.Value; skillEffect.SettingChanged += [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (object _, EventArgs _) => { skill.SkillEffectFactor = skillEffect.Value; }; ConfigEntry<int> skillLoss = config(group, "Skill loss", skill.skillLoss, new ConfigDescription("How much experience to lose on death.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), new object[1] { new ConfigurationManagerAttributes { Category = category } })); skill.skillLoss = skillLoss.Value; skillLoss.SettingChanged += [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (object _, EventArgs _) => { skill.skillLoss = skillLoss.Value; }; } } } private static void Patch_Skills_GetSkillDef([<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] ref SkillDef __result, List<SkillDef> ___m_skills, SkillType type) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) if (__result == null) { SkillDef val = GetSkillDef(type); if (val != null) { ___m_skills.Add(val); __result = val; } } } private static bool Patch_Skills_CheatRaiseskill(Skills __instance, string name, float value, Player ___m_player) { //IL_0019: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) foreach (SkillType key in skills.Keys) { SkillType current = key; Skill skill = skills[current]; if (string.Equals(skill.internalSkillName, name, StringComparison.CurrentCultureIgnoreCase)) { Skill skill2 = __instance.GetSkill(current); skill2.m_level += value; skill2.m_level = Mathf.Clamp(skill2.m_level, 0f, 100f); ((Character)___m_player).Message((MessageType)1, "Skill increased " + Localization.instance.Localize("$skill_" + ((object)(SkillType)(ref current)).ToString()) + ": " + (int)skill2.m_level, 0, skill2.m_info.m_icon); Console.instance.Print("Skill " + skill.internalSkillName + " = " + skill2.m_level); return false; } } return true; } private static bool Patch_Skills_CheatResetSkill(Skills __instance, string name) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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) foreach (SkillType key in skills.Keys) { Skill skill = skills[key]; if (string.Equals(skill.internalSkillName, name, StringComparison.CurrentCultureIgnoreCase)) { __instance.ResetSkill(key); Console.instance.Print("Skill " + skill.internalSkillName + " reset"); return false; } } return true; } private static void Patch_Skills_OnDeath_Prefix(Skills __instance, [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 2, 1 })] ref Dictionary<SkillType, Skill> __state) { //IL_002e: 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_00a0: Unknown result type (might be due to invalid IL or missing references) if (__state == null) { __state = new Dictionary<SkillType, Skill>(); } foreach (KeyValuePair<SkillType, Skill> skill in skills) { if (__instance.m_skillData.TryGetValue(skill.Key, out var value)) { __state[skill.Key] = value; if (skill.Value.skillLoss > 0) { Skill obj = value; obj.m_level -= value.m_level * (float)skill.Value.SkillLoss / 100f; value.m_accumulator = 0f; } __instance.m_skillData.Remove(skill.Key); } } } private static void Patch_Skills_OnDeath_Finalizer(Skills __instance, [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 2, 1 })] ref Dictionary<SkillType, Skill> __state) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (__state == null) { return; } foreach (KeyValuePair<SkillType, Skill> item in __state) { __instance.m_skillData[item.Key] = item.Value; } __state = null; } private static void Patch_Terminal_InitTerminal_Prefix() { InitializedTerminal = Terminal.m_terminalInitialized; } private static void Patch_Terminal_InitTerminal() { if (!InitializedTerminal) { AddSkill(Terminal.commands["raiseskill"]); AddSkill(Terminal.commands["resetskill"]); } static void AddSkill(ConsoleCommand command) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown ConsoleOptionsFetcher fetcher = command.m_tabOptionsFetcher; command.m_tabOptionsFetcher = (ConsoleOptionsFetcher)([<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] () => { List<string> list = fetcher.Invoke(); list.AddRange(skills.Values.Select([<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (Skill skill) => skill.internalSkillName)); return list; }); } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(2)] private static SkillDef GetSkillDef(SkillType skillType) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (!skills.ContainsKey(skillType)) { return null; } Skill skill = skills[skillType]; return skill.skillDef; } private static byte[] ReadEmbeddedFileBytes(string name) { using MemoryStream memoryStream = new MemoryStream(); Assembly.GetExecutingAssembly().GetManifestResourceStream(Assembly.GetExecutingAssembly().GetName().Name + "." + name).CopyTo(memoryStream); return memoryStream.ToArray(); } private static Texture2D loadTexture(string name) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown Texture2D val = new Texture2D(0, 0); ImageConversion.LoadImage(val, ReadEmbeddedFileBytes("icons." + name)); return val; } private static Sprite loadSprite(string name, int width, int height) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) return Sprite.Create(loadTexture(name), new Rect(0f, 0f, (float)width, (float)height), Vector2.zero); } private static ConfigEntry<T> config<[<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] T>(string group, string name, T value, ConfigDescription description) { ConfigEntry<T> val = plugin.Config.Bind<T>(group, name, value, description); configSync?.GetType().GetMethod("AddConfigEntry").MakeGenericMethod(typeof(T)) .Invoke(configSync, new object[1] { val }); return val; } private static ConfigEntry<T> config<[<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] T>(string group, string name, T value, string description) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown return config(group, name, value, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>())); } } public static class SkillManagerVersion { [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(1)] public const string Version = "1.7.0"; } [PublicAPI] [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] public static class SkillExtensions { public static float GetSkillFactor(this Character character, string name) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return character.GetSkillFactor(Skill.fromName(name)) * Skill.skillByName[name].SkillEffectFactor; } public static float GetSkillFactor(this Skills skills, string name) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return skills.GetSkillFactor(Skill.fromName(name)) * Skill.skillByName[name].SkillEffectFactor; } public static void RaiseSkill(this Character character, string name, float value = 1f) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) character.RaiseSkill(Skill.fromName(name), value); } public static void RaiseSkill(this Skills skill, string name, float value = 1f) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) skill.RaiseSkill(Skill.fromName(name), value); } public static void LowerSkill(this Character character, string name, float factor = 1f) { character.GetSkills().LowerSkill(name, factor); } public static void LowerSkill(this Skills skills, string name, float factor) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (factor > 0f && skills.m_skillData.TryGetValue(Skill.fromName(name), out var value)) { Skill obj = value; obj.m_level -= value.m_level * factor; value.m_accumulator = 0f; } } } } namespace PotionsPlus { public static class FlaskEffects { [HarmonyPatch(typeof(Character), "RPC_Damage")] private class ReduceDamageTaken { [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] private static void Prefix(Character __instance, HitData hit) { Player val = (Player)(object)((__instance is Player) ? __instance : null); if (val != null) { if (((Character)val).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Flask_of_Elements"))) { hit.m_damage.m_fire *= 1f - (float)PotionsPlus.flaskOfElementsFireDamageTakenReduction.Value / 100f; hit.m_damage.m_lightning *= 1f - (float)PotionsPlus.flaskOfElementsLightningDamageTakenReduction.Value / 100f; } if (((Character)val).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Flask_of_Fortification"))) { hit.m_damage.m_blunt *= 1f - (float)PotionsPlus.flaskOfFortificationBluntDamageTakenReduction.Value / 100f; hit.m_damage.m_slash *= 1f - (float)PotionsPlus.flaskOfFortificationSlashDamageTakenReduction.Value / 100f; hit.m_damage.m_pierce *= 1f - (float)PotionsPlus.flaskOfFortificationPierceDamageTakenReduction.Value / 100f; } } } } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] public class GroupPotion : SE_Stats { public static bool effectApplied; public DamageType damageType; public int range; public override void Setup(Character character) { //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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) ((SE_Stats)this).Setup(character); if ((Object)(object)character != (Object)(object)Player.m_localPlayer || effectApplied || !API.IsLoaded()) { return; } try { List<PlayerReference> list = API.GroupPlayers(); if (list == null) { return; } foreach (PlayerReference groupPlayer in list.Where((PlayerReference p) => p != PlayerReference.fromPlayer(Player.m_localPlayer))) { Player val = Player.s_players?.FirstOrDefault((Func<Player, bool>)([<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (Player p) => (Object)(object)p != (Object)null && p.GetPlayerID() == groupPlayer.peerId)); if (!((Object)(object)val == (Object)null)) { Vector3 position = ((Component)val).transform.position; if ((range == 0 || Utils.DistanceXZ(((Component)character).transform.position, position) < (float)range) && ZRoutedRpc.instance != null) { ZRoutedRpc.instance.InvokeRoutedRPC(groupPlayer.peerId, "PotionsPlus Potion Activated", new object[1] { ((Object)this).name }); } } } effectApplied = true; } catch (Exception ex) { Debug.LogError((object)("[PotionsPlus] Error in GroupPotion.Setup: " + ex.Message + "\n" + ex.StackTrace)); } } public override void ModifyAttack(SkillType skill, ref HitData hitData) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_003e: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0065: 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) //IL_006b: Invalid comparison between Unknown and I4 //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Invalid comparison between Unknown and I4 //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Invalid comparison between Unknown and I4 //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Invalid comparison between Unknown and I4 //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Invalid comparison between Unknown and I4 if ((int)damageType == 0) { return; } float chop = hitData.m_damage.m_chop; float pickaxe = hitData.m_damage.m_pickaxe; float num = hitData.GetTotalDamage() - pickaxe - chop; hitData.m_damage = new DamageTypes { m_chop = chop, m_pickaxe = pickaxe }; DamageType val = damageType; DamageType val2 = val; if ((int)val2 <= 64) { if ((int)val2 != 32) { if ((int)val2 == 64) { hitData.m_damage.m_frost = num; } } else { hitData.m_damage.m_fire = num; } } else if ((int)val2 != 128) { if ((int)val2 != 256) { if ((int)val2 == 512) { hitData.m_damage.m_spirit = num; } } else { hitData.m_damage.m_poison = num; } } else { hitData.m_damage.m_lightning = num; } } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] [BepInPlugin("com.odinplus.potionsplus", "PotionsPlus", "4.2.9")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class PotionsPlus : BaseUnityPlugin { [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] private enum Toggle { On = 1, Off = 0 } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] private static class RegisterAlchemySkill { private static void Postfix() { if (alchemy == null) { Sprite icon = potionAssets.LoadAsset<Sprite>("AlcSkill"); alchemy = new Skill("Alchemy", icon) { Configurable = false }; alchemy.Name.Alias("pp_potion_skill_name"); alchemy.Description.Alias("pp_potion_skill_description"); } } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] [HarmonyPatch(typeof(Character), "SetHealth")] public static class PatchCharacterSetHealth { [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] private static bool Prefix(ref Character __instance, float health) { if (!((Object)(object)__instance != (Object)(object)Player.m_localPlayer) && !(health > 0f)) { StatusEffect val = ((IEnumerable<StatusEffect>)((Character)Player.m_localPlayer).GetSEMan().GetStatusEffects()).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect se) => se.m_category == "pp_philstone")); if (val != null) { ((Character)Player.m_localPlayer).GetSEMan().RemoveStatusEffect(val, false); Inventory inventory = ((Humanoid)Player.m_localPlayer).GetInventory(); ItemData val2 = ((IEnumerable<ItemData>)inventory.GetAllItems()).FirstOrDefault((Func<ItemData, bool>)((ItemData i) => i.m_equipped && (int)i.m_shared.m_itemType == 18 && i.m_shared.m_equipStatusEffect.m_category == "pp_philstone")); if (val2 != null) { inventory.RemoveOneItem(val2); ((StatusEffect)CheatDeathStatusEffect).m_ttl = 6f; ((Character)Player.m_localPlayer).GetSEMan().AddStatusEffect((StatusEffect)(object)CheatDeathStatusEffect, false, 0, 0f); __instance.Heal(__instance.GetMaxHealth(), true); return false; } return true; } } return true; } } [HarmonyPatch(typeof(ZNet), "Awake")] [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] private static class RegisterRPCPatch { private static void Postfix() { ZRoutedRpc.instance.Register<float>("PotionsPlus Raise Alchemy", (Action<long, float>)delegate(long _, float num) { ((Character)(object)Player.m_localPlayer).RaiseSkill("Alchemy", num); }); ZRoutedRpc.instance.Register<int>("PotionsPlus Alchemy Level", (Action<long, int>)delegate(long sender, int num) { SubmitAlchemyLevel.playerAlchemyLevels[sender] = num; }); ZRoutedRpc.instance.Register("PotionsPlus Alchemy Proc", (Action<long>)delegate { ((Character)Player.m_localPlayer).GetSEMan().AddStatusEffect((StatusEffect)(object)AlchemySkillProcStatusEffect, false, 0, 0f); }); ZRoutedRpc.instance.Register<string>("PotionsPlus Potion Activated", (Action<long, string>)onGroupPotionActivated); } } [HarmonyPatch(typeof(Incinerator), "OnIncinerate")] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private static class SubmitAlchemyLevel { public static readonly Dictionary<long, int> playerAlchemyLevels = new Dictionary<long, int>(); private static void Postfix(Incinerator __instance) { ZRoutedRpc.instance.InvokeRoutedRPC(__instance.m_nview.GetZDO().GetOwner(), "PotionsPlus Alchemy Level", new object[1] { Mathf.RoundToInt(((Character)(object)Player.m_localPlayer).GetSkillFactor("Alchemy") * 100f) }); } } [HarmonyPatch] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private static class SaveCauldronUsingPlayer { [CompilerGenerated] private sealed class <Transpiler>d__3 : IEnumerable<CodeInstruction>, IEnumerable, IEnumerator<CodeInstruction>, IDisposable, IEnumerator { private int <>1__state; private CodeInstruction <>2__current; private int <>l__initialThreadId; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] private IEnumerable<CodeInstruction> instructions; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] public IEnumerable<CodeInstruction> <>3__instructions; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private Type <Incinerate>5__1; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private MethodInfo <invoke>5__2; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] private IEnumerator<CodeInstruction> <>s__3; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private CodeInstruction <instruction>5__4; CodeInstruction IEnumerator<CodeInstruction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] [return: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] get { return <>2__current; } } [DebuggerHidden] public <Transpiler>d__3(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || (uint)(num - 1) <= 9u) { try { } finally { <>m__Finally1(); } } <Incinerate>5__1 = null; <invoke>5__2 = null; <>s__3 = null; <instruction>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Expected O, but got Unknown //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Expected O, but got Unknown //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Expected O, but got Unknown //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <Incinerate>5__1 = TargetMethod().DeclaringType; <invoke>5__2 = AccessTools.DeclaredMethod(typeof(MonoBehaviour), "Invoke", (Type[])null, (Type[])null); <>s__3 = instructions.GetEnumerator(); <>1__state = -3; goto IL_030f; case 1: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.DeclaredField(<Incinerate>5__1, "<>4__this")); <>1__state = 2; return true; case 2: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null); <>1__state = 3; return true; case 3: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.DeclaredField(<Incinerate>5__1, "uid")); <>1__state = 4; return true; case 4: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.DeclaredMethod(typeof(SaveCauldronUsingPlayer), "SetUid", (Type[])null, (Type[])null)); <>1__state = 5; return true; case 5: <>1__state = -3; goto IL_0205; case 6: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldfld, (object)AccessTools.DeclaredField(<Incinerate>5__1, "<>4__this")); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldc_I8, (object)0L); <>1__state = 8; return true; case 8: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.DeclaredMethod(typeof(SaveCauldronUsingPlayer), "SetUid", (Type[])null, (Type[])null)); <>1__state = 9; return true; case 9: <>1__state = -3; goto IL_02e7; case 10: { <>1__state = -3; <instruction>5__4 = null; goto IL_030f; } IL_030f: if (<>s__3.MoveNext()) { <instruction>5__4 = <>s__3.Current; if (<instruction>5__4.opcode == OpCodes.Call && CodeInstructionExtensions.OperandIs(<instruction>5__4, (MemberInfo)<invoke>5__2)) { <>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null); <>1__state = 1; return true; } goto IL_0205; } <>m__Finally1(); <>s__3 = null; return false; IL_02e7: <>2__current = <instruction>5__4; <>1__state = 10; return true; IL_0205: if (<instruction>5__4.opcode == OpCodes.Ret) { <>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null); <>1__state = 6; return true; } goto IL_02e7; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__3 != null) { <>s__3.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] [return: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] IEnumerator<CodeInstruction> IEnumerable<CodeInstruction>.GetEnumerator() { <Transpiler>d__3 <Transpiler>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Transpiler>d__ = this; } else { <Transpiler>d__ = new <Transpiler>d__3(0); } <Transpiler>d__.instructions = <>3__instructions; return <Transpiler>d__; } [DebuggerHidden] [return: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<CodeInstruction>)this).GetEnumerator(); } } public static long uid; private static void SetUid(Incinerator incinerator, long sender) { if (((Object)incinerator).name.StartsWith("opcauldron", StringComparison.Ordinal)) { uid = sender; } } private static MethodInfo TargetMethod() { return (from t in typeof(Incinerator).GetNestedTypes(BindingFlags.Instance | BindingFlags.NonPublic) where t.Name.Contains("Incinerate") select t).SelectMany([<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (Type t) => from m in t.GetMethods(BindingFlags.Instance | BindingFlags.NonPublic) where m.Name == "MoveNext" select m).First(); } [IteratorStateMachine(typeof(<Transpiler>d__3))] private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Transpiler>d__3(-2) { <>3__instructions = instructions }; } } [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] [HarmonyPatch(typeof(IncineratorConversion), "AttemptCraft")] private static class ApplyAlchemySkillOnCauldronUsage { private static void Prefix(List<ItemDrop> toAdd, out int __state) { __state = toAdd.Count; } private static void Postfix(List<ItemDrop> toAdd, int __state, ref int __result) { if (SaveCauldronUsingPlayer.uid == 0L || toAdd.Count == __state) { return; } for (int num = toAdd.Count - 1; num >= __state; num--) { SubmitAlchemyLevel.playerAlchemyLevels.TryGetValue(SaveCauldronUsingPlayer.uid, out var value); for (int num2 = DetermineExtraItems(value, SaveCauldronUsingPlayer.uid); num2 > 0; num2--) { toAdd.Add(toAdd[num]); __result++; } } if (alchemySkillEnabled.Value == Toggle.On) { ZRoutedRpc.instance.InvokeRoutedRPC(SaveCauldronUsingPlayer.uid, "PotionsPlus Raise Alchemy", new object[1] { (float)toAdd.Count }); } } } [HarmonyPatch(typeof(InventoryGui), "DoCrafting")] [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] private static class ApplyAlchemySkillOnAlchemyTableCrafting { private static void Prefix(out int __state) { __state = (int)Game.instance.GetPlayerProfile().m_playerStats[(PlayerStatType)13]; } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] private static void Postfix(InventoryGui __instance, Player player, int __state) { if ((int)Game.instance.GetPlayerProfile().m_playerStats[(PlayerStatType)13] <= __state) { return; } CraftingStation currentCraftingStation = Player.m_localPlayer.GetCurrentCraftingStation(); if (currentCraftingStation != null && ((Object)currentCraftingStation).name.StartsWith("opalchemy") && __instance.m_craftUpgradeItem == null) { for (int num = DetermineExtraItems(Mathf.RoundToInt(((Character)(object)player).GetSkillFactor("Alchemy") * 100f), ZDOMan.instance.m_sessionID); num > 0; num--) { int num2 = ((__instance.m_craftUpgradeItem == null) ? 1 : (__instance.m_craftUpgradeItem.m_quality + 1)); ((Humanoid)player).GetInventory().AddItem(((Object)((Component)__instance.m_craftRecipe.m_item).gameObject).name, __instance.m_craftRecipe.m_amount, num2, __instance.m_craftVariant, player.GetPlayerID(), player.GetPlayerName(), false); } ((Character)(object)player).RaiseSkill("Alchemy"); } } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] [HarmonyPatch(typeof(RandomSpeak), "Start")] private class PreventGhostFromTalking { [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] private static bool Prefix(RandomSpeak __instance) { return ((Component)__instance).gameObject.layer != Piece.s_ghostLayer; } } [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] [HarmonyPatch(typeof(Attack), "Start")] private class BypassAmmoCheck { private static void Prefix(Attack __instance, ItemData weapon, ref string __state) { GameObject dropPrefab = weapon.m_dropPrefab; if (((dropPrefab != null) ? ((Object)dropPrefab).name : null) == "Odins_Dragon_Staff") { GameObject spawnOnTrigger = __instance.m_spawnOnTrigger; if (((spawnOnTrigger != null) ? ((Object)spawnOnTrigger).name : null) == "Staff_Smoke_Cloud") { __state = weapon.m_shared.m_ammoType; weapon.m_shared.m_ammoType = ""; } } } private static void Finalizer(ItemData weapon, ref string __state) { if (__state != null) { weapon.m_shared.m_ammoType = __state; } } } [HarmonyPatch(typeof(Attack), "UseAmmo")] [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] private class ReduceAmmoUsage { [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] private static bool Prefix(Attack __instance, ref bool __result) { GameObject dropPrefab = __instance.m_weapon.m_dropPrefab; string text = ((dropPrefab != null) ? ((Object)dropPrefab).name : null); string text2 = text; if (!(text2 == "Odins_Dragon_Staff")) { if (!(text2 == "Odins_Alchemy_Wand")) { goto IL_00f8; } } else { GameObject spawnOnTrigger = __instance.m_spawnOnTrigger; if (((spawnOnTrigger != null) ? ((Object)spawnOnTrigger).name : null) == "Staff_Smoke_Cloud") { __result = true; return false; } } ItemData helmetItem = __instance.m_character.m_helmetItem; object obj; if (helmetItem == null) { obj = null; } else { GameObject dropPrefab2 = helmetItem.m_dropPrefab; obj = ((dropPrefab2 != null) ? ((Object)dropPrefab2).name : null); } if ((string?)obj == "Odins_Wizard_Hat") { ItemData ammoItem = __instance.m_character.GetInventory().GetAmmoItem(__instance.m_weapon.m_shared.m_ammoType, (string)null); if (ammoItem == null) { return true; } if (Random.value < wizardHatConsumeChargeReduction.Value / 100f) { __instance.m_ammoItem = ammoItem; __result = true; return false; } } goto IL_00f8; IL_00f8: return true; } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] public class HealingAoe : MonoBehaviour { private float nextHealTime = 0f; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(1)] private HashSet<int> healedThisTick = new HashSet<int>(); private float radius => hellbrothOfEternalLifeRadius.Value; private float healInterval => hellbrothOfEternalLifeTickInterval.Value; private void Start() { nextHealTime = Time.time; } private void Update() { if (Time.time >= nextHealTime) { healedThisTick.Clear(); HealNearbyCharacters(); nextHealTime = Time.time + healInterval; } } private void HealNearbyCharacters() { //IL_0007: 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_0031: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; int mask = LayerMask.GetMask(new string[3] { "character", "character_noenv", "character_ghost" }); Collider[] array = Physics.OverlapSphere(position, radius, mask); int num = 0; Collider[] array2 = array; foreach (Collider val in array2) { Character val2 = ((Component)val).GetComponentInParent<Character>(); if ((Object)(object)val2 == (Object)null) { val2 = ((Component)val).GetComponent<Character>(); } if ((Object)(object)val2 == (Object)null || val2.IsDead()) { continue; } int instanceID = ((Object)val2).GetInstanceID(); if (healedThisTick.Contains(instanceID)) { continue; } healedThisTick.Add(instanceID); if (val2 is Player || val2.IsTamed()) { float maxHealth = val2.GetMaxHealth(); float num2 = maxHealth * hellbrothOfEternalLifeHealing.Value / 100f; val2.Heal(num2, true); num++; Player val3 = (Player)(object)((val2 is Player) ? val2 : null); if (val3 != null && Random.value < 0.3f) { ((Character)val3).Message((MessageType)2, $"+{Mathf.RoundToInt(num2)} HP", 0, (Sprite)null); } } } } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] public class SmokescreenOwner : MonoBehaviour, IProjectile { [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] public void Setup(Character owner, Vector3 velocity, float hitNoise, HitData hitData, ItemData item, ItemData ammo) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) ZDO zdo = ((Component)this).GetComponent<ZNetView>().m_zdo; zdo.Set("PotionsPlus SmokeCloud Owner", owner.GetZDOID()); zdo.Set("PotionsPlus SmokeCloud HatBonus", ((Component)owner).GetComponent<VisEquipment>().m_currentHelmetItemHash == StringExtensionMethods.GetStableHashCode("Odins_Warlock_Hat")); } public void Start() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (((Component)this).GetComponent<ZNetView>().m_zdo.GetBool("PotionsPlus SmokeCloud HatBonus", false)) { ParticleSystem[] componentsInChildren = ((Component)this).GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { ShapeModule shape = val.shape; ((ShapeModule)(ref shape)).radius = ((ShapeModule)(ref shape)).radius + warlockHatSmokeScreenSizeIncrease.Value; } SphereCollider componentInChildren = ((Component)this).GetComponentInChildren<SphereCollider>(); componentInChildren.radius += warlockHatSmokeScreenSizeIncrease.Value; TimedDestruction component = ((Component)this).GetComponent<TimedDestruction>(); ((MonoBehaviour)component).CancelInvoke("DestroyNow"); component.Trigger(smokeScreenTTL.Value + (float)warlockHatSmokeScreenDurationIncrease.Value); } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] public string GetTooltipString(int itemQuality) { return ""; } } [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] [HarmonyPatch(typeof(Projectile), "FixedUpdate")] private class SmokescreenHitBarrier { [CompilerGenerated] private sealed class <Transpiler>d__1 : IEnumerable<CodeInstruction>, IEnumerable, IEnumerator<CodeInstruction>, IDisposable, IEnumerator { private int <>1__state; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(1)] private CodeInstruction <>2__current; private int <>l__initialThreadId; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] private IEnumerable<CodeInstruction> instructions; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] public IEnumerable<CodeInstruction> <>3__instructions; private FieldInfo <maskField>5__1; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] private IEnumerator<CodeInstruction> <>s__2; private CodeInstruction <instruction>5__3; CodeInstruction IEnumerator<CodeInstruction>.Current { [DebuggerHidden] [return: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(1)] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Transpiler>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || (uint)(num - 1) <= 1u) { try { } finally { <>m__Finally1(); } } <maskField>5__1 = null; <>s__2 = null; <instruction>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <maskField>5__1 = AccessTools.DeclaredField(typeof(Projectile), "s_rayMaskSolids"); <>s__2 = instructions.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; if (<instruction>5__3.opcode == OpCodes.Ldsfld && CodeInstructionExtensions.OperandIs(<instruction>5__3, (MemberInfo)<maskField>5__1)) { <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.DeclaredMethod(typeof(SmokescreenHitBarrier), "ProjectileBlocker", (Type[])null, (Type[])null)); <>1__state = 2; return true; } goto IL_010a; case 2: { <>1__state = -3; goto IL_010a; } IL_010a: <instruction>5__3 = null; break; } if (<>s__2.MoveNext()) { <instruction>5__3 = <>s__2.Current; <>2__current = <instruction>5__3; <>1__state = 1; return true; } <>m__Finally1(); <>s__2 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { <>s__2.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<CodeInstruction> IEnumerable<CodeInstruction>.GetEnumerator() { <Transpiler>d__1 <Transpiler>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Transpiler>d__ = this; } else { <Transpiler>d__ = new <Transpiler>d__1(0); } <Transpiler>d__.instructions = <>3__instructions; return <Transpiler>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<CodeInstruction>)this).GetEnumerator(); } } private static int ProjectileBlocker(int mask) { return mask | (1 << LayerMask.NameToLayer("blocker")); } [IteratorStateMachine(typeof(<Transpiler>d__1))] [<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(1)] private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Transpiler>d__1(-2) { <>3__instructions = instructions }; } } [HarmonyPatch(typeof(Projectile), "OnHit")] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private class DestroyBlockedProjectile { private static bool Prefix(Projectile __instance, Collider collider, ref bool __state) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)collider) && ((Component)collider).gameObject.layer == LayerMask.NameToLayer("blocker")) { Transform parent = ((Component)collider).transform.parent; ZDO val = ((parent == null) ? null : ((Component)parent).GetComponent<ZNetView>()?.m_zdo); if (val != null) { GameObject obj = ZNetScene.instance.FindInstance(val.GetZDOID("PotionsPlus SmokeCloud Owner")); Character val2 = ((obj != null) ? obj.GetComponent<Character>() : null); if (val2 != null && !__instance.IsValidTarget((IDestructible)(object)val2)) { return false; } __state = true; Random.InitState((int)((ZDOID)(ref __instance.m_nview.m_zdo.m_uid)).ID); State state = Random.state; bool result = Random.value < (float)(smokeScreenChanceToBlock.Value + (val.GetBool("PotionsPlus SmokeCloud HatBonus", false) ? warlockHatSmokeScreenBlockIncrease.Value : 0)) / 100f; Random.state = state; return result; } } return true; } [HarmonyPriority(200)] private static void Postfix(Projectile __instance, Collider collider, bool __state) { if (__state && __instance != null && __instance.m_didHit && __instance.m_stayAfterHitStatic) { ZNetScene.instance.Destroy(((Component)__instance).gameObject); } } } [HarmonyPatch(typeof(Projectile), "SpawnOnHit")] [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private class TransferDamageToAoeProjectile { [CompilerGenerated] private sealed class <Transpiler>d__1 : IEnumerable<CodeInstruction>, IEnumerable, IEnumerator<CodeInstruction>, IDisposable, IEnumerator { private int <>1__state; private CodeInstruction <>2__current; private int <>l__initialThreadId; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] private IEnumerable<CodeInstruction> instructions; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] public IEnumerable<CodeInstruction> <>3__instructions; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private MethodInfo <projectile>5__1; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(new byte[] { 0, 1 })] private IEnumerator<CodeInstruction> <>s__2; [<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] private CodeInstruction <instruction>5__3; CodeInstruction IEnumerator<CodeInstruction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] [return: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] get { return <>2__current; } } [DebuggerHidden] public <Transpiler>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || (uint)(num - 1) <= 2u) { try { } finally { <>m__Finally1(); } } <projectile>5__1 = null; <>s__2 = null; <instruction>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <projectile>5__1 = AccessTools.DeclaredMethod(typeof(GameObject), "GetComponent", Array.Empty<Type>(), new Type[1] { typeof(IProjectile) }); <>s__2 = instructions.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; if (<instruction>5__3.opcode == OpCodes.Callvirt && CodeInstructionExtensions.OperandIs(<instruction>5__3, (MemberInfo)<projectile>5__1)) { <>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null); <>1__state = 2; return true; } goto IL_0152; case 2: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.DeclaredMethod(typeof(TransferDamageToAoeProjectile), "UpdateAoeProjectileDamage", (Type[])null, (Type[])null)); <>1__state = 3; return true; case 3: { <>1__state = -3; goto IL_0152; } IL_0152: <instruction>5__3 = null; break; } if (<>s__2.MoveNext()) { <instruction>5__3 = <>s__2.Current; <>2__current = <instruction>5__3; <>1__state = 1; return true; } <>m__Finally1(); <>s__2 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { <>s__2.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] [return: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] IEnumerator<CodeInstruction> IEnumerable<CodeInstruction>.GetEnumerator() { <Transpiler>d__1 <Transpiler>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Transpiler>d__ = this; } else { <Transpiler>d__ = new <Transpiler>d__1(0); } <Transpiler>d__.instructions = <>3__instructions; return <Transpiler>d__; } [DebuggerHidden] [return: <a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(0)] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<CodeInstruction>)this).GetEnumerator(); } } private static IProjectile UpdateAoeProjectileDamage(IProjectile newProjectile, IProjectile spawning) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) string projectileName = ((Object)(Component)spawning).name; if (wandProjectiles.Any([<fc05ea1b-54d4-44c5-b970-744c4dbf9494>NullableContext(0)] (string p) => projectileName.StartsWith(p, StringComparison.Ordinal))) { Aoe val = (Aoe)newProjectile; Projectile val2 = (Projectile)spawning; ((DamageTypes)(ref val.m_damage)).Add(val2.m_damage, 1); val.m_attackForce += val2.m_attackForce; val.m_backstabBonus += val2.m_backstabBonus; val.m_statusEffect += val2.m_statusEffect; } return newProjectile; } [IteratorStateMachine(typeof(<Transpiler>d__1))] private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Transpiler>d__1(-2) { <>3__instructions = instructions }; } } private const string ModName = "PotionsPlus"; private const string ModVersion = "4.2.9"; private const string ModGUID = "com.odinplus.potionsplus"; private static readonly ConfigSync configSync = new ConfigSync("PotionsPlus") { DisplayName = "PotionsPlus", CurrentVersion = "4.2.9", MinimumRequiredVersion = "4.2.9" }; private static AssetBundle potionAssets; public static readonly HashSet<string> wandProjectiles = new HashSet<string>(); private static ConfigEntry<Toggle> serverConfigLocked = null; public static ConfigEntry<float> philosophersStoneXpGainFactor = null; private static ConfigEntry<Toggle> alchemySkillEnabled = null; private static ConfigEntry<Toggle> alchemySkillBonusWhenCraftingEnabled = null; public static ConfigEntry<int> flaskOfElementsFireDamageTakenReduction = null; public static ConfigEntry<int> flaskOfElementsLightningDamageTakenReduction = null; public static ConfigEntry<int> flaskOfElementsTTL = null; public static ConfigEntry<int> flaskOfFortificationBluntDamageTakenReduction = null; public static ConfigEntry<int> flaskOfFortificationSlashDamageTakenReduction = null; public static ConfigEntry<int> flaskOfFortificationPierceDamageTakenReduction = null; public static ConfigEntry<int> flaskOfFortificationTTL = null; public static ConfigEntry<float> flaskOfMagelightIntensity = null; public static ConfigEntry<Color> flaskOfMagelightColor = null; public static ConfigEntry<int> flaskOfMagelightTTL = null; public static ConfigEntry<float> flaskOfGodsHealing = null; public static ConfigEntry<float> flaskOfGodsRegenMultiplier = null; public static ConfigEntry<int> flaskOfGodsTTL = null; public static ConfigEntry<float> flaskOfSecondWindJumpStaminaFactor = null; public static ConfigEntry<float> flaskOfSecondWindRunStaminaFactor = null; public static ConfigEntry<float> flaskOfSecondWindStaminaRegenMultiplier = null; public static ConfigEntry<int> flaskOfSecondWindTTL = null; public static ConfigEntry<float> grandHealingTidePotionHealthOverTime = null; public static ConfigEntry<float> grandHealingTidePotionTickInterval = null; public static ConfigEntry<float> grandHealingTidePotionTTL = null; public static ConfigEntry<int> grandHealingTidePotionCooldown = null; public static ConfigEntry<float> grandSpiritualHealingPotionHealthOverTime = null; public static ConfigEntry<int> grandSpiritualHealingPotionCooldown = null; public static ConfigEntry<float> grandStaminaElixirStaminaOverTime = null; public static ConfigEntry<float> grandStaminaElixirTTL = null; public static ConfigEntry<int> grandStaminaElixirCooldown = null; public static ConfigEntry<int> grandStealthElixirNoiseReduction = null; public static ConfigEntry<int> grandStealthElixirVisibilityReduction = null; public static ConfigEntry<int> grandStealthElixirTTL = null; public static ConfigEntry<float> mediumHealingTideFlaskHealthOverTime = null; public static ConfigEntry<float> mediumHealingTideFlaskTickInterval = null; public static ConfigEntry<float> mediumHealingTideFlaskTTL = null; public static ConfigEntry<int> mediumHealingTideFlaskCooldown = null; public static ConfigEntry<float> mediumSpiritualHealingFlaskHealthOverTime = null; public static ConfigEntry<int> mediumSpiritualHealingFlaskCooldown = null; public static ConfigEntry<float> mediumStaminaFlaskStaminaOverTime = null; public static ConfigEntry<int> mediumStaminaFlaskCooldown = null; public static ConfigEntry<float> lesserHealingTideVialHealthOverTime = null; public static ConfigEntry<float> lesserHealingTideVialTickInterval = null; public static ConfigEntry<float> lesserHealingTideVialTTL = null; public static ConfigEntry<int> lesserHealingTideVialCooldown = null; public static ConfigEntry<float> lesserSpiritualHealingVialHealthOverTime = null; public static ConfigEntry<int> lesserSpiritualHealingVialCooldown = null; public static ConfigEntry<float> lesserStaminaVialStaminaOverTime = null; public static ConfigEntry<int> lesserStaminaVialCooldown = null; public static ConfigEntry<float> hellbrothOfFlamesDamage = null; public static ConfigEntry<float> hellbrothOfFrostDamage = null; public static ConfigEntry<float> hellbrothOfThorsFuryDamage = null; public static ConfigEntry<float> hellbrothOfEternalLifeHealing = null; public static ConfigEntry<float> hellbrothOfEternalLifeTTL = null; public static ConfigEntry<float> hellbrothOfEternalLifeRadius = null; public static ConfigEntry<float> hellbrothOfEternalLifeTickInterval = null; public static ConfigEntry<float> brewOfFaintGroupHealingHealthOverTime = null; public static ConfigEntry<int> brewOfFaintGroupHealingCooldown = null; private static ConfigEntry<int> brewOfFaintGroupHealingRange = null; public static ConfigEntry<float> brewOfGroupHealingHealthOverTime = null; public static ConfigEntry<int> brewOfGroupHealingCooldown = null; private static ConfigEntry<int> brewOfGroupHealingRange = null; public static ConfigEntry<float> brewOfGrandGroupHealingHealthOverTime = null; public static ConfigEntry<int> brewOfGrandGroupHealingCooldown = null; private static ConfigEntry<int> brewOfGrandGroupHealingRange = null; public static ConfigEntry<float> brewOfFieryRevengeTTL = null; public static ConfigEntry<int> brewOfFieryRevengeRange = null; public static ConfigEntry<float> brewOfIcyTouchTTL = null; public static ConfigEntry<int> brewOfIcyTouchRange = null; public static ConfigEntry<float> brewOfCunningToxicityTTL = null; public static ConfigEntry<int> brewOfCunningToxicityRange = null; public static ConfigEntry<float> brewOfSpiritualDeathTTL = null; public static ConfigEntry<int> brewOfSpiritualDeathRange = null; public static ConfigEntry<float> brewOfThunderousWordsTTL = null; public static ConfigEntry<int> brewOfThunderousWordsRange = null; private static ConfigEntry<float> wizardHatConsumeChargeReduction = null; private static ConfigEntry<float> warlockHatSmokeScreenSizeIncrease = null; private static ConfigEntry<int> warlockHatSmokeScreenBlockIncrease = null; private static ConfigEntry<int> warlockHatSmokeScreenDurationIncrease = null; public static ConfigEntry<int> weaponOilDamageIncrease = null; public static ConfigEntry<float> weaponOilTTL = null; private static ConfigEntry<int> smokeScreenChanceToBlock = null; public static ConfigEntry<float> smokeScreenTTL = null; private static Skill alchemy = null; private bool _placeholdersRegistered = false; private static SE_Stats CheatDeathStatusEffect = null; private static SE_Stats AlchemySkillProcStatusEffect = null; private ConfigEntry<T> config<[<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] T>(string group, string name, T value, ConfigDescription description, bool synchronizedSetting = true) { ConfigEntry<T> val = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, description); SyncedConfigEntry<T> syncedConfigEntry = configSync.AddConfigEntry<T>(val); syncedConfigEntry.SynchronizedConfig = synchronizedSetting; return val; } private ConfigEntry<T> config<[<a2876065-12a4-46f7-ae92-efd5abf656f5>Nullable(2)] T>(string group, string name, T value, string description, bool synchronizedSetting = true) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown return config(group, name, value, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>()), synchronizedSetting); } public void Awake() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Expected O, but got Unknown //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Expected O, but got Unknown //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Expected O, but got Unknown //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Expected O, but got Unknown //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Expected O, but got Unknown //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Expected O, but got Unknown //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Expected O, but got Unknown //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Expected O, but got Unknown //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Expected O, but got Unknown //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Expected O, but got Unknown //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Expected O, but got Unknown //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Expected O, but got Unknown //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Expected O, but got Unknown //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Expected O, but got Unknown //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Expected O, but got Unknown //IL_05b1: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Expected O, but got Unknown //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_05f1: Expected O, but got Unknown //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Expected O, but got Unknown //IL_0644: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Expected O, but got Unknown //IL_0676: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Expected O, but got Unknown //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Expected O, but got Unknown //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Expected O, but got Unknown //IL_0713: Unknown result type (might be due to invalid IL or missing references) //IL_071e: Expected O, but got Unknown //IL_0748: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Expected O, but got Unknown //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_077e: Expected O, but got Unknown //IL_07a8: Unknown result type (might be due to invalid IL or missing references) //IL_07b3: Expected O, but got Unknown //IL_07d3: Unknown result type (might be due to invalid IL or missing references) //IL_07de: Expected O, but got Unknown //IL_0808: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Expected O, but got Unknown //IL_0833: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Expected O, but got Unknown //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Expected O, but got Unknown //IL_08a5: Unknown result type (might be due to invalid IL or missing references) //IL_08b0: Expected O, but got Unknown //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08e5: Expected O, but got Unknown //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_0910: Expected O, but got Unknown //IL_093a: Unknown result type (might be due to invalid IL or missing references) //IL_0945: Expected O, but got Unknown //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Expected O, but got Unknown //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_09a5: Expected O, but got Unknown //IL_09c5: Unknown result type (might be due to invalid IL or missing references) //IL_09d0: Expected O, but got Unknown //IL_09f0: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Expected O, but got Unknown //IL_0a1b: Unknown result type (might be due to invalid IL or missing references) //IL_0a26: Expected O, but got Unknown //IL_0a54: Unknown result type (might be due to invalid IL or missing references) //IL_0a5f: Expected O, but got Unknown //IL_0a8d: Unknown result type (might be due to invalid IL or missing references) //IL_0a98: Expected O, but got Unknown //IL_0ac6: Unknown result type (might be due to invalid IL or missing references) //IL_0ad1: Expected O, but got Unknown //IL_0aff: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Expected O, but got Unknown //IL_0b2a: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Expected O, but got Unknown //IL_0b5f: Unknown result type (might be due to invalid IL or missing references) //IL_0b6a: Expected O, but got Unknown //IL_0b91: Unknown result type (might be due to invalid IL or missing references) //IL_0b9c: Expected O, but got Unknown //IL_0bbc: Unknown result type (might be due to invalid IL or missing references) //IL_0bc7: Expected O, but got Unknown //IL_0bf1: Unknown result type (might be due to invalid IL or missing references) //IL_0bfc: Expected O, but got Unknown //IL_0c23: Unknown result type (might be due to invalid IL or missing references) //IL_0c2e: Expected O, but got Unknown //IL_0c4e: Unknown result type (might be due to invalid IL or missing references) //IL_0c59: Expected O, but got Unknown //IL_0c83: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Expected O, but got Unknown //IL_0cb5: Unknown result type (might be due to invalid IL or missing references) //IL_0cc0: Expected O, but got Unknown //IL_0cee: Unknown result type (might be due to invalid IL or missing references) //IL_0cf9: Expected O, but got Unknown //IL_0d20: Unknown result type (might be due to invalid IL or missing references) //IL_0d2b: Expected O, but got Unknown //IL_0d59: Unknown result type (might be due to invalid IL or missing references) //IL_0d64: Expected O, but got Unknown //IL_0d8b: Unknown result type (might be due to invalid IL or missing references) //IL_0d96: Expected O, but got Unknown //IL_0dc4: Unknown result type (might be due to invalid IL or missing references) //IL_0dcf: Expected O, but got Unknown //IL_0df6: Unknown result type (might be due to invalid IL or missing references) //IL_0e01: Expected O, but got Unknown //IL_0e2f: Unknown result type (might be due to invalid IL or missing references) //IL_0e3a: Expected O, but got Unknown //IL_0e61: Unknown result type (might be due to invalid IL or missing references) //IL_0e6c: Expected O, but got Unknown //IL_0e9a: Unknown result type (might be due to invalid IL or missing references) //IL_0ea5: Expected O, but got Unknown //IL_0ecc: Unknown result type (might be due to invalid IL or missing references) //IL_0ed7: Expected O, but got Unknown //IL_0f05: Unknown result type (might be due to invalid IL or missing references) //IL_0f10: Expected O, but got Unknown //IL_0f3e: Unknown result type (might be due to invalid IL or missing references) //IL_0f49: Expected O, but got Unknown //IL_0f6c: Unknown result type (might be due to invalid IL or missing references) //IL_0f77: Expected O, but got Unknown //IL_0f9b: Unknown result type (might be due to invalid IL or missing references) //IL_0fa6: Expected O, but got Unknown //IL_0fca: Unknown result type (might be due to invalid IL or missing references) //IL_0fd5: Expected O, but got Unknown //IL_1003: Unknown result type (might be due to invalid IL or missing references) //IL_100e: Expected O, but got Unknown //IL_1031: Unknown result type (might be due to invalid IL or missing references) //IL_103c: Expected O, but got Unknown //IL_106a: Unknown result type (might be due to invalid IL or missing references) //IL_1075: Expected O, but got Unknown //IL_10af: Unknown result type (might be due to invalid IL or missing references) //IL_10b5: Expected O, but got Unknown Localizer.Load(); potionAssets = PrefabManager.RegisterAssetBundle("potions"); AssetBundle val = potionAssets; serverConfigLocked = config("1 - General", "Lock Configuration", Toggle.On, "If on, the configuration is locked and can be changed by server admins only."); configSync.AddLockingConfigEntry<Toggle>(serverConfigLocked); alchemySkillEnabled = config("1 - General", "Alchemy Skill", Toggle.On, "Enables the Alchemy skill."); alchemySkillBonusWhenCraftingEnabled = config("1 - General", "Alchemy Crafting Bonus", Toggle.On, "Enable Alchemy Bonus when crafting."); philosophersStoneXpGainFactor = config("2 - Philosophers Stone", "Philosophers Stone XP Gain Factor", 1.25f, new ConfigDescription("Factor for Alchemy XP gain, when a Philosophers Stone is equipped.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 3f), Array.Empty<object>())); flaskOfElementsFireDamageTakenReduction = config("Flask of Elements", "Fire damage reduction", 66, new ConfigDescription("Fire damage reduction during Flask of Elements effect.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); flaskOfElementsLightningDamageTakenReduction = config("Flask of Elements", "Lightning damage reduction", 66, new ConfigDescription("Lightning damage reduction during Flask of Elements effect.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); flaskOfElementsTTL = config("Flask of Elements", "Effect Duration", 120, new ConfigDescription("Effect duration of the Flask of Elements in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); flaskOfFortificationBluntDamageTakenReduction = config("Flask of Fortification", "Blunt damage reduction", 66, new ConfigDescription("Blunt damage reduction during Flask of Fortification effect.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); flaskOfFortificationSlashDamageTakenReduction = config("Flask of Fortification", "Slash damage reduction", 66, new ConfigDescription("Slash damage reduction during Flask of Fortification effect.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); flaskOfFortificationPierceDamageTakenReduction = config("Flask of Fortification", "Pierce damage reduction", 66, new ConfigDescription("Pierce damage reduction during Flask of Fortification effect.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); flaskOfFortificationTTL = config("Flask of Fortification", "Effect Duration", 120, new ConfigDescription("Effect duration of the Flask of Fortification in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); flaskOfMagelightColor = config<Color>("Flask of Magelight", "Effect Color", new Color(0.75f, 0.75f, 1f), new ConfigDescription("Color of the Flask of Magelight effect.", (AcceptableValueBase)null, Array.Empty<object>())); flaskOfMagelightIntensity = config("Flask of Magelight", "Effect Intensity", 3f, new ConfigDescription("Intensity of the Flask of Magelight effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.01f, 5f), Array.Empty<object>())); flaskOfMagelightTTL = config("Flask of Magelight", "Effect Duration", 300, new ConfigDescription("Effect duration of the Flask of Magelight in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); flaskOfGodsHealing = config("Flask of the Gods", "Healing Effect", 250f, new ConfigDescription("Healing from the Flask of the Gods effect.", (AcceptableValueBase)null, Array.Empty<object>())); flaskOfGodsRegenMultiplier = config("Flask of the Gods", "Health Regen Factor", 1.05f, new ConfigDescription("Health regen factor from the Flask of the Gods effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5f), Array.Empty<object>())); flaskOfGodsTTL = config("Flask of the Gods", "Effect Duration", 300, new ConfigDescription("Effect duration of the Flask of the Gods in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); flaskOfSecondWindJumpStaminaFactor = config("Flask of Second Wind", "Jump Stamina Usage Factor", 0.75f, new ConfigDescription("Jump stamina usage factor the Flask of Second Wind effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>())); flaskOfSecondWindRunStaminaFactor = config("Flask of Second Wind", "Run Stamina Usage Factor", 0.75f, new ConfigDescription("Run stamina usage factor from the Flask of Second Wind effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>())); flaskOfSecondWindStaminaRegenMultiplier = config("Flask of Second Wind", "Stamina Regen Factor", 1.05f, new ConfigDescription("Stamina regeneration factor from the Flask of Second Wind effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5f), Array.Empty<object>())); flaskOfSecondWindTTL = config("Flask of Second Wind", "Effect Duration", 120, new ConfigDescription("Effect duration of the Flask of Second Wind in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); grandHealingTidePotionHealthOverTime = config("Grand Healing Tide Potion", "Healing Effect", 95f, new ConfigDescription("Healing from the Grand Healing Tide Potion effect.", (AcceptableValueBase)null, Array.Empty<object>())); grandHealingTidePotionTickInterval = config("Grand Healing Tide Potion", "Tick Interval", 1f, new ConfigDescription("Tick interval for the Grand Healing Tide Potion effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); grandHealingTidePotionTTL = config("Grand Healing Tide Potion", "Effect Duration", 10f, new ConfigDescription("Effect duration of the Grand Healing Tide Potion in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 30f), Array.Empty<object>())); grandHealingTidePotionCooldown = config("Grand Healing Tide Potion", "Cooldown Duration", 240, new ConfigDescription("Cooldown of the Grand Healing Tide Potion in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 600), Array.Empty<object>())); grandStaminaElixirStaminaOverTime = config("Grand Stamina Elixir", "Stamina Regeneration", 150f, new ConfigDescription("Stamina regeneration from the Grand Stamina Elixir effect.", (AcceptableValueBase)null, Array.Empty<object>())); grandStaminaElixirTTL = config("Grand Stamina Elixir", "Effect Duration", 15f, new ConfigDescription("Effect duration of the Grand Stamina Elixir effect in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 30f), Array.Empty<object>())); grandStaminaElixirCooldown = config("Grand Stamina Elixir", "Cooldown Duration", 300, new ConfigDescription("Cooldown duration of the Grand Stamina Elixir in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); grandSpiritualHealingPotionHealthOverTime = config("Grand Spiritual Healing Potion", "Healing Effect", 100f, new ConfigDescription("Healing from the Grand Spiritual Healing Potion effect.", (AcceptableValueBase)null, Array.Empty<object>())); grandSpiritualHealingPotionCooldown = config("Grand Spiritual Healing Potion", "Cooldown Duration", 240, new ConfigDescription("Cooldown of the Grand Spiritual Healing Potion in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 600), Array.Empty<object>())); grandStealthElixirVisibilityReduction = config("Grand Stealth Elixir", "Visibility Reduction", 100, new ConfigDescription("Visibility reduction while sneaking during the Grand Stealth Elixir effect.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); grandStealthElixirNoiseReduction = config("Grand Stealth Elixir", "Noise Reduction", 100, new ConfigDescription("Noise reduction while sneaking during the Grand Stealth Elixir effect.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); grandStealthElixirTTL = config("Grand Stealth Elixir", "Effect Duration", 60, new ConfigDescription("Effect duration of the Grand Stealth Elixir effect in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); mediumHealingTideFlaskHealthOverTime = config("Medium Healing Tide Flask", "Healing Effect", 45f, new ConfigDescription("Healing from the Medium Healing Tide Flask effect.", (AcceptableValueBase)null, Array.Empty<object>())); mediumHealingTideFlaskTickInterval = config("Medium Healing Tide Flask", "Tick Interval", 1f, new ConfigDescription("Tick interval for the Medium Healing Tide Flask effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); mediumHealingTideFlaskTTL = config("Medium Healing Tide Flask", "Effect Duration", 10f, new ConfigDescription("Effect duration of the Medium Healing Tide Flask in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 30f), Array.Empty<object>())); mediumHealingTideFlaskCooldown = config("Medium Healing Tide Flask", "Cooldown Duration", 240, new ConfigDescription("Cooldown of the Medium Healing Tide Flask in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 600), Array.Empty<object>())); mediumSpiritualHealingFlaskHealthOverTime = config("Medium Spiritual Healing Flask", "Healing Effect", 50f, new ConfigDescription("Healing from the Medium Spiritual Healing Flask effect.", (AcceptableValueBase)null, Array.Empty<object>())); mediumSpiritualHealingFlaskCooldown = config("Medium Spiritual Healing Flask", "Cooldown Duration", 240, new ConfigDescription("Cooldown of the Medium Spiritual Healing Flask in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); mediumStaminaFlaskStaminaOverTime = config("Medium Stamina Flask", "Stamina Regeneration", 90f, new ConfigDescription("Stamina regeneration from the Medium Stamina Flask effect.", (AcceptableValueBase)null, Array.Empty<object>())); mediumStaminaFlaskCooldown = config("Medium Stamina Flask", "Cooldown Duration", 240, new ConfigDescription("Cooldown duration of the Medium Stamina Flask in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); lesserHealingTideVialHealthOverTime = config("Lesser Healing Tide Vial", "Healing Effect", 25f, new ConfigDescription("Healing from the Lesser Healing Tide Vial effect.", (AcceptableValueBase)null, Array.Empty<object>())); lesserHealingTideVialTickInterval = config("Lesser Healing Tide Vial", "Tick Interval", 1f, new ConfigDescription("Tick interval for the Lesser Healing Tide Vial effect.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); lesserHealingTideVialTTL = config("Lesser Healing Tide Vial", "Effect Duration", 10f, new ConfigDescription("Effect duration of the Lesser Healing Tide Vial in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 30f), Array.Empty<object>())); lesserHealingTideVialCooldown = config("Lesser Healing Tide Vial", "Cooldown Duration", 240, new ConfigDescription("Cooldown duration of the Lesser Healing Tide Vial in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 900), Array.Empty<object>())); lesserSpiritualHe