Decompiled source of WolfFixes v1.1.5
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.Fauna; using EntityStates.GlobalSkills.LunarDetonator; using EntityStates.InfiniteTowerSafeWard; using EntityStates.LemurianBruiserMonster; using EntityStates.LemurianMonster; using EntityStates.MajorConstruct.Weapon; using EntityStates.Merc; using EntityStates.ScavMonster; using EntityStates.VagrantNovaItem; using HG; using HG.Reflection; using IL.EntityStates.CaptainSupplyDrop; using IL.EntityStates.Commando.CommandoWeapon; 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.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.ExpansionManagement; using RoR2.Hologram; using RoR2.Items; 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; [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+4a455151a9d6fd7ed99abe94b32c196e1a2712e7")] [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__1_0; public static hook_OnExit <>9__1_1; public static Func<Instruction, bool> <>9__5_1; public static Func<bool, ProjectileDamage, bool> <>9__5_0; public static Func<Instruction, bool> <>9__11_1; public static Func<int, int> <>9__11_0; internal void <Start>b__1_0(orig_OnEnter orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } } internal void <Start>b__1_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__5_1(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "RoR2.BulletAttack", "isCrit"); } internal bool <FixCaptainBeaconNoCrit>b__5_0(bool a, ProjectileDamage projectileDamage) { return projectileDamage.crit; } internal bool <CommandoReloadStateRemove>b__11_1(Instruction x) { return ILPatternMatchingExt.MatchCallvirt(x, "RoR2.GenericSkill", "get_stock"); } internal int <CommandoReloadStateRemove>b__11_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) 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>(); } } 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__1_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__1_0 = val2; obj2 = (object)val2; } Spawn.OnEnter += (hook_OnEnter)obj2; object obj3 = <>c.<>9__1_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__1_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_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; } 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 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 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_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; } } 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 ItemsAndEquipment { [CompilerGenerated] private static class <>O { public static Manipulator <0>__FixSawmarang; public static Manipulator <1>__FixWarpedEchoE8; public static hook_HealthComponentToTransform <2>__FixTwisteds_NotWorkingOnPlayers; public static hook_SetupWings <3>__BugWingsAlways_SetupWings; public static hook_OnDisable <4>__BugWingsAlways_OnDisable; public static Manipulator <5>__FixChargedPerferatorCrit; } 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 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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>__FixWarpedEchoE8; if (obj2 == null) { Manipulator val2 = FixWarpedEchoE8; <>O.<1>__FixWarpedEchoE8 = val2; obj2 = (object)val2; } HealthComponent.TakeDamageProcess += (Manipulator)obj2; object obj3 = <>O.<2>__FixTwisteds_NotWorkingOnPlayers; if (obj3 == null) { hook_HealthComponentToTransform val3 = FixTwisteds_NotWorkingOnPlayers; <>O.<2>__FixTwisteds_NotWorkingOnPlayers = val3; obj3 = (object)val3; } Util.HealthComponentToTransform += (hook_HealthComponentToTransform)obj3; object obj4 = <>O.<3>__BugWingsAlways_SetupWings; if (obj4 == null) { hook_SetupWings val4 = BugWingsAlways_SetupWings; <>O.<3>__BugWingsAlways_SetupWings = val4; obj4 = (object)val4; } JetpackController.SetupWings += (hook_SetupWings)obj4; object obj5 = <>O.<4>__BugWingsAlways_OnDisable; if (obj5 == null) { hook_OnDisable val5 = BugWingsAlways_OnDisable; <>O.<4>__BugWingsAlways_OnDisable = val5; obj5 = (object)val5; } JetpackController.OnDisable += (hook_OnDisable)obj5; object obj6 = <>O.<5>__FixChargedPerferatorCrit; if (obj6 == null) { Manipulator val6 = FixChargedPerferatorCrit; <>O.<5>__FixChargedPerferatorCrit = val6; obj6 = (object)val6; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj6; } 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 Transform FixTwisteds_NotWorkingOnPlayers(orig_HealthComponentToTransform orig, HealthComponent healthComponent) { if (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 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"); } } 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) { //IL_002e: 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) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self.targetBody) || !self.targetBody.isPlayerControlled || self.targetBody.inventory.currentEquipmentIndex == Equipment.Jetpack.equipmentIndex) { 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 DontDestroyIfJetpack : MonoBehaviour { public CharacterModel characterModel; public List<GameObject> storedWings; public List<ParentedPrefabDisplay> storedDisplays; 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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) index = Equipment.Jetpack.equipmentIndex; storedWings = new List<GameObject>(); storedDisplays = new List<ParentedPrefabDisplay>(); for (int num = characterModel.parentedPrefabDisplays.Count - 1; num >= 0; num--) { if (characterModel.parentedPrefabDisplays[num].equipmentIndex == index) { ParentedPrefabDisplay val = characterModel.parentedPrefabDisplays[num]; val.equipmentIndex = (EquipmentIndex)(-1); characterModel.parentedPrefabDisplays[num] = val; storedDisplays.Add(val); storedWings.Add(((ParentedPrefabDisplay)(ref val)).instance); } } } 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_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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) if (characterModel.currentEquipmentDisplayIndex == index) { for (int num = storedDisplays.Count - 1; num >= 0; num--) { ParentedPrefabDisplay value = storedDisplays[num]; value.equipmentIndex = index; storedDisplays[num] = value; } } else { for (int num2 = storedDisplays.Count - 1; num2 >= 0; num2--) { ParentedPrefabDisplay val = storedDisplays[num2]; ((ParentedPrefabDisplay)(ref val)).Undo(); } } Object.Destroy((Object)(object)this); } } 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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[8]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); array2[3] = (ItemTag)(int)evoBlacklistTag; val6.bannedItemTags = (val5.bannedItemTags = (val4.bannedItemTags = (val3.bannedItemTags = (val2.bannedItemTags = (val.bannedItemTags = (ItemTag[])(object)array2))))); val7.bannedItemTags = bannedItemTags; val8.bannedItemTags = bannedItemTags; val9.bannedItemTags = bannedItemTags; } public static void CallLate() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_005a: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: 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_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0267: 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_0307: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.FlatHealth.tags, 1, 1); ref ItemTag[] tags = ref Items.BonusGoldPackOnKill.tags; ItemTag val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags, ref val); ref ItemTag[] tags2 = ref Items.MoveSpeedOnKill.tags; val = (ItemTag)6; ArrayUtils.ArrayAppend<ItemTag>(ref tags2, ref val); ref ItemTag[] tags3 = ref Items.MushroomVoid.tags; val = (ItemTag)8; ArrayUtils.ArrayAppend<ItemTag>(ref tags3, ref val); ref ItemTag[] tags4 = ref Items.MonstersOnShrineUse.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags4, ref val); ref ItemTag[] tags5 = ref Items.GoldOnHit.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags5, ref val); ref ItemTag[] tags6 = ref Items.LunarTrinket.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags6, ref val); ref ItemTag[] tags7 = ref Items.FocusConvergence.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags7, ref val); ref ItemTag[] tags8 = ref Items.OnLevelUpFreeUnlock.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags8, ref val); ref ItemTag[] tags9 = ref Items.MushroomVoid.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags9, ref val); Items.ParentEgg.tags[0] = (ItemTag)2; if (WConfig.cfgItemTags.Value) { ArrayUtils.ArrayAppend<ItemTag>(ref Items.FlatHealth.tags, ref evoBlacklistTag); ref ItemTag[] tags10 = ref Items.Infusion.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags10, ref val); ArrayUtils.ArrayAppend<ItemTag>(ref Items.PrimarySkillShuriken.tags, ref evoBlacklistTag); ref ItemTag[] tags11 = ref Items.NovaOnHeal.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags11, ref val); ArrayUtils.ArrayAppend<ItemTag>(ref Items.BarrierOnOverHeal.tags, ref evoBlacklistTag); ArrayUtils.ArrayAppend<ItemTag>(ref Items.MoreMissile.tags, ref evoBlacklistTag); ref ItemTag[] tags12 = ref Items.TitanGoldDuringTP.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags12, ref val); ref ItemTag[] tags13 = ref Items.SprintWisp.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags13, ref val); ref ItemTag[] tags14 = ref Items.SiphonOnLowHealth.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags14, ref val); ref ItemTag[] tags15 = ref Items.MinorConstructOnKill.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags15, ref val); ref ItemTag[] tags16 = ref Items.RoboBallBuddy.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags16, ref val); ref ItemTag[] tags17 = ref Items.MinorConstructOnKill.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags17, ref val); ref ItemTag[] tags18 = ref Items.CaptainDefenseMatrix.tags; val = (ItemTag)12; ArrayUtils.ArrayAppend<ItemTag>(ref tags18, ref val); ref ItemTag[] tags19 = ref Items.LunarSun.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags19, ref val); ref ItemTag[] tags20 = ref Items.RandomlyLunar.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags20, ref val); ref ItemTag[] tags21 = ref Items.ElementalRingVoid.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags21, ref val); ref ItemTag[] tags22 = ref Items.ExplodeOnDeathVoid.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags22, ref val); ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("WatchMetronome")); if ((Object)(object)itemDef != (Object)null) { ref ItemTag[] tags23 = ref itemDef.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags23, ref val); } itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("VV_ITEM_EHANCE_VIALS_ITEM")); if ((Object)(object)itemDef != (Object)null) { ref ItemTag[] tags24 = ref itemDef.tags; val = (ItemTag)4; ArrayUtils.ArrayAppend<ItemTag>(ref tags24, ref val); } ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.Infusion.tags, 0, 1); ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.HeadHunter.tags, 0, 1); ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.BarrierOnKill.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); ref ItemTag[] tags26 = ref Items.ImmuneToDebuff.tags; val = (ItemTag)2; ArrayUtils.ArrayAppend<ItemTag>(ref tags26, ref val); Items.RandomDamageZone.tags[0] = (ItemTag)1; Items.HalfSpeedDoubleHealth.tags[0] = (ItemTag)2; Items.LunarSun.tags[0] = (ItemTag)1; Items.LunarUtilityReplacement.tags[0] = (ItemTag)2; Items.ShieldOnly.tags[0] = (ItemTag)2; ref ItemTag[] tags27 = ref Items.HalfSpeedDoubleHealth.tags; val = (ItemTag)2; ArrayUtils.ArrayAppend<ItemTag>(ref tags27, ref val); ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref Items.Knurl.tags, 0, 1); ref ItemTag[] tags28 = ref Items.ElementalRingVoid.tags; val = (ItemTag)3; ArrayUtils.ArrayAppend<ItemTag>(ref tags28, 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_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; } 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 missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_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_00db: Expected O, but got Unknown UnusedSounds(); object obj = <>O.<0>__WarBondsNoise_OnlyIfActuallyMissile; if (obj == null) { Manipulator val = WarBondsNoise_OnlyIfActuallyMissile; <>O.<0>__WarBondsNoise_OnlyIfActuallyMissile = val; obj = (object)val; } BarrageOnBossBehaviour.StartMissileCountdown += (Manipulator)obj; GameObject val2 = LegacyResourcesAPI.Load<GameObject>("Prefabs/itempickups/VoidOrb"); AkEvent[] components = val2.GetComponents<AkEvent>(); foreach (AkEvent val3 in components) { Object.Destroy((Object)(object)val3); } Object.Destroy((Object)(object)val2.GetComponent<AkGameObj>()); PlaySoundOnEvent val4 = val2.AddComponent<PlaySoundOnEvent>(); val4.triggeringEvent = (PlaySoundEvent)2; val4.soundEvent = "Play_UI_item_spawn_tier3"; val4 = val2.AddComponent<PlaySoundOnEvent>(); val4.triggeringEvent = (PlaySoundEvent)int.MinValue; val4.soundEvent = "Play_nullifier_death_vortex_explode"; object obj2 = <>O.<1>__LoadMulTSoundsForScrapper; if (obj2 == null) { hook_Start val5 = LoadMulTSoundsForScrapper; <>O.<1>__LoadMulTSoundsForScrapper = val5; obj2 = (object)val5; } SoundbankLoader.Start += (hook_Start)obj2; object obj3 = <>O.<2>__FixClientNoiseSpam; if (obj3 == null) { hook_OnEnter val6 = FixClientNoiseSpam; <>O.<2>__FixClientNoiseSpam = val6; obj3 = (object)val6; } Detonate.OnEnter += (hook_OnEnter)obj3; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/RoboBallBoss/RoboBallMiniBody.prefab").WaitForCompletion().GetComponent<SfxLocator>() .aliveLoopStart = "Play_roboBall_attack2_mini_spawn"; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/RoboBallBuddy/RoboBallRedBuddyBody.prefab").WaitForCompletion().GetComponent<SfxLocator>() .aliveLoopStart = "Play_roboBall_attack2_mini_spawn"; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/RoboBallBuddy/RoboBallGreenBuddyBody.prefab").WaitForCompletion().GetComponent<SfxLocator>() .aliveLoopStart = "Play_roboBall_attack2_mini_spawn"; PlaySoundOnEvent val7 = Addressables.LoadAssetAsync<GameObject>((object)"8fa98ca49d9137045a738929c63567c7").WaitForCompletion().AddComponent<PlaySoundOnEvent>(); val7.soundEvent = "Play_treeBot_m1_impact"; val7.triggeringEvent = (PlaySoundEvent)int.MinValue; val7 = Addressables.LoadAssetAsync<GameObject>((object)"1e58dd828d88f5d46bd5ac5a33bbd589").WaitForCompletion().AddComponent<PlaySoundOnEvent>(); val7.soundEvent = "Play_treeBot_m1_impact"; val7.triggeringEvent = (PlaySoundEvent)int.MinValue; } private static void FixClientNoiseSpam(orig_OnEnter orig, Detonate self) { orig.Invoke(self); if (NetworkServer.active) { return; } float num = 0.25f; ((EntityState)self).PlayAnimation("Base", BaseSpiderMineState.IdleToArmedStateHash, BaseSpiderMineState.IdleToArmedParamHash, num); foreach (string item in self.childLocatorStringToDisable) { Transform val = ((BaseState)self).FindModelChild(item); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(false); } } } private static void LoadMulTSoundsForScrapper(orig_Start orig, SoundbankLoader self) { ref string[] soundbankStrings = ref self.soundbankStrings; string text = "char_Toolbot"; ArrayUtils.ArrayAppend<string>(ref soundbankStrings, ref text); orig.Invoke(self); } private static void WarBondsNoise_OnlyIfActuallyMissile(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.BarrageOnBossBehaviour", "missileStartPrefab") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<GameObject, BarrageOnBossBehaviour, GameObject>>((Func<GameObject, BarrageOnBossBehaviour, GameObject>)((GameObject effect, BarrageOnBossBehaviour self) => (self.barrageQuantity == 0) ? null : effect)); } else { Debug.LogWarning((object)"IL Failed: WarBondsNoise_OnlyIfActuallyMissile"); } } } public class RandomFixes { [CompilerGenerated] private static class <>O { public static hook_PreStartClient <0>__NewtAvailableFix12; public static hook_OnSyncShouldAttemptToSpawnShopPortal <1>__NewtAvailableFix2; public static hook_ShouldDisplayHologram <2>__DisableEmptyHologram; public static hook_ShouldDisplayHologram <3>__DisableEmptyHologram2; public static hook_OnExit <4>__ChargeState_OnExit; public static Manipulator <5>__FixChronocDisplayNullRefOnCorpse; } 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>__NewtAvailableFix12; if (obj == null) { hook_PreStartClient val = NewtAvailableFix12; <>O.<0>__NewtAvailableFix12 = val; obj = (object)val; } PortalStatueBehavior.PreStartClient += (hook_PreStartClient)obj; object obj2 = <>O.<1>__NewtAvailableFix2; if (obj2 == null) { hook_OnSyncShouldAttemptToSpawnShopPortal val2 = NewtAvailableFix2; <>O.<1>__NewtAvailableFix2 = val2; obj2 = (object)val2; } TeleporterInteraction.OnSyncShouldAttemptToSpawnShopPortal += (hook_OnSyncShouldAttemptToSpawnShopPortal)obj2; object obj3 = <>O.<2>__DisableEmptyHologram; if (obj3 == null) { hook_ShouldDisplayHologram val3 = DisableEmptyHologram; <>O.<2>__DisableEmptyHologram = val3; obj3 = (object)val3; } PurchaseInteraction.ShouldDisplayHologram += (hook_ShouldDisplayHologram)obj3; object obj4 = <>O.<3>__DisableEmptyHologram2; if (obj4 == null) { hook_ShouldDisplayHologram val4 = DisableEmptyHologram2; <>O.<3>__DisableEmptyHologram2 = val4; obj4 = (object)val4; } MultiShopController.ShouldDisplayHologram += (hook_ShouldDisplayHologram)obj4; object obj5 = <>O.<4>__ChargeState_OnExit; if (obj5 == null) { hook_OnExit val5 = ChargeState_OnExit; <>O.<4>__ChargeState_OnExit = val5; obj5 = (object)val5; } ChargeState.OnExit += (hook_OnExit)obj5; object obj6 = <>O.<5>__FixChronocDisplayNullRefOnCorpse; if (obj6 == null) { Manipulator val6 = FixChronocDisplayNullRefOnCorpse; <>O.<5>__FixChronocDisplayNullRefOnCorpse = val6; obj6 = (object)val6; } IncreaseDamageOnMultiKillItemDisplayUpdater.SetVisibleHologram += (Manipulator)obj6; } private static void FixChronocDisplayNullRefOnCorpse(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.MatchLdfld(x, "RoR2.IncreaseDamageOnMultiKillItemDisplayUpdater", "body") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<CharacterBody, IncreaseDamageOnMultiKillItemDisplayUpdater, CharacterBody>>((Func<CharacterBody, IncreaseDamageOnMultiKillItemDisplayUpdater, CharacterBody>)delegate(CharacterBody body, IncreaseDamageOnMultiKillItemDisplayUpdater self) { if (!Object.op_Implicit((Object)(object)body)) { Object.Destroy((Object)(object)self); return null; } return body; }); } else { Debug.LogWarning((object)"IL Failed : IncreaseDamageOnMultiKillItemDisplayUpdater"); } } private static void ChargeState_OnExit(orig_OnExit orig, ChargeState self) { if ((Object)(object)self.chargeVfxInstance != (Object)null) { EntityState.Destroy((Object)(object)self.chargeVfxInstance); } if ((Object)(object)self.areaIndicatorVfxInstance != (Object)null) { EntityState.Destroy((Object)(object)self.areaIndicatorVfxInstance); } orig.Invoke(self); } private static bool DisableEmptyHologram2(orig_ShouldDisplayHologram orig, MultiShopController self, GameObject viewer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)self.costType == 0) { return false; } return orig.Invoke(self, viewer); } private static bool DisableEmptyHologram(orig_ShouldDisplayHologram orig, PurchaseInteraction self, GameObject viewer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)self.costType == 0) { return false; } return orig.Invoke(self, viewer); } private static void NewtAvailableFix12(orig_PreStartClient orig, PortalStatueBehavior self) { orig.Invoke(self); ((Component)self).GetComponent<PurchaseInteraction>().setUnavailableOnTeleporterActivated = true; } private static void NewtAvailableFix2(orig_OnSyncShouldAttemptToSpawnShopPortal orig, TeleporterInteraction self, bool newValue) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 orig.Invoke(self, newValue); if (!newValue) { return; } PortalStatueBehavior[] array = Object.FindObjectsOfType<PortalStatueBehavior>(); foreach (PortalStatueBehavior val in array) { if ((int)val.portalType == 0) { PurchaseInteraction component = ((Component)val).GetComponent<PurchaseInteraction>(); if (Object.op_Implicit((Object)(object)component)) { component.Networkavailable = false; val.CallRpcSetPingable(((Component)val).gameObject, false); } } } } } public class ShrineShapingFixes { [CompilerGenerated] private static class <>O { public static Manipulator <0>__ShrineRezEffect; } 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>__ShrineRezEffect; if (obj == null) { Manipulator val = ShrineRezEffect; <>O.<0>__ShrineRezEffect = val; obj = (object)val; } EquipmentSlot.FireHealAndRevive += (Manipulator)obj; object obj2 = <>O.<0>__ShrineRezEffect; if (obj2 == null) { Manipulator val2 = ShrineRezEffect; <>O.<0>__ShrineRezEffect = val2; obj2 = (object)val2; } CharacterMaster.RespawnExtraLifeHealAndRevive += (Manipulator)obj2; object obj3 = <>O.<0>__ShrineRezEffect; if (obj3 == null) { Manipulator val3 = ShrineRezEffect; <>O.<0>__ShrineRezEffect = val3; obj3 = (object)val3; } CharacterMaster.RespawnExtraLifeShrine += (Manipulator)obj3; } private static void RezEffectOnDead(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.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "Immune") })) { val.EmitDelegate<Func<CharacterBody, CharacterBody>>((Func<CharacterBody, CharacterBody>)delegate(CharacterBody body) { //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_0024: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)body)) { GameObject val2 = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/HippoRezEffect"); EffectManager.SpawnEffect(val2, new EffectData { origin = body.transform.position, rotation = body.transform.rotation }, true); Util.PlaySound("Play_item_proc_extraLife", ((Component)body).gameObject); } return body; }); } else { Debug.LogWarning((object)"IL Failed : bro they forgot to make a rez effect2"); } } private static void ShrineRezEffect(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.MatchLdstr(x, "Prefabs/Effects/fxHealAndReviveGold") })) { val.Next.Operand = "Prefabs/Effects/HippoRezEffect"; } else { Debug.LogWarning((object)"IL Failed : bro they forgot to make a rez effect"); } } private static void CharacterMaster_RespawnExtraLifeShrine(orig_RespawnExtraLifeShrine orig, CharacterMaster self) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.bodyInstanceObject)) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/HippoRezEffect"), new EffectData { origin = self.deathFootPosition, rotation = self.bodyInstanceObject.transform.rotation }, true); } } } public class ShrineHalcyonFixes { [CompilerGenerated] private static class <>O { public static hook_SpendAllCreditsOnMapSpawns <0>__CombatDirector_SpendAllCreditsOnMapSpawns; public static hook_HalcyoniteShrineActivation <1>__CombatDirector_HalcyoniteShrineActivation; public static hook_IsDraining <2>__HalcyoniteShrineInteractable_IsDraining; public static hook_Awake <3>__MoreValuesForClients; public static hook_Start <4>__MoreValuesClient2; public static Manipulator <5>__DelayThunderMessage; } 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>__CombatDirector_SpendAllCreditsOnMapSpawns; if (obj == null) { hook_SpendAllCreditsOnMapSpawns val = CombatDirector_SpendAllCreditsOnMapSpawns; <>O.<0>__CombatDirector_SpendAllCreditsOnMapSpawns = val; obj = (object)val; } CombatDirector.SpendAllCreditsOnMapSpawns += (hook_SpendAllCreditsOnMapSpawns)obj; object obj2 = <>O.<1>__CombatDirector_HalcyoniteShrineActivation; if (obj2 == null) { hook_HalcyoniteShrineActivation val2 = CombatDirector_HalcyoniteShrineActivation; <>O.<1>__CombatDirector_HalcyoniteShrineActivation = val2; obj2 = (object)val2; } CombatDirector.HalcyoniteShrineActivation += (hook_HalcyoniteShrineActivation)obj2; object obj3 = <>O.<2>__HalcyoniteShrineInteractable_IsDraining; if (obj3 == null) { hook_IsDraining val3 = HalcyoniteShrineInteractable_IsDraining; <>O.<2>__HalcyoniteShrineInteractable_IsDraining = val3; obj3 = (object)val3; } HalcyoniteShrineInteractable.IsDraining += (hook_IsDraining)obj3; object obj4 = <>O.<3>__MoreValuesForClients; if (obj4 == null) { hook_Awake val4 = MoreValuesForClients; <>O.<3>__MoreValuesForClients = val4; obj4 = (object)val4; } HalcyoniteShrineInteractable.Awake += (hook_Awake)obj4; object obj5 = <>O.<4>__MoreValuesClient2; if (obj5 == null) { hook_Start val5 = MoreValuesClient2; <>O.<4>__MoreValuesClient2 = val5; obj5 = (object)val5; } HalcyoniteShrineInteractable.Start += (hook_Start)obj5; object obj6 = <>O.<5>__DelayThunderMessage; if (obj6 == null) { Manipulator val6 = DelayThunderMessage; <>O.<5>__DelayThunderMessage = val6; obj6 = (object)val6; } PortalSpawner.Start += (Manipulator)obj6; } private static void DelayThunderMessage(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.MatchLdfld(x, "RoR2.PortalSpawner", "spawnPreviewMessageToken") })) { val.EmitDelegate<Func<string, string>>((Func<str