Decompiled source of WolfFixes v1.1.13
WolfoFixes.dll
Decompiled a day 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.Linq; 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.Chef; using EntityStates.Croco; using EntityStates.Engi.SpiderMine; using EntityStates.EngiTurret.EngiTurretWeapon; using EntityStates.FalseSon; using EntityStates.Fauna; using EntityStates.GlobalSkills.LunarDetonator; using EntityStates.InfiniteTowerSafeWard; using EntityStates.LemurianBruiserMonster; using EntityStates.LemurianMonster; using EntityStates.MajorConstruct.Weapon; using EntityStates.Merc; using EntityStates.QuestVolatileBattery; using EntityStates.ScavMonster; using EntityStates.VagrantNovaItem; using HG; using HG.Reflection; using IL.EntityStates.CaptainSupplyDrop; using IL.EntityStates.Commando.CommandoWeapon; using IL.EntityStates.ShrineHalcyonite; using IL.RoR2; using IL.RoR2.Artifacts; using IL.RoR2.Networking; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using Newtonsoft.Json.Utilities; using On; using On.EntityStates.Chef; using On.EntityStates.Croco; using On.EntityStates.Engi.SpiderMine; using On.EntityStates.Fauna; using On.EntityStates.GlobalSkills.LunarDetonator; using On.EntityStates.InfiniteTowerSafeWard; using On.EntityStates.LemurianBruiserMonster; using On.EntityStates.LemurianMonster; using On.EntityStates.MajorConstruct.Weapon; using On.EntityStates.Merc; using On.EntityStates.QuestVolatileBattery; using On.EntityStates.ScavMonster; using On.EntityStates.VagrantNovaItem; using On.RoR2; using On.RoR2.CharacterAI; using On.RoR2.Projectile; using On.RoR2.Stats; using On.RoR2.UI; using On.RoR2.UI.LogBook; using On.RoR2.WwiseUtils; using R2API; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntitlementManagement; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.Items; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI; using RoR2.UI.LogBook; using RoR2.UI.MainMenu; using RoR2.WwiseUtils; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.AddressableAssets.ResourceLocators; using UnityEngine.Networking; using UnityEngine.Rendering.PostProcessing; using UnityEngine.UI; using WolfoFixes.Testing; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("WolfoFixes")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+7da93bfc762c4890453b3745777e4669ae8792b6")] [assembly: AssemblyProduct("WolfoFixes")] [assembly: AssemblyTitle("WolfoFixes")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WolfoFixes { public class MithrixPhase4Fix : MonoBehaviour { public bool stoleItems = false; public void Start() { SetStateOnHurt component = ((Component)this).GetComponent<SetStateOnHurt>(); if (Object.op_Implicit((Object)(object)component)) { component.canBeHitStunned = true; } HurtBoxGroup component2 = ((Component)this).GetComponent<HurtBoxGroup>(); if (Object.op_Implicit((Object)(object)component2) && component2.hurtBoxesDeactivatorCounter == 0) { component2.SetHurtboxesActive(true); } } } public class BodyFixes { [CompilerGenerated] private static class <>O { public static hook_OnEnter <0>__WhirlwindBase_OnEnter; public static Manipulator <1>__CommandoReloadStateRemove; public static hook_OnEnter <2>__FixDumbFruit; public static hook_OnExit <3>__XI_LaserFix; public static Manipulator <4>__FixCaptainBeaconNoCrit; public static hook_OnEnter <5>__IceBox_OnEnter; public static hook_ChargeCleaver <6>__CleaverProjectile_ChargeCleaver; public static hook_OnExit <7>__FallDamageImmunityOnOilSpillCancel; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnter <>9__2_0; public static hook_OnExit <>9__2_1; public static Func<Instruction, bool> <>9__6_1; public static Func<bool, ProjectileDamage, bool> <>9__6_0; public static Func<Instruction, bool> <>9__12_1; public static Func<int, int> <>9__12_0; internal void <Start>b__2_0(orig_OnEnter orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } } internal void <Start>b__2_1(orig_OnExit orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f); } } internal bool <FixCaptainBeaconNoCrit>b__6_1(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "RoR2.BulletAttack", "isCrit"); } internal bool <FixCaptainBeaconNoCrit>b__6_0(bool a, ProjectileDamage projectileDamage) { return projectileDamage.crit; } internal bool <CommandoReloadStateRemove>b__12_1(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RoR2.GenericSkill", "get_stock"); } internal int <CommandoReloadStateRemove>b__12_0(int stock) { return 1; } } public static GameObject JellyfishDeath; public static void SetSkippable(object sender, EventArgs e) { //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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherHurtBody.prefab").WaitForCompletion(); SetStateOnHurt component = val.GetComponent<SetStateOnHurt>(); if (Object.op_Implicit((Object)(object)component)) { component.canBeHitStunned = !WConfig.cfgMithrix4Skip.Value; } if ((Object)(object)val.GetComponent<MithrixPhase4Fix>() == (Object)null) { ((Component)component).gameObject.AddComponent<MithrixPhase4Fix>(); } CharacterBody component2 = Addressables.LoadAssetAsync<GameObject>((object)"1336d77e77299964884c3bd02757fde7").WaitForCompletion().GetComponent<CharacterBody>(); component2.baseNameToken = "EQUIPMENT_DEATHPROJECTILE_NAME"; component2.portraitIcon = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"dda5febead506894fa6e053cea042ddc").WaitForCompletion(); Addressables.LoadAssetAsync<BuffDef>((object)"4f0cbda1787e0074ab5e44d1df995d6b").WaitForCompletion().isDebuff = false; } private static void FixHeresyForEnemies(orig_SetSkillOverride orig, GenericSkill self, object source, SkillDef skillDef, SkillOverridePriority priority) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Invalid comparison between Unknown and I4 //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) if ((int)priority == 3 && Object.op_Implicit((Object)(object)self.characterBody) && !self.characterBody.isPlayerControlled) { EntityStateMachine stateMachine = self.stateMachine; orig.Invoke(self, source, skillDef, priority); if (Object.op_Implicit((Object)(object)stateMachine)) { self.stateMachine = stateMachine; } } else { orig.Invoke(self, source, skillDef, priority); } } public static void Start() { //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_002a: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_0074: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) SetSkippable(null, null); ChefFixes(); object obj = <>O.<0>__WhirlwindBase_OnEnter; if (obj == null) { hook_OnEnter val = WhirlwindBase_OnEnter; <>O.<0>__WhirlwindBase_OnEnter = val; obj = (object)val; } WhirlwindBase.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__2_0; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } }; <>c.<>9__2_0 = val2; obj2 = (object)val2; } Spawn.OnEnter += (hook_OnEnter)obj2; object obj3 = <>c.<>9__2_1; if (obj3 == null) { hook_OnExit val3 = delegate(orig_OnExit orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f); } }; <>c.<>9__2_1 = val3; obj3 = (object)val3; } Spawn.OnExit += (hook_OnExit)obj3; GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Child/ChildBody.prefab").WaitForCompletion(); CharacterBody component = val4.GetComponent<CharacterBody>(); if (!((Enum)component.bodyFlags).HasFlag((Enum)(object)(BodyFlags)512)) { component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x200); } object obj4 = <>O.<1>__CommandoReloadStateRemove; if (obj4 == null) { Manipulator val5 = CommandoReloadStateRemove; <>O.<1>__CommandoReloadStateRemove = val5; obj4 = (object)val5; } FirePistol2.FixedUpdate += (Manipulator)obj4; object obj5 = <>O.<2>__FixDumbFruit; if (obj5 == null) { hook_OnEnter val6 = FixDumbFruit; <>O.<2>__FixDumbFruit = val6; obj5 = (object)val6; } HabitatFruitDeathState.OnEnter += (hook_OnEnter)obj5; HabitatFruitDeathState.deathSoundString = "Play_jellyfish_death"; HabitatFruitDeathState.healPackMaxVelocity = 60f; HabitatFruitDeathState.fractionalHealing = 0.15f; HabitatFruitDeathState.scale = 1f; object obj6 = <>O.<3>__XI_LaserFix; if (obj6 == null) { hook_OnExit val7 = XI_LaserFix; <>O.<3>__XI_LaserFix = val7; obj6 = (object)val7; } FireLaser.OnExit += (hook_OnExit)obj6; object obj7 = <>O.<4>__FixCaptainBeaconNoCrit; if (obj7 == null) { Manipulator val8 = FixCaptainBeaconNoCrit; <>O.<4>__FixCaptainBeaconNoCrit = val8; obj7 = (object)val8; } HitGroundState.OnEnter += (Manipulator)obj7; if (WConfig.cfgFunnyIceSpear.Value) { Addressables.LoadAssetAsync<GameObject>((object)"7a5eecba2b015474dbed965c120860d0").WaitForCompletion().layer = 8; } } public static void ChefFixes() { //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) //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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_004a: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //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_006b: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown Addressables.LoadAssetAsync<SkillDef>((object)"6870bda0b12690048a9701539d1e2285").WaitForCompletion().activationState = Addressables.LoadAssetAsync<SkillDef>((object)"c97062b172b41af4ebdb42c312ac1989").WaitForCompletion().activationState; object obj = <>O.<5>__IceBox_OnEnter; if (obj == null) { hook_OnEnter val = IceBox_OnEnter; <>O.<5>__IceBox_OnEnter = val; obj = (object)val; } IceBox.OnEnter += (hook_OnEnter)obj; object obj2 = <>O.<6>__CleaverProjectile_ChargeCleaver; if (obj2 == null) { hook_ChargeCleaver val2 = CleaverProjectile_ChargeCleaver; <>O.<6>__CleaverProjectile_ChargeCleaver = val2; obj2 = (object)val2; } CleaverProjectile.ChargeCleaver += (hook_ChargeCleaver)obj2; Addressables.LoadAssetAsync<GameObject>((object)"a327aaf45e7e3b44f8b0bcc20c7eacfa").WaitForCompletion().GetComponent<ProjectileOverlapAttack>() .overlapProcCoefficient = 1f; object obj3 = <>O.<7>__FallDamageImmunityOnOilSpillCancel; if (obj3 == null) { hook_OnExit val3 = FallDamageImmunityOnOilSpillCancel; <>O.<7>__FallDamageImmunityOnOilSpillCancel = val3; obj3 = (object)val3; } OilSpillBase.OnExit += (hook_OnExit)obj3; Addressables.LoadAssetAsync<GameObject>((object)"c00152ae354576245849336ff7e67ba6").WaitForCompletion().GetComponent<ProjectileExplosion>() .childrenDamageCoefficient = 1f / 35f; } public static void CallLate() { //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) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) Addressables.LoadAssetAsync<GameObject>((object)"3a44327eee358a74ba0580dbca78897e").WaitForCompletion().AddComponent<GivePickupsOnStart>() .itemDefInfos = (ItemDefInfo[])(object)new ItemDefInfo[1] { new ItemDefInfo { itemDef = Items.UseAmbientLevel, count = 1 } }; } private static void FallDamageImmunityOnOilSpillCancel(orig_OnExit orig, OilSpillBase self) { ((EntityState)self).characterBody.AddTimedBuff(Buffs.IgnoreFallDamage, 0.25f); orig.Invoke(self); } private static void FixCaptainBeaconNoCrit(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.BulletAttack", "isCrit") })) { val.Emit(OpCodes.Ldloc_1); val.EmitDelegate<Func<bool, ProjectileDamage, bool>>((Func<bool, ProjectileDamage, bool>)((bool a, ProjectileDamage projectileDamage) => projectileDamage.crit)); } else { Debug.LogWarning((object)"IL Failed : FixCaptainBeaconNoCrit"); } } private static void XI_LaserFix(orig_OnExit orig, FireLaser self) { orig.Invoke(self); ((EntityState)self).outer.SetNextState(((FireBeam)self).GetNextState()); } private static void FixDumbFruit(orig_OnEnter orig, HabitatFruitDeathState self) { //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_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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) Transform child = ((EntityState)self).gameObject.transform.GetChild(1).GetChild(3); EffectManager.SimpleImpactEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Jellyfish/JellyfishDeath.prefab").WaitForCompletion(), child.position, Vector3.up, false); if (NetworkServer.active) { GameObject val = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/HealPack"), child.position, Random.rotation); val.GetComponent<TeamFilter>().teamIndex = (TeamIndex)1; val.GetComponentInChildren<HealthPickup>().fractionalHealing = HabitatFruitDeathState.fractionalHealing; val.transform.localScale = new Vector3(HabitatFruitDeathState.scale, HabitatFruitDeathState.scale, HabitatFruitDeathState.scale); val.GetComponent<Rigidbody>().AddForce(Random.insideUnitSphere * HabitatFruitDeathState.healPackMaxVelocity, (ForceMode)2); NetworkServer.Spawn(val); } orig.Invoke(self); } private static void IceBox_OnEnter(orig_OnEnter orig, IceBox self) { orig.Invoke(self); if (self.hasBoost) { self.attackSoundString = "Play_Chef_Secondary_IceBox_Boosted_Fire"; Util.PlaySound(self.blizzardSFXString, ((EntityState)self).gameObject); } } private static void CleaverProjectile_ChargeCleaver(orig_ChargeCleaver orig, CleaverProjectile self) { orig.Invoke(self); if (self.charged) { self.projectileOverlapAttack.overlapProcCoefficient = 1f; } } public static void CommandoReloadStateRemove(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.GenericSkill", "get_stock") })) { val.EmitDelegate<Func<int, int>>((Func<int, int>)((int stock) => 1)); } else { Debug.LogWarning((object)"IL Failed : CommandoReloadStateRemove"); } } private static void WhirlwindBase_OnEnter(orig_OnEnter orig, WhirlwindBase self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddTimedBuff(Buffs.IgnoreFallDamage, self.duration); } } } public class DevotionFixes { [CompilerGenerated] private static class <>O { public static hook_OnDevotionArtifactDisabled <0>__Fix_EliteListBeingBlank; public static hook_CreateItemTakenOrb <1>__Fix_NullrefWhenOrb; public static hook_UpdateAllMinions <2>__AddItemToAllFirst; public static Manipulator <3>__RemoveNormalItemGiving; public static Manipulator <4>__CheckIfNullBody; public static hook_OnDevotedBodyDead <5>__CheckIfInventoryNull; public static hook_GetOrCreateDevotionInventoryController <6>__CheckIfRandomlyPlayerMasterNull; public static hook_EvolveDevotedLumerian <7>__FixEvolveWithoutBody; public static Action<Run> <8>__OnRunDestroy; public static hook_OnEnter <9>__SoundBugged; public static hook_OnEnter <10>__NoSoundEven; } public static void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0095: 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_00a0: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: 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) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown object obj = <>O.<0>__Fix_EliteListBeingBlank; if (obj == null) { hook_OnDevotionArtifactDisabled val = Fix_EliteListBeingBlank; <>O.<0>__Fix_EliteListBeingBlank = val; obj = (object)val; } DevotionInventoryController.OnDevotionArtifactDisabled += (hook_OnDevotionArtifactDisabled)obj; object obj2 = <>O.<1>__Fix_NullrefWhenOrb; if (obj2 == null) { hook_CreateItemTakenOrb val2 = Fix_NullrefWhenOrb; <>O.<1>__Fix_NullrefWhenOrb = val2; obj2 = (object)val2; } LemurianEggController.CreateItemTakenOrb += (hook_CreateItemTakenOrb)obj2; object obj3 = <>O.<2>__AddItemToAllFirst; if (obj3 == null) { hook_UpdateAllMinions val3 = AddItemToAllFirst; <>O.<2>__AddItemToAllFirst = val3; obj3 = (object)val3; } DevotionInventoryController.UpdateAllMinions += (hook_UpdateAllMinions)obj3; object obj4 = <>O.<3>__RemoveNormalItemGiving; if (obj4 == null) { Manipulator val4 = RemoveNormalItemGiving; <>O.<3>__RemoveNormalItemGiving = val4; obj4 = (object)val4; } DevotionInventoryController.UpdateMinionInventory += (Manipulator)obj4; object obj5 = <>O.<4>__CheckIfNullBody; if (obj5 == null) { Manipulator val5 = CheckIfNullBody; <>O.<4>__CheckIfNullBody = val5; obj5 = (object)val5; } DevotionInventoryController.UpdateMinionInventory += (Manipulator)obj5; object obj6 = <>O.<5>__CheckIfInventoryNull; if (obj6 == null) { hook_OnDevotedBodyDead val6 = CheckIfInventoryNull; <>O.<5>__CheckIfInventoryNull = val6; obj6 = (object)val6; } DevotedLemurianController.OnDevotedBodyDead += (hook_OnDevotedBodyDead)obj6; object obj7 = <>O.<6>__CheckIfRandomlyPlayerMasterNull; if (obj7 == null) { hook_GetOrCreateDevotionInventoryController val7 = CheckIfRandomlyPlayerMasterNull; <>O.<6>__CheckIfRandomlyPlayerMasterNull = val7; obj7 = (object)val7; } DevotionInventoryController.GetOrCreateDevotionInventoryController += (hook_GetOrCreateDevotionInventoryController)obj7; object obj8 = <>O.<7>__FixEvolveWithoutBody; if (obj8 == null) { hook_EvolveDevotedLumerian val8 = FixEvolveWithoutBody; <>O.<7>__FixEvolveWithoutBody = val8; obj8 = (object)val8; } DevotionInventoryController.EvolveDevotedLumerian += (hook_EvolveDevotedLumerian)obj8; Run.onRunDestroyGlobal += DevotionInventoryController.OnRunDestroy; if (WConfig.cfgDevotionSpareDroneParts.Value) { GameObject val9 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/DevotedLemurianBody.prefab").WaitForCompletion(); GameObject val10 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/DevotedLemurianBruiserBody.prefab").WaitForCompletion(); CharacterBody component = val9.GetComponent<CharacterBody>(); component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x2000); CharacterBody component2 = val10.GetComponent<CharacterBody>(); component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x2000); } object obj9 = <>O.<9>__SoundBugged; if (obj9 == null) { hook_OnEnter val11 = SoundBugged; <>O.<9>__SoundBugged = val11; obj9 = (object)val11; } SpawnState.OnEnter += (hook_OnEnter)obj9; object obj10 = <>O.<10>__NoSoundEven; if (obj10 == null) { hook_OnEnter val12 = NoSoundEven; <>O.<10>__NoSoundEven = val12; obj10 = (object)val12; } SpawnState.OnEnter += (hook_OnEnter)obj10; } private static void NoSoundEven(orig_OnEnter orig, SpawnState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).characterBody.master).GetComponent<DevotedLemurianController>())) { Util.PlaySound(SpawnState.devotionHissSoundString, ((EntityState)self).gameObject); Util.PlaySound(SpawnState.devotionSpawnSoundString, ((EntityState)self).gameObject); } } private static void SoundBugged(orig_OnEnter orig, SpawnState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).characterBody.master).GetComponent<DevotedLemurianController>())) { Util.PlaySound(SpawnState.devotionHissSoundString, ((EntityState)self).gameObject); Util.PlaySound(SpawnState.devotionSpawnSoundString, ((EntityState)self).gameObject); } } private static void FixEvolveWithoutBody(orig_EvolveDevotedLumerian orig, DevotionInventoryController self, DevotedLemurianController devotedLemurianController) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)devotedLemurianController.LemurianBody == (Object)null) { switch (devotedLemurianController.DevotedEvolutionLevel) { case 1: devotedLemurianController.LemurianInventory.SetEquipmentIndex(DevotionInventoryController.lowLevelEliteBuffs[Random.Range(0, DevotionInventoryController.lowLevelEliteBuffs.Count)]); break; case 2: devotedLemurianController.LemurianInventory.SetEquipmentIndex((EquipmentIndex)(-1)); devotedLemurianController._lemurianMaster.TransformBody("DevotedLemurianBruiserBody"); break; case 3: devotedLemurianController.LemurianInventory.SetEquipmentIndex(DevotionInventoryController.highLevelEliteBuffs[Random.Range(0, DevotionInventoryController.highLevelEliteBuffs.Count)]); break; } } else { orig.Invoke(self, devotedLemurianController); } } private static DevotionInventoryController CheckIfRandomlyPlayerMasterNull(orig_GetOrCreateDevotionInventoryController orig, Interactor summoner) { foreach (DevotionInventoryController instance in DevotionInventoryController.InstanceList) { if ((Object)(object)instance._summonerMaster == (Object)null) { Object.Destroy((Object)(object)instance); } } return orig.Invoke(summoner); } private static void CheckIfInventoryNull(orig_OnDevotedBodyDead orig, DevotedLemurianController self) { if (Object.op_Implicit((Object)(object)self) && (Object)(object)self._devotionInventoryController != (Object)null) { orig.Invoke(self); } } private static void CheckIfNullBody(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DevotionInventoryController", "activationSoundEventDef") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<GameObject, DevotedLemurianController, GameObject>>((Func<GameObject, DevotedLemurianController, GameObject>)((GameObject obj, DevotedLemurianController lem) => ((Object)(object)lem.LemurianBody == (Object)null) ? null : obj)); } else { Debug.LogWarning((object)"IL Failed : CheckIfNullBody"); } } private static void RemoveNormalItemGiving(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Inventory", "GiveItem") })) { val.Prev.OpCode = OpCodes.Ldc_I4_0; } else { Debug.LogWarning((object)"IL Failed: FixOneBehindRemoveItemHerel"); } } private static void FixBodyComponentsSometimesJustNotBeingThere(orig_UpdateMinionInventory orig, DevotionInventoryController self, DevotedLemurianController devotedLemurianController, bool shouldEvolve) { orig.Invoke(self, devotedLemurianController, shouldEvolve); if (Object.op_Implicit((Object)(object)devotedLemurianController.LemurianBody) && Object.op_Implicit((Object)(object)devotedLemurianController.LemurianBody.inventory)) { devotedLemurianController.LemurianBody.OnInventoryChanged(); } } private static void AddItemToAllFirst(orig_UpdateAllMinions orig, DevotionInventoryController self, bool shouldEvolve) { //IL_0020: 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) if (shouldEvolve && Object.op_Implicit((Object)(object)self._summonerMaster)) { MinionGroup val = MinionGroup.FindGroup(((NetworkBehaviour)self._summonerMaster).netId); if (val != null) { MinionOwnership[] members = val.members; DevotedLemurianController val3 = default(DevotedLemurianController); foreach (MinionOwnership val2 in members) { if (Object.op_Implicit((Object)(object)val2) && ((Component)((Component)val2).GetComponent<CharacterMaster>()).TryGetComponent<DevotedLemurianController>(ref val3)) { self._devotionMinionInventory.GiveItem(val3.DevotionItem, 1); } } } } orig.Invoke(self, shouldEvolve); ((MonoBehaviour)self).StartCoroutine(FixItemComponentsBeingDeleted(self)); } public static IEnumerator FixItemComponentsBeingDeleted(DevotionInventoryController self) { yield return (object)new WaitForSeconds(1f); if (!Object.op_Implicit((Object)(object)self._summonerMaster)) { yield break; } MinionGroup minionGroup = MinionGroup.FindGroup(((NetworkBehaviour)self._summonerMaster).netId); if (minionGroup == null) { yield break; } MinionOwnership[] members = minionGroup.members; DevotedLemurianController devotedLemurianController = default(DevotedLemurianController); foreach (MinionOwnership minionOwnership in members) { if (Object.op_Implicit((Object)(object)minionOwnership) && ((Component)((Component)minionOwnership).GetComponent<CharacterMaster>()).TryGetComponent<DevotedLemurianController>(ref devotedLemurianController) && Object.op_Implicit((Object)(object)devotedLemurianController.LemurianBody) && Object.op_Implicit((Object)(object)devotedLemurianController.LemurianBody.inventory)) { devotedLemurianController.LemurianBody.OnInventoryChanged(); } devotedLemurianController = null; } } private static void Fix_EliteListBeingBlank(orig_OnDevotionArtifactDisabled orig, RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { if ((Object)(object)artifactDef == (Object)(object)Artifacts.Devotion) { List<EquipmentIndex> lowLevelEliteBuffs = new List<EquipmentIndex>(DevotionInventoryController.lowLevelEliteBuffs); List<EquipmentIndex> highLevelEliteBuffs = new List<EquipmentIndex>(DevotionInventoryController.highLevelEliteBuffs); orig.Invoke(runArtifactManager, artifactDef); DevotionInventoryController.lowLevelEliteBuffs = lowLevelEliteBuffs; DevotionInventoryController.highLevelEliteBuffs = highLevelEliteBuffs; } else { orig.Invoke(runArtifactManager, artifactDef); } } private static void Fix_NullrefWhenOrb(orig_CreateItemTakenOrb orig, LemurianEggController self, Vector3 effectOrigin, GameObject targetObject, ItemIndex itemIndex) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)DevotionInventoryController.s_effectPrefab)) { DevotionInventoryController.OnDevotionArtifactEnabled(RunArtifactManager.instance, Artifacts.Devotion); Items.BoostDamage.hidden = true; Items.BoostHp.hidden = true; } orig.Invoke(self, effectOrigin, targetObject, itemIndex); } } public class EquipmentFixes { [CompilerGenerated] private static class <>O { public static Manipulator <0>__FixSawmarang; public static hook_HealthComponentToTransform <1>__FixTwisteds_NotWorkingOnPlayers; public static hook_SetupWings <2>__BugWingsAlways_SetupWings; public static hook_OnDisable <3>__BugWingsAlways_OnDisable; public static hook_OnEnter <4>__FallbackIfNoItemDisplay; } public static void Start() { //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) //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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown Addressables.LoadAssetAsync<GameObject>((object)"9ca7d392fa3bb444b827d475b36b9253").WaitForCompletion().AddComponent<ThisIsASawmarang>(); Addressables.LoadAssetAsync<EquipmentDef>((object)"f2ddbb7586240e648945ad494ebe3984").WaitForCompletion().cooldown = 0f; object obj = <>O.<0>__FixSawmarang; if (obj == null) { Manipulator val = FixSawmarang; <>O.<0>__FixSawmarang = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; object obj2 = <>O.<1>__FixTwisteds_NotWorkingOnPlayers; if (obj2 == null) { hook_HealthComponentToTransform val2 = FixTwisteds_NotWorkingOnPlayers; <>O.<1>__FixTwisteds_NotWorkingOnPlayers = val2; obj2 = (object)val2; } Util.HealthComponentToTransform += (hook_HealthComponentToTransform)obj2; object obj3 = <>O.<2>__BugWingsAlways_SetupWings; if (obj3 == null) { hook_SetupWings val3 = BugWingsAlways_SetupWings; <>O.<2>__BugWingsAlways_SetupWings = val3; obj3 = (object)val3; } JetpackController.SetupWings += (hook_SetupWings)obj3; object obj4 = <>O.<3>__BugWingsAlways_OnDisable; if (obj4 == null) { hook_OnDisable val4 = BugWingsAlways_OnDisable; <>O.<3>__BugWingsAlways_OnDisable = val4; obj4 = (object)val4; } JetpackController.OnDisable += (hook_OnDisable)obj4; object obj5 = <>O.<4>__FallbackIfNoItemDisplay; if (obj5 == null) { hook_OnEnter val5 = FallbackIfNoItemDisplay; <>O.<4>__FallbackIfNoItemDisplay = val5; obj5 = (object)val5; } CountDown.OnEnter += (hook_OnEnter)obj5; } private static void FallbackIfNoItemDisplay(orig_OnEnter orig, CountDown self) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.vfxInstances.Length == 0 && Object.op_Implicit((Object)(object)((QuestVolatileBatteryBaseState)self).networkedBodyAttachment.attachedBody) && Object.op_Implicit((Object)(object)CountDown.vfxPrefab) && Object.op_Implicit((Object)(object)((QuestVolatileBatteryBaseState)self).attachedCharacterModel)) { self.vfxInstances = (GameObject[])(object)new GameObject[1]; GameObject val = Object.Instantiate<GameObject>(CountDown.vfxPrefab, ((QuestVolatileBatteryBaseState)self).networkedBodyAttachment.attachedBody.coreTransform); val.transform.localPosition = Vector3.zero; val.transform.localRotation = Quaternion.identity; val.transform.localScale = new Vector3(2.5f / val.transform.lossyScale.x, 2.5f / val.transform.lossyScale.y, 2.5f / val.transform.lossyScale.z); if (val.transform.localScale.z < 1f) { val.transform.localScale = new Vector3(1f, 1f, 1f); } Light component = ((Component)val.transform.GetChild(0)).GetComponent<Light>(); component.range *= 3f; Light component2 = ((Component)val.transform.GetChild(0)).GetComponent<Light>(); component2.intensity *= 3f; LightIntensityCurve component3 = ((Component)val.transform.GetChild(0)).GetComponent<LightIntensityCurve>(); component3.timeMax /= 2f; self.vfxInstances[0] = val; } } private static Transform FixTwisteds_NotWorkingOnPlayers(orig_HealthComponentToTransform orig, HealthComponent healthComponent) { if (Object.op_Implicit((Object)(object)healthComponent) && Object.op_Implicit((Object)(object)healthComponent.body) && Object.op_Implicit((Object)(object)healthComponent.body.mainHurtBox)) { return ((Component)healthComponent.body.mainHurtBox).transform; } return orig.Invoke(healthComponent); } private static void FixSawmarang(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Equipment", "Saw"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.EquipmentDef", "get_equipmentIndex") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<EquipmentIndex, DamageInfo, EquipmentIndex>>((Func<EquipmentIndex, DamageInfo, EquipmentIndex>)delegate(EquipmentIndex eq, DamageInfo damageInfo) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)eq); return Object.op_Implicit((Object)(object)damageInfo.inflictor.GetComponent<ThisIsASawmarang>()) ? Equipment.Saw.equipmentIndex : eq; }); } else { Debug.LogWarning((object)"IL Failed : FixSawmarang"); } } private static void BugWingsAlways_SetupWings(orig_SetupWings orig, JetpackController self) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) CharacterModel val = null; if (Object.op_Implicit((Object)(object)self.targetBody) && self.targetBody.isPlayerControlled) { val = ((Component)self.targetBody.modelLocator.modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)val.itemDisplayRuleSet) && val.currentEquipmentDisplayIndex != Equipment.Jetpack.equipmentIndex) { DisplayRuleGroup equipmentDisplayRuleGroup = val.itemDisplayRuleSet.GetEquipmentDisplayRuleGroup(Equipment.Jetpack.equipmentIndex); val.InstantiateDisplayRuleGroup(equipmentDisplayRuleGroup, (ItemIndex)(-1), Equipment.Jetpack.equipmentIndex); } } orig.Invoke(self); if ((Object)(object)val != (Object)null) { DontDestroyIfJetpack dontDestroyIfJetpack = ((Component)val).GetComponent<DontDestroyIfJetpack>(); if (!Object.op_Implicit((Object)(object)dontDestroyIfJetpack)) { dontDestroyIfJetpack = ((Component)val).gameObject.AddComponent<DontDestroyIfJetpack>(); } dontDestroyIfJetpack.characterModel = val; dontDestroyIfJetpack.Setup(); } } private static void BugWingsAlways_OnDisable(orig_OnDisable orig, JetpackController self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self.targetBody) || !self.targetBody.isPlayerControlled) { return; } CharacterModel component = ((Component)self.targetBody.modelLocator.modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component.itemDisplayRuleSet)) { DontDestroyIfJetpack component2 = ((Component)component).GetComponent<DontDestroyIfJetpack>(); if (Object.op_Implicit((Object)(object)component2)) { component2.UnSetup(); } } } } public class ThisIsASawmarang : MonoBehaviour { } public class BlockModelUndo : MonoBehaviour { } public class DontDestroyIfJetpack : MonoBehaviour { public CharacterModel characterModel; public ParentedPrefabDisplay storedDisplay; public EquipmentIndex index; public void Setup() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) index = Equipment.Jetpack.equipmentIndex; for (int num = characterModel.parentedPrefabDisplays.Count - 1; num >= 0; num--) { if (characterModel.parentedPrefabDisplays[num].equipmentIndex == index) { storedDisplay = characterModel.parentedPrefabDisplays[num]; characterModel.parentedPrefabDisplays.RemoveAt(num); break; } } } public void UnSetup() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (characterModel.currentEquipmentDisplayIndex == index) { characterModel.parentedPrefabDisplays.Add(storedDisplay); } else { ((ParentedPrefabDisplay)(ref storedDisplay)).Undo(); } } } public class GameplayMisc { [CompilerGenerated] private static class <>O { public static hook_OnEnable <0>__PathOfColossusSkipFix; public static Manipulator <1>__SwarmsVengenceGooboFix; public static hook_TakeDamageProcess <2>__SlayerApplyingToProc; public static Manipulator <3>__AllowGhostsToSuicideProperly; } public static void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown object obj = <>O.<0>__PathOfColossusSkipFix; if (obj == null) { hook_OnEnable val = PathOfColossusSkipFix; <>O.<0>__PathOfColossusSkipFix = val; obj = (object)val; } SceneExitController.OnEnable += (hook_OnEnable)obj; object obj2 = <>O.<1>__SwarmsVengenceGooboFix; if (obj2 == null) { Manipulator val2 = SwarmsVengenceGooboFix; <>O.<1>__SwarmsVengenceGooboFix = val2; obj2 = (object)val2; } SwarmsArtifactManager.OnSpawnCardOnSpawnedServerGlobal += (Manipulator)obj2; if (WConfig.cfgSlayerScale.Value) { object obj3 = <>O.<2>__SlayerApplyingToProc; if (obj3 == null) { hook_TakeDamageProcess val3 = SlayerApplyingToProc; <>O.<2>__SlayerApplyingToProc = val3; obj3 = (object)val3; } HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)obj3; } SceneDef val4 = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/habitat/habitat.asset").WaitForCompletion(); val4.validForRandomSelection = true; val4 = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/helminthroost/helminthroost.asset").WaitForCompletion(); val4.validForRandomSelection = true; Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"e291748f54c927a47ad44789d295c39f").WaitForCompletion().bannedItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)21 }; object obj4 = <>O.<3>__AllowGhostsToSuicideProperly; if (obj4 == null) { Manipulator val5 = AllowGhostsToSuicideProperly; <>O.<3>__AllowGhostsToSuicideProperly = val5; obj4 = (object)val5; } HealthComponent.ServerFixedUpdate += (Manipulator)obj4; } public static void AllowGhostsToSuicideProperly(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "RoR2.HealthComponent", "Suicide") }); if (val.TryGotoPrev((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0) })) { val.EmitDelegate<Func<HealthComponent, HealthComponent>>((Func<HealthComponent, HealthComponent>)delegate(HealthComponent stock) { stock.health = 1f; return stock; }); } else { Debug.LogWarning((object)"IL Failed : HealthComponent_ServerFixedUpdateHealthComponent_Suicide1"); } } private static void SwarmsVengenceGooboFix(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.SpawnCard/SpawnResult", "spawnRequest"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.DirectorCore", "TrySpawnObject") })) { val.EmitDelegate<Func<SpawnResult, SpawnResult>>((Func<SpawnResult, SpawnResult>)delegate(SpawnResult result) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)result.spawnedInstance) && result.spawnRequest.spawnCard is MasterCopySpawnCard) { result.spawnRequest.spawnCard = (SpawnCard)(object)MasterCopySpawnCard.FromMaster(result.spawnedInstance.GetComponent<CharacterMaster>(), true, true, (Action<CharacterMaster>)null); } return result; }); } else { Debug.LogWarning((object)"IL Failed: SwarmsArtifactManager_OnSpawnCardOnSpawnedServerGlobal"); } } public static void SlayerApplyingToProc(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)524288)) != 0) { damageInfo.damage *= Mathf.Lerp(3f, 1f, self.combinedHealthFraction); damageInfo.damageType &= DamageTypeCombo.op_Implicit((DamageType)(-524289)); } orig.Invoke(self, damageInfo); } private static void PathOfColossusSkipFix(orig_OnEnable orig, SceneExitController self) { orig.Invoke(self); if (self.isColossusPortal && self.isAlternatePath) { self.destinationScene = self.GetDestinationSceneToPreload(); } } } public class InteractableFixes { [CompilerGenerated] private static class <>O { public static hook_SetUpSeerStations <0>__FixDuplicateAndEmptyThirdSeers; public static hook_SetRunNextStageToTarget <1>__BazaarDisableAllSeers; } public static void Start() { //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 //IL_003e: 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_0049: Expected O, but got Unknown ShrineShapingFixes.Start(); ShrineHalcyonFixes.Start(); object obj = <>O.<0>__FixDuplicateAndEmptyThirdSeers; if (obj == null) { hook_SetUpSeerStations val = FixDuplicateAndEmptyThirdSeers; <>O.<0>__FixDuplicateAndEmptyThirdSeers = val; obj = (object)val; } BazaarController.SetUpSeerStations += (hook_SetUpSeerStations)obj; object obj2 = <>O.<1>__BazaarDisableAllSeers; if (obj2 == null) { hook_SetRunNextStageToTarget val2 = BazaarDisableAllSeers; <>O.<1>__BazaarDisableAllSeers = val2; obj2 = (object)val2; } SeerStationController.SetRunNextStageToTarget += (hook_SetRunNextStageToTarget)obj2; } private static void BazaarDisableAllSeers(orig_SetRunNextStageToTarget orig, SeerStationController self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)BazaarController.instance)) { for (int i = 0; i < BazaarController.instance.seerStations.Length; i++) { ((Component)BazaarController.instance.seerStations[i]).GetComponent<PurchaseInteraction>().SetAvailable(false); } } } private static void FixDuplicateAndEmptyThirdSeers(orig_SetUpSeerStations orig, BazaarController self) { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); List<string> list = new List<string>(); List<SeerStationController> list2 = new List<SeerStationController>(); SeerStationController[] seerStations = self.seerStations; foreach (SeerStationController val in seerStations) { if (val.targetSceneDefIndex != -1) { string baseSceneName = SceneCatalog.indexToSceneDef[val.targetSceneDefIndex].baseSceneName; if (list.Contains(baseSceneName)) { list2.Add(val); } else { list.Add(baseSceneName); } } else { list2.Add(val); } } if (list2.Count <= 0) { return; } SceneDef nextStageScene = Run.instance.nextStageScene; List<SceneDef> list3 = new List<SceneDef>(); if ((Object)(object)nextStageScene != (Object)null) { int stageOrder = nextStageScene.stageOrder; Enumerator<SceneDef> enumerator = SceneCatalog.allSceneDefs.GetEnumerator(); try { while (enumerator.MoveNext()) { SceneDef current = enumerator.Current; if (current.stageOrder == stageOrder && ((Object)(object)current.requiredExpansion == (Object)null || Run.instance.IsExpansionEnabled(current.requiredExpansion)) && self.IsUnlockedBeforeLooping(current) && !list.Contains(current.baseSceneName)) { list3.Add(current); } } } finally { ((IDisposable)enumerator).Dispose(); } } if (list3.Count <= 0) { return; } foreach (SeerStationController item in list2) { Util.ShuffleList<SceneDef>(list3, self.rng); int index = list3.Count - 1; item.SetTargetScene(list3[index]); list3.RemoveAt(index); ((Component)item).GetComponent<PurchaseInteraction>().SetAvailable(true); } } } public class ItemFixes { [CompilerGenerated] private static class <>O { public static Manipulator <0>__FixWarpedEchoE8; public static Manipulator <1>__FixWarpedEchoNotUsingArmor; public static Manipulator <2>__FixChargedPerferatorCrit; public static hook_OnTakeDamageServer <3>__WEchoFirstHitIntoDanger; public static Manipulator <4>__Antler_FixWrongAuth; public static hook_RpcRequestShardInfoClient <5>__Antler_FixNullRefOnNullMotor; } public static void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0095: 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_00a0: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown object obj = <>O.<0>__FixWarpedEchoE8; if (obj == null) { Manipulator val = FixWarpedEchoE8; <>O.<0>__FixWarpedEchoE8 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; object obj2 = <>O.<1>__FixWarpedEchoNotUsingArmor; if (obj2 == null) { Manipulator val2 = FixWarpedEchoNotUsingArmor; <>O.<1>__FixWarpedEchoNotUsingArmor = val2; obj2 = (object)val2; } HealthComponent.TakeDamageProcess += (Manipulator)obj2; object obj3 = <>O.<2>__FixChargedPerferatorCrit; if (obj3 == null) { Manipulator val3 = FixChargedPerferatorCrit; <>O.<2>__FixChargedPerferatorCrit = val3; obj3 = (object)val3; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj3; object obj4 = <>O.<3>__WEchoFirstHitIntoDanger; if (obj4 == null) { hook_OnTakeDamageServer val4 = WEchoFirstHitIntoDanger; <>O.<3>__WEchoFirstHitIntoDanger = val4; obj4 = (object)val4; } CharacterBody.OnTakeDamageServer += (hook_OnTakeDamageServer)obj4; object obj5 = <>O.<4>__Antler_FixWrongAuth; if (obj5 == null) { Manipulator val5 = Antler_FixWrongAuth; <>O.<4>__Antler_FixWrongAuth = val5; obj5 = (object)val5; } CharacterBody.RpcRequestShardInfoClient += (Manipulator)obj5; object obj6 = <>O.<5>__Antler_FixNullRefOnNullMotor; if (obj6 == null) { hook_RpcRequestShardInfoClient val6 = Antler_FixNullRefOnNullMotor; <>O.<5>__Antler_FixNullRefOnNullMotor = val6; obj6 = (object)val6; } CharacterBody.RpcRequestShardInfoClient += (hook_RpcRequestShardInfoClient)obj6; } private static void Antler_FixNullRefOnNullMotor(orig_RpcRequestShardInfoClient orig, CharacterBody self) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self.characterMotor)) { orig.Invoke(self); return; } Quaternion val = Quaternion.Euler(0f, Random.Range(-45f, 45f), 0f); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(self.inputBank.aimDirection.x, 0f, self.inputBank.aimDirection.z); Vector3 val3 = val * val2; Vector3 val4 = ((Component)self).gameObject.transform.position + val3 * Random.Range(15f, 30f); NodeGraph groundNodes = SceneInfo.instance.groundNodes; NodeIndex val5 = groundNodes.FindClosestNode(val4, (HullClassification)0, float.PositiveInfinity); if (groundNodes.GetNodePosition(val5, ref val4)) { float num = HullDef.Find((HullClassification)0).radius * 0.7f; if (!HGPhysics.DoesOverlapSphere(val4 + Vector3.up * (num + 0.25f), num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.defaultLayer)).mask) | LayerMask.op_Implicit(CommonMasks.fakeActorLayers) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.debris)).mask), (QueryTriggerInteraction)0)) { self.CallCmdSpawnShard(val4); } } } private static void Antler_FixWrongAuth(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "UnityEngine.Networking.NetworkBehaviour", "get_hasAuthority") })) { val.Remove(); val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody body) => body.hasEffectiveAuthority)); } else { Debug.LogWarning((object)"IL Failed : Antler_FixWrongAuth"); } } private static void WEchoFirstHitIntoDanger(orig_OnTakeDamageServer orig, CharacterBody self, DamageReport damageReport) { if (damageReport.damageInfo.firstHitOfDelayedDamageSecondHalf) { self.outOfDangerStopwatch = 0f; } orig.Invoke(self, damageReport); } private static void FixWarpedEchoNotUsingArmor(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_006d: 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) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "DelayedDamage") }); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 8) })) { val.Emit(OpCodes.Ldloc, 7); val.EmitDelegate<Func<float, float, float>>((Func<float, float, float>)((float aaa, float bbb) => bbb)); } else { Debug.LogWarning((object)"IL Failed : FixWarpedEchoNotUsingArmor"); } if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 50) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<float, HealthComponent, DamageInfo, float>>((Func<float, HealthComponent, DamageInfo, float>)delegate(float damage, HealthComponent self, DamageInfo damageInfo) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //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_002d: Invalid comparison between Unknown and I4 if (self.body.hasOneShotProtection && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)262144)) != 262144) { float num = (self.fullCombinedHealth + self.barrier) * (1f - self.body.oneShotProtectionFraction); float num2 = Mathf.Max(0f, num - self.serverDamageTakenThisUpdate); float num3 = damage; damage = Mathf.Min(damage, num2); if (damage != num3) { Debug.Log((object)"Trigger Warped OSP"); } } return damage; }); } else { Debug.LogWarning((object)"IL Failed : WARPED OSP FIX"); } } private static void FixEchoOSP(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int num = -1; int num2 = -1; int num3 = -1; val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buff", "DelayedDamageBuff") }); val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchNewobj(x, "RoR2.Orbs.SimpleLightningStrikeOrb") }); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.Orbs.GenericDamageOrb", "isCrit") })) { ILCursor val2 = val.Emit(OpCodes.Break); } else { Debug.LogWarning((object)"IL Failed : FixChargedPerferatorCrit"); } } public static void FixChargedPerferatorCrit(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "LightningStrikeOnHit") }); val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchNewobj(x, "RoR2.Orbs.SimpleLightningStrikeOrb") }); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.Orbs.GenericDamageOrb", "isCrit") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool isCrit, DamageInfo damageInfo) => damageInfo.crit)); } else { Debug.LogWarning((object)"IL Failed : FixChargedPerferatorCrit"); } } private static void FixWarpedEchoE8(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "RoR2.Run", "get_instance"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Run", "get_selectedDifficulty"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 10) }); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "delayedDamageSecondHalf") })) { val.Remove(); val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)((DamageInfo damageInfo) => false)); } else { Debug.LogWarning((object)"IL Failed : FixWarpedEchoE8"); } } } public class ItemTags { public static ItemTag evoBlacklistTag = (ItemTag)94; public static void Start() { //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) //IL_001a: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected I4, but got Unknown BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier1Item.asset").WaitForCompletion(); BasicPickupDropTable val2 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier2Item.asset").WaitForCompletion(); BasicPickupDropTable val3 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier3Item.asset").WaitForCompletion(); ArenaMonsterItemDropTable val4 = Addressables.LoadAssetAsync<ArenaMonsterItemDropTable>((object)"RoR2/Base/arena/dtArenaMonsterTier1.asset").WaitForCompletion(); ArenaMonsterItemDropTable val5 = Addressables.LoadAssetAsync<ArenaMonsterItemDropTable>((object)"RoR2/Base/arena/dtArenaMonsterTier2.asset").WaitForCompletion(); ArenaMonsterItemDropTable val6 = Addressables.LoadAssetAsync<ArenaMonsterItemDropTable>((object)"RoR2/Base/arena/dtArenaMonsterTier3.asset").WaitForCompletion(); BasicPickupDropTable val7 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtAISafeTier1Item.asset").WaitForCompletion(); BasicPickupDropTable val8 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtAISafeTier2Item.asset").WaitForCompletion(); BasicPickupDropTable val9 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtAISafeTier3Item.asset").WaitForCompletion(); ItemTag[] array = new ItemTag[5]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ItemTag[] bannedItemTags = (ItemTag[])(object)array; ItemTag[] array2 = new ItemTag[9]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); array2[4] = (ItemTag)(int)evoBlacklistTag; ItemTag[] bannedItemTags2 = (ItemTag[])(object)array2; ItemTag[] array3 = new ItemTag[8]; RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ItemTag[] bannedItemTags3 = (ItemTag[])(object)array3; val.bannedItemTags = bannedItemTags2; val2.bannedItemTags = bannedItemTags2; val3.bannedItemTags = bannedItemTags2; val4.bannedItemTags = bannedItemTags3; val5.bannedItemTags = bannedItemTags3; val6.bannedItemTags = bannedItemTags3; val7.bannedItemTags = bannedItemTags; val8.bannedItemTags = bannedItemTags; val9.bannedItemTags = bannedItemTags; } public static void CallLate() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) ref ItemTag[] tags = ref Items.CloverVoid.tags; ItemTag val = (ItemTag)23; ArrayUtils.ArrayAppend<ItemTag>(ref tags, ref val); ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.FlatHealth.tags, 1, 1); ref ItemTag[] tags2 = ref Items.BonusGoldPackOnKill.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags2, ref val); ref ItemTag[] tags3 = ref Items.MoveSpeedOnKill.tags; val = (ItemTag)6; ArrayUtils.ArrayAppend<ItemTag>(ref tags3, ref val); ref ItemTag[] tags4 = ref Items.MushroomVoid.tags; val = (ItemTag)8; ArrayUtils.ArrayAppend<ItemTag>(ref tags4, ref val); ref ItemTag[] tags5 = ref Items.MonstersOnShrineUse.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags5, ref val); ref ItemTag[] tags6 = ref Items.GoldOnHit.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags6, ref val); ref ItemTag[] tags7 = ref Items.LunarTrinket.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags7, ref val); ref ItemTag[] tags8 = ref Items.FocusConvergence.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags8, ref val); ref ItemTag[] tags9 = ref Items.OnLevelUpFreeUnlock.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags9, ref val); ref ItemTag[] tags10 = ref Items.MushroomVoid.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags10, ref val); Items.ParentEgg.tags[0] = (ItemTag)2; if (WConfig.cfgItemTags.Value) { ArrayUtils.ArrayAppend<ItemTag>(ref Items.FlatHealth.tags, ref evoBlacklistTag); ref ItemTag[] tags11 = ref Items.Infusion.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags11, ref val); ArrayUtils.ArrayAppend<ItemTag>(ref Items.PrimarySkillShuriken.tags, ref evoBlacklistTag); ref ItemTag[] tags12 = ref Items.NovaOnHeal.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags12, ref val); ArrayUtils.ArrayAppend<ItemTag>(ref Items.BarrierOnOverHeal.tags, ref evoBlacklistTag); ArrayUtils.ArrayAppend<ItemTag>(ref Items.MoreMissile.tags, ref evoBlacklistTag); ref ItemTag[] tags13 = ref Items.TitanGoldDuringTP.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags13, ref val); ref ItemTag[] tags14 = ref Items.SprintWisp.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags14, ref val); ref ItemTag[] tags15 = ref Items.SiphonOnLowHealth.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags15, ref val); ref ItemTag[] tags16 = ref Items.MinorConstructOnKill.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags16, ref val); ref ItemTag[] tags17 = ref Items.RoboBallBuddy.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags17, ref val); ref ItemTag[] tags18 = ref Items.LunarSun.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags18, ref val); ref ItemTag[] tags19 = ref Items.RandomlyLunar.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags19, ref val); ref ItemTag[] tags20 = ref Items.ElementalRingVoid.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags20, ref val); ref ItemTag[] tags21 = ref Items.ExplodeOnDeathVoid.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags21, ref val); ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("WatchMetronome")); if ((Object)(object)itemDef != (Object)null) { ref ItemTag[] tags22 = ref itemDef.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags22, ref val); } itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("VV_ITEM_EHANCE_VIALS_ITEM")); if ((Object)(object)itemDef != (Object)null) { ref ItemTag[] tags23 = ref itemDef.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags23, ref val); } ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.BarrierOnKill.tags, 0, 1); ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.Infusion.tags, 0, 1); ref ItemTag[] tags24 = ref Items.TeleportOnLowHealth.tags; val = (ItemTag)2; ArrayUtils.ArrayAppend<ItemTag>(ref tags24, ref val); ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.HeadHunter.tags, 0, 1); ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.BarrierOnOverHeal.tags, 0, 1); ref ItemTag[] tags25 = ref Items.NovaOnHeal.tags; val = (ItemTag)2; ArrayUtils.ArrayAppend<ItemTag>(ref tags25, ref val); ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.Knurl.tags, 0, 1); Items.RandomDamageZone.tags[0] = (ItemTag)1; Items.HalfSpeedDoubleHealth.tags[0] = (ItemTag)2; Items.LunarSun.tags[0] = (ItemTag)1; Items.LunarUtilityReplacement.tags[0] = (ItemTag)2; ref ItemTag[] tags26 = ref Items.ShieldOnly.tags; val = (ItemTag)2; ArrayUtils.ArrayAppend<ItemTag>(ref tags26, ref val); } } } public class PrayerBeadsStorage : MonoBehaviour { public int lastSeenBeadAmount; } public class PrayerBeads { [CompilerGenerated] private static class <>O { public static hook_Awake <0>__BuffTracker_ClientFix; public static Manipulator <1>__BuffTracker_SetBuffCount_FixAmount; public static hook_OnBeadReset <2>__CharacterMaster_OnBeadReset; } public static void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown object obj = <>O.<0>__BuffTracker_ClientFix; if (obj == null) { hook_Awake val = BuffTracker_ClientFix; <>O.<0>__BuffTracker_ClientFix = val; obj = (object)val; } CharacterBody.Awake += (hook_Awake)obj; object obj2 = <>O.<1>__BuffTracker_SetBuffCount_FixAmount; if (obj2 == null) { Manipulator val2 = BuffTracker_SetBuffCount_FixAmount; <>O.<1>__BuffTracker_SetBuffCount_FixAmount = val2; obj2 = (object)val2; } CharacterBody.RecalculateStats += (Manipulator)obj2; object obj3 = <>O.<2>__CharacterMaster_OnBeadReset; if (obj3 == null) { hook_OnBeadReset val3 = CharacterMaster_OnBeadReset; <>O.<2>__CharacterMaster_OnBeadReset = val3; obj3 = (object)val3; } CharacterMaster.OnBeadReset += (hook_OnBeadReset)obj3; } private static void CharacterMaster_OnBeadReset(orig_OnBeadReset orig, CharacterMaster self, bool gainedStats) { orig.Invoke(self, gainedStats); GameObject bodyObject = self.GetBodyObject(); if ((Object)(object)bodyObject != (Object)null) { bodyObject.GetComponent<PrayerBeadsStorage>().lastSeenBeadAmount = 0; } } private static void BuffTracker_ClientFix(orig_Awake orig, CharacterBody self) { orig.Invoke(self); ((Component)self).gameObject.AddComponent<PrayerBeadsStorage>(); } private static void BuffTracker_SetBuffCount_FixAmount(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "extraStatsOnLevelUpCount_CachedLastApplied") })) { val.EmitDelegate<Func<CharacterBody, CharacterBody>>((Func<CharacterBody, CharacterBody>)delegate(CharacterBody body) { int buffCount2 = body.GetBuffCount(Buffs.ExtraStatsOnLevelUpBuff); if (buffCount2 > 0) { PrayerBeadsStorage component2 = ((Component)body).GetComponent<PrayerBeadsStorage>(); component2.lastSeenBeadAmount = buffCount2; } return body; }); } else { Debug.LogWarning((object)"IL Failed : PrayerAttemptToFixClients"); } if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ExtraStatsOnLevelUpBuff"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, "RoR2.CharacterBody", "GetBuffCount") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<int, CharacterBody, int>>((Func<int, CharacterBody, int>)delegate(int buffCount, CharacterBody body) { PrayerBeadsStorage component = ((Component)body).GetComponent<PrayerBeadsStorage>(); return (component.lastSeenBeadAmount > buffCount) ? component.lastSeenBeadAmount : buffCount; }); } else { Debug.LogWarning((object)"IL Failed : PrayerAttemptToFixClients2"); } } } public class Simualcrum { [CompilerGenerated] private static class <>O { public static Manipulator <0>__FixRequestIndicatorsClient; public static hook_OnEnter <1>__Waiting_SetRadius; public static hook_OverrideRuleChoices <2>__ForceSotVOn; } public static void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0069: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown object obj = <>O.<0>__FixRequestIndicatorsClient; if (obj == null) { Manipulator val = FixRequestIndicatorsClient; <>O.<0>__FixRequestIndicatorsClient = val; obj = (object)val; } InfiniteTowerWaveController.FixedUpdate += (Manipulator)obj; object obj2 = <>O.<1>__Waiting_SetRadius; if (obj2 == null) { hook_OnEnter val2 = Waiting_SetRadius; <>O.<1>__Waiting_SetRadius = val2; obj2 = (object)val2; } AwaitingActivation.OnEnter += (hook_OnEnter)obj2; object obj3 = <>O.<2>__ForceSotVOn; if (obj3 == null) { hook_OverrideRuleChoices val3 = ForceSotVOn; <>O.<2>__ForceSotVOn = val3; obj3 = (object)val3; } InfiniteTowerRun.OverrideRuleChoices += (hook_OverrideRuleChoices)obj3; FogDamageController component = Addressables.LoadAssetAsync<GameObject>((object)"9c7ca1b454882464f90010d3a68b6795").WaitForCompletion().GetComponent<FogDamageController>(); component.healthFractionRampIncreaseCooldown = 0f; } public static void CallLate() { //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) if (!Chainloader.PluginInfos.ContainsKey("Wolfo.SimulacrumAdditions")) { InfiniteTowerRun component = Addressables.LoadAssetAsync<GameObject>((object)"ba84d17b27db8b84d925071b4af1e352").WaitForCompletion().GetComponent<InfiniteTowerRun>(); ArrayUtils.ArrayAppend<ItemDef>(ref component.blacklistedItems, ref Items.ExtraShrineItem); } } private static void ForceSotVOn(orig_OverrideRuleChoices orig, InfiniteTowerRun self, RuleChoiceMask mustInclude, RuleChoiceMask mustExclude, ulong runSeed) { orig.Invoke(self, mustInclude, mustExclude, runSeed); RuleDef val = RuleCatalog.FindRuleDef("Expansions.DLC1"); RuleChoiceDef val2 = ((val != null) ? val.FindChoice("On") : null); if (val2 != null) { ((Run)self).ForceChoice(mustInclude, mustExclude, val2); } } public static void Waiting_SetRadius(orig_OnEnter orig, AwaitingActivation self) { orig.Invoke(self); InfiniteTowerRun component = ((Component)Run.instance).GetComponent<InfiniteTowerRun>(); if (!Object.op_Implicit((Object)(object)component.safeWardController)) { component.safeWardController = ((EntityState)self).gameObject.GetComponent<InfiniteTowerSafeWardController>(); } } public static void FixRequestIndicatorsClient(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CombatSquad", "get_readOnlyMembersList") }); if (val.TryGotoPrev((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.InfiniteTowerWaveController", "combatSquad") })) { val.EmitDelegate<Func<InfiniteTowerWaveController, InfiniteTowerWaveController>>((Func<InfiniteTowerWaveController, InfiniteTowerWaveController>)delegate(InfiniteTowerWaveController wave) { if (wave.combatSquad.readOnlyMembersList.Count == 0) { Debug.Log((object)"Couln't do indicators the normal way"); for (int i = 0; wave.combatSquad.membersList.Count > i; i++) { wave.RequestIndicatorForMaster(wave.combatSquad.membersList[i]); } } return wave; }); Debug.Log((object)"IL Found : IL.RoR2.InfiniteTowerWaveController.FixedUpdate"); } else { Debug.LogWarning((object)"IL Failed : IL.RoR2.InfiniteTowerWaveController.FixedUpdate"); } } } public class Audio { [CompilerGenerated] private static class <>O { public static Manipulator <0>__WarBondsNoise_OnlyIfActuallyMissile; public static hook_Start <1>__LoadMulTSoundsForScrapper; public static hook_OnEnter <2>__FixClientNoiseSpam; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_PreStartClient <>9__0_0; public static hook_DropPickup <>9__0_1; public static hook_OnEnter <>9__0_2; public static hook_OnEnter <>9__0_3; public static Func<Instruction, bool> <>9__4_1; public static Func<GameObject, BarrageOnBossBehaviour, GameObject> <>9__4_0; internal void <UnusedSounds>b__0_0(orig_PreStartClient orig, ShopTerminalBehavior self) { orig.Invoke(self); if (((Object)self).name.StartsWith("LunarCauldron,") || ((Object)self).name.StartsWith("ShrineCleanse")) { Util.PlaySound("Play_ui_obj_lunarPool_idle_loop", ((Component)self).gameObject); Util.PlaySound("Play_ui_obj_lunarPool_idle_loop", ((Component)self).gameObject); Util.PlaySound("Play_ui_obj_lunarPool_idle_loop", ((Component)self).gameObject); } } internal void <UnusedSounds>b__0_1(orig_DropPickup orig, ShopTerminalBehavior self) { orig.Invoke(self); if (((Object)self).name.StartsWith("LunarCauldron") || ((Object)self).name.StartsWith("ShrineCleanse")) { Util.PlaySound("Play_ui_obj_lunarPool_activate", ((Component)self).gameObject); Util.PlaySound("Play_ui_obj_lunarPool_activate", ((Component)self).gameObject); Util.PlaySound("Play_ui_obj_lunarPool_activate", ((Component)self).gameObject); } } internal void <UnusedSounds>b__0_2(orig_OnEnter orig, Sit self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).outer).gameObject)) { Util.PlaySound(Sit.soundString, ((Component)((EntityState)self).outer).gameObject); } } internal void <UnusedSounds>b__0_3(orig_OnEnter orig, Detonate self) { orig.Invoke(self); Util.PlaySound("Play_item_lunar_specialReplace_apply", ((Component)((EntityState)self).outer).gameObject); } internal bool <WarBondsNoise_OnlyIfActuallyMissile>b__4_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.BarrageOnBossBehaviour", "missileStartPrefab"); } internal GameObject <WarBondsNoise_OnlyIfActuallyMissile>b__4_0(GameObject effect, BarrageOnBossBehaviour self) { if (self.barrageQuantity == 0) { return null; } return effect; } } public static void UnusedSounds() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown object obj = <>c.<>9__0_0; if (obj == null) { hook_PreStartClient val = delegate(orig_PreStartClient orig, ShopTerminalBehavior self) { orig.Invoke(self); if (((Object)self).name.StartsWith("LunarCauldron,") || ((Object)self).name.StartsWith("ShrineCleanse")) { Util.PlaySound("Play_ui_obj_lunarPool_idle_loop", ((Component)self).gameObject); Util.PlaySound("Play_ui_obj_lunarPool_idle_loop", ((Component)self).gameObject); Util.PlaySound("Play_ui_obj_lunarPool_idle_loop", ((Component)self).gameObject); } }; <>c.<>9__0_0 = val; obj = (object)val; } ShopTerminalBehavior.PreStartClient += (hook_PreStartClient)obj; object obj2 = <>c.<>9__0_1; if (obj2 == null) { hook_DropPickup val2 = delegate(orig_DropPickup orig, ShopTerminalBehavior self) { orig.Invoke(self); if (((Object)self).name.StartsWith("LunarCauldron") || ((Object)self).name.StartsWith("ShrineCleanse")) { Util.PlaySound("Play_ui_obj_lunarPool_activate", ((Component)self).gameObject); Util.PlaySound("Play_ui_obj_lunarPool_activate", ((Component)self).gameObject); Util.PlaySound("Play_ui_obj_lunarPool_activate", ((Component)self).gameObject); } }; <>c.<>9__0_1 = val2; obj2 = (object)val2; } ShopTerminalBehavior.DropPickup += (hook_DropPickup)obj2; object obj3 = <>c.<>9__0_2; if (obj3 == null) { hook_OnEnter val3 = delegate(orig_OnEnter orig, Sit self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).outer).gameObject)) { Util.PlaySound(Sit.soundString, ((Component)((EntityState)self).outer).gameObject); } }; <>c.<>9__0_2 = val3; obj3 = (object)val3; } Sit.OnEnter += (hook_OnEnter)obj3; object obj4 = <>c.<>9__0_3; if (obj4 == null) { hook_OnEnter val4 = delegate(orig_OnEnter orig, Detonate self) { orig.Invoke(self); Util.PlaySound("Play_item_lunar_specialReplace_apply", ((Component)((EntityState)self).outer).gameObject); }; <>c.<>9__0_3 = val4; obj4 = (object)val4; } Detonate.OnEnter += (hook_OnEnter)obj4; } public static void Start() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: 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) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or mi