Decompiled source of LordsItemEdits v0.3.4
plugins/LordsItemEdits.dll
Decompiled 2 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.Generic; 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 EntityStates; using EntityStates.RocketSurvivorSkills.Primary; using EntityStates.Toolbot; using IL.RoR2; using IL.RoR2.Items; using LordsItemEdits.ItemEdits; using LordsItemEdits.ModSupport.RiskyTweaksMod; using LordsItemEdits.ModSupport.RocketSurvivorGuy; using LordsItemEdits.ModSupport.Starstorm2; using LordsItemEdits.ModSupport.WolfFixes; using LordsItemEdits.MultiItemEdits; using Microsoft.CodeAnalysis; using MiscFixes.Modules; using Mono.Cecil; using Mono.Cecil.Cil; using Mono.Collections.Generic; using MonoDetour; using MonoDetour.Cil; using MonoDetour.DetourTypes; using MonoDetour.HookGen; using MonoDetourHooks.EntityStates.RocketSurvivorSkills.Primary.FireRocket; using MonoDetourHooks.RiskyTweaks.Tweaks.Survivors.Toolbot.ScrapICBM; using MonoDetourHooks.RoR2.GlobalEventManager; using MonoDetourHooks.RoR2.HealthComponent; using MonoDetourHooks.RoR2.Inventory; using MonoDetourHooks.RoR2.Items.MultiShopCardUtils; using MonoDetourHooks.RoR2.MissileUtils; using MonoDetourHooks.RoR2.Projectile.BoomerangProjectile; using MonoDetourHooks.SS2.Items.ArmedBackpack.Behavior; using MonoDetourHooks.SS2.Items.ErraticGadget; using MonoDetourHooks.WolfoFixes.EquipmentFixes; using MonoMod.Cil; using On.EntityStates.Toolbot; using On.RoR2; using On.RoR2.Orbs; using R2API; using RiskyTweaks.Tweaks.Survivors.Toolbot; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Items; using RoR2.Orbs; using RoR2.Projectile; using RoR2BepInExPack.GameAssetPathsBetter; using RoR2BepInExPack.Utilities; using SS2; using SS2.Items; using SimpleJSON; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using WolfoFixes; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("RiskyTweaks")] [assembly: IgnoresAccessChecksTo("RocketSurvivor")] [assembly: IgnoresAccessChecksTo("Starstorm2")] [assembly: IgnoresAccessChecksTo("WolfoFixes")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("LordsItemEdits")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+9d6e330d2388f7566acb39f13f1ffceb386efece")] [assembly: AssemblyProduct("LordsItemEdits")] [assembly: AssemblyTitle("LordsItemEdits")] [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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [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 MonoDetourHooks.SS2.Items.ErraticGadget { internal static class LightningOrb_OnArrival { public delegate void PrefixSignature(ErraticGadget self, ref orig_OnArrival orig, ref LightningOrb self1); public delegate ReturnFlow ControlFlowPrefixSignature(ErraticGadget self, ref orig_OnArrival orig, ref LightningOrb self1); public delegate void PostfixSignature(ErraticGadget self, ref orig_OnArrival orig, ref LightningOrb self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ControlFlowPrefix(ControlFlowPrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(ErraticGadget).GetMethod("LightningOrb_OnArrival", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnArrival), typeof(LightningOrb) }, null) ?? throw new MissingMethodException("SS2.Items.ErraticGadget", "LightningOrb_OnArrival"); } } internal static class LightningStrikeOrb_OnArrival { public delegate void PrefixSignature(ErraticGadget self, ref orig_OnArrival orig, ref LightningStrikeOrb self1); public delegate ReturnFlow ControlFlowPrefixSignature(ErraticGadget self, ref orig_OnArrival orig, ref LightningStrikeOrb self1); public delegate void PostfixSignature(ErraticGadget self, ref orig_OnArrival orig, ref LightningStrikeOrb self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ControlFlowPrefix(ControlFlowPrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(ErraticGadget).GetMethod("LightningStrikeOrb_OnArrival", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnArrival), typeof(LightningStrikeOrb) }, null) ?? throw new MissingMethodException("SS2.Items.ErraticGadget", "LightningStrikeOrb_OnArrival"); } } internal static class SimpleLightningStrikeOrb_OnArrival { public delegate void PrefixSignature(ErraticGadget self, ref orig_OnArrival orig, ref SimpleLightningStrikeOrb self1); public delegate ReturnFlow ControlFlowPrefixSignature(ErraticGadget self, ref orig_OnArrival orig, ref SimpleLightningStrikeOrb self1); public delegate void PostfixSignature(ErraticGadget self, ref orig_OnArrival orig, ref SimpleLightningStrikeOrb self1); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ControlFlowPrefix(ControlFlowPrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(ErraticGadget).GetMethod("SimpleLightningStrikeOrb_OnArrival", (BindingFlags)(-1), null, new Type[2] { typeof(orig_OnArrival), typeof(SimpleLightningStrikeOrb) }, null) ?? throw new MissingMethodException("SS2.Items.ErraticGadget", "SimpleLightningStrikeOrb_OnArrival"); } } internal static class get_AssetRequest { } internal static class Initialize { } internal static class VoidLightningOrb_Begin { } internal static class _ctor { } internal static class _cctor { } internal static class Behavior { internal static class GetItemDef { } internal static class GetMuzzleTransform { } internal static class OnDamageDealtServer { } internal static class _ctor { } } internal static class GadgetLightningOrb { internal static class Begin { } internal static class OnArrival { } internal static class PickNextTarget { } internal static class _ctor { } } } namespace MonoDetourHooks.SS2.Items.ArmedBackpack.Behavior { internal static class OnTakeDamageServer { public delegate void PrefixSignature(Behavior self, ref DamageReport damageReport); public delegate void PostfixSignature(Behavior self, ref DamageReport damageReport); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(Behavior).GetMethod("OnTakeDamageServer", (BindingFlags)(-1), null, new Type[1] { typeof(DamageReport) }, null) ?? throw new MissingMethodException("SS2.Items.ArmedBackpack+Behavior", "OnTakeDamageServer"); } } internal static class GetItemDef { } internal static class _ctor { } } namespace MonoDetourHooks.RiskyTweaks.Tweaks.Survivors.Toolbot.ScrapICBM { internal static class FireGrenadeLauncher_ModifyProjectileAimRay { public delegate void PrefixSignature(ScrapICBM self, ref orig_ModifyProjectileAimRay orig, ref FireGrenadeLauncher self1, ref Ray aimRay); public delegate ReturnFlow ControlFlowPrefixSignature(ScrapICBM self, ref orig_ModifyProjectileAimRay orig, ref FireGrenadeLauncher self1, ref Ray aimRay, ref Ray returnValue); public delegate void PostfixSignature(ScrapICBM self, ref orig_ModifyProjectileAimRay orig, ref FireGrenadeLauncher self1, ref Ray aimRay, ref Ray returnValue); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ControlFlowPrefix(ControlFlowPrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(ScrapICBM).GetMethod("FireGrenadeLauncher_ModifyProjectileAimRay", (BindingFlags)(-1), null, new Type[3] { typeof(orig_ModifyProjectileAimRay), typeof(FireGrenadeLauncher), typeof(Ray) }, null) ?? throw new MissingMethodException("RiskyTweaks.Tweaks.Survivors.Toolbot.ScrapICBM", "FireGrenadeLauncher_ModifyProjectileAimRay"); } } internal static class get_ConfigCategoryString { } internal static class get_ConfigOptionName { } internal static class get_ConfigDescriptionString { } internal static class get_StopLoadOnConfigDisable { } internal static class ApplyChanges { } internal static class _ctor { } } namespace MonoDetourHooks.WolfoFixes.EquipmentFixes { internal static class Start { public delegate void PrefixSignature(); public delegate void PostfixSignature(); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(EquipmentFixes).GetMethod("Start", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("WolfoFixes.EquipmentFixes", "Start"); } } internal static class FallbackIfNoItemDisplay { } internal static class FixTwisteds_NotWorkingOnPlayers { } internal static class FixSawmarang { } internal static class BugWingsAlways_SetupWings { } internal static class BugWingsAlways_OnDisable { } internal static class _ctor { } internal static class __c { internal static class _ctor { } } } namespace MonoDetourHooks.EntityStates.RocketSurvivorSkills.Primary.FireRocket { internal static class FixedUpdate { public delegate void PrefixSignature(FireRocket self); public delegate void PostfixSignature(FireRocket self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(FireRocket).GetMethod("FixedUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("EntityStates.RocketSurvivorSkills.Primary.FireRocket", "FixedUpdate"); } } internal static class OnEnter { public delegate void PrefixSignature(FireRocket self); public delegate void PostfixSignature(FireRocket self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(FireRocket).GetMethod("OnEnter", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("EntityStates.RocketSurvivorSkills.Primary.FireRocket", "OnEnter"); } } internal static class GetMinimumInterruptPriority { } internal static class _ctor { } internal static class _cctor { } } namespace MonoDetourHooks.RoR2.MissileUtils { internal static class FireMissile_UnityEngine_Vector3_RoR2_CharacterBody_RoR2_ProcChainMask_UnityEngine_GameObject_System_Single_System_Boolean_UnityEngine_GameObject_RoR2_DamageColorIndex_UnityEngine_Vector3_System_Single_System_Boolean { public delegate void PrefixSignature(ref Vector3 position, ref CharacterBody attackerBody, ref ProcChainMask procChainMask, ref GameObject victim, ref float missileDamage, ref bool isCrit, ref GameObject projectilePrefab, ref DamageColorIndex damageColorIndex, ref Vector3 initialDirection, ref float force, ref bool addMissileProc); public delegate void PostfixSignature(ref Vector3 position, ref CharacterBody attackerBody, ref ProcChainMask procChainMask, ref GameObject victim, ref float missileDamage, ref bool isCrit, ref GameObject projectilePrefab, ref DamageColorIndex damageColorIndex, ref Vector3 initialDirection, ref float force, ref bool addMissileProc); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(MissileUtils).GetMethod("FireMissile", (BindingFlags)(-1), null, new Type[11] { typeof(Vector3), typeof(CharacterBody), typeof(ProcChainMask), typeof(GameObject), typeof(float), typeof(bool), typeof(GameObject), typeof(DamageColorIndex), typeof(Vector3), typeof(float), typeof(bool) }, null) ?? throw new MissingMethodException("RoR2.MissileUtils", "FireMissile"); } } internal static class FireMissile_UnityEngine_Vector3_RoR2_CharacterBody_RoR2_ProcChainMask_UnityEngine_GameObject_System_Single_System_Boolean_UnityEngine_GameObject_RoR2_DamageColorIndex_System_Boolean { } } namespace MonoDetourHooks.RoR2.Items.MultiShopCardUtils { internal static class OnPurchase { public delegate void PrefixSignature(ref PayCostContext context, ref int moneyCost); public delegate void PostfixSignature(ref PayCostContext context, ref int moneyCost); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(MultiShopCardUtils).GetMethod("OnPurchase", (BindingFlags)(-1), null, new Type[2] { typeof(PayCostContext), typeof(int) }, null) ?? throw new MissingMethodException("RoR2.Items.MultiShopCardUtils", "OnPurchase"); } } internal static class OnNonMoneyPurchase { } internal static class OnMoneyPurchase { } } namespace MonoDetourHooks.RoR2.HealthComponent { internal static class FixedUpdate { public delegate void PrefixSignature(HealthComponent self); public delegate void PostfixSignature(HealthComponent self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(HealthComponent).GetMethod("FixedUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.HealthComponent", "FixedUpdate"); } } internal static class TakeDamageProcess { public delegate void PrefixSignature(HealthComponent self, ref DamageInfo damageInfo); public delegate void PostfixSignature(HealthComponent self, ref DamageInfo damageInfo); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(HealthComponent).GetMethod("TakeDamageProcess", (BindingFlags)(-1), null, new Type[1] { typeof(DamageInfo) }, null) ?? throw new MissingMethodException("RoR2.HealthComponent", "TakeDamageProcess"); } } internal static class Init { public delegate void PrefixSignature(); public delegate void PostfixSignature(); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(HealthComponent).GetMethod("Init", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.HealthComponent", "Init"); } } internal static class SetBarrier { } internal static class get_recentlyTookDamage { } internal static class get_killingDamageType { } internal static class set_killingDamageType { } internal static class get_alive { } internal static class get_fullHealth { } internal static class get_fullShield { } internal static class get_fullBarrier { } internal static class get_combinedHealth { } internal static class get_fullCombinedHealth { } internal static class get_combinedHealthFraction { } internal static class get_missingCombinedHealth { } internal static class get_lastHitTime { } internal static class set_lastHitTime { } internal static class get_lastHealTime { } internal static class set_lastHealTime { } internal static class get_lastHitAttacker { } internal static class set_lastHitAttacker { } internal static class get_timeSinceLastHit { } internal static class get_timeSinceLastHeal { } internal static class get_godMode { } internal static class set_godMode { } internal static class get_potionReserve { } internal static class set_potionReserve { } internal static class get_isInFrozenState { } internal static class set_isInFrozenState { } internal static class get_isHealthLow { } internal static class IsHealthBelowThreshold_System_Single { } internal static class IsHealthBelowThreshold_System_Single_System_Single { } internal static class GetHealthAtThreshold { } internal static class add_onCharacterHealServer { } internal static class remove_onCharacterHealServer { } internal static class OnValidate { } internal static class Heal { } internal static class UsePotion { } internal static class HealFraction { } internal static class SetCurrentHealthLevel { } internal static class GetNormalizedHealth { } internal static class CmdHealFull { } internal static class RechargeShieldFull { } internal static class CmdRechargeShieldFull { } internal static class RechargeShield { } internal static class AddBarrier { } internal static class AddCharge { } internal static class CmdAddBarrier { } internal static class AddBarrierAuthority { } internal static class CmdForceShieldRegen { } internal static class ForceShieldRegen { } internal static class Die { } internal static class TakeDamageForce_RoR2_DamageInfo_System_Boolean_System_Boolean { } internal static class TakeDamageForce_UnityEngine_Vector3_System_Boolean_System_Boolean { } internal static class TakeDamage { } internal static class DoWarp { } internal static class TriggerOneShotProtection { } internal static class Suicide { } internal static class UpdateLastHitTime { } internal static class Awake { } internal static class OnDestroy { } internal static class ManagedFixedUpdate { } internal static class ServerFixedUpdate { } internal static class SendDamageDealt { } internal static class HandleDamageDealt { } internal static class SendHeal { } internal static class HandleHeal { } internal static class OnInventoryChanged { } internal static class GetHealthBarValues { } internal static class _ctor { } internal static class _cctor { } internal static class _TakeDamageProcess_g__DoJuggle_109_0 { } internal static class UNetVersion { } internal static class get_Networkhealth { } internal static class set_Networkhealth { } internal static class get_Networkshield { } internal static class set_Networkshield { } internal static class get_NetworkechoDamage { } internal static class set_NetworkechoDamage { } internal static class get_Networkbarrier { } internal static class set_Networkbarrier { } internal static class get_NetworkmagnetiCharge { } internal static class set_NetworkmagnetiCharge { } internal static class get_Network_killingDamageType { } internal static class set_Network_killingDamageType { } internal static class InvokeCmdCmdHealFull { } internal static class InvokeCmdCmdRechargeShieldFull { } internal static class InvokeCmdCmdAddBarrier { } internal static class InvokeCmdCmdForceShieldRegen { } internal static class CallCmdHealFull { } internal static class CallCmdRechargeShieldFull { } internal static class CallCmdAddBarrier { } internal static class CallCmdForceShieldRegen { } internal static class OnSerialize { } internal static class OnDeserialize { } internal static class PreStartClient { } internal static class AssetReferences { internal static class Resolve { } internal static class __c { internal static class _cctor { } internal static class _ctor { } internal static class _Resolve_b__18_0 { } internal static class _Resolve_b__18_1 { } internal static class _Resolve_b__18_2 { } internal static class _Resolve_b__18_3 { } internal static class _Resolve_b__18_4 { } internal static class _Resolve_b__18_5 { } internal static class _Resolve_b__18_6 { } internal static class _Resolve_b__18_7 { } internal static class _Resolve_b__18_8 { } internal static class _Resolve_b__18_9 { } internal static class _Resolve_b__18_10 { } internal static class _Resolve_b__18_11 { } internal static class _Resolve_b__18_12 { } internal static class _Resolve_b__18_13 { } internal static class _Resolve_b__18_14 { } internal static class _Resolve_b__18_15 { } internal static class _Resolve_b__18_16 { } internal static class _Resolve_b__18_17 { } } } internal static class HealMessage { internal static class _ctor { } internal static class Serialize { } internal static class Deserialize { } } internal static class ItemCounts { internal static class _ctor { } internal static class _ctor_RoR2_Inventory { } } internal static class HealthBarValues { internal static class _ctor { } } internal static class RepeatHealComponent { internal static class FixedUpdate { } internal static class AddReserve { } internal static class _ctor { } } internal static class __c__DisplayClass109_0 { internal static class _ctor { } } internal static class __c__DisplayClass109_1 { internal static class _ctor { } } } namespace MonoDetourHooks.RoR2.Projectile.BoomerangProjectile { internal static class FixedUpdate { public delegate void PrefixSignature(BoomerangProjectile self); public delegate void PostfixSignature(BoomerangProjectile self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(BoomerangProjectile).GetMethod("FixedUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.Projectile.BoomerangProjectile", "FixedUpdate"); } } internal static class Start { public delegate void PrefixSignature(BoomerangProjectile self); public delegate void PostfixSignature(BoomerangProjectile self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(BoomerangProjectile).GetMethod("Start", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.Projectile.BoomerangProjectile", "Start"); } } internal static class Awake { } internal static class OnProjectileImpact { } internal static class Reel { } internal static class _ctor { } internal static class _FixedUpdate_g__CalculatePullDirection_29_0 { } internal static class UNetVersion { } internal static class get_NetworkboomerangState { } internal static class set_NetworkboomerangState { } internal static class OnSerialize { } internal static class OnDeserialize { } internal static class PreStartClient { } internal static class BoomerangState { internal static class _ctor { } } } namespace MonoDetourHooks.RoR2.Inventory { internal static class CalculateEquipmentCooldownScale { public delegate void PrefixSignature(Inventory self); public delegate void PostfixSignature(Inventory self, ref float returnValue); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(Inventory).GetMethod("CalculateEquipmentCooldownScale", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.Inventory", "CalculateEquipmentCooldownScale"); } } internal static class FixedUpdate { public delegate void PrefixSignature(Inventory self); public delegate void PostfixSignature(Inventory self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(Inventory).GetMethod("FixedUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.Inventory", "FixedUpdate"); } } internal static class add_onInventoryChanged { } internal static class remove_onInventoryChanged { } internal static class add_onEquipmentExternalRestockServer { } internal static class remove_onEquipmentExternalRestockServer { } internal static class get_currentEquipmentIndex { } internal static class get_currentEquipmentState { } internal static class get_alternateEquipmentIndex { } internal static class get_alternateEquipmentState { } internal static class get_activeEquipmentSlot { } internal static class set_activeEquipmentSlot { } internal static class SetEquipmentInternal { } internal static class SetEquipment { } internal static class GetEquipment { } internal static class SetActiveEquipmentSlot { } internal static class SetEquipmentDisabled { } internal static class GetEquipmentDisabled { } internal static class GetEquipmentSlotCount { } internal static class SetEquipmentIndex { } internal static class SetEquipmentIndexForSlot { } internal static class GetEquipmentIndex { } internal static class DeductEquipmentCharges { } internal static class GetEquipmentRestockableChargeCount { } internal static class RestockEquipmentCharges { } internal static class DeductActiveEquipmentCooldown { } internal static class GetEquipmentSlotMaxCharges { } internal static class GetActiveEquipmentMaxCharges { } internal static class UpdateEquipment { } internal static class RpcTriggerInventoryChanged { } internal static class HandleInventoryChanged { } internal static class MyFixedUpdate { } internal static class get_infusionBonus { } internal static class set_infusionBonus { } internal static class AddInfusionBonus { } internal static class GiveItemString_System_String { } internal static class GiveItemString_System_String_System_Int32 { } internal static class GiveEquipmentString { } internal static class GiveRandomItems { } internal static class GiveRandomEquipment { } internal static class GiveRandomEquipment_Xoroshiro128Plus { } internal static class GiveItem_RoR2_ItemIndex_System_Int32 { } internal static class GiveItem_RoR2_ItemDef_System_Int32 { } internal static class get_spawnedOverNetwork { } internal static class add_onInventoryChangedGlobal { } internal static class remove_onInventoryChangedGlobal { } internal static class add_onServerItemGiven { } internal static class remove_onServerItemGiven { } internal static class RpcItemAdded { } internal static class RpcClientEquipmentChanged { } internal static class add_onItemAddedClient { } internal static class remove_onItemAddedClient { } internal static class add_onEquipmentChangedClient { } internal static class remove_onEquipmentChangedClient { } internal static class RemoveItem_RoR2_ItemIndex_System_Int32 { } internal static class RemoveItem_RoR2_ItemDef_System_Int32 { } internal static class ResetItem_RoR2_ItemIndex { } internal static class ResetItem_RoR2_ItemDef { } internal static class CopyEquipmentFrom { } internal static class DefaultItemCopyFilter { } internal static class AddItemsFrom_RoR2_Inventory { } internal static class AddItemsFrom_RoR2_Inventory_System_Func_2 { } internal static class AddItemsFrom__System_Func_2 { } internal static class AddItemAcquisitionOrderFrom { } internal static class CopyItemsFrom_RoR2_Inventory { } internal static class CopyItemsFrom_RoR2_Inventory_System_Func_2 { } internal static class CleanInventory { } internal static class ShrineRestackInventory { } internal static class GetItemCount_RoR2_ItemIndex { } internal static class GetItemCount_RoR2_ItemDef { } internal static class HasAtLeastXTotalItemsOfTier { } internal static class GetTotalItemCountOfTier { } internal static class WriteItemStacks { } internal static class GetNetworkChannel { } internal static class OnDeserialize { } internal static class OnSerialize { } internal static class _ctor { } internal static class _cctor { } internal static class UNetVersion { } internal static class InvokeRpcRpcTriggerInventoryChanged { } internal static class InvokeRpcRpcItemAdded { } internal static class InvokeRpcRpcClientEquipmentChanged { } internal static class CallRpcTriggerInventoryChanged { } internal static class CallRpcItemAdded { } internal static class CallRpcClientEquipmentChanged { } internal static class PreStartClient { } } namespace MonoDetourHooks.RoR2.GlobalEventManager { internal static class ProcessHitEnemy { public delegate void PrefixSignature(GlobalEventManager self, ref DamageInfo damageInfo, ref GameObject victim); public delegate void PostfixSignature(GlobalEventManager self, ref DamageInfo damageInfo, ref GameObject victim); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(GlobalEventManager).GetMethod("ProcessHitEnemy", (BindingFlags)(-1), null, new Type[2] { typeof(DamageInfo), typeof(GameObject) }, null) ?? throw new MissingMethodException("RoR2.GlobalEventManager", "ProcessHitEnemy"); } } internal static class Init { public delegate void PrefixSignature(); public delegate void PostfixSignature(); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { return typeof(GlobalEventManager).GetMethod("Init", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("RoR2.GlobalEventManager", "Init"); } } internal static class OnEnable { } internal static class OnDisable { } internal static class IsImmuneToFallDamage { } internal static class OnHitEnemy { } internal static class ProcDeathMark { } internal static class FrozenExplosion { } internal static class HandleDamageWithNoAttacker { } internal static class OnCharacterHitGroundServer { } internal static class OnCharacterHitGroundSFX { } internal static class OnCharacterHitGround { } internal static class OnPlayerCharacterDeath { } internal static class add_onCharacterDeathGlobal { } internal static class remove_onCharacterDeathGlobal { } internal static class ProcIgniteOnKill { } internal static class OnCharacterDeath { } internal static class OnHitAll { } internal static class OnHitAllProcess { } internal static class OnCrit { } internal static class OnTeamLevelUp { } internal static class add_onTeamLevelUp { } internal static class remove_onTeamLevelUp { } internal static class OnCharacterLevelUp { } internal static class add_onCharacterLevelUp { } internal static class remove_onCharacterLevelUp { } internal static class add_OnInteractionsGlobal { } internal static class remove_OnInteractionsGlobal { } internal static class OnInteractionBegin { } internal static class add_onClientDamageNotified { } internal static class remove_onClientDamageNotified { } internal static class ClientDamageNotified { } internal static class add_onServerDamageDealt { } internal static class remove_onServerDamageDealt { } internal static class ServerDamageDealt { } internal static class add_onServerCharacterExecuted { } internal static class remove_onServerCharacterExecuted { } internal static class ServerCharacterExecuted { } internal static class _ctor { } internal static class _cctor { } internal static class CommonAssets { internal static class Load { } internal static class __c { internal static class _cctor { } internal static class _ctor { } internal static class _Load_b__16_0 { } internal static class _Load_b__16_1 { } internal static class _Load_b__16_2 { } internal static class _Load_b__16_3 { } internal static class _Load_b__16_4 { } internal static class _Load_b__16_5 { } internal static class _Load_b__16_6 { } internal static class _Load_b__16_7 { } internal static class _Load_b__16_8 { } internal static class _Load_b__16_9 { } internal static class _Load_b__16_10 { } internal static class _Load_b__16_11 { } internal static class _Load_b__16_12 { } internal static class _Load_b__16_13 { } internal static class _Load_b__16_14 { } internal static class _Load_b__16_15 { } } } internal static class __c__DisplayClass26_0 { internal static class _ctor { } internal static class _OnCharacterDeath_b__0 { } } internal static class __c__DisplayClass41_0 { internal static class _ctor { } internal static class _OnInteractionBegin_g__InteractableIsPermittedForSpawn_0 { } internal static class _OnInteractionBegin_b__1 { } } internal static class __c { internal static class _cctor { } internal static class _ctor { } internal static class __cctor_b__55_0 { } internal static class __cctor_b__55_1 { } } } namespace MonoDetour.HookGen { internal static class DefaultMonoDetourManager { internal static MonoDetourManager Instance { get; } = New(); internal static MonoDetourManager New() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown return new MonoDetourManager(typeof(DefaultMonoDetourManager).Assembly.GetName().Name); } } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = true, Inherited = false)] internal class MonoDetourTargetsAttribute : Attribute, IMonoDetourTargets { public Type? TargetType { get; } public bool IncludeNestedTypes { get; set; } public bool DistinguishOverloadsByName { get; set; } public string[]? Members { get; set; } public string[]? MemberNamePrefixes { get; set; } public string[]? MemberNameSuffixes { get; set; } public bool GenerateControlFlowVariants { get; set; } public MonoDetourTargetsAttribute(Type? targetType = null) { TargetType = targetType; IncludeNestedTypes = true; base..ctor(); } } } namespace LordsItemEdits { public static class ConfigOptions { public static class SS2Items { public static class ArmedBackpack { public static ConfigEntry<bool> EnableEdit; } public static class ErraticGadget { public static ConfigEntry<bool> EnableEdit; } } public static class VoidDios { public static ConfigEntry<bool> EnableEdit; public static ConfigEntry<bool> AllowRespawnAsVoidReaver; } public static class ATG { public static ConfigEntry<bool> EnableEdit; } public static class PocketICBM { public static ConfigEntry<bool> EnableEdit; public static ConfigEntry<bool> ChangeATGEffect; public static ConfigEntry<bool> ChangeArmedBackpackEffect; public static ConfigEntry<bool> ChangeGenericMissileEffect; public static ConfigEntry<bool> ChangePlasmaShrimpEffect; public static ConfigEntry<bool> ChangeRocketSurvivorEffect; public static ConfigEntry<bool> ChangeRiskyTweaksScrapLauncherEffect; } public static class BottledChaos { public static ConfigEntry<bool> EnableEdit; } public static class Planula { public static ConfigEntry<bool> EnableEdit; } public static class ElectricBoomerang { public static ConfigEntry<bool> EnableEdit; } public static class MoltenPerforator { public static ConfigEntry<bool> EnableEdit; } public static class ExecutiveCard { public static ConfigEntry<bool> EnableEdit; public static ConfigEntry<bool> AddCreditCardToBottledChaos; } public static class Polylute { public static ConfigEntry<bool> EnableEdit; } internal static void BindConfigOptions(ConfigFile config) { VoidDios.EnableEdit = Extensions.BindOption<bool>(config, "Pluripotent Larva", "Enable edit", "Enable the Pluripotent Larva edit?", true, (ConfigFlags)1); VoidDios.AllowRespawnAsVoidReaver = Extensions.BindOption<bool>(config, "Pluripotent Larva", "Allow respawning as a Void Reaver", "Should the Void Reaver be an option to respawn as with the edited Pluripotent Larva? This is configurable since their only attack has bad damage and can't target flying enemies.", false, (ConfigFlags)0); ATG.EnableEdit = Extensions.BindOption<bool>(config, "ATG", "Enable edit", "Enable the ATG edit which makes it fire like plasma shrimp? This will help performance!", true, (ConfigFlags)1); PocketICBM.EnableEdit = Extensions.BindOption<bool>(config, "Pocket ICBM", "Enable Edit", "Enable the Pocket I.C.B.M edit that triples missile damage instead of firing 2 extra missiles? This will help performance! Disabling this will also disable all effect options below.", true, (ConfigFlags)1); PocketICBM.ChangeArmedBackpackEffect = Extensions.BindOption<bool>(config, "Pocket ICBM", "Change Armed Backpack Effect", "Make Armed Backpack's ICBM effect triple missile damage instead of firing 2 extra missiles? This will help performance!", true, (ConfigFlags)1); PocketICBM.ChangeATGEffect = Extensions.BindOption<bool>(config, "Pocket ICBM", "Change ATG Effect", "Make ATG's ICBM effect triple missile damage instead of firing 2 extra missiles? This will help performance!", true, (ConfigFlags)1); PocketICBM.ChangeGenericMissileEffect = Extensions.BindOption<bool>(config, "Pocket ICBM", "Change Effect for generic missiles", "Make DML's and Engineer Harpoons' ICBM effect triple missile damage instead of firing 2 extra missiles? This will help performance!", true, (ConfigFlags)1); PocketICBM.ChangePlasmaShrimpEffect = Extensions.BindOption<bool>(config, "Pocket ICBM", "Change Plasma Shrimp Effect", "Make Plasma Shrimp's ICBM effect triple missile damage instead of firing 2 extra missiles? This will help performance!", true, (ConfigFlags)1); PocketICBM.ChangeRocketSurvivorEffect = Extensions.BindOption<bool>(config, "Pocket ICBM", "Change The Rocket Survivor Effect", "Make Rocket's ICBM effect triple missile damage instead of firing 2 extra missiles? This will help performance!", true, (ConfigFlags)1); PocketICBM.ChangeRiskyTweaksScrapLauncherEffect = Extensions.BindOption<bool>(config, "Pocket ICBM", "Change RiskyTweaks MUL-T Scrap Launcher Effect", "Make RiskyTweaks' MUL-T scrap launcher ICBM synergy effect triple missile damage instead of firing 2 extra missiles? This will help performance!", true, (ConfigFlags)1); BottledChaos.EnableEdit = Extensions.BindOption<bool>(config, "Bottled Chaos", "Enable Edit", "Enable the Bottled Chaos edit which makes it give some equipment cooldown reduction alongside it's normal effect?", true, (ConfigFlags)1); ElectricBoomerang.EnableEdit = Extensions.BindOption<bool>(config, "Electric Boomerang", "Enable Edit", "Enable the Electric Boomerang edit that entirely changes what the item does?", true, (ConfigFlags)1); MoltenPerforator.EnableEdit = Extensions.BindOption<bool>(config, "Molten Perforator", "Enable Edit", "Enable the Molten Perforator edit?", true, (ConfigFlags)1); ExecutiveCard.EnableEdit = Extensions.BindOption<bool>(config, "Executive Card", "Enable Edit", "Enable the Executive Card edit that makes it more like a normal equipment?", true, (ConfigFlags)1); ExecutiveCard.AddCreditCardToBottledChaos = Extensions.BindOption<bool>(config, "Executive Card", "Add edited effect to the Bottled Chaos pool", "Should the new effect for Executive Card be added to the equipment effect pool for Bottled Chaos?", true, (ConfigFlags)1); Polylute.EnableEdit = Extensions.BindOption<bool>(config, "Polylute", "Enable Edit", "Enable the Polylute edit that makes it stack damage instead of hit amount?", true, (ConfigFlags)1); SS2Items.ArmedBackpack.EnableEdit = Extensions.BindOption<bool>(config, "Starstorm 2 - Armed Backpack", "Enable edit", "Enable the Armed Backpack edit that makes the missile fire like plasma shrimp AND make the ICBM effect triple missile damage instead of firing 2 extra missiles? This will help performance!", true, (ConfigFlags)1); SS2Items.ErraticGadget.EnableEdit = Extensions.BindOption<bool>(config, "Starstorm 2 - Erratic Gadget", "Turn double procs into double damage", "Make affected lightning procs deal double damage instead of proccing twice? This will help performance!", true, (ConfigFlags)1); } } internal static class ModLanguage { internal static List<string> LangFilesToLoad = new List<string>(); internal static void AddNewLangTokens() { string path = Path.Combine(Path.GetDirectoryName(Plugin.PluginInfo.Location), "Language"); foreach (string item in LangFilesToLoad) { foreach (KeyValuePair<string, Dictionary<string, string>> item2 in LoadFile(File.ReadAllText(Path.Combine(path, item + ".json")))) { string key = item2.Key; foreach (KeyValuePair<string, string> item3 in item2.Value) { LanguageAPI.AddOverlay(item3.Key, item3.Value, key); } } } } private static Dictionary<string, Dictionary<string, string>>? LoadFile(string fileContent) { Dictionary<string, Dictionary<string, string>> dictionary = new Dictionary<string, Dictionary<string, string>>(); try { JSONNode val = JSON.Parse(fileContent); if (val == (object)null) { return null; } foreach (string key in val.Keys) { JSONNode val2 = val[key]; if (val2 == (object)null) { continue; } string text = key; if (text == "strings") { text = "generic"; } if (!dictionary.ContainsKey(text)) { dictionary.Add(text, new Dictionary<string, string>()); } Dictionary<string, string> dictionary2 = dictionary[text]; foreach (string key2 in val2.Keys) { dictionary2.Add(key2, val2[key2].Value); } } } catch (Exception arg) { Log.Error($"Parsing error in language file, Error: {arg}"); return null; } if (dictionary.Count == 0) { return null; } return dictionary; } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object 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); } } internal static class ModUtil { internal static void LogILError(ILContext il, ILCursor c) { Log.Error("COULD NOT IL HOOK " + ((MemberReference)il.Method).Name); Log.Warning($"cursor is {c}"); Log.Warning($"il is {il}"); } internal static void LogILInstructions(this ILWeaver iLWeaver) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) Enumerator<Instruction> enumerator = iLWeaver.Instructions.GetEnumerator(); try { while (enumerator.MoveNext()) { Log.Warning(enumerator.Current); } } finally { ((IDisposable)enumerator).Dispose(); } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("LordVGames.LordsItemEdits", "LordsItemEdits", "0.3.4")] public class Plugin : BaseUnityPlugin { public const string PluginGUID = "LordVGames.LordsItemEdits"; public const string PluginAuthor = "LordVGames"; public const string PluginName = "LordsItemEdits"; public const string PluginVersion = "0.3.4"; public static PluginInfo PluginInfo { get; private set; } public void Awake() { PluginInfo = ((BaseUnityPlugin)this).Info; Log.Init(((BaseUnityPlugin)this).Logger); ConfigOptions.BindConfigOptions(((BaseUnityPlugin)this).Config); Extensions.WipeConfig(((BaseUnityPlugin)this).Config); Missiles.MonoDetourEdits.Setup(); VoidDios.Setup(); ATG.Setup(); Plimp.Setup(); BottledChaos.Setup(); MoltenPerforator.Setup(); ExecutiveCard.Setup(); PocketICBM.Setup(); Polylute.Setup(); ElectricBoomerang.Setup(); if (Starstorm2Mod.ModIsRunning) { ArmedBackpack.Setup(); ErraticGadget.Setup(); } if (RocketSurvivorGuy.ModIsRunning) { PrimaryICBMSupport.Setup(); } if (RiskyTweaksMod.ModIsRunning) { MulTScrapLauncherSynergyEdit.Setup(); } ModLanguage.AddNewLangTokens(); } } } namespace LordsItemEdits.MultiItemEdits { internal static class Missiles { [MonoDetourTargets(typeof(MissileUtils))] internal static class MonoDetourEdits { [CompilerGenerated] private static class <>O { public static Manipulator <0>__ChangeICBMEffect; public static Func<float, CharacterBody, float> <1>__ReplaceOldICBMDamageMult; } [MonoDetourHookInitialize] internal static void Setup() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if (ConfigOptions.PocketICBM.EnableEdit.Value && ConfigOptions.PocketICBM.ChangeGenericMissileEffect.Value) { object obj = <>O.<0>__ChangeICBMEffect; if (obj == null) { Manipulator val = ChangeICBMEffect; <>O.<0>__ChangeICBMEffect = val; obj = (object)val; } FireMissile_UnityEngine_Vector3_RoR2_CharacterBody_RoR2_ProcChainMask_UnityEngine_GameObject_System_Single_System_Boolean_UnityEngine_GameObject_RoR2_DamageColorIndex_UnityEngine_Vector3_System_Single_System_Boolean.ILHook((Manipulator)obj); } } private static void ChangeICBMEffect(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) ILWeaver w = new ILWeaver(info); MethodReference val3 = default(MethodReference); w.MatchRelaxed(new Predicate<Instruction>[4] { (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val3) && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 1) }).ThrowIfFailure().InsertAfterCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[2] { w.Create(OpCodes.Ldarg_1), w.CreateCall((Delegate)new Func<float, CharacterBody, float>(ReplaceOldICBMDamageMult)) })); MethodReference val2 = default(MethodReference); MethodReference val = default(MethodReference); w.MatchRelaxed(new Predicate<Instruction>[3] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val2), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 4), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, ref val) && w.SetCurrentTo(x) }).ThrowIfFailure().InsertAfterCurrent((IEnumerable<Instruction>)new <>z__ReadOnlySingleElementList<Instruction>(w.Create(OpCodes.Ret))); } private static float ReplaceOldICBMDamageMult(float oldDamageMult, CharacterBody attackerBody) { return PocketICBM.GetICBMDamageMult(attackerBody); } } internal static void FireMissileOrb(CharacterBody attackerBody, float missileDamage, DamageInfo damageInfo, GameObject victim) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 if (!((Object)(object)victim == (Object)null) && (int)attackerBody.teamComponent.teamIndex == 1) { CharacterBody component = victim.GetComponent<CharacterBody>(); FireMissileOrb(attackerBody, missileDamage, damageInfo, component, addMissileProc: true); } } internal static void FireMissileOrb(CharacterBody attackerBody, float missileDamage, DamageInfo damageInfo, CharacterBody victimBody, bool addMissileProc) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 //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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0084: Expected O, but got Unknown if (!((Object)(object)victimBody == (Object)null) && (int)attackerBody.teamComponent.teamIndex == 1) { MicroMissileOrb val = new MicroMissileOrb { origin = attackerBody.aimOrigin, damageValue = missileDamage, isCrit = damageInfo.crit, teamIndex = attackerBody.teamComponent.teamIndex, attacker = ((Component)attackerBody).gameObject, procChainMask = damageInfo.procChainMask, procCoefficient = 1f, damageColorIndex = (DamageColorIndex)3, target = victimBody.mainHurtBox }; if (addMissileProc) { ((ProcChainMask)(ref ((GenericDamageOrb)val).procChainMask)).AddProc((ProcType)1); } if (ConfigOptions.PocketICBM.EnableEdit.Value && ((ConfigOptions.PocketICBM.ChangeATGEffect.Value && addMissileProc) || (ConfigOptions.PocketICBM.ChangeArmedBackpackEffect.Value && !addMissileProc))) { ((GenericDamageOrb)val).damageValue = ((GenericDamageOrb)val).damageValue * PocketICBM.GetICBMDamageMult(attackerBody); } else { OrbManager.instance.AddOrb((Orb)(object)val); OrbManager.instance.AddOrb((Orb)(object)val); Util.PlaySound("Play_item_proc_missile_fire", ((Component)attackerBody).gameObject); Util.PlaySound("Play_item_proc_missile_fire", ((Component)attackerBody).gameObject); } OrbManager.instance.AddOrb((Orb)(object)val); Util.PlaySound("Play_item_proc_missile_fire", ((Component)attackerBody).gameObject); } } } } namespace LordsItemEdits.ModSupport.WolfFixes { internal class WolfFixesMod { internal const string ModGUID = "Early.Wolfo.WolfFixes"; private static bool? _enabled; internal static bool ModIsRunning { get { bool valueOrDefault = _enabled.GetValueOrDefault(); if (!_enabled.HasValue) { valueOrDefault = Chainloader.PluginInfos.ContainsKey("Early.Wolfo.WolfFixes"); _enabled = valueOrDefault; } return _enabled.Value; } } } } namespace LordsItemEdits.ModSupport.Starstorm2 { [MonoDetourTargets(typeof(Behavior))] internal static class ArmedBackpack { [CompilerGenerated] private static class <>O { public static Manipulator <0>__ReplaceMissileWithOrb; public static Func<float, DamageReport, bool> <1>__FireMissileOrbIfApplicable; } [MonoDetourHookInitialize] internal static void Setup() { //IL_001d: 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_0028: Expected O, but got Unknown if (ConfigOptions.SS2Items.ArmedBackpack.EnableEdit.Value) { object obj = <>O.<0>__ReplaceMissileWithOrb; if (obj == null) { Manipulator val = ReplaceMissileWithOrb; <>O.<0>__ReplaceMissileWithOrb = val; obj = (object)val; } OnTakeDamageServer.ILHook((Manipulator)obj); } } private static void ReplaceMissileWithOrb(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) ILWeaver w = new ILWeaver(info); ILLabel val = w.DefineLabel(); w.MatchRelaxed(new Predicate<Instruction>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 2), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 3) && w.SetCurrentTo(x) }).ThrowIfFailure().InsertAfterCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[4] { w.Create(OpCodes.Ldloc_3), w.Create(OpCodes.Ldarg_1), w.CreateCall((Delegate)new Func<float, DamageReport, bool>(FireMissileOrbIfApplicable)), w.Create(OpCodes.Brtrue, (object)val) })); w.MatchRelaxed(new Predicate<Instruction>[2] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "RoR2.MissileUtils", "FireMissile") && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchRet(x) }).ThrowIfFailure().MarkLabelToCurrentNext(val); } private static bool FireMissileOrbIfApplicable(float missileDamage, DamageReport damageReport) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 if ((int)damageReport.victimTeamIndex != 1) { return false; } Missiles.FireMissileOrb(damageReport.victimBody, missileDamage, damageReport.damageInfo, damageReport.attackerBody, addMissileProc: false); return true; } } [MonoDetourTargets(typeof(ErraticGadget), GenerateControlFlowVariants = true)] internal static class ErraticGadget { [CompilerGenerated] private static class <>O { public static Manipulator <0>__SkipDoublingProc; public static LightningStrikeOrb_OnArrival.ControlFlowPrefixSignature <1>__LightningStrikeOrb_JustDoubleDamage; public static SimpleLightningStrikeOrb_OnArrival.ControlFlowPrefixSignature <2>__SimpleLightningStrikeOrb_JustDoubleDamage; public static Action<LightningOrb> <3>__DealDoubleDamage; } [MonoDetourHookInitialize] internal static void Setup() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (ConfigOptions.SS2Items.ErraticGadget.EnableEdit.Value) { ModLanguage.LangFilesToLoad.Add("ErraticGadget"); object obj = <>O.<0>__SkipDoublingProc; if (obj == null) { Manipulator val = SkipDoublingProc; <>O.<0>__SkipDoublingProc = val; obj = (object)val; } LightningOrb_OnArrival.ILHook((Manipulator)obj); LightningStrikeOrb_OnArrival.ControlFlowPrefix(LightningStrikeOrb_JustDoubleDamage); SimpleLightningStrikeOrb_OnArrival.ControlFlowPrefix(SimpleLightningStrikeOrb_JustDoubleDamage); } } private static void SkipDoublingProc(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) ILWeaver w = new ILWeaver(info); ILLabel val = w.DefineLabel(); w.MatchRelaxed(new Predicate<Instruction>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0) && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 0) }).ThrowIfFailure(); w.InsertBeforeCurrentStealLabels((IEnumerable<Instruction>)new <>z__ReadOnlySingleElementList<Instruction>(w.Create(OpCodes.Br, (object)val))); MethodReference val2 = default(MethodReference); w.MatchRelaxed(new Predicate<Instruction>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1), (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, ref val2) && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 2) }).ThrowIfFailure(); w.InsertAfterCurrent((IEnumerable<Instruction>)new <>z__ReadOnlySingleElementList<Instruction>(w.Create(OpCodes.Ldarg_2))); w.MarkLabelToCurrent(val); w.InsertAfterCurrent((IEnumerable<Instruction>)new <>z__ReadOnlySingleElementList<Instruction>(w.CreateCall((Delegate)new Action<LightningOrb>(DealDoubleDamage)))); } private static void DealDoubleDamage(LightningOrb lightningOrb) { if (AllowErraticGadgetDamageBuff(lightningOrb.attacker)) { lightningOrb.damageValue *= 2f; } } private static ReturnFlow SimpleLightningStrikeOrb_JustDoubleDamage(ErraticGadget self, ref orig_OnArrival orig, ref SimpleLightningStrikeOrb simpleLightningStrikeOrb) { if (!AllowErraticGadgetDamageBuff(((GenericDamageOrb)simpleLightningStrikeOrb).attacker)) { orig.Invoke(simpleLightningStrikeOrb); return (ReturnFlow)1; } SimpleLightningStrikeOrb obj = simpleLightningStrikeOrb; ((GenericDamageOrb)obj).damageValue = ((GenericDamageOrb)obj).damageValue * 2f; orig.Invoke(simpleLightningStrikeOrb); return (ReturnFlow)1; } private static ReturnFlow LightningStrikeOrb_JustDoubleDamage(ErraticGadget self, ref orig_OnArrival orig, ref LightningStrikeOrb lightningStrikeOrb) { if (!AllowErraticGadgetDamageBuff(((GenericDamageOrb)lightningStrikeOrb).attacker)) { orig.Invoke(lightningStrikeOrb); return (ReturnFlow)1; } LightningStrikeOrb obj = lightningStrikeOrb; ((GenericDamageOrb)obj).damageValue = ((GenericDamageOrb)obj).damageValue * 2f; orig.Invoke(lightningStrikeOrb); return (ReturnFlow)1; } private static bool AllowErraticGadgetDamageBuff(GameObject attacker) { if ((Object)(object)attacker == (Object)null) { return false; } CharacterBody component = attacker.GetComponent<CharacterBody>(); if ((Object)(object)component == (Object)null || (Object)(object)component.inventory == (Object)null) { return false; } if (component.inventory.GetItemCount(Items.ErraticGadget) < 1) { return false; } return true; } } internal static class Starstorm2Mod { private static bool? _enabled; internal static bool ModIsRunning { get { bool valueOrDefault = _enabled.GetValueOrDefault(); if (!_enabled.HasValue) { valueOrDefault = Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm"); _enabled = valueOrDefault; } return _enabled.Value; } } } } namespace LordsItemEdits.ModSupport.RocketSurvivorGuy { [MonoDetourTargets(typeof(FireRocket))] internal static class PrimaryICBMSupport { [CompilerGenerated] private static class <>O { public static Manipulator <0>__ChangeICBMEffect; public static Func<float, EntityState, float> <1>__ChangeDamageBasedOnICBM; } [MonoDetourHookInitialize] internal static void Setup() { //IL_001d: 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_0028: Expected O, but got Unknown if (ConfigOptions.PocketICBM.ChangeRocketSurvivorEffect.Value) { object obj = <>O.<0>__ChangeICBMEffect; if (obj == null) { Manipulator val = ChangeICBMEffect; <>O.<0>__ChangeICBMEffect = val; obj = (object)val; } OnEnter.ILHook((Manipulator)obj); } } private static void ChangeICBMEffect(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0081: 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_013d: Unknown result type (might be due to invalid IL or missing references) ILWeaver w = new ILWeaver(info); ILLabel val = default(ILLabel); w.MatchRelaxed(new Predicate<Instruction>[3] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 5), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 5) && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val) }).ThrowIfFailure().InsertAfterCurrent((IEnumerable<Instruction>)new <>z__ReadOnlySingleElementList<Instruction>(w.Create(OpCodes.Pop))) .Next.OpCode = OpCodes.Br; w.MatchRelaxed(new Predicate<Instruction>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<BaseState>(x, "damageStat"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld<FireRocket>(x, "damageCoefficient"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) && w.SetCurrentTo(x) }).ThrowIfFailure().InsertAfterCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[2] { w.Create(OpCodes.Ldarg_0), w.CreateCall((Delegate)new Func<float, EntityState, float>(ChangeDamageBasedOnICBM)) })); } private static float ChangeDamageBasedOnICBM(float damage, EntityState entityState) { return damage * PocketICBM.GetICBMDamageMult(entityState.characterBody); } } internal static class RocketSurvivorGuy { private static bool? _enabled; internal static bool ModIsRunning { get { bool valueOrDefault = _enabled.GetValueOrDefault(); if (!_enabled.HasValue) { valueOrDefault = Chainloader.PluginInfos.ContainsKey("com.EnforcerGang.RocketSurvivor"); _enabled = valueOrDefault; } return _enabled.Value; } } } } namespace LordsItemEdits.ModSupport.RiskyTweaksMod { [MonoDetourTargets(typeof(ScrapICBM), GenerateControlFlowVariants = true)] internal static class MulTScrapLauncherSynergyEdit { [CompilerGenerated] private static class <>O { public static Manipulator <0>__JustDoMyThing; public static Action<FireGrenadeLauncher> <1>__ChangeICBMSynergy; } [MonoDetourHookInitialize] internal static void Setup() { //IL_001d: 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_0028: Expected O, but got Unknown if (ConfigOptions.PocketICBM.ChangeRiskyTweaksScrapLauncherEffect.Value) { object obj = <>O.<0>__JustDoMyThing; if (obj == null) { Manipulator val = JustDoMyThing; <>O.<0>__JustDoMyThing = val; obj = (object)val; } FireGrenadeLauncher_ModifyProjectileAimRay.ILHook((Manipulator)obj); } } private static void JustDoMyThing(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) ILWeaver w = new ILWeaver(info); ILLabel val = w.DefineLabel(); w.InsertBeforeCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[3] { w.Create(OpCodes.Ldarg_2), w.CreateCall((Delegate)new Action<FireGrenadeLauncher>(ChangeICBMSynergy)), w.Create(OpCodes.Br, (object)val) })); MethodReference val2 = default(MethodReference); w.MatchRelaxed(new Predicate<Instruction>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1) && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 3), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, ref val2) }).ThrowIfFailure().MarkLabelToCurrentPrevious(val); } private static void ChangeICBMSynergy(FireGrenadeLauncher fireGrenadeLauncherState) { ((GenericProjectileBaseState)fireGrenadeLauncherState).damageCoefficient = ((GenericProjectileBaseState)fireGrenadeLauncherState).damageCoefficient * PocketICBM.GetICBMDamageMult(((EntityState)fireGrenadeLauncherState).characterBody); } } internal static class RiskyTweaksMod { internal const string GUID = "com.Moffein.RiskyTweaks"; private static bool? _enabled; internal static bool ModIsRunning { get { bool valueOrDefault = _enabled.GetValueOrDefault(); if (!_enabled.HasValue) { valueOrDefault = Chainloader.PluginInfos.ContainsKey("com.Moffein.RiskyTweaks"); _enabled = valueOrDefault; } return _enabled.Value; } } } } namespace LordsItemEdits.ItemEdits { internal static class ATG { [CompilerGenerated] private static class <>O { public static Manipulator <0>__FireOrbIfFair; public static Func<CharacterBody, float, DamageInfo, GameObject, bool> <1>__FireMissileOrbReturnFairness; } [MonoDetourHookInitialize] internal static void Setup() { //IL_001d: 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_0028: Expected O, but got Unknown if (ConfigOptions.ATG.EnableEdit.Value) { object obj = <>O.<0>__FireOrbIfFair; if (obj == null) { Manipulator val = FireOrbIfFair; <>O.<0>__FireOrbIfFair = val; obj = (object)val; } ProcessHitEnemy.ILHook((Manipulator)obj); } } private static void FireOrbIfFair(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) ILWeaver w = new ILWeaver(info); ILLabel val = w.DefineLabel(); MethodReference val5 = default(MethodReference); FieldReference val4 = default(FieldReference); w.MatchRelaxed(new Predicate<Instruction>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0) && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val5), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, ref val4) }).ThrowIfFailure().InsertBeforeCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[6] { w.Create(OpCodes.Ldloc, 0), w.Create(OpCodes.Ldloc, 45), w.Create(OpCodes.Ldarg_1), w.Create(OpCodes.Ldarg_2), w.CreateCall((Delegate)new Func<CharacterBody, float, DamageInfo, GameObject, bool>(FireMissileOrbReturnFairness)), w.Create(OpCodes.Brtrue, (object)val) })); FieldReference val3 = default(FieldReference); MethodReference val2 = default(MethodReference); w.MatchRelaxed(new Predicate<Instruction>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, ref val3), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 3), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1), (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val2) && w.SetCurrentTo(x) }).ThrowIfFailure().MarkLabelToCurrentNext(val); } private static bool FireMissileOrbReturnFairness(CharacterBody attackerBody, float missileDamage, DamageInfo damageInfo, GameObject victim) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 Missiles.FireMissileOrb(attackerBody, missileDamage, damageInfo, victim); return (int)attackerBody.teamComponent.teamIndex == 1; } } [MonoDetourTargets(typeof(Inventory))] internal static class BottledChaos { [CompilerGenerated] private static class <>O { public static Manipulator <0>__SetupBhaosCooldownReduction; public static Func<Inventory, float, float> <1>__AddBhaosCooldownReduction; } [MonoDetourHookInitialize] internal static void Setup() { //IL_002c: 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) //IL_0037: Expected O, but got Unknown if (ConfigOptions.BottledChaos.EnableEdit.Value) { ModLanguage.LangFilesToLoad.Add("BottledChaos"); object obj = <>O.<0>__SetupBhaosCooldownReduction; if (obj == null) { Manipulator val = SetupBhaosCooldownReduction; <>O.<0>__SetupBhaosCooldownReduction = val; obj = (object)val; } CalculateEquipmentCooldownScale.ILHook((Manipulator)obj); } } private static void SetupBhaosCooldownReduction(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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) ILWeaver w = new ILWeaver(info); w.MatchRelaxed(new Predicate<Instruction>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 3) && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchRet(x) }).ThrowIfFailure().InsertBeforeCurrentStealLabels((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[4] { w.Create(OpCodes.Ldarg_0), w.Create(OpCodes.Ldloc_3), w.CreateCall((Delegate)new Func<Inventory, float, float>(AddBhaosCooldownReduction)), w.Create(OpCodes.Stloc_3) })); } private static float AddBhaosCooldownReduction(Inventory inventory, float currentCooldownReduction) { if (inventory.GetItemCount(Items.RandomEquipmentTrigger) > 0) { return currentCooldownReduction *= 0.65f; } return currentCooldownReduction; } } [MonoDetourTargets(typeof(BoomerangProjectile))] internal static class ElectricBoomerang { private class LieElectricBoomerangInfo { internal bool HasBoomerangOut; } [CompilerGenerated] private static class <>O { public static hook_ProcessHitEnemy <0>__GlobalEventManager_ProcessHitEnemy; public static Manipulator <1>__MakeBoomerangBetter; public static Manipulator <2>__InsertRemoveProjectileOwnerFromFiredList; public static Func<DamageInfo, int, bool> <3>__ShouldAllowNewElectricBoomerang; public static Func<DamageInfo, int, float> <4>__GetNewDamageValue; public static Action<CharacterBody> <5>__TryAddCharacterBodyToFiredBoomerangsList; public static Action<BoomerangProjectile> <6>__TryRemoveProjectileOwnerFromFiredList; } private const float _damagePerHit = 3f; private const float _damagePerHitStack = 2f; private static readonly AssetReferenceT<GameObject> _electricBoomerangProjectileAsset = new AssetReferenceT<GameObject>(RoR2_DLC2_Items_StunAndPierce.StunAndPierceBoomerang_prefab); private static readonly AssetReferenceT<ItemDef> _electricBoomerangItemDef = new AssetReferenceT<ItemDef>(RoR2_DLC2_Items_StunAndPierce.StunAndPierce_asset); private static readonly FixedConditionalWeakTable<GameObject, LieElectricBoomerangInfo> _lieElectricBoomerangInfoTable = new FixedConditionalWeakTable<GameObject, LieElectricBoomerangInfo>(); [MonoDetourHookInitialize] internal static void Setup() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //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_0061: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown if (ConfigOptions.ElectricBoomerang.EnableEdit.Value) { ModLanguage.LangFilesToLoad.Add("ElectricBoomerang"); EditBoomerangProjectile(); AIBlacklistNewBoomerang(); object obj = <>O.<0>__GlobalEventManager_ProcessHitEnemy; if (obj == null) { hook_ProcessHitEnemy val = GlobalEventManager_ProcessHitEnemy; <>O.<0>__GlobalEventManager_ProcessHitEnemy = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (hook_ProcessHitEnemy)obj; object obj2 = <>O.<1>__MakeBoomerangBetter; if (obj2 == null) { Manipulator val2 = MakeBoomerangBetter; <>O.<1>__MakeBoomerangBetter = val2; obj2 = (object)val2; } ProcessHitEnemy.ILHook((Manipulator)obj2); object obj3 = <>O.<2>__InsertRemoveProjectileOwnerFromFiredList; if (obj3 == null) { Manipulator val3 = InsertRemoveProjectileOwnerFromFiredList; <>O.<2>__InsertRemoveProjectileOwnerFromFiredList = val3; obj3 = (object)val3; } MonoDetourHooks.RoR2.Projectile.BoomerangProjectile.FixedUpdate.ILHook((Manipulator)obj3); } } private static void GlobalEventManager_ProcessHitEnemy(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { orig.Invoke(self, damageInfo, victim); if ((Object)(object)victim != (Object)null && (Object)(object)damageInfo.inflictor != (Object)null && ((Object)damageInfo.inflictor).name == "StunAndPierceBoomerang(Clone)") { Util.PlaySound("Play_item_proc_chain_lightning", victim); Util.PlaySound("Play_item_proc_chain_lightning", victim); Util.PlaySound("Play_item_proc_chain_lightning", victim); Util.PlaySound("Play_item_proc_chain_lightning", victim); Util.PlaySound("Play_item_proc_chain_lightning", victim); Util.PlaySound("Play_item_proc_chain_lightning", victim); } } private static void EditBoomerangProjectile() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<GameObject> val = AssetAsyncReferenceManager<GameObject>.LoadAsset(_electricBoomerangProjectileAsset, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<GameObject> handle) { BoomerangProjectile component = handle.Result.GetComponent<BoomerangProjectile>(); component.distanceMultiplier *= 0.15f; component.travelSpeed *= 3f; Extensions.TryDestroyComponent<ProjectileOverlapAttack>(handle.Result); AssetAsyncReferenceManager<GameObject>.UnloadAsset(_electricBoomerangProjectileAsset); }; } private static void AIBlacklistNewBoomerang() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<ItemDef> val = AssetAsyncReferenceManager<ItemDef>.LoadAsset(_electricBoomerangItemDef, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<ItemDef> handle) { ItemDef result = handle.Result; ItemTag[] tags = result.tags; int num = 0; ItemTag[] array = (ItemTag[])(object)new ItemTag[1 + tags.Length]; ReadOnlySpan<ItemTag> readOnlySpan = new ReadOnlySpan<ItemTag>(tags); readOnlySpan.CopyTo(new Span<ItemTag>(array).Slice(num, readOnlySpan.Length)); num += readOnlySpan.Length; array[num] = (ItemTag)4; result.tags = array; AssetAsyncReferenceManager<ItemDef>.UnloadAsset(_electricBoomerangItemDef); }; } private static void MakeBoomerangBetter(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) ILWeaver w = new ILWeaver(info); ILLabel skipElectricBoomerangCode = w.DefineLabel(); ILLabel val = w.DefineLabel(); ILLabel val2 = w.DefineLabel(); w.MatchRelaxed(new Predicate<Instruction>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 24) && w.SetCurrentTo(x), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref skipElectricBoomerangCode) }).ThrowIfFailure().InsertBeforeCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[5] { w.Create(OpCodes.Ldarg_1), w.Create(OpCodes.Ldloc, 24), w.CreateCall((Delegate)new Func<DamageInfo, int, bool>(ShouldAllowNewElectricBoomerang)), w.Create(OpCodes.Brfalse, (object)skipElectricBoomerangCode), w.Create(OpCodes.Br, (object)val) })); ILLabel val3 = default(ILLabel); w.MatchRelaxed(new Predicate<Instruction>[7] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 15f), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld<DamageInfo>(x, "procCoefficient"), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 7), (Instruction x) => ILPatternMatchingExt.MatchCall(x, "RoR2.Util", "CheckRoll"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3) && w.SetCurrentTo(x) }).ThrowIfFailure().MarkLabelToCurrentNext(val) .CurrentToNext() .InsertBeforeCurrentStealLabels((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[7] { w.Create(OpCodes.Ldarg_1), w.Create(OpCodes.Ldloc, 24), w.CreateCall((Delegate)new Func<DamageInfo, int, float>(GetNewDamageValue)), w.Create(OpCodes.Stloc, 153), w.Create(OpCodes.Ldloc_0), w.CreateCall((Delegate)new Action<CharacterBody>(TryAddCharacterBodyToFiredBoomerangsList)), w.Create(OpCodes.Br, (object)val2) })); w.MatchRelaxed(new Predicate<Instruction>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 24), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 153) && w.SetCurrentTo(x) }).ThrowIfFailure().MarkLabelToCurrentNext(val2); } private static bool ShouldAllowNewElectricBoomerang(DamageInfo damageInfo, int electricBoomerangCount) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (electricBoomerangCount > 0 && !((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)23) && ((DamageTypeCombo)(ref damageInfo.damageType)).IsDamageSourceSkillBased && ((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)32)) { return !_lieElectricBoomerangInfoTable.ContainsKey(damageInfo.attacker); } return false; } private static float GetNewDamageValue(DamageInfo damageInfo, int electricBoomerangCount) { return damageInfo.damage *= 3f + 2f * (float)(electricBoomerangCount - 1); } private static void TryAddCharacterBodyToFiredBoomerangsList(CharacterBody characterBody) { if (NetworkServer.active && !_lieElectricBoomerangInfoTable.ContainsKey(((Component)characterBody).gameObject)) { _lieElectricBoomerangInfoTable.Add(((Component)characterBody).gameObject, new LieElectricBoomerangInfo { HasBoomerangOut = true }); } } private static void InsertRemoveProjectileOwnerFromFiredList(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ILWeaver w = new ILWeaver(info); w.MatchMultipleRelaxed((Action<ILWeaver>)delegate(ILWeaver mW) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) mW.InsertAfterCurrent((IEnumerable<Instruction>)new <>z__ReadOnlyArray<Instruction>((Instruction[])(object)new Instruction[2] { mW.Create(OpCodes.Ldarg_0), mW.CreateCall((Delegate)new Action<BoomerangProjectile>(TryRemoveProjectileOwnerFromFiredList)) })); }, new Predicate<Instruction>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "UnityEngine.Object", "Destroy") && w.SetCurrentTo(x) }).ThrowIfFailure(); } private static void TryRemoveProjectileOwnerFromFiredList(BoomerangProjectile boomerangProjectile) { if (NetworkServer.active && _lieElectricBoomerangInfoTable.ContainsKey(boomerangProjectile.projectileController.owner)) { _lieElectricBoomerangInfoTable.Remove(boomerangProjectile.projectileController.owner); } } } internal static class ExecutiveCard { private static class CreditScoreBuff { private static readonly AssetReferenceT<Sprite> _creditCardIconSpriteReference = new AssetReferenceT<Sprite>(RoR2_DLC1_MultiShopCard.texExecutiveCardIcon_png); internal static BuffDef bdCreditScore; internal static void SetupBuff() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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) bdCreditScore = ScriptableObject.CreateInstance<BuffDef>(); ((Object)bdCreditScore).name = "bdCreditScore"; bdCreditScore.buffColor = Color.white; bdCreditScore.canStack = true; bdCreditScore.isDebuff = false; bdCreditScore.flags = (Flags)1; bdCreditScore.ignoreGrowthNectar = true; bdCreditScore.startSfx = CreateNetworkSoundEventDef("Play_item_proc_moneyOnKill_loot"); AsyncOperationHandle<Sprite> val = AssetAsyncReferenceManager<Sprite>.LoadAsset(_creditCardIconSpriteReference, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<Sprite> handle) { bdCreditScore.iconSprite = handle.Result; AssetAsyncReferenceManager<Sprite>.UnloadAsset(_creditCardIconSpriteReference); }; ContentAddition.AddBuffDef(bdCreditScore); } private static NetworkSoundEventDef