using System; 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.Logging; using ExamplePlugin.Items; using Microsoft.CodeAnalysis; using On.RoR2; using On.RoR2.Projectile; using R2API; using RoR2; using RoR2.Projectile; using UnityEngine; using UnityEngine.AddressableAssets; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("DoomslugItemMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+c331e36f2efc68922de8c167a10b4d9e5eb4fc19")] [assembly: AssemblyProduct("DoomslugItemMod")] [assembly: AssemblyTitle("DoomslugItemMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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 ExamplePlugin { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Doomslug.Test", "Test", "1.5.0")] public class Initialize : BaseUnityPlugin { public const string PluginGUID = "Doomslug.Test"; public const string PluginAuthor = "Doomslug"; public const string PluginName = "Test"; public const string PluginVersion = "1.5.0"; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); AssetBundle val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "doomslugbundle")); if (!Object.op_Implicit((Object)(object)val)) { Log.Error("AssetBundle failed to load!"); } MicrobialBullets.Init(val); Biomissles.Init(val); SourSaltShaker.Init(val); BrittleShield.Init(val); EntropyRounds.Init(val); HeavyRounds.Init(val); } private void Update() { MicrobialBullets.Update(); Biomissles.Update(); SourSaltShaker.Update(); BrittleShield.Update(); EntropyRounds.Update(); HeavyRounds.Update(); } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } } namespace ExamplePlugin.Items { public class BiomisslesMarker : MonoBehaviour { } public class Biomissles { [CompilerGenerated] private static class <>O { public static hook_OnHitEnemy <0>__GlobalEventManager_OnHitEnemy; public static hook_Awake <1>__ProjectileController_Awake; public static StatHookEventHandler <2>__RecalculateStats; } public static string IconName = "Placeholder_Icon"; public static ItemDef ItemDef; public static ModdedProcType BiomisslesProcType; private static bool isFiringBiomissle = false; private static GameObject missilePrefab; public static void Init(AssetBundle bundle) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) BiomisslesProcType = ProcTypeAPI.ReserveProcType(); if (!Object.op_Implicit((Object)(object)bundle)) { Log.Error("AssetBundle failed to load!"); } CreateItem(bundle); AddHooks(); } private static void CreateItem(AssetBundle bundle) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = "DOOMSLUG_BIOMISSLES"; ItemDef.nameToken = "DOOMSLUG_BIOMISSLES_NAME"; ItemDef.pickupToken = "DOOMSLUG_BIOMISSLES_PICKUP"; ItemDef.descriptionToken = "DOOMSLUG_BIOMISSLES_DESC"; ItemDef.loreToken = "DOOMSLUG_BIOMISSLES_DESC_LORE"; LanguageAPI.Add("DOOMSLUG_BIOMISSLES_NAME", "Biomissles"); LanguageAPI.Add("DOOMSLUG_BIOMISSLES_PICKUP", "Fire missles on crit"); LanguageAPI.Add("DOOMSLUG_BIOMISSLES_DESC", "On crit fire 5 (+5 per stack) missles that deal 20% Total Damage"); ItemDef._itemTierDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Tier3Def.asset").WaitForCompletion(); ItemDef.pickupIconSprite = bundle.LoadAsset(IconName); ItemDef.pickupModelPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDef.canRemove = true; ItemDef.hidden = false; missilePrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/MissileProjectile.prefab").WaitForCompletion(); if (!Object.op_Implicit((Object)(object)missilePrefab)) { Log.Error("Biomissles: missile prefab failed to load!"); } else { Log.Info("Biomissles: missile prefab loaded successfully!"); } ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(ItemDef, val)); } private static void AddHooks() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: 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_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown object obj = <>O.<0>__GlobalEventManager_OnHitEnemy; if (obj == null) { hook_OnHitEnemy val = GlobalEventManager_OnHitEnemy; <>O.<0>__GlobalEventManager_OnHitEnemy = val; obj = (object)val; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj; object obj2 = <>O.<1>__ProjectileController_Awake; if (obj2 == null) { hook_Awake val2 = ProjectileController_Awake; <>O.<1>__ProjectileController_Awake = val2; obj2 = (object)val2; } ProjectileController.Awake += (hook_Awake)obj2; object obj3 = <>O.<2>__RecalculateStats; if (obj3 == null) { StatHookEventHandler val3 = RecalculateStats; <>O.<2>__RecalculateStats = val3; obj3 = (object)val3; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj3; } private static void ProjectileController_Awake(orig_Awake orig, ProjectileController self) { orig.Invoke(self); if (isFiringBiomissle) { self.procCoefficient = 0.2f; } } private static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); if (!Object.op_Implicit((Object)(object)damageInfo.attacker)) { return; } CharacterBody component = damageInfo.attacker.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.inventory)) { return; } int itemCount = component.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount <= 0 || ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, BiomisslesProcType) || !damageInfo.crit || damageInfo.procCoefficient == 0f) { return; } CharacterBody component2 = victim.GetComponent(); if (!Object.op_Implicit((Object)(object)component2) || !Object.op_Implicit((Object)(object)component2.healthComponent)) { return; } if (!Object.op_Implicit((Object)(object)missilePrefab)) { Log.Error("Biomissles: missile prefab is null, cannot fire!"); return; } Log.Info("Biomissles proc fired!"); ProcTypeAPI.AddModdedProc(ref damageInfo.procChainMask, BiomisslesProcType); int num = 3 * itemCount; HurtBox mainHurtBox = component2.mainHurtBox; Collider val = ((mainHurtBox != null) ? mainHurtBox.collider : null); float num2 = 0f; if ((Object)(object)val != (Object)null) { Bounds bounds = val.bounds; num2 = Mathf.Max(((Bounds)(ref bounds)).extents.x, ((Bounds)(ref bounds)).extents.z); } Vector3 position = component2.corePosition + Vector3.up * (1.5f * num2 + 1f); isFiringBiomissle = true; for (int i = 0; i < num; i++) { Vector3 val2 = Util.ApplySpread(Vector3.up, 0f, 20f, 1f, 1f, 0f, 0f); FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = missilePrefab; val3.position = position; val3.rotation = Util.QuaternionSafeLookRotation(val2); val3.owner = ((Component)component).gameObject; val3.damage = damageInfo.damage * 0.2f; val3.force = 0f; val3.crit = damageInfo.crit; val3.damageColorIndex = (DamageColorIndex)3; val3.procChainMask = damageInfo.procChainMask; FireProjectileInfo val4 = val3; ProjectileManager.instance.FireProjectile(val4); } isFiringBiomissle = false; } private static void RecalculateStats(CharacterBody body, StatHookEventArgs args) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body.inventory)) { int itemCount = body.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount > 0) { args.critAdd += 5f; } } } public static void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0066: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)285)) { Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; Log.Info($"Player pressed F4. Spawning our Biomissles at coordinates {transform.position}"); PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(ItemDef.itemIndex), transform.position, transform.forward * 20f); } } } public class BrittleShieldMarker : MonoBehaviour { } public class BrittleShield { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStats; public static hook_TakeDamage <1>__HealthComponent_TakeDamage; } public static string IconName = "Placeholder_Icon"; public static string BrokenIconName = IconName; public static ItemDef ItemDef; public static ItemDef BrokenItemDef; public static void Init(AssetBundle bundle) { if (!Object.op_Implicit((Object)(object)bundle)) { Log.Error("AssetBundle failed to load!"); } CreateItem(bundle); CreateBrokenItem(bundle); AddHooks(); } private static void CreateItem(AssetBundle bundle) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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) //IL_00f1: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = "DOOMSLUG_BRITTLESHIELD"; ItemDef.nameToken = "DOOMSLUG_BRITTLESHIELD_NAME"; ItemDef.pickupToken = "DOOMSLUG_BRITTLESHIELD_PICKUP"; ItemDef.descriptionToken = "DOOMSLUG_BRITTLESHIELD_DESC"; ItemDef.loreToken = "DOOMSLUG_BRITTLESHIELD_DESC_LORE"; LanguageAPI.Add("DOOMSLUG_BRITTLESHIELD_NAME", "Brittle Shield"); LanguageAPI.Add("DOOMSLUG_BRITTLESHIELD_PICKUP", "Gain bonus armor. Breaks at low health."); LanguageAPI.Add("DOOMSLUG_BRITTLESHIELD_DESC", "Gain 20 (+20 per stack) armor. Taking damage to below 25% health breaks this item."); ItemDef._itemTierDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion(); ItemDef.pickupIconSprite = bundle.LoadAsset(IconName); ItemDef.pickupModelPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDef.canRemove = true; ItemDef.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(ItemDef, val)); } private static void CreateBrokenItem(AssetBundle bundle) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown BrokenItemDef = ScriptableObject.CreateInstance(); ((Object)BrokenItemDef).name = "DOOMSLUG_BRITTLESHIELD_BROKEN"; BrokenItemDef.nameToken = "DOOMSLUG_BRITTLESHIELD_BROKEN_NAME"; BrokenItemDef.pickupToken = "DOOMSLUG_BRITTLESHIELD_BROKEN_PICKUP"; BrokenItemDef.descriptionToken = "DOOMSLUG_BRITTLESHIELD_BROKEN_DESC"; BrokenItemDef.loreToken = "DOOMSLUG_BRITTLESHIELD_BROKEN_DESC_LORE"; LanguageAPI.Add("DOOMSLUG_BRITTLESHIELD_BROKEN_NAME", "Brittle Shield (Broken)"); LanguageAPI.Add("DOOMSLUG_BRITTLESHIELD_BROKEN_PICKUP", "At least the pieces are pretty..."); LanguageAPI.Add("DOOMSLUG_BRITTLESHIELD_BROKEN_DESC", "At least the pieces are pretty..."); BrokenItemDef.deprecatedTier = (ItemTier)5; BrokenItemDef.pickupIconSprite = bundle.LoadAsset(BrokenIconName); BrokenItemDef.pickupModelPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); BrokenItemDef.canRemove = false; BrokenItemDef.hidden = true; ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(BrokenItemDef, val)); } private static void AddHooks() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: 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_003d: Expected O, but got Unknown object obj = <>O.<0>__RecalculateStats; if (obj == null) { StatHookEventHandler val = RecalculateStats; <>O.<0>__RecalculateStats = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; object obj2 = <>O.<1>__HealthComponent_TakeDamage; if (obj2 == null) { hook_TakeDamage val2 = HealthComponent_TakeDamage; <>O.<1>__HealthComponent_TakeDamage = val2; obj2 = (object)val2; } HealthComponent.TakeDamage += (hook_TakeDamage)obj2; } private static void RecalculateStats(CharacterBody body, StatHookEventArgs args) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body.inventory)) { int itemCount = body.inventory.GetItemCount(ItemDef.itemIndex); args.armorAdd += (float)(itemCount * 20); } } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo); CharacterBody body = self.body; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { int itemCount = body.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount > 0 && body.healthComponent.combinedHealthFraction < 0.25f) { BreakItem(body); } } } private static void BreakItem(CharacterBody body) { //IL_000c: 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) //IL_005d: Unknown result type (might be due to invalid IL or missing references) int itemCount = body.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount > 0) { body.inventory.RemoveItem(ItemDef, itemCount); body.inventory.GiveItem(BrokenItemDef, itemCount); CharacterMasterNotificationQueue.SendTransformNotification(body.master, ItemDef.itemIndex, BrokenItemDef.itemIndex, (TransformationType)0); } } public static void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0066: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)287)) { Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; Log.Info($"Player pressed F6. Spawning our BrittleShield at coordinates {transform.position}"); PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(ItemDef.itemIndex), transform.position, transform.forward * 20f); } } } public class EntropyRoundsMarker : MonoBehaviour { } public class EntropyRounds { [CompilerGenerated] private static class <>O { public static hook_OnHitEnemy <0>__GlobalEventManager_OnHitEnemy; } public static string IconName = "Placeholder_Icon"; public static ItemDef ItemDef; public static BuffDef EntropyBuff; public static DotIndex EntropyDotIndex; public static void Init(AssetBundle bundle) { if (!Object.op_Implicit((Object)(object)bundle)) { Log.Error("AssetBundle failed to load!"); } CreateItem(bundle); CreateDot(bundle); AddHooks(); } private static void CreateItem(AssetBundle bundle) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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) //IL_00f1: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = "DOOMSLUG_ENTROPYROUNDS"; ItemDef.nameToken = "DOOMSLUG_ENTROPYROUNDS_NAME"; ItemDef.pickupToken = "DOOMSLUG_ENTROPYROUNDS_PICKUP"; ItemDef.descriptionToken = "DOOMSLUG_ENTROPYROUNDS_DESC"; ItemDef.loreToken = "DOOMSLUG_ENTROPYROUNDS_DESC_LORE"; LanguageAPI.Add("DOOMSLUG_ENTROPYROUNDS_NAME", "Entropy Rounds"); LanguageAPI.Add("DOOMSLUG_ENTROPYROUNDS_PICKUP", "Chance to apply damage over time effect with infinite duration"); LanguageAPI.Add("DOOMSLUG_ENTROPYROUNDS_DESC", "On hit 10% (+10% per stack) to apply entropy, dealing 50% Base Damage per second with infinite duration."); ItemDef._itemTierDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion(); ItemDef.pickupIconSprite = bundle.LoadAsset(IconName); ItemDef.pickupModelPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDef.canRemove = true; ItemDef.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(ItemDef, val)); } private static void AddHooks() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__GlobalEventManager_OnHitEnemy; if (obj == null) { hook_OnHitEnemy val = GlobalEventManager_OnHitEnemy; <>O.<0>__GlobalEventManager_OnHitEnemy = val; obj = (object)val; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj; } private static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) Log.Info("OnHitEnemy fired"); orig.Invoke(self, damageInfo, victim); CharacterBody component = victim.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.healthComponent) || !Object.op_Implicit((Object)(object)damageInfo.attacker)) { return; } CharacterBody component2 = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.inventory)) { int itemCount = component2.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount > 0 && damageInfo.procCoefficient != 0f && Util.CheckRoll(10f * (float)itemCount * damageInfo.procCoefficient, component2.master)) { Log.Info("Entropy Rounds applied!"); DotController.InflictDot(((Component)component).gameObject, damageInfo.attacker, (HurtBox)null, EntropyDotIndex, float.PositiveInfinity, 1f, (uint?)null); } } } public static void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0066: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)288)) { Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; Log.Info($"Player pressed F7. Spawning our EntropyRounds at coordinates {transform.position}"); PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(ItemDef.itemIndex), transform.position, transform.forward * 20f); } } private static void CreateDot(AssetBundle bundle) { //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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) EntropyBuff = ScriptableObject.CreateInstance(); ((Object)EntropyBuff).name = "DOOMSLUG_ENTROPY"; EntropyBuff.canStack = true; EntropyBuff.isDebuff = true; EntropyBuff.isCooldown = false; EntropyBuff.iconSprite = bundle.LoadAsset(IconName); ContentAddition.AddBuffDef(EntropyBuff); EntropyDotIndex = DotAPI.RegisterDotDef(new DotDef { interval = 0.25f, damageCoefficient = 0.15f, damageColorIndex = (DamageColorIndex)4, associatedBuff = EntropyBuff }, (CustomDotBehaviour)null, (CustomDotVisual)null, (CustomDotDamageEvaluation)null); } } public class HeavyRoundsMarker : MonoBehaviour { } public class HeavyRounds { [CompilerGenerated] private static class <>O { public static hook_TakeDamage <0>__HealthComponent_TakeDamage; } public static string IconName = "Placeholder_Icon"; public static string BrokenIconName = IconName; public static ItemDef ItemDef; public static ItemDef BrokenItemDef; public static void Init(AssetBundle bundle) { if (!Object.op_Implicit((Object)(object)bundle)) { Log.Error("AssetBundle failed to load!"); } CreateItem(bundle); AddHooks(); } private static void CreateItem(AssetBundle bundle) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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) //IL_00f1: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = "DOOMSLUG_HEAVYROUNDS"; ItemDef.nameToken = "DOOMSLUG_HEAVYROUNDS_NAME"; ItemDef.pickupToken = "DOOMSLUG_HEAVYROUNDS_PICKUP"; ItemDef.descriptionToken = "DOOMSLUG_HEAVYROUNDS_DESC"; ItemDef.loreToken = "DOOMSLUG_HEAVYROUNDS_DESC_LORE"; LanguageAPI.Add("DOOMSLUG_HEAVYROUNDS_NAME", "Heavy Rounds"); LanguageAPI.Add("DOOMSLUG_HEAVYROUNDS_PICKUP", "Add force preportional to damage to all hits."); LanguageAPI.Add("DOOMSLUG_HEAVYROUNDS_DESC", "Apply force equal to 300 (+300 per stack) times the damage dealt divided by base damage."); ItemDef._itemTierDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion(); ItemDef.pickupIconSprite = bundle.LoadAsset(IconName); ItemDef.pickupModelPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDef.canRemove = true; ItemDef.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(ItemDef, val)); } private static void AddHooks() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__HealthComponent_TakeDamage; if (obj == null) { hook_TakeDamage val = HealthComponent_TakeDamage; <>O.<0>__HealthComponent_TakeDamage = val; obj = (object)val; } HealthComponent.TakeDamage += (hook_TakeDamage)obj; } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory)) { int itemCount = component.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount > 0) { float combinedHealth = self.combinedHealth; orig.Invoke(self, damageInfo); float num = combinedHealth - self.combinedHealth; if (Object.op_Implicit((Object)(object)self.body) && Object.op_Implicit((Object)(object)self.body.characterMotor)) { Vector3 val = ((Vector3)(ref damageInfo.force)).normalized * num * (float)itemCount * 300f / component.damage; Vector3 val2 = damageInfo.force; Log.Message("Before force: " + ((object)(Vector3)(ref val2)).ToString()); Log.Message("Damage: " + num); Log.Message("underlying damage: " + component.damage); self.body.characterMotor.ApplyForce(val, false, false); val2 = val; Log.Message("Force added: " + ((object)(Vector3)(ref val2)).ToString()); } return; } } } orig.Invoke(self, damageInfo); } public static void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0066: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)289)) { Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; Log.Info($"Player pressed F8. Spawning our HeavyRounds at coordinates {transform.position}"); PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(ItemDef.itemIndex), transform.position, transform.forward * 20f); } } } public class MicrobialBulletsMarker : MonoBehaviour { } public class MicrobialBullets { [CompilerGenerated] private static class <>O { public static hook_OnHitEnemy <0>__GlobalEventManager_OnHitEnemy; public static hook_Awake <1>__DelayBlast_Awake; public static hook_Detonate <2>__DelayBlast_Detonate; } public static string IconName = "Microbial_Bullet_Icon2"; public static ItemDef ItemDef; private static bool isFiringFakeDeathReport = false; public static ModdedProcType MicrobialBulletsProcType; public static void Init(AssetBundle bundle) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) MicrobialBulletsProcType = ProcTypeAPI.ReserveProcType(); if (!Object.op_Implicit((Object)(object)bundle)) { Log.Error("AssetBundle failed to load!"); } CreateItem(bundle); AddHooks(); } private static void CreateItem(AssetBundle bundle) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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) //IL_00f1: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = "DOOMSLUG_MICROBIAL_BULLETS"; ItemDef.nameToken = "DOOMSLUG_MICROBIAL_BULLETS_NAME"; ItemDef.pickupToken = "DOOMSLUG_MICROBIAL_BULLETS_PICKUP"; ItemDef.descriptionToken = "DOOMSLUG_MICROBIAL_BULLETS_DESC"; ItemDef.loreToken = "DOOMSLUG_MICROBIAL_BULLETS_DESC_LORE"; LanguageAPI.Add("DOOMSLUG_MICROBIAL_BULLETS_NAME", "Microbial Bullets"); LanguageAPI.Add("DOOMSLUG_MICROBIAL_BULLETS_PICKUP", "Chance to trigger on kill effects"); LanguageAPI.Add("DOOMSLUG_MICROBIAL_BULLETS_DESC", "3% (+2% per stack) chance to trigger all on kill effects on hit."); ItemDef._itemTierDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Tier2Def.asset").WaitForCompletion(); ItemDef.pickupIconSprite = bundle.LoadAsset(IconName); ItemDef.pickupModelPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDef.canRemove = true; ItemDef.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(ItemDef, val)); } private static void AddHooks() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: 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_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown object obj = <>O.<0>__GlobalEventManager_OnHitEnemy; if (obj == null) { hook_OnHitEnemy val = GlobalEventManager_OnHitEnemy; <>O.<0>__GlobalEventManager_OnHitEnemy = val; obj = (object)val; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj; object obj2 = <>O.<1>__DelayBlast_Awake; if (obj2 == null) { hook_Awake val2 = DelayBlast_Awake; <>O.<1>__DelayBlast_Awake = val2; obj2 = (object)val2; } DelayBlast.Awake += (hook_Awake)obj2; object obj3 = <>O.<2>__DelayBlast_Detonate; if (obj3 == null) { hook_Detonate val3 = DelayBlast_Detonate; <>O.<2>__DelayBlast_Detonate = val3; obj3 = (object)val3; } DelayBlast.Detonate += (hook_Detonate)obj3; } private static void DelayBlast_Awake(orig_Awake orig, DelayBlast self) { orig.Invoke(self); if (isFiringFakeDeathReport) { ((Component)self).gameObject.AddComponent(); } } private static void DelayBlast_Detonate(orig_Detonate orig, DelayBlast self) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Component)self).GetComponent())) { ProcTypeAPI.AddModdedProc(ref self.procChainMask, MicrobialBulletsProcType); } orig.Invoke(self); } private static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown orig.Invoke(self, damageInfo, victim); if (isFiringFakeDeathReport || !Object.op_Implicit((Object)(object)damageInfo.attacker)) { return; } CharacterBody component = damageInfo.attacker.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.inventory)) { return; } int itemCount = component.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount > 0 && !ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, MicrobialBulletsProcType) && Util.CheckRoll(1f + 2f * (float)itemCount * damageInfo.procCoefficient, component.master)) { CharacterBody component2 = victim.GetComponent(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.healthComponent) && component2.healthComponent.alive) { Log.Info("Microbial Bullets proc fired!"); ProcTypeAPI.AddModdedProc(ref damageInfo.procChainMask, MicrobialBulletsProcType); DamageReport val = new DamageReport(damageInfo, component2.healthComponent, damageInfo.damage, component2.healthComponent.combinedHealth); isFiringFakeDeathReport = true; GlobalEventManager.instance.OnCharacterDeath(val); isFiringFakeDeathReport = false; } } } public static void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0066: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)284)) { Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; Log.Info($"Player pressed F3. Spawning our Microbial Bullets at coordinates {transform.position}"); PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(ItemDef.itemIndex), transform.position, transform.forward * 20f); } } } public class SourSaltShakerMarker : MonoBehaviour { } public class SourSaltShaker { [CompilerGenerated] private static class <>O { public static hook_OnHitEnemy <0>__GlobalEventManager_OnHitEnemy; public static StatHookEventHandler <1>__RecalculateStats; } public static string IconName = "Salt-Shaker-Status-Image"; public static ItemDef ItemDef; public static BuffDef SaltBuff; public static void Init(AssetBundle bundle) { if (!Object.op_Implicit((Object)(object)bundle)) { Log.Error("AssetBundle failed to load!"); } CreateItem(bundle); CreateBuff(bundle); AddHooks(); } private static void CreateItem(AssetBundle bundle) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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) //IL_00f1: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = "DOOMSLUG_SOURSALTSHAKER"; ItemDef.nameToken = "DOOMSLUG_SOURSALTSHAKER_NAME"; ItemDef.pickupToken = "DOOMSLUG_SOURSALTSHAKER_PICKUP"; ItemDef.descriptionToken = "DOOMSLUG_SOURSALTSHAKER_DESC"; ItemDef.loreToken = "DOOMSLUG_SOURSALTSHAKER_DESC_LORE"; LanguageAPI.Add("DOOMSLUG_SOURSALTSHAKER_NAME", "Sour Salt Shaker"); LanguageAPI.Add("DOOMSLUG_SOURSALTSHAKER_PICKUP", "Enemies that have been crit take damage on hit"); LanguageAPI.Add("DOOMSLUG_SOURSALTSHAKER_DESC", "On crit enemies take 5% Base Damage on hit for the next 3 (+3 per stack) seconds"); ItemDef._itemTierDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Tier2Def.asset").WaitForCompletion(); ItemDef.pickupIconSprite = bundle.LoadAsset(IconName); ItemDef.pickupModelPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); ItemDef.canRemove = true; ItemDef.hidden = false; ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(ItemDef, val)); } private static void AddHooks() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: 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_003d: Expected O, but got Unknown object obj = <>O.<0>__GlobalEventManager_OnHitEnemy; if (obj == null) { hook_OnHitEnemy val = GlobalEventManager_OnHitEnemy; <>O.<0>__GlobalEventManager_OnHitEnemy = val; obj = (object)val; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj; object obj2 = <>O.<1>__RecalculateStats; if (obj2 == null) { StatHookEventHandler val2 = RecalculateStats; <>O.<1>__RecalculateStats = val2; obj2 = (object)val2; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj2; } private static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d6: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); CharacterBody component = victim.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.healthComponent)) { return; } if (component.HasBuff(SaltBuff)) { int buffCount = component.GetBuffCount(SaltBuff); DamageInfo val = new DamageInfo { attacker = damageInfo.attacker, inflictor = damageInfo.attacker, damage = (float)buffCount * damageInfo.attacker.GetComponent().damage * 0.05f * damageInfo.procCoefficient, position = component.corePosition, procCoefficient = 0f, damageColorIndex = (DamageColorIndex)3, procChainMask = default(ProcChainMask), damageType = DamageTypeCombo.op_Implicit((DamageType)2048) }; component.healthComponent.TakeDamage(val); } if (!Object.op_Implicit((Object)(object)damageInfo.attacker)) { return; } CharacterBody component2 = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.inventory)) { int itemCount = component2.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount > 0 && damageInfo.crit && damageInfo.procCoefficient != 0f) { Log.Info("Sour Salt Shaker applied!"); component.AddTimedBuff(SaltBuff, (float)(itemCount * 3)); } } } private static void RecalculateStats(CharacterBody body, StatHookEventArgs args) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body.inventory)) { int itemCount = body.inventory.GetItemCount(ItemDef.itemIndex); if (itemCount > 0) { args.critAdd += 5f; } } } public static void Update() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0066: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)286)) { Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; Log.Info($"Player pressed F5. Spawning our SourSaltShaker at coordinates {transform.position}"); PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(ItemDef.itemIndex), transform.position, transform.forward * 20f); } } private static void CreateBuff(AssetBundle bundle) { SaltBuff = ScriptableObject.CreateInstance(); ((Object)SaltBuff).name = "DOOMSLUG_SALT"; LanguageAPI.Add("DOOMSLUG_SALT", "Salt"); SaltBuff.canStack = true; SaltBuff.isDebuff = true; SaltBuff.isCooldown = false; SaltBuff.iconSprite = bundle.LoadAsset(IconName); ContentAddition.AddBuffDef(SaltBuff); } } }