Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of WaterDwarfsItems v1.0.0
WaterDwarfsItems.dll
Decompiled 14 hours agousing System; using System.Collections; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HG; using ItemQualities; using ItemQualities.ContentManagement; using ItemQualities.Utilities.Extensions; using Microsoft.CodeAnalysis; using MiscFixes.Modules; using R2API; using R2API.Utils; using RiskOfOptions; using RoR2; using UnityEngine; using UnityEngine.AddressableAssets; using WaterDwarfsItems.Items; using WaterDwarfsItems.Items.QualityItems; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("WaterDwarfsItems")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("WaterDwarfsItems")] [assembly: AssemblyTitle("WaterDwarfsItems")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WaterDwarfsItems { public static class Assets { public static AssetBundle mainBundle; public const string bundleName = "waterdwarfsitemsassets"; public static string AssetBundlePath => Path.Combine(Path.GetDirectoryName(WaterDwarfsItems.PluginInfo.Location), "waterdwarfsitemsassets"); public static void Init() { mainBundle = AssetBundle.LoadFromFile(AssetBundlePath); mainBundle.SwapAllShaders(); Log.Debug("Done swapping shaders", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Assets.cs", 33); } internal static void LogAllGameObjects() { GameObject[] array = mainBundle.LoadAllAssets<GameObject>(); for (int i = 0; i < array.Length; i++) { Log.Message(((Object)array[i]).name ?? "", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Assets.cs", 40); } } internal static Material LoadMaterial(string materialName) { Material obj = mainBundle.LoadAsset<Material>(materialName); TrySwapShader(obj); return obj; } internal static void SwapAllShaders(this AssetBundle assetBundle) { Material[] array = assetBundle.LoadAllAssets<Material>(); for (int i = 0; i < array.Length; i++) { TrySwapShader(array[i]); } } internal static void TrySwapShader(Material material) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) string name = ((Object)material.shader).name; if (name.Contains("Stubbed")) { name = name.Replace("Stubbed", string.Empty) + ".shader"; Shader val = Addressables.LoadAssetAsync<Shader>((object)name).WaitForCompletion(); if ((Object)(object)val != (Object)null) { material.shader = val; } else { Log.Error("Failed to load shader " + name, "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Assets.cs", 74); } } else if (name == "Standard") { Texture texture = material.GetTexture("_BumpMap"); float num = material.GetFloat("_BumpScale"); Texture texture2 = material.GetTexture("_EmissionMap"); material.shader = Resources.Load<Shader>("Shaders/Deferred/HGStandard"); material.SetTexture("_NormalMap", texture); material.SetFloat("_NormalStrength", num); material.SetTexture("_EmTex", texture2); material.SetColor("_EmColor", new Color(0.2f, 0.2f, 0.2f)); material.SetFloat("_EmPower", 0.15f); } } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } private static string Format(object data, string file, int line) { string fileName = Path.GetFileName(file); return $"[{fileName}:{line}] {data}"; } internal static void Debug(object data, [CallerFilePath] string file = "", [CallerLineNumber] int line = 0) { _logSource.LogDebug((object)Format(data, file, line)); } internal static void Error(object data, [CallerFilePath] string file = "", [CallerLineNumber] int line = 0) { _logSource.LogError((object)Format(data, file, line)); } internal static void Fatal(object data, [CallerFilePath] string file = "", [CallerLineNumber] int line = 0) { _logSource.LogFatal((object)Format(data, file, line)); } internal static void Info(object data, [CallerFilePath] string file = "", [CallerLineNumber] int line = 0) { _logSource.LogInfo((object)Format(data, file, line)); } internal static void Message(object data, [CallerFilePath] string file = "", [CallerLineNumber] int line = 0) { _logSource.LogMessage((object)Format(data, file, line)); } internal static void Warning(object data, [CallerFilePath] string file = "", [CallerLineNumber] int line = 0) { _logSource.LogWarning((object)Format(data, file, line)); } } internal class ModConfigs { public static ConfigEntry<bool> HyperPod_Enable; public static ConfigEntry<int> HyperPod_BaseSpeed; public static ConfigEntry<int> HyperPod_StackSpeed; public static ConfigEntry<bool> HyperPod_EnableQuality; public static void Init() { ConfigFile configs = WaterDwarfsItems.Configs; HyperPod_Enable = Extensions.BindOption<bool>(configs, "Hyperactive Pea Pod", "Enable this item", "Disable to remove this item from your game.", true, (ConfigFlags)1); HyperPod_BaseSpeed = Extensions.BindOptionSlider<int>(configs, "Hyperactive Pea Pod", "Base movement speed bonus", "How much of a movement speed bonus the first stack of this item should provide (Goat Hoof is 14 for reference).", 35, 0, 140, (ConfigFlags)0); HyperPod_StackSpeed = Extensions.BindOptionSlider<int>(configs, "Hyperactive Pea Pod", "Stack movement speed bonus", "How much of a movement speed bonus stacking this item should provide (Goat Hoof is 14 for reference).", 35, 0, 140, (ConfigFlags)0); HyperPod_EnableQuality = Extensions.BindOption<bool>(configs, "Hyperactive Pea Pod", "Enable Quality compatibility.", "Disable to remove this item's Quality variant's from your game (does nothing without Quality).", true, (ConfigFlags)1); } } internal static class QualityCompat { [CompilerGenerated] private static class <>O { public static LoadContentAsyncDelegate <0>__loadContent_Basic; } public static ItemQualityGroup HyperPodItemGroup; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Init() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__loadContent_Basic; if (obj == null) { LoadContentAsyncDelegate val = loadContent_Basic; <>O.<0>__loadContent_Basic = val; obj = (object)val; } QualityContentManager.LoadContentAsync += (LoadContentAsyncDelegate)obj; if (ModConfigs.HyperPod_EnableQuality.Value) { Quality_HyperPod.Init(); } } private static IEnumerator loadContent_Basic(QualityContentLoadArgs args) { if (ModConfigs.HyperPod_EnableQuality.Value) { HyperPodItemGroup = args.CreateItemQualityGroup(HyperPod.itemDef); } yield break; } public static void UpdateQualityDESC(string token, string DESC, LanguageOverlay[] overlays, string[] DESCSuffixes, bool overlayAdded = true) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) string text = "ITEM_" + token; Log.Debug("New base item DESC: " + DESC, "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\QualityCompat.cs", 37); if (overlayAdded) { Log.Debug("Removing previous overlays", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\QualityCompat.cs", 41); for (int i = 0; i < overlays.Length; i++) { overlays[i].Remove(); } } for (int j = 0; j < 4; j++) { string text2 = text + "_" + ((object)(QualityTier)j/*cast due to .constrained prefix*/).ToString().ToUpper() + "_DESC"; string text3 = DESC + DESCSuffixes[j]; Log.Debug("Should be changing ovelay for token: " + text2 + " to: " + text3, "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\QualityCompat.cs", 54); overlays[j] = LanguageAPI.AddOverlay(text2, text3); } } } internal class RoOCompat { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void InitRoO() { try { ModSettingsManager.SetModDescription("A mod containing items I wanted to add to the game. Configurable. Supports Quality and Risk of Options.", "water_dwarf.WaterDwarfsItems", "WaterDwarfsItems"); ModSettingsManager.SetModIcon(Assets.mainBundle.LoadAsset<Sprite>("icon")); Log.Debug("Risk of Options enabled", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\RoOCompat.cs", 20); } catch (Exception ex) { Log.Debug(ex.ToString(), "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\RoOCompat.cs", 24); } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("water_dwarf.WaterDwarfsItems", "WaterDwarfsItems", "1.0.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class WaterDwarfsItems : BaseUnityPlugin { public const string PluginGUID = "water_dwarf.WaterDwarfsItems"; public const string PluginAuthor = "water_dwarf"; public const string PluginName = "WaterDwarfsItems"; public const string PluginVersion = "1.0.0"; public static bool QualityEnabled; public static PluginInfo PluginInfo { get; private set; } public static ConfigFile Configs { get; private set; } public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); PluginInfo = ((BaseUnityPlugin)this).Info; Assets.Init(); Configs = ((BaseUnityPlugin)this).Config; ModConfigs.Init(); if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions")) { RoOCompat.InitRoO(); } if (Chainloader.PluginInfos.ContainsKey("com.Gorakh.ItemQualities")) { qualityCompatInit(); QualityEnabled = true; } if (ModConfigs.HyperPod_Enable.Value) { HyperPod.Init(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void qualityCompatInit() { QualityCompat.Init(); } } } namespace WaterDwarfsItems.Items { internal class HyperPod { [CompilerGenerated] private static class <>O { public static Action <0>__HyperPod_SetDESC; public static EventHandler <1>__HyperPod_BaseSpeedChanged; public static EventHandler <2>__HyperPod_StackSpeedChanged; public static StatHookEventHandler <3>__RecalculateStatsAPI_GetStatCoefficients; } public static ItemDef itemDef; public static int baseMovementSpeed = 35; public static int stackMovementSpeed = 35; public static LanguageOverlay DESCOverlay; public static bool overlayAdded = false; public static bool qualityVariant; public static void Init() { //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); itemDef = ItemBase.CreateItemDef("HyperPod", (ItemTier)1, canRemove: true, hidden: false, (ItemTag[])(object)array, CreateItemDisplayRules()); qualityVariant = WaterDwarfsItems.QualityEnabled && ModConfigs.HyperPod_EnableQuality.Value; if (qualityVariant) { Log.Debug("Will be modifying quality hyperpod DESC", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 32); } else { Log.Debug("Won't be modifying quality hyperpod DESC", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 33); } baseMovementSpeed = ModConfigs.HyperPod_BaseSpeed.Value; Log.Message($"Set baseMovementSpeed to config's value of {baseMovementSpeed}", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 37); stackMovementSpeed = ModConfigs.HyperPod_StackSpeed.Value; Log.Message($"Set stackMovementSpeed to config's value of {stackMovementSpeed}", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 39); Language.onCurrentLanguageChanged += HyperPod_SetDESC; ModConfigs.HyperPod_BaseSpeed.SettingChanged += HyperPod_BaseSpeedChanged; ModConfigs.HyperPod_StackSpeed.SettingChanged += HyperPod_StackSpeedChanged; object obj = <>O.<3>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<3>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; } private static void HyperPod_SetDESC() { Log.Debug("onCurrentLanguageChanged event triggered. Setting DESC token.", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 53); DESCOverlay = ItemBase.UpdateDESC(itemDef.descriptionToken, new object[2] { baseMovementSpeed, stackMovementSpeed }, DESCOverlay, overlayAdded); if (!overlayAdded) { overlayAdded = true; } } private static ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown return new ItemDisplayRuleDict((ItemDisplayRule[])null); } private static void HyperPod_BaseSpeedChanged(object sender, EventArgs args) { baseMovementSpeed = ModConfigs.HyperPod_BaseSpeed.Value; Log.Debug($"Set baseMovementSpeed to config's value of {baseMovementSpeed}", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 68); DESCOverlay = ItemBase.UpdateDESC(itemDef.descriptionToken, new object[2] { baseMovementSpeed, stackMovementSpeed }, DESCOverlay); if (qualityVariant) { Log.Debug("Updating Quality HyperPod's DESC", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 72); updateQualityDESC(); } } private static void HyperPod_StackSpeedChanged(object sender, EventArgs args) { stackMovementSpeed = ModConfigs.HyperPod_StackSpeed.Value; Log.Debug($"Set stackMovementSpeed to config's value of {stackMovementSpeed}", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 80); DESCOverlay = ItemBase.UpdateDESC(itemDef.descriptionToken, new object[2] { baseMovementSpeed, stackMovementSpeed }, DESCOverlay); if (qualityVariant) { Log.Debug("Updating Quality HyperPod's DESC", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\HyperPod.cs", 84); updateQualityDESC(); } } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody body, StatHookEventArgs args) { if (!((Object)(object)body == (Object)null) && Object.op_Implicit((Object)(object)body.inventory)) { int itemCountEffective = body.inventory.GetItemCountEffective(itemDef); if (itemCountEffective > 0) { int num = baseMovementSpeed + stackMovementSpeed * (itemCountEffective - 1); args.moveSpeedMultAdd += (float)num / 100f; } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void updateQualityDESC() { Quality_HyperPod.UpdateDESC(); } } internal class ItemBase { public static ItemDef itemDef; public static ItemDef CreateItemDef(string internalItemName, ItemTier rarity, bool canRemove, bool hidden, ItemTag[] tags, ItemDisplayRuleDict displayRules) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) itemDef = ScriptableObject.CreateInstance<ItemDef>(); string text = internalItemName.ToUpper(); ((Object)itemDef).name = internalItemName; itemDef.nameToken = "ITEM_" + text + "_NAME"; itemDef.pickupToken = "ITEM_" + text + "_PICKUP"; itemDef.descriptionToken = "ITEM_" + text + "_DESC"; itemDef.loreToken = "ITEM_" + text + "_LORE"; itemDef.deprecatedTier = rarity; GameObject val = Assets.mainBundle.LoadAsset<GameObject>(internalItemName + "_Model_Parent"); if ((Object)(object)val == (Object)null) { Log.Debug(internalItemName + " model not found. Using question mark model.", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\ItemBase.cs", 30); val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); } Sprite val2 = Assets.mainBundle.LoadAsset<Sprite>(internalItemName + "_Icon"); if ((Object)(object)val2 == (Object)null) { Log.Debug(internalItemName + " sprite not found. Using question mark sprite.", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\ItemBase.cs", 37); val2 = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); } ModelPanelParameters val3 = UnityObjectExtensions.EnsureComponent<ModelPanelParameters>(val); if (!Object.op_Implicit((Object)(object)val3.focusPointTransform)) { val3.focusPointTransform = new GameObject("FocusPoint").transform; val3.focusPointTransform.SetParent(val.transform); val3.focusPointTransform.localPosition = new Vector3(0f, 0.2f, 0f); } if (!Object.op_Implicit((Object)(object)val3.cameraPositionTransform)) { val3.cameraPositionTransform = new GameObject("CameraPosition").transform; val3.cameraPositionTransform.SetParent(val.transform); val3.cameraPositionTransform.localPosition = new Vector3(-0.2f, 0.2f, -0.5f); } val3.maxDistance = 3f; val3.minDistance = 0.1f; itemDef.pickupModelPrefab = val; itemDef.pickupIconSprite = val2; itemDef.canRemove = canRemove; itemDef.hidden = hidden; itemDef.tags = tags; ItemAPI.Add(new CustomItem(itemDef, displayRules)); return itemDef; } public static LanguageOverlay UpdateDESC(string DESCToken, object[] values, LanguageOverlay overlay, bool overlayAdded = true) { if (overlayAdded) { Log.Debug("Removing previous overlay", "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\ItemBase.cs", 74); overlay.Remove(); } string stringFormatted = Language.GetStringFormatted(DESCToken, values); Log.Debug("Trying to update overlay to " + stringFormatted, "C:\\Users\\cwash\\Desktop\\NewModDevStuff\\items_mod\\WaterDwarfsItems\\Items\\ItemBase.cs", 78); overlay = LanguageAPI.AddOverlay(DESCToken, stringFormatted); return overlay; } public static string GetDESC(string DESCToken, object[] values) { return Language.GetStringFormatted(DESCToken, values); } } } namespace WaterDwarfsItems.Items.QualityItems { internal class Quality_HyperPod { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; } public static LanguageOverlay[] DESCOverlays = (LanguageOverlay[])(object)new LanguageOverlay[4]; public static bool overlayAdded = false; public static string[] qualityDESCSuffixes = new string[4] { "\n<sprite name=\"Quality\"> Increases <style=cIsUtility>jump height</style> by <style=cIsUtility>15%</style> <style=cStack>(+15% per stack)</style> and <style=cIsUtility>reduces fall damage</style>.", "\n<sprite name=\"Quality\"> Increases <style=cIsUtility>jump height</style> by <style=cIsUtility>25%</style> <style=cStack>(+25% per stack)</style> and <style=cIsUtility>reduces fall damage</style>.", "\n<sprite name=\"Quality\"> Increases <style=cIsUtility>jump height</style> by <style=cIsUtility>50%</style> <style=cStack>(+50% per stack)</style> and <style=cIsUtility>reduces fall damage</style>.", "\n<sprite name=\"Quality\"> Increases <style=cIsUtility>jump height</style> by <style=cIsUtility>100%</style> <style=cStack>(+100% per stack)</style> and <style=cIsUtility>reduces fall damage</style>." }; public static void Init() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_0018: 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) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)sender.inventory)) { ItemQualityCounts itemCountsEffective = InventoryExtensions.GetItemCountsEffective(sender.inventory, QualityCompat.HyperPodItemGroup); args.jumpPowerMultAdd += 0.15f * (float)itemCountsEffective.UncommonCount + 0.25f * (float)itemCountsEffective.RareCount + 0.5f * (float)itemCountsEffective.EpicCount + 1f * (float)itemCountsEffective.LegendaryCount; } } public static void UpdateDESC() { string dESC = ItemBase.GetDESC("ITEM_HYPERPOD_DESC", new object[2] { HyperPod.baseMovementSpeed, HyperPod.stackMovementSpeed }); QualityCompat.UpdateQualityDESC("HYPERPOD", dESC, DESCOverlays, qualityDESCSuffixes, overlayAdded); if (!overlayAdded) { overlayAdded = true; } } } }