Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of WolfFixes v1.3.6
WolfoFixes.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.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.Drone; using EntityStates.DroneCombiner; using EntityStates.Engi.SpiderMine; using EntityStates.Fauna; using EntityStates.GlobalSkills.LunarDetonator; using EntityStates.InfiniteTowerSafeWard; using EntityStates.LemurianBruiserMonster; using EntityStates.LemurianMonster; using EntityStates.QuestVolatileBattery; using EntityStates.ScavMonster; using EntityStates.SolusHeart; using EntityStates.SolusHeart.Death; using EntityStates.VagrantNovaItem; using HG; using HarmonyLib; using IL.EntityStates.CaptainSupplyDrop; using IL.EntityStates.Commando.CommandoWeapon; using IL.EntityStates.ShrineHalcyonite; using IL.RoR2; using IL.RoR2.Artifacts; using IL.RoR2.Items; using IL.RoR2.UI; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On; using On.EntityStates.Drone; using On.EntityStates.DroneCombiner; 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.QuestVolatileBattery; using On.EntityStates.ScavMonster; using On.EntityStates.SolusHeart.Death; using On.EntityStates.VagrantNovaItem; using On.RoR2; using On.RoR2.Artifacts; using On.RoR2.CharacterAI; using On.RoR2.Items; using On.RoR2.Stats; using On.RoR2.UI; using R2API; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterAI; using RoR2.CharacterSpeech; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; using WolfoLibrary; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Wolfo")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("A fix and library mod with various commands, methods and classes")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+20bc0b5b0d93e702bf58b23fb36c7e1e421be9e7")] [assembly: AssemblyProduct("WolfoFixes")] [assembly: AssemblyTitle("WolfoFixes")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WolfoFixes { internal class ArtifactFixes { [CompilerGenerated] private static class <>O { public static hook_CreateDoppelganger <0>__Vengence_NoUmbraForRemoteOpPlayers; public static hook_FindAiMasterIndexForBody <1>__Vengence_BreakingWithRemoteOp; public static hook_FixedUpdate <2>__Evol_SolusHeartSoftlockWithDios; public static hook_OnDestroy <3>__MetaMorph_StopDronesFollowingOperatorIfOperatorGone; public static hook_PromoteIfHonor <4>__EliteOnlyArtifactManager_PromoteIfHonor; public static Manipulator <5>__SwarmsVengenceGooboFix; } 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>__Vengence_NoUmbraForRemoteOpPlayers; if (obj == null) { hook_CreateDoppelganger val = Vengence_NoUmbraForRemoteOpPlayers; <>O.<0>__Vengence_NoUmbraForRemoteOpPlayers = val; obj = (object)val; } DoppelgangerInvasionManager.CreateDoppelganger += (hook_CreateDoppelganger)obj; object obj2 = <>O.<1>__Vengence_BreakingWithRemoteOp; if (obj2 == null) { hook_FindAiMasterIndexForBody val2 = Vengence_BreakingWithRemoteOp; <>O.<1>__Vengence_BreakingWithRemoteOp = val2; obj2 = (object)val2; } MasterCatalog.FindAiMasterIndexForBody += (hook_FindAiMasterIndexForBody)obj2; object obj3 = <>O.<2>__Evol_SolusHeartSoftlockWithDios; if (obj3 == null) { hook_FixedUpdate val3 = Evol_SolusHeartSoftlockWithDios; <>O.<2>__Evol_SolusHeartSoftlockWithDios = val3; obj3 = (object)val3; } MissionCompleted.FixedUpdate += (hook_FixedUpdate)obj3; object obj4 = <>O.<3>__MetaMorph_StopDronesFollowingOperatorIfOperatorGone; if (obj4 == null) { hook_OnDestroy val4 = MetaMorph_StopDronesFollowingOperatorIfOperatorGone; <>O.<3>__MetaMorph_StopDronesFollowingOperatorIfOperatorGone = val4; obj4 = (object)val4; } DroneTechController.OnDestroy += (hook_OnDestroy)obj4; object obj5 = <>O.<4>__EliteOnlyArtifactManager_PromoteIfHonor; if (obj5 == null) { hook_PromoteIfHonor val5 = EliteOnlyArtifactManager_PromoteIfHonor; <>O.<4>__EliteOnlyArtifactManager_PromoteIfHonor = val5; obj5 = (object)val5; } EliteOnlyArtifactManager.PromoteIfHonor += (hook_PromoteIfHonor)obj5; object obj6 = <>O.<5>__SwarmsVengenceGooboFix; if (obj6 == null) { Manipulator val6 = SwarmsVengenceGooboFix; <>O.<5>__SwarmsVengenceGooboFix = val6; obj6 = (object)val6; } SwarmsArtifactManager.OnSpawnCardOnSpawnedServerGlobal += (Manipulator)obj6; } 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 { WolfFixes.log.LogError((object)"IL Failed: SwarmsArtifactManager_OnSpawnCardOnSpawnedServerGlobal"); } } private static void EliteOnlyArtifactManager_PromoteIfHonor(orig_PromoteIfHonor orig, CharacterMaster instanceMaster, Xoroshiro128Plus rng, EliteDef[] eliteDefs) { orig.Invoke(instanceMaster, Run.instance.bossRewardRng, eliteDefs); } private static void Evol_SolusHeartSoftlockWithDios(orig_FixedUpdate orig, MissionCompleted self) { for (int i = 0; i < ((SolusWebMissionPhaseBaseState)self).combatSquad.readOnlyMembersList.Count; i++) { CharacterMaster val = ((SolusWebMissionPhaseBaseState)self).combatSquad.readOnlyMembersList[i]; if (Object.op_Implicit((Object)(object)val)) { CharacterBody body = val.GetBody(); if (Object.op_Implicit((Object)(object)body)) { val.TrueKill(); } } } orig.Invoke(self); } private static void MetaMorph_StopDronesFollowingOperatorIfOperatorGone(orig_OnDestroy orig, DroneTechController self) { orig.Invoke(self); self.followActive = false; foreach (DroneInfo allDrone in self.AllDrones) { Debug.Log((object)allDrone.droneDef); if (Object.op_Implicit((Object)(object)allDrone.commandReceiver)) { allDrone.commandReceiver.CommandFollow(false); allDrone.bodyStateMachine.SetNextStateToMain(); } } } private static void Vengence_NoUmbraForRemoteOpPlayers(orig_CreateDoppelganger orig, CharacterMaster srcCharacterMaster, Xoroshiro128Plus rng) { if (!Object.op_Implicit((Object)(object)srcCharacterMaster) || !srcCharacterMaster.GetInRemoteOp()) { orig.Invoke(srcCharacterMaster, rng); } } private static MasterIndex Vengence_BreakingWithRemoteOp(orig_FindAiMasterIndexForBody orig, BodyIndex bodyIndex) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_002e: Unknown result type (might be due to invalid IL or missing references) DroneIndex droneIndexFromBodyIndex = DroneCatalog.GetDroneIndexFromBodyIndex(bodyIndex); if ((int)droneIndexFromBodyIndex != -1) { BodyIndex bodyIndexFromDroneIndex = DroneCatalog.GetBodyIndexFromDroneIndex(droneIndexFromBodyIndex); if ((int)bodyIndexFromDroneIndex != -1) { return orig.Invoke(bodyIndexFromDroneIndex); } } return orig.Invoke(bodyIndex); } } internal class BodyFixes { [CompilerGenerated] private static class <>O { public static hook_OnEnter <0>__FixDumbFruit; public static Manipulator <1>__FixCaptainBeaconNoCrit; public static Manipulator <2>__CommandoReloadStateRemove; public static hook_OnSpawnedServer <3>__XI_GhostEliteMinionFix; public static hook_SetActiveEquipmentSlot <4>__MulT_DontHighlightEveryTime; public static hook_OnImpactServer <5>__DontSpawnBrokenDronesForDronesWithRevives; public static Manipulator <6>__ReplaceDroneCheckWithRemoteOpDroneCheck; public static hook_SetActiveEquipmentSlot <7>__FixMulTWeirdEquipmentThing; public static hook_CheckDroneHasItems <8>__CharacterBody_CheckDroneHasItems; public static hook_InheritMovementItems <9>__RequestedWarbannerBehavior; } public static void FixBarnalceMinorsSpammingNotImplementedWithOpsTransport(Action<PseudoCharacterMotor, Vector3> orig, PseudoCharacterMotor self, Vector3 newVelocity) { } private static void MulT_DontHighlightEveryTime(orig_SetActiveEquipmentSlot orig, Inventory self, byte slotIndex) { self.wasRecentlyExtraEquipmentSwapped = true; orig.Invoke(self, slotIndex); } 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_002a: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //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_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"1336d77e77299964884c3bd02757fde7").WaitForCompletion().GetComponent<CharacterBody>(); component.baseNameToken = "EQUIPMENT_DEATHPROJECTILE_NAME"; component.portraitIcon = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"dda5febead506894fa6e053cea042ddc").WaitForCompletion(); object obj = <>O.<0>__FixDumbFruit; if (obj == null) { hook_OnEnter val = FixDumbFruit; <>O.<0>__FixDumbFruit = val; obj = (object)val; } HabitatFruitDeathState.OnEnter += (hook_OnEnter)obj; HabitatFruitDeathState.deathSoundString = "Play_jellyfish_death"; HabitatFruitDeathState.healPackMaxVelocity = 60f; HabitatFruitDeathState.fractionalHealing = 0.15f; HabitatFruitDeathState.scale = 1f; object obj2 = <>O.<1>__FixCaptainBeaconNoCrit; if (obj2 == null) { Manipulator val2 = FixCaptainBeaconNoCrit; <>O.<1>__FixCaptainBeaconNoCrit = val2; obj2 = (object)val2; } HitGroundState.OnEnter += (Manipulator)obj2; object obj3 = <>O.<2>__CommandoReloadStateRemove; if (obj3 == null) { Manipulator val3 = CommandoReloadStateRemove; <>O.<2>__CommandoReloadStateRemove = val3; obj3 = (object)val3; } FirePistol2.FixedUpdate += (Manipulator)obj3; object obj4 = <>O.<3>__XI_GhostEliteMinionFix; if (obj4 == null) { hook_OnSpawnedServer val4 = XI_GhostEliteMinionFix; <>O.<3>__XI_GhostEliteMinionFix = val4; obj4 = (object)val4; } NetworkedBodySpawnSlot.OnSpawnedServer += (hook_OnSpawnedServer)obj4; Addressables.LoadAssetAsync<EntityStateConfiguration>((object)"04deef0aeeb41dc4aa4ad14f7f967526").WaitForCompletion().serializedFieldsCollection.serializedFields[3].fieldName = "baseDuration"; Addressables.LoadAssetAsync<GameObject>((object)"c00152ae354576245849336ff7e67ba6").WaitForCompletion().GetComponent<ProjectileExplosion>() .childrenDamageCoefficient = 1f / 35f; CharacterBody component2 = Addressables.LoadAssetAsync<GameObject>((object)"746b53f076ca9af4d89f67c981d2bbf9").WaitForCompletion().GetComponent<CharacterBody>(); component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x800); CharacterBody component3 = Addressables.LoadAssetAsync<GameObject>((object)"a0a8fa4272069874b9e538c59bbda5ed").WaitForCompletion().GetComponent<CharacterBody>(); component3.bodyFlags = (BodyFlags)(component3.bodyFlags | 0x800); CharacterBody component4 = Addressables.LoadAssetAsync<GameObject>((object)"7dfb4548829852a49a4b2840046787ed").WaitForCompletion().GetComponent<CharacterBody>(); component4.bodyFlags = (BodyFlags)(component4.bodyFlags | 0x800); CharacterBody component5 = Addressables.LoadAssetAsync<GameObject>((object)"769510dc6be546b40aa3aca3cf93945c").WaitForCompletion().GetComponent<CharacterBody>(); component5.bodyFlags = (BodyFlags)(component5.bodyFlags | 0x800); CharacterBody component6 = Addressables.LoadAssetAsync<GameObject>((object)"8684165ea0542bf4bae1eea1f5865386").WaitForCompletion().GetComponent<CharacterBody>(); component6.bodyFlags = (BodyFlags)(component6.bodyFlags | 0x800); CharacterBody component7 = Addressables.LoadAssetAsync<GameObject>((object)"9d63f2d3bc6c52c44883128cc4b97bf4").WaitForCompletion().GetComponent<CharacterBody>(); component7.bodyFlags = (BodyFlags)(component7.bodyFlags | 0x800); DLC3Fixes(); object obj5 = <>O.<4>__MulT_DontHighlightEveryTime; if (obj5 == null) { hook_SetActiveEquipmentSlot val5 = MulT_DontHighlightEveryTime; <>O.<4>__MulT_DontHighlightEveryTime = val5; obj5 = (object)val5; } Inventory.SetActiveEquipmentSlot += (hook_SetActiveEquipmentSlot)obj5; object obj6 = <>O.<5>__DontSpawnBrokenDronesForDronesWithRevives; if (obj6 == null) { hook_OnImpactServer val6 = DontSpawnBrokenDronesForDronesWithRevives; <>O.<5>__DontSpawnBrokenDronesForDronesWithRevives = val6; obj6 = (object)val6; } DeathState.OnImpactServer += (hook_OnImpactServer)obj6; object obj7 = <>O.<6>__ReplaceDroneCheckWithRemoteOpDroneCheck; if (obj7 == null) { Manipulator val7 = ReplaceDroneCheckWithRemoteOpDroneCheck; <>O.<6>__ReplaceDroneCheckWithRemoteOpDroneCheck = val7; obj7 = (object)val7; } CharacterMaster.IsDeadAndOutOfLivesServer += (Manipulator)obj7; object obj8 = <>O.<7>__FixMulTWeirdEquipmentThing; if (obj8 == null) { hook_SetActiveEquipmentSlot val8 = FixMulTWeirdEquipmentThing; <>O.<7>__FixMulTWeirdEquipmentThing = val8; obj8 = (object)val8; } Inventory.SetActiveEquipmentSlot += (hook_SetActiveEquipmentSlot)obj8; } private static void FixMulTWeirdEquipmentThing(orig_SetActiveEquipmentSlot orig, Inventory self, byte slotIndex) { self.activeEquipmentSlot = slotIndex; orig.Invoke(self, slotIndex); } private static void ReplaceDroneCheckWithRemoteOpDroneCheck(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.MatchCallvirt(x, "RoR2.CharacterBody", "get_IsDrone") })) { val.Remove(); val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody body) => body.isRemoteOp)); } else { WolfFixes.log.LogError((object)"IL Failed : IsDeadAndOutOfLivesServer"); } } private static void DontSpawnBrokenDronesForDronesWithRevives(orig_OnImpactServer orig, DeathState self, Vector3 contactPoint) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((EntityState)self).characterBody.master) || ((EntityState)self).characterBody.master.IsDeadAndOutOfLivesServer()) { orig.Invoke(self, contactPoint); } } public static void DLC3Fixes() { //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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown SkillDef val = Addressables.LoadAssetAsync<SkillDef>((object)"1df669ea25cc9cc408ff56b4a2571af9").WaitForCompletion(); ((SerializableEntityStateType)(ref val.activationState)).typeName = "EntityStates.Drone.DroneJailer.AssumePosition"; object obj = <>O.<8>__CharacterBody_CheckDroneHasItems; if (obj == null) { hook_CheckDroneHasItems val2 = CharacterBody_CheckDroneHasItems; <>O.<8>__CharacterBody_CheckDroneHasItems = val2; obj = (object)val2; } CharacterBody.CheckDroneHasItems += (hook_CheckDroneHasItems)obj; object obj2 = <>O.<9>__RequestedWarbannerBehavior; if (obj2 == null) { hook_InheritMovementItems val3 = RequestedWarbannerBehavior; <>O.<9>__RequestedWarbannerBehavior = val3; obj2 = (object)val3; } PhysicsProjectileBehavior.InheritMovementItems += (hook_InheritMovementItems)obj2; } private static void RequestedWarbannerBehavior(orig_InheritMovementItems orig, PhysicsProjectileBehavior self, Inventory friendInventory) { orig.Invoke(self, friendInventory); if (Object.op_Implicit((Object)(object)friendInventory) && Run.instance.ambientLevel > 99f) { friendInventory.ResetItemPermanent(Items.WardOnLevel); } } private static bool CharacterBody_CheckDroneHasItems(orig_CheckDroneHasItems orig, CharacterBody self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Invalid comparison between Unknown and I4 //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00d6: Unknown result type (might be due to invalid IL or missing references) bool flag = orig.Invoke(self); if ((self.bodyFlags & 2) > 0) { if (self.inventory.GetItemCountPermanent(Items.CaptainDefenseMatrix) > 0 || self.inventory.GetItemCountPermanent(Items.DroneWeaponsBoost) > 0 || self.inventory.GetItemCountPermanent(Items.DroneDynamiteDisplay) > 0 || self.inventory.GetItemCountPermanent(Items.TransferDebuffOnHit) > 0) { self.bodyFlags = (BodyFlags)(self.bodyFlags | 0x200000); flag = true; } } else if ((self.bodyFlags & 0x2000) > 0 && (self.inventory.GetItemCountPermanent(Items.DroneWeaponsBoost) > 0 || self.inventory.GetItemCountPermanent(Items.DroneDynamiteDisplay) > 0)) { self.bodyFlags = (BodyFlags)(self.bodyFlags | 0x200000); flag = true; } if (!flag && ((Enum)self.bodyFlags).HasFlag((Enum)(object)(BodyFlags)2097152)) { self.bodyFlags = (BodyFlags)(self.bodyFlags & -2097153); } return flag; } public static void CallLate() { //IL_0007: 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_0012: 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_003d: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) CharacterBody childBody = BodyPrefabs.ChildBody; childBody.bodyFlags = (BodyFlags)(childBody.bodyFlags | 0x200); GameObject val = null; val = Addressables.LoadAssetAsync<GameObject>((object)"1fb51531942733b469329cbcd0647a68").WaitForCompletion(); val.GetComponent<ProjectileController>().owner = val; val = Addressables.LoadAssetAsync<GameObject>((object)"40316250be8e9a049b87745e197820e2").WaitForCompletion(); val.GetComponent<ProjectileController>().owner = val; val = Addressables.LoadAssetAsync<GameObject>((object)"40316250be8e9a049b87745e197820e2").WaitForCompletion(); val.GetComponent<ProjectileController>().owner = val; val = Addressables.LoadAssetAsync<GameObject>((object)"fa0f995f3a42e244db914ac7d61cab47").WaitForCompletion(); val.GetComponent<ProjectileController>().owner = val; val = Addressables.LoadAssetAsync<GameObject>((object)"efcf575c05e1ea543be85f5cac0c12fd").WaitForCompletion(); val.GetComponent<ProjectileController>().owner = val; val = Addressables.LoadAssetAsync<GameObject>((object)"d59e337394dd72f418dbb1b622d2480d").WaitForCompletion(); val.GetComponent<ProjectileController>().owner = val; } public static void XI_GhostEliteMinionFix(orig_OnSpawnedServer orig, NetworkedBodySpawnSlot self, GameObject ownerBodyObject, SpawnResult spawnResult, Action<ISlot, SpawnResult> callback) { //IL_0004: 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_0015: 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) orig.Invoke(self, ownerBodyObject, spawnResult, callback); if (!spawnResult.success || !Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) || !Object.op_Implicit((Object)(object)ownerBodyObject)) { return; } CharacterBody component = ownerBodyObject.GetComponent<CharacterBody>(); Inventory component2 = spawnResult.spawnedInstance.GetComponent<Inventory>(); if (Object.op_Implicit((Object)(object)component2)) { if (WConfig.cfgXIEliteFix.Value) { component2.CopyEquipmentFrom(component.inventory, false); } if (component.inventory.GetItemCountPermanent(Items.Ghost) > 0) { component2.GiveItemPermanent(Items.Ghost, 1); component2.GiveItemPermanent(Items.HealthDecay, 30); component2.GiveItemPermanent(Items.BoostDamage, 150); } } } 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 { WolfFixes.log.LogError((object)"IL Failed : FixCaptainBeaconNoCrit"); } } private static void FixDumbFruit(orig_OnEnter orig, HabitatFruitDeathState self) { //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_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_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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); Transform transform = ((Component)((EntityState)self).characterBody.mainHurtBox).transform; EffectManager.SimpleImpactEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Jellyfish/JellyfishDeath.prefab").WaitForCompletion(), transform.position, Vector3.up, false); if (NetworkServer.active) { GameObject val = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/HealPack"), transform.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); } } 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 { WolfFixes.log.LogError((object)"IL Failed : CommandoReloadStateRemove"); } } } internal 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); } } } internal class DCCS_SpawnPool { [CompilerGenerated] private static class <>O { public static hook_IsUnlockedBeforeLooping <0>__NoPreLoopPostLoop; public static hook_PreStartClient <1>__FixRareStagesWithoutNodesWhenCalledFor; public static hook_OnStartServer <2>__AccessCodesMissionController_OnStartServer; public static Action<SceneDirector, DirectorCardCategorySelection> <3>__SceneDirector_onGenerateInteractableCardSelection; public static hook_GetBlendedDCCS <4>__DCCSBlender_GetBlendedDCCS; } public static void Main() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Expected O, but got Unknown DCCSFixes(); SpawnCardFixes(); SceneCollection val = Addressables.LoadAssetAsync<SceneCollection>((object)"RoR2/Base/SceneGroups/sgStage1.asset").WaitForCompletion(); ((SceneEntry)(ref val._sceneEntries[0])).weight = WConfig.cfgStage1Weight.Value; ((SceneEntry)(ref val._sceneEntries[1])).weight = WConfig.cfgStage1Weight.Value; ((SceneEntry)(ref val._sceneEntries[2])).weight = WConfig.cfgStage1Weight.Value; ((SceneEntry)(ref val._sceneEntries[3])).weight = WConfig.cfgStage1Weight.Value; ((SceneEntry)(ref val._sceneEntries[5])).weight = 1f; SceneCollection val2 = Addressables.LoadAssetAsync<SceneCollection>((object)"RoR2/Base/SceneGroups/loopSgStage1.asset").WaitForCompletion(); ((SceneEntry)(ref val2._sceneEntries[0])).weight = WConfig.cfgStage1Weight.Value; ((SceneEntry)(ref val2._sceneEntries[1])).weight = WConfig.cfgStage1Weight.Value; ((SceneEntry)(ref val2._sceneEntries[2])).weight = WConfig.cfgStage1Weight.Value; ((SceneEntry)(ref val2._sceneEntries[3])).weight = WConfig.cfgStage1Weight.Value; object obj = <>O.<0>__NoPreLoopPostLoop; if (obj == null) { hook_IsUnlockedBeforeLooping val3 = NoPreLoopPostLoop; <>O.<0>__NoPreLoopPostLoop = val3; obj = (object)val3; } BazaarController.IsUnlockedBeforeLooping += (hook_IsUnlockedBeforeLooping)obj; object obj2 = <>O.<1>__FixRareStagesWithoutNodesWhenCalledFor; if (obj2 == null) { hook_PreStartClient val4 = FixRareStagesWithoutNodesWhenCalledFor; <>O.<1>__FixRareStagesWithoutNodesWhenCalledFor = val4; obj2 = (object)val4; } Stage.PreStartClient += (hook_PreStartClient)obj2; object obj3 = <>O.<2>__AccessCodesMissionController_OnStartServer; if (obj3 == null) { hook_OnStartServer val5 = AccessCodesMissionController_OnStartServer; <>O.<2>__AccessCodesMissionController_OnStartServer = val5; obj3 = (object)val5; } AccessCodesMissionController.OnStartServer += (hook_OnStartServer)obj3; SceneDirector.onGenerateInteractableCardSelection += SceneDirector_onGenerateInteractableCardSelection; object obj4 = <>O.<4>__DCCSBlender_GetBlendedDCCS; if (obj4 == null) { hook_GetBlendedDCCS val6 = DCCSBlender_GetBlendedDCCS; <>O.<4>__DCCSBlender_GetBlendedDCCS = val6; obj4 = (object)val6; } DCCSBlender.GetBlendedDCCS += (hook_GetBlendedDCCS)obj4; } private static DirectorCardCategorySelection DCCSBlender_GetBlendedDCCS(orig_GetBlendedDCCS orig, Category dccsPoolCategory, ref Xoroshiro128Plus rng, ClassicStageInfo stageInfo, int contentSourceMixLimit, List<ExpansionDef> acceptableExpansionList) { return orig.Invoke(dccsPoolCategory, ref rng, stageInfo, contentSourceMixLimit, (List<ExpansionDef>)null); } private static void SceneDirector_onGenerateInteractableCardSelection(SceneDirector self, DirectorCardCategorySelection dccs) { if (!WConfig.cfgTempShopWeight.Value) { return; } int num = dccs.FindCategoryIndexByName("Chests"); if (num == -1) { return; } DirectorCard directorCard = DccsUtil.GetDirectorCard(ref dccs.categories[num].cards, "ItemsShop"); if (directorCard != null) { DirectorCard directorCard2 = DccsUtil.GetDirectorCard(ref dccs.categories[num].cards, "1"); if (directorCard2 != null && directorCard2.selectionWeight == 24) { directorCard.selectionWeight = 1; Debug.Log((object)"Fixing TempShop weight on SotS stage"); } } } private static void AccessCodesMissionController_OnStartServer(orig_OnStartServer orig, AccessCodesMissionController self) { if (SceneInfo.instance.sceneDef.baseSceneName == "repurposedcrater") { self.ignoreSolusWingDeath = true; } orig.Invoke(self); } private static void FixRareStagesWithoutNodesWhenCalledFor(orig_PreStartClient orig, Stage self) { //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_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) orig.Invoke(self); if (!NetworkServer.active || !Object.op_Implicit((Object)(object)SceneInfo.instance)) { return; } string baseSceneName = SceneInfo.instance.sceneDef.baseSceneName; string text = baseSceneName; string text2 = text; if (!(text2 == "itancientloft")) { if (text2 == "itmoon") { NodeGraph val = Addressables.LoadAssetAsync<NodeGraph>((object)"RoR2/DLC1/itmoon/itmoon_GroundNodeGraph.asset").WaitForCompletion(); for (int i = 0; i < val.nodes.Length; i += 10) { ref NodeFlags flags = ref val.nodes[i].flags; flags = (NodeFlags)((uint)flags | 1u); } } } else { NodeGraph val2 = Addressables.LoadAssetAsync<NodeGraph>((object)"RoR2/DLC1/itancientloft/itancientloft_GroundNodeGraph.asset").WaitForCompletion(); for (int j = 0; j < val2.nodes.Length; j += 10) { ref NodeFlags flags2 = ref val2.nodes[j].flags; flags2 = (NodeFlags)((uint)flags2 | 1u); } } } public static bool NoPreLoopPostLoop(orig_IsUnlockedBeforeLooping orig, BazaarController self, SceneDef sceneDef) { if (WConfig.cfgLoopSeers.Value && Object.op_Implicit((Object)(object)sceneDef.loopedSceneDef) && Run.instance.stageClearCount >= 5) { return false; } return orig.Invoke(self, sceneDef); } public static void DCCSFixes() { //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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_00cb: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown DccsPool val = Addressables.LoadAssetAsync<DccsPool>((object)"RoR2/DLC2/artifactworld02/dpArtifactWorld02Monsters.asset").WaitForCompletion(); ((PoolEntry)val.poolCategories[0].includedIfConditionsMet[0]).dccs = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC2/artifactworld02/dccsArtifactWorld02Monsters_DLC1.asset").WaitForCompletion(); DirectorCardCategorySelection val2 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"eca601c0708cfe940b371b5cae6a4872").WaitForCompletion(); val2.categories[0].cards[0].spawnCard = null; val2.categories[1].cards[0].spawnCard = null; val2.categories[0].cards[0].spawnCardReference = new AssetReferenceT<SpawnCard>("cf55a1f0cb720ec4eb136a5976013bd0"); val2.categories[1].cards[0].spawnCardReference = new AssetReferenceT<SpawnCard>("0ca64dc7fa66f4e4a88352d08bf15e66"); DirectorCardCategorySelection val3 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"359a1dff413474745a1d4076c1b26aa7").WaitForCompletion(); val3.AddCard(0, new DirectorCard { spawnCardReference = new AssetReferenceT<SpawnCard>("1d23f78593a91a04f818ca9895f4e7d7"), selectionWeight = 1 }); val3.AddCard(0, new DirectorCard { spawnCardReference = new AssetReferenceT<SpawnCard>("db1a26c64dfaf5043949b2aedf193269"), selectionWeight = 1 }); } public static void SpawnCardFixes() { //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_0014: 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_001f: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) CharacterSpawnCard obj = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"f7aba48d470b1594281c0eab455a12dd").WaitForCompletion(); ((SpawnCard)obj).forbiddenFlags = (NodeFlags)(((SpawnCard)obj).forbiddenFlags & 0xFE); Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"32c40c2b1da4a4244871ef499447ac1a").WaitForCompletion().maxSpawnsPerStage = 1; Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"2eaec01927ea16245822dcb50080cba3").WaitForCompletion().skipSpawnWhenDevotionArtifactEnabled = true; Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"5a86990b032424e48b4b8456f7d684c9").WaitForCompletion().skipSpawnWhenSacrificeArtifactEnabled = false; } } internal 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; } [CompilerGenerated] private sealed class <FixItemComponentsBeingDeleted>d__10 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public DevotionInventoryController self; private MinionGroup <minionGroup>5__1; private MinionOwnership[] <>s__2; private int <>s__3; private MinionOwnership <minionOwnership>5__4; private DevotedLemurianController <devotedLemurianController>5__5; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <FixItemComponentsBeingDeleted>d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <minionGroup>5__1 = null; <>s__2 = null; <minionOwnership>5__4 = null; <devotedLemurianController>5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; if (Object.op_Implicit((Object)(object)self._summonerMaster)) { <minionGroup>5__1 = MinionGroup.FindGroup(((NetworkBehaviour)self._summonerMaster).netId); if (<minionGroup>5__1 != null) { <>s__2 = <minionGroup>5__1.members; for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++) { <minionOwnership>5__4 = <>s__2[<>s__3]; if (Object.op_Implicit((Object)(object)<minionOwnership>5__4) && ((Component)((Component)<minionOwnership>5__4).GetComponent<CharacterMaster>()).TryGetComponent<DevotedLemurianController>(ref <devotedLemurianController>5__5) && Object.op_Implicit((Object)(object)<devotedLemurianController>5__5.LemurianBody) && Object.op_Implicit((Object)(object)<devotedLemurianController>5__5.LemurianBody.inventory)) { <devotedLemurianController>5__5.LemurianBody.OnInventoryChanged(); } <devotedLemurianController>5__5 = null; <minionOwnership>5__4 = null; } <>s__2 = null; } <minionGroup>5__1 = null; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)devotedLemurianController.LemurianBody == (Object)null && Object.op_Implicit((Object)(object)devotedLemurianController._lemurianMaster)) { 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.bodyPrefab = BodyCatalog.FindBodyPrefab("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 { WolfFixes.log.LogError((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", "GiveItemPermanent") })) { val.Prev.OpCode = OpCodes.Ldc_I4_0; } else { WolfFixes.log.LogError((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)); } [IteratorStateMachine(typeof(<FixItemComponentsBeingDeleted>d__10))] public static IEnumerator FixItemComponentsBeingDeleted(DevotionInventoryController self) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <FixItemComponentsBeingDeleted>d__10(0) { self = self }; } 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); } } internal class EquipmentFixes { [CompilerGenerated] private static class <>O { public static hook_SetupWings <0>__BugWingsAlways_SetupWings; public static hook_OnDisable <1>__BugWingsAlways_OnDisable; public static hook_OnEnter <2>__FallbackIfNoItemDisplay; public static Manipulator <3>__FixSawmarang; } public static void VisualFixes() { //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>__BugWingsAlways_SetupWings; if (obj == null) { hook_SetupWings val = BugWingsAlways_SetupWings; <>O.<0>__BugWingsAlways_SetupWings = val; obj = (object)val; } JetpackController.SetupWings += (hook_SetupWings)obj; object obj2 = <>O.<1>__BugWingsAlways_OnDisable; if (obj2 == null) { hook_OnDisable val2 = BugWingsAlways_OnDisable; <>O.<1>__BugWingsAlways_OnDisable = val2; obj2 = (object)val2; } JetpackController.OnDisable += (hook_OnDisable)obj2; object obj3 = <>O.<2>__FallbackIfNoItemDisplay; if (obj3 == null) { hook_OnEnter val3 = FallbackIfNoItemDisplay; <>O.<2>__FallbackIfNoItemDisplay = val3; obj3 = (object)val3; } CountDown.OnEnter += (hook_OnEnter)obj3; } public static void GameplayFixes() { //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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown EquipmentDef val = Addressables.LoadAssetAsync<EquipmentDef>((object)"f2ddbb7586240e648945ad494ebe3984").WaitForCompletion(); if (val.cooldown == 0.1f) { val.cooldown -= 0.1f; } Addressables.LoadAssetAsync<GameObject>((object)"9ca7d392fa3bb444b827d475b36b9253").WaitForCompletion().AddComponent<ThisIsASawmarang>(); object obj = <>O.<3>__FixSawmarang; if (obj == null) { Manipulator val2 = FixSawmarang; <>O.<3>__FixSawmarang = val2; obj = (object)val2; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; } private static void FallbackIfNoItemDisplay(orig_OnEnter orig, CountDown self) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.vfxInstances.Length == 0 && Object.op_Implicit((Object)(object)((QuestVolatileBatteryBaseState)self).networkedBodyAttachment.attachedBody) && Object.op_Implicit((Object)(object)CountDown.vfxPrefab) && Object.op_Implicit((Object)(object)((QuestVolatileBatteryBaseState)self).attachedCharacterModel)) { self.vfxInstances = (GameObject[])(object)new GameObject[1]; GameObject val = Object.Instantiate<GameObject>(CountDown.vfxPrefab, ((QuestVolatileBatteryBaseState)self).networkedBodyAttachment.attachedBody.coreTransform); val.transform.localPosition = Vector3.zero; val.transform.localRotation = Quaternion.identity; val.transform.localScale = new Vector3(2.5f / val.transform.lossyScale.x, 2.5f / val.transform.lossyScale.y, 2.5f / val.transform.lossyScale.z); if (val.transform.localScale.z < 1f) { val.transform.localScale = new Vector3(1f, 1f, 1f); } Light component = ((Component)val.transform.GetChild(0)).GetComponent<Light>(); component.range *= 3f; Light component2 = ((Component)val.transform.GetChild(0)).GetComponent<Light>(); component2.intensity *= 3f; LightIntensityCurve component3 = ((Component)val.transform.GetChild(0)).GetComponent<LightIntensityCurve>(); component3.timeMax /= 2f; self.vfxInstances[0] = val; } } private static 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>)((EquipmentIndex eq, DamageInfo damageInfo) => Object.op_Implicit((Object)(object)damageInfo.inflictor.GetComponent<ThisIsASawmarang>()) ? Equipment.Saw.equipmentIndex : eq)); } else { WolfFixes.log.LogError((object)"IL Failed : FixSawmarang"); } } private static void BugWingsAlways_SetupWings(orig_SetupWings orig, JetpackController self) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) CharacterModel val = null; if (Object.op_Implicit((Object)(object)self.targetBody) && self.targetBody.isPlayerControlled) { val = ((Component)self.targetBody.modelLocator.modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)val.itemDisplayRuleSet) && val.currentEquipmentDisplayIndex != Equipment.Jetpack.equipmentIndex) { DisplayRuleGroup equipmentDisplayRuleGroup = val.itemDisplayRuleSet.GetEquipmentDisplayRuleGroup(Equipment.Jetpack.equipmentIndex); val.InstantiateDisplayRuleGroup(equipmentDisplayRuleGroup, (ItemIndex)(-1), Equipment.Jetpack.equipmentIndex); } } orig.Invoke(self); if ((Object)(object)val != (Object)null) { DontDestroyIfJetpack dontDestroyIfJetpack = ((Component)val).GetComponent<DontDestroyIfJetpack>(); if (!Object.op_Implicit((Object)(object)dontDestroyIfJetpack)) { dontDestroyIfJetpack = ((Component)val).gameObject.AddComponent<DontDestroyIfJetpack>(); } dontDestroyIfJetpack.characterModel = val; dontDestroyIfJetpack.Setup(); } } private static void BugWingsAlways_OnDisable(orig_OnDisable orig, JetpackController self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self.targetBody) || !self.targetBody.isPlayerControlled) { return; } CharacterModel component = ((Component)self.targetBody.modelLocator.modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component.itemDisplayRuleSet)) { DontDestroyIfJetpack component2 = ((Component)component).GetComponent<DontDestroyIfJetpack>(); if (Object.op_Implicit((Object)(object)component2)) { component2.UnSetup(); } } } } internal class ThisIsASawmarang : MonoBehaviour { } internal class DontDestroyIfJetpack : MonoBehaviour { public CharacterModel characterModel; public ParentedPrefabDisplay storedDisplay; public EquipmentIndex index; public void Setup() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) index = Equipment.Jetpack.equipmentIndex; for (int num = characterModel.parentedPrefabDisplays.Count - 1; num >= 0; num--) { if (characterModel.parentedPrefabDisplays[num].equipmentIndex == index) { storedDisplay = characterModel.parentedPrefabDisplays[num]; characterModel.parentedPrefabDisplays.RemoveAt(num); break; } } } public void UnSetup() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (characterModel.currentEquipmentDisplayIndex == index) { characterModel.parentedPrefabDisplays.Add(storedDisplay); } else { ((ParentedPrefabDisplay)(ref storedDisplay)).Undo(); } } } internal class GameplayMisc { [CompilerGenerated] private static class <>O { public static hook_HandlePostRunDestination <0>__FixEclipseRunsKickingOutOfLobby; } 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_0020: 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_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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown SceneDef val = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/habitat/habitat.asset").WaitForCompletion(); val.validForRandomSelection = true; val = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/helminthroost/helminthroost.asset").WaitForCompletion(); val.validForRandomSelection = true; GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"e075b1933eaeb214180184c6d242f13a").WaitForCompletion(); val2.GetComponent<ProjectileSimple>().lifetime = 3f; Object.Destroy((Object)(object)Addressables.LoadAssetAsync<GameObject>((object)"5459e8ded89cd0f4d84219750a7e10ac").WaitForCompletion().GetComponent<Deployable>()); object obj = <>O.<0>__FixEclipseRunsKickingOutOfLobby; if (obj == null) { hook_HandlePostRunDestination val3 = FixEclipseRunsKickingOutOfLobby; <>O.<0>__FixEclipseRunsKickingOutOfLobby = val3; obj = (object)val3; } EclipseRun.HandlePostRunDestination += (hook_HandlePostRunDestination)obj; } private static void FixEclipseRunsKickingOutOfLobby(orig_HandlePostRunDestination orig, EclipseRun self) { if (NetworkServer.active) { NetworkManager.singleton.ServerChangeScene("lobby"); } } } internal class InteractableFixes { [CompilerGenerated] private static class <>O { public static hook_SetUpSeerStations <0>__FixDuplicateAndEmptyThirdSeers; public static hook_SetRunNextStageToTarget <1>__BazaarDisableAllSeers; public static hook_OnDeserialize <2>__FixBrokenAH_DroneCombinerCombining_OnDeserialize; } public static void VisualFixes() { //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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown ShrineShapingFixes.Start(); object obj = <>O.<0>__FixDuplicateAndEmptyThirdSeers; if (obj == null) { hook_SetUpSeerStations val = FixDuplicateAndEmptyThirdSeers; <>O.<0>__FixDuplicateAndEmptyThirdSeers = val; obj = (object)val; } BazaarController.SetUpSeerStations += (hook_SetUpSeerStations)obj; object obj2 = <>O.<1>__BazaarDisableAllSeers; if (obj2 == null) { hook_SetRunNextStageToTarget val2 = BazaarDisableAllSeers; <>O.<1>__BazaarDisableAllSeers = val2; obj2 = (object)val2; } SeerStationController.SetRunNextStageToTarget += (hook_SetRunNextStageToTarget)obj2; Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"749e2ff7e1839074885efb0f82197ba7").WaitForCompletion().slightlyRandomizeOrientation = false; Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"592ddd0e913440844b42eff65663abda").WaitForCompletion().slightlyRandomizeOrientation = false; object obj3 = <>O.<2>__FixBrokenAH_DroneCombinerCombining_OnDeserialize; if (obj3 == null) { hook_OnDeserialize val3 = FixBrokenAH_DroneCombinerCombining_OnDeserialize; <>O.<2>__FixBrokenAH_DroneCombinerCombining_OnDeserialize = val3; obj3 = (object)val3; } DroneCombinerCombining.OnDeserialize += (hook_OnDeserialize)obj3; } public static void MissingDLCRequirements() { //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_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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_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_008a: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidCoinBarrel/VoidCoinBarrel.prefab").WaitForCompletion().AddComponent<ExpansionRequirementComponent>() .requiredExpansion = DLCS.DLC1; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/ShrineColossusAccess.prefab").WaitForCompletion().AddComponent<ExpansionRequirementComponent>() .requiredExpansion = DLCS.DLC2; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC3/DroneCombinerStation/DroneCombinerStation.prefab").WaitForCompletion().AddComponent<ExpansionRequirementComponent>() .requiredExpansion = DLCS.DLC3; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC3/DroneScrapper/DroneScrapper.prefab").WaitForCompletion().AddComponent<ExpansionRequirementComponent>() .requiredExpansion = DLCS.DLC3; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC3/TripleDroneShop/TripleDroneShop.prefab").WaitForCompletion().AddComponent<ExpansionRequirementComponent>() .requiredExpansion = DLCS.DLC3; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC3/TemporaryItemsDistributor/TemporaryItemsShopTerminal.prefab").WaitForCompletion().AddComponent<ExpansionRequirementComponent>() .requiredExpansion = DLCS.DLC3; } private static void FixBrokenAH_DroneCombinerCombining_OnDeserialize(orig_OnDeserialize orig, DroneCombinerCombining self, NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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) NetworkInstanceId val = reader.ReadNetworkId(); NetworkInstanceId val2 = reader.ReadNetworkId(); GameObject val3 = ClientScene.FindLocalObject(val); GameObject val4 = ClientScene.FindLocalObject(val2); if (Object.op_Implicit((Object)(object)val3)) { self.toUpgrade = val3.GetComponent<CharacterBody>(); } if (Object.op_Implicit((Object)(object)val4)) { self.toDestroy = val4.GetComponent<CharacterBody>(); } self._controller = ((EntityState)self).gameObject.GetComponent<DroneCombinerController>(); } private static void BazaarDisableAllSeers(orig_SetRunNextStageToTarget orig, SeerStationController self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)BazaarController.instance)) { for (int i = 0; i < BazaarController.instance.seerStations.Length; i++) { ((Component)BazaarController.instance.seerStations[i]).GetComponent<PurchaseInteraction>().SetAvailable(false); } } } private static void FixDuplicateAndEmptyThirdSeers(orig_SetUpSeerStations orig, BazaarController self) { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); List<string> list = new List<string>(); List<SeerStationController> list2 = new List<SeerStationController>(); SeerStationController[] seerStations = self.seerStations; foreach (SeerStationController val in seerStations) { if (val.targetSceneDefIndex != -1) { string baseSceneName = SceneCatalog.indexToSceneDef[val.targetSceneDefIndex].baseSceneName; if (list.Contains(baseSceneName)) { list2.Add(val); } else { list.Add(baseSceneName); } } else { list2.Add(val); } } if (list2.Count <= 0) { return; } SceneDef nextStageScene = Run.instance.nextStageScene; List<SceneDef> list3 = new List<SceneDef>(); if ((Object)(object)nextStageScene != (Object)null) { int stageOrder = nextStageScene.stageOrder; Enumerator<SceneDef> enumerator = SceneCatalog.allSceneDefs.GetEnumerator(); try { while (enumerator.MoveNext()) { SceneDef current = enumerator.Current; if (current.stageOrder == stageOrder && ((Object)(object)current.requiredExpansion == (Object)null || Run.instance.IsExpansionEnabled(current.requiredExpansion)) && self.IsUnlockedBeforeLooping(current) && !list.Contains(current.baseSceneName)) { list3.Add(current); } } } finally { ((IDisposable)enumerator).Dispose(); } } if (list3.Count <= 0) { return; } foreach (SeerStationController item in list2) { Util.ShuffleList<SceneDef>(list3, self.rng); int index = list3.Count - 1; item.SetTargetScene(list3[index]); list3.RemoveAt(index); ((Component)item).GetComponent<PurchaseInteraction>().SetAvailable(true); } } } internal class ItemFixes { [CompilerGenerated] private static class <>O { public static Manipulator <0>__Stew_GettingDeletedByCurseRandomly; public static Manipulator <1>__FixStoneFluxBeingAppliedTwice; public static Manipulator <2>__FixChargedPerferatorCrit; public static Manipulator <3>__Antler_FixWrongAuth; public static hook_RpcRequestShardInfoClient <4>__Antler_FixNullRefOnNullMotor; public static Manipulator <5>__Bandolier_WrongAuthCheck; public static Manipulator <6>__RemoveOSPEntirelyIfYouAreBelowOSPThreshold; public static Manipulator <7>__FixWarpedReducingDamageAfterOSP; public static Manipulator <8>__FixWEchoDamageNotProccingPlanulaAnymoreAC141; public static Manipulator <9>__FixWEchoDamageDoubleDippingEnemyWatches; public static Manipulator <10>__FixWEchoDoubleDippingLunarRuin; public static Manipulator <11>__FixParryConsuemdOn0Damage0ProcAttacks; } 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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_00f1: Expected O, but got Unknown //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_0178: 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_0183: Expected O, but got Unknown object obj = <>O.<0>__Stew_GettingDeletedByCurseRandomly; if (obj == null) { Manipulator val = Stew_GettingDeletedByCurseRandomly; <>O.<0>__Stew_GettingDeletedByCurseRandomly = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; object obj2 = <>O.<1>__FixStoneFluxBeingAppliedTwice; if (obj2 == null) { Manipulator val2 = FixStoneFluxBeingAppliedTwice; <>O.<1>__FixStoneFluxBeingAppliedTwice = val2; obj2 = (object)val2; } CharacterBody.RecalculateStats += (Manipulator)obj2; object obj3 = <>O.<2>__FixChargedPerferatorCrit; if (obj3 == null) { Manipulator val3 = FixChargedPerferatorCrit; <>O.<2>__FixChargedPerferatorCrit = val3; obj3 = (object)val3; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj3; object obj4 = <>O.<3>__Antler_FixWrongAuth; if (obj4 == null) { Manipulator val4 = Antler_FixWrongAuth; <>O.<3>__Antler_FixWrongAuth = val4; obj4 = (object)val4; } CharacterBody.RpcRequestShardInfoClient += (Manipulator)obj4; object obj5 = <>O.<4>__Antler_FixNullRefOnNullMotor; if (obj5 == null) { hook_RpcRequestShardInfoClient val5 = Antler_FixNullRefOnNullMotor; <>O.<4>__Antler_FixNullRefOnNullMotor = val5; obj5 = (object)val5; } CharacterBody.RpcRequestShardInfoClient += (hook_RpcRequestShardInfoClient)obj5; object obj6 = <>O.<5>__Bandolier_WrongAuthCheck; if (obj6 == null) { Manipulator val6 = Bandolier_WrongAuthCheck; <>O.<5>__Bandolier_WrongAuthCheck = val6; obj6 = (object)val6; } SkillLocator.ApplyAmmoPack += (Manipulator)obj6; if (WConfig.cfgFixWarpedOSP.Value) { object obj7 = <>O.<6>__RemoveOSPEntirelyIfYouAreBelowOSPThreshold; if (obj7 == null) { Manipulator val7 = RemoveOSPEntirelyIfYouAreBelowOSPThreshold; <>O.<6>__RemoveOSPEntirelyIfYouAreBelowOSPThreshold = val7; obj7 = (object)val7; } HealthComponent.TakeDamageProcess += (Manipulator)obj7; object obj8 = <>O.<7>__FixWarpedReducingDamageAfterOSP; if (obj8 == null) { Manipulator val8 = FixWarpedReducingDamageAfterOSP; <>O.<7>__FixWarpedReducingDamageAfterOSP = val8; obj8 = (object)val8; } HealthComponent.TakeDamageProcess += (Manipulator)obj8; } object obj9 = <>O.<8>__FixWEchoDamageNotProccingPlanulaAnymoreAC141; if (obj9 == null) { Manipulator val9 = FixWEchoDamageNotProccingPlanulaAnymoreAC141; <>O.<8>__FixWEchoDamageNotProccingPlanulaAnymoreAC141 = val9; obj9 = (object)val9; } HealthComponent.TakeDamageProcess += (Manipulator)obj9; object obj10 = <>O.<9>__FixWEchoDamageDoubleDippingEnemyWatches; if (obj10 == null) { Manipulator val10 = FixWEchoDamageDoubleDippingEnemyWatches; <>O.<9>__FixWEchoDamageDoubleDippingEnemyWatches = val10; obj10 = (object)val10; } HealthComponent.TakeDamageProcess += (Manipulator)obj10; if (!WolfFixes.riskyTweaks) { object obj11 = <>O.<10>__FixWEchoDoubleDippingLunarRuin; if (obj11 == null) { Manipulator val11 = FixWEchoDoubleDippingLunarRuin; <>O.<10>__FixWEchoDoubleDippingLunarRuin = val11; obj11 = (object)val11; } HealthComponent.TakeDamageProcess += (Manipulator)obj11; } object obj12 = <>O.<11>__FixParryConsuemdOn0Damage0ProcAttacks; if (obj12 == null) { Manipulator val12 = FixParryConsuemdOn0Damage0ProcAttacks; <>O.<11>__FixParryConsuemdOn0Damage0ProcAttacks = val12; obj12 = (object)val12; } HealthComponent.TakeDamageProcess += (Manipulator)obj12; } private static void Stew_GettingDeletedByCurseRandomly(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>[7] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, (MethodBase)AccessTools.PropertyGetter(typeof(CharacterBody), "healthComponent")), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(HealthComponent), "health"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "get_maxHealth"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "get_cursePenalty"), (Instruction x) => ILPatternMatchingExt.MatchDiv(x) })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float body) => Mathf.Floor(body))); } else { WolfFixes.log.LogError((object)"IL Failed : STEW getting fucked up by eclipse curse"); } } private static void FixWEchoDoubleDippingLunarRuin(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0061: 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>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "lunarruin"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "HasBuff") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool var, DamageInfo self) => !self.delayedDamageSecondHalf && var)); } else { WolfFixes.log.LogError((object)"IL Failed : FixWEchoDoubleDippingLunarRuin"); } } private static void FixParryConsuemdOn0Damage0ProcAttacks(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0061: 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>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "SureProc"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "HasBuff") })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool var, DamageInfo self) => self.procCoefficient != 0f && self.damage != 0f && var)); } else { WolfFixes.log.LogError((object)"IL Failed : FixParryConsuemdOn0Damage0ProcAttacks"); } } private static void FixWarpedReducingDamageAfterOSP(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "DelayedDamage") }); if (flag & val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.9f) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, HealthComponent, float>>((Func<float, HealthComponent, float>)((float var, HealthComponent self) => (self.ospTimer > 0f) ? 1f : var)); } else { WolfFixes.log.LogError((object)"IL Failed : FixWarpedReducingDamageAfterOSP"); } } private static void RemoveOSPEntirelyIfYouAreBelowOSPThreshold(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.MatchCallvirt(x, "RoR2.CharacterBody", "get_hasOneShotProtection") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<bool, HealthComponent, bool>>((Func<bool, HealthComponent, bool>)((bool var, HealthComponent self) => !(self.combinedHealthFraction <= 1f - self.body.oneShotProtectionFraction) && var)); } else { WolfFixes.log.LogError((object)"IL Failed : RemoveOSPEntirelyIfYouAreBelowOSPThreshold"); } } private static void FixWEchoDamageDoubleDippingEnemyWatches(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); bool flag = val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "get_canPerformBackstab") }); bool flag2 = val.TryGotoPrev((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, "UnityEngine.Object", "op_Implicit") }); if (!flag || !flag2) { WolfFixes.log.LogError((object)"IL Failed : FixWEchoDamageDoubleDippingEnemyWatches Part 1"); return; } val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool var, DamageInfo damageInfo) => !damageInfo.delayedDamageSecondHalf && var)); } private static void FixWEchoDamageNotProccingPlanulaAnymoreAC141(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00bf: 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) ILCursor val = new ILCursor(il); bool flag = false; ILLabel val2 = default(ILLabel); if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent", "body"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "get_armor") })) { WolfFixes.log.LogError((object)"IL Failed : FixWEchoDamageNotProccingPlanulaAnymoreAC141 Part 1"); return; } val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool var, DamageInfo damageInfo) => !damageInfo.delayedDamageSecondHalf && var)); if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchCall(x, "UnityEngine.Mathf", "Max"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 10) })) { WolfFixes.log.LogError((object)"IL Failed : FixWEchoDamageNotProccingPlanulaAnymoreAC141 Part 2"); return; } val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<float, DamageInfo, float>>((Func<float, DamageInfo, float>)((float var, DamageInfo damageInfo) => damageInfo.delayedDamageSecondHalf ? 1f : var)); } private static void FixStoneFluxBeingAppliedTwice(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>[5] { (Instruction x) => ILPatte
WolfoLibrary.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.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.InfiniteTowerSafeWard; using EntityStates.MeridianEvent; using EntityStates.Missions.BrotherEncounter; using EntityStates.SolusHeart; using EntityStates.SolusWing2; using HG; using HG.Reflection; using IL.EntityStates.ShrineHalcyonite; using IL.RoR2; using IL.RoR2.Networking; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using Newtonsoft.Json.Utilities; using On.EntityStates.MeridianEvent; using On.EntityStates.Missions.BrotherEncounter; using On.EntityStates.SolusHeart; using On.EntityStates.SolusWing2; using On.RoR2; using On.RoR2.EntitlementManagement; using On.RoR2.UI.LogBook; using R2API; using R2API.Utils; using RoR2; using RoR2.EntitlementManagement; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.Items; using RoR2.Networking; using RoR2.Stats; using RoR2.UI; using RoR2.UI.LogBook; using RoR2.UI.MainMenu; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.AddressableAssets.ResourceLocators; using UnityEngine.Networking; using UnityEngine.UI; using WolfoLibrary.Testing; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: NetworkCompatibility(/*Could not decode attribute arguments.*/)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Wolfo")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("A fix and library mod with various commands, methods and classes")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+20bc0b5b0d93e702bf58b23fb36c7e1e421be9e7")] [assembly: AssemblyProduct("WolfoLibrary")] [assembly: AssemblyTitle("WolfoLibrary")] [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 WolfoLibrary { internal static class Log { public static ManualLogSource log; public static void LogMessage(object message) { log.LogMessage(message); } public static void LogWarning(object message) { log.LogWarning(message); } public static void LogError(object message) { log.LogError(message); } } public static class Networker { public static readonly Dictionary<Type, byte> message_to_index = new Dictionary<Type, byte>(); public static readonly Dictionary<byte, Type> index_to_message = new Dictionary<byte, Type>(); public static byte wqol_startByte = 0; public static byte artifacts_startByte = 32; public static void SendWQoLMessage(ChatMessageBase message) { SendBroadcastChat(message, QosChannelIndex.chat.intVal); } public static void SendBroadcastChat(ChatMessageBase message, int channelIndex) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown if (WConfig.cfgTestMultiplayer.Value) { Debug.Log((object)"SendBroadcastChat"); } NetworkWriter val = new NetworkWriter(); val.StartMessage((short)20024); val.Write(message_to_index[((object)message).GetType()]); val.Write((MessageBase)(object)message); val.FinishMessage(); foreach (NetworkConnection connection in NetworkServer.connections) { if (connection != null) { connection.SendWriter(val, channelIndex); } } } public static ChatMessageBase InstantiateMessage(byte typeIndex) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown Type type = index_to_message[typeIndex]; if (ChatMessageBase.cvChatDebug.value) { Debug.LogFormat("Received chat message typeIndex={0} type={1}", new object[2] { typeIndex, (type != null) ? type.Name : null }); } if (type != null) { return (ChatMessageBase)Activator.CreateInstance(type); } return null; } [NetworkMessageHandler(msgType = 20024, client = true)] public static void HandleBroadcastChat(NetworkMessage netMsg) { if (WConfig.cfgTestMultiplayer.Value) { Debug.Log((object)"HandleBroadcastChat"); } ChatMessageBase val = InstantiateMessage(netMsg.reader.ReadByte()); if (val != null) { ((MessageBase)val).Deserialize(netMsg.reader); Chat.AddMessage(val); } } } internal class ShrineHalcyonFixes { [CompilerGenerated] private static class <>O { public static hook_SpendAllCreditsOnMapSpawns_Transform <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>__FixVisualsBeingInconsistent; } 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_Transform val = CombatDirector_SpendAllCreditsOnMapSpawns; <>O.<0>__CombatDirector_SpendAllCreditsOnMapSpawns = val; obj = (object)val; } CombatDirector.SpendAllCreditsOnMapSpawns_Transform += (hook_SpendAllCreditsOnMapSpawns_Transform)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>__FixVisualsBeingInconsistent; if (obj6 == null) { Manipulator val6 = FixVisualsBeingInconsistent; <>O.<5>__FixVisualsBeingInconsistent = val6; obj6 = (object)val6; } ShrineHalcyoniteBaseState.ModifyVisuals += (Manipulator)obj6; } private static void FixVisualsBeingInconsistent(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.HalcyoniteShrineInteractable", "isDraining") })) { val.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool target) => true)); } else { Log.LogError("IL Failed: FixVisualsBeingInconsistent"); } } private static void HalcyoniteShrineInteractable_IsDraining(orig_IsDraining orig, HalcyoniteShrineInteractable self, bool drainingActive) { if (NetworkServer.active) { orig.Invoke(self, drainingActive); } } private static void CombatDirector_SpendAllCreditsOnMapSpawns(orig_SpendAllCreditsOnMapSpawns_Transform orig, CombatDirector self, Transform mapSpawnTarget) { if (!NetworkServer.active) { Log.LogError("CombatDirector_SpendAllCreditsOnMapSpawns | This isn't meant to run on Client, Gearbox Software"); } else { orig.Invoke(self, mapSpawnTarget); } } private static void CombatDirector_HalcyoniteShrineActivation(orig_HalcyoniteShrineActivation orig, CombatDirector self, float monsterCredit, DirectorCard chosenDirectorCard, int difficultyLevel, Transform shrineTransform) { if (!NetworkServer.active) { Log.LogError("CombatDirector_HalcyoniteShrineActivation | This isn't meant to run on Client, Gearbox Software"); } else { orig.Invoke(self, monsterCredit, chosenDirectorCard, difficultyLevel, shrineTransform); } } private static void MoreValuesForClients(orig_Awake orig, HalcyoniteShrineInteractable self) { orig.Invoke(self); if (NetworkServer.active) { } } private static void MoreValuesClient2(orig_Start orig, HalcyoniteShrineInteractable self) { orig.Invoke(self); if (!NetworkServer.active) { self.lowGoldCost = Run.instance.GetDifficultyScaledCost(self.lowGoldCost); self.midGoldCost = Run.instance.GetDifficultyScaledCost(self.midGoldCost); self.maxGoldCost = Run.instance.GetDifficultyScaledCost(self.maxGoldCost); if (self.purchaseInteraction.Networkcost > 0) { self.goldDrainValue = self.purchaseInteraction.Networkcost; } self.goldDrainValue = Run.instance.GetDifficultyScaledCost(self.goldDrainValue); GoldSiphonNearbyBodyController component = ((Component)((Component)self).transform.GetChild(1)).GetComponent<GoldSiphonNearbyBodyController>(); component.goldDrainValue = self.goldDrainValue; } } } internal static class VoidElite { public static void VoidAffix() { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) EquipmentDef val = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/EliteVoid/EliteVoidEquipment.asset").WaitForCompletion(); GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/DisplayAffixVoid.prefab").WaitForCompletion(), "PickupAffixVoidW", false); val2.transform.GetChild(0).GetChild(2).SetAsFirstSibling(); val2.transform.GetChild(1).localPosition = new Vector3(0f, 0.7f, 0f); val2.transform.GetChild(1).GetChild(0).localPosition = new Vector3(0f, -0.5f, -0.6f); val2.transform.GetChild(1).GetChild(0).localScale = new Vector3(1.5f, 1.5f, 1.5f); ((Component)val2.transform.GetChild(1).GetChild(1)).gameObject.SetActive(false); ((Component)val2.transform.GetChild(1).GetChild(3)).gameObject.SetActive(false); val2.transform.GetChild(0).eulerAngles = new Vector3(310f, 0f, 0f); val2.transform.GetChild(0).localScale = new Vector3(0.75f, 0.75f, 0.75f); ItemDisplay component = val2.GetComponent<ItemDisplay>(); ArrayUtils.ArrayRemoveAtAndResize<RendererInfo>(ref component.rendererInfos, 4, 1); val2.AddComponent<ModelPanelParameters>(); val.pickupModelReference = new AssetReferenceT<GameObject>(""); val.pickupModelPrefab = val2; } } internal class VoidSuppressor { [CompilerGenerated] private static class <>O { public static hook_Init <0>__MakeTiered; public static Action<Run> <1>__MakeTieredAgain; public static hook_ctor <2>__RemoveFromCompletion; public static hook_PreStartClient <3>__AddPriceHologram; public static hook_RefreshPickupDisplays <4>__FixPickupDisplayTooSmallDueToLossyScale; } public static void SuppresedScrap() { //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_0076: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown MissedContent.Items.ScrapWhiteSuppressed.pickupToken = "ITEM_SCRAPWHITE_PICKUP"; MissedContent.Items.ScrapGreenSuppressed.pickupToken = "ITEM_SCRAPGREEN_PICKUP"; MissedContent.Items.ScrapRedSuppressed.pickupToken = "ITEM_SCRAPRED_PICKUP"; MissedContent.Items.ScrapWhiteSuppressed.descriptionToken = "ITEM_SCRAPWHITE_DESC"; MissedContent.Items.ScrapGreenSuppressed.descriptionToken = "ITEM_SCRAPGREEN_DESC"; MissedContent.Items.ScrapRedSuppressed.descriptionToken = "ITEM_SCRAPRED_DESC"; object obj = <>O.<0>__MakeTiered; if (obj == null) { hook_Init val = MakeTiered; <>O.<0>__MakeTiered = val; obj = (object)val; } PickupCatalog.Init += (hook_Init)obj; Run.onRunStartGlobal += MakeTieredAgain; object obj2 = <>O.<2>__RemoveFromCompletion; if (obj2 == null) { hook_ctor val2 = RemoveFromCompletion; <>O.<2>__RemoveFromCompletion = val2; obj2 = (object)val2; } GameCompletionStatsHelper.ctor += (hook_ctor)obj2; } public static void FixInteractable() { //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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSuppressor/VoidSuppressor.prefab").WaitForCompletion(); VoidSuppressorBehavior component = val.GetComponent<VoidSuppressorBehavior>(); component.useRefreshDelay = 1.05f; val.GetComponent<PurchaseInteraction>().isShrine = true; val.GetComponent<VoidSuppressorBehavior>().effectColor.a = 0.85f; Transform child = val.transform.GetChild(0); ((Component)child.GetChild(7).GetChild(1).GetChild(1)).gameObject.SetActive(true); child.GetChild(7).localPosition = new Vector3(0f, -0.5f, -0.5f); child.GetChild(7).GetChild(1).GetChild(0) .localScale = new Vector3(1.2f, 1.2f, 1.2f); Renderer component2 = ((Component)child.GetChild(5)).GetComponent<Renderer>(); Bounds localBounds = default(Bounds); ((Bounds)(ref localBounds)).extents = new Vector3(5f, 5f, 5f); component2.localBounds = localBounds; GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/HUDSimple.prefab").WaitForCompletion(); try { Transform val3 = val2.GetComponent<ChildLocator>().FindChild("ScoreboardPanel").Find("Container/SuppressedItems"); ((Component)val3).GetComponent<LayoutElement>().minHeight = 96f; ((Component)val3).GetComponent<ItemInventoryDisplay>().verticalMargin = 16f; } catch (Exception ex) { Debug.LogException(ex); } object obj = <>O.<3>__AddPriceHologram; if (obj == null) { hook_PreStartClient val4 = AddPriceHologram; <>O.<3>__AddPriceHologram = val4; obj = (object)val4; } VoidSuppressorBehavior.PreStartClient += (hook_PreStartClient)obj; object obj2 = <>O.<4>__FixPickupDisplayTooSmallDueToLossyScale; if (obj2 == null) { hook_RefreshPickupDisplays val5 = FixPickupDisplayTooSmallDueToLossyScale; <>O.<4>__FixPickupDisplayTooSmallDueToLossyScale = val5; obj2 = (object)val5; } VoidSuppressorBehavior.RefreshPickupDisplays += (hook_RefreshPickupDisplays)obj2; } private static void MakeTieredAgain(Run obj) { MissedContent.Items.ScrapWhiteSuppressed.tier = (ItemTier)0; MissedContent.Items.ScrapGreenSuppressed.tier = (ItemTier)1; MissedContent.Items.ScrapRedSuppressed.tier = (ItemTier)2; Run.onRunStartGlobal -= MakeTieredAgain; } private static IEnumerator MakeTiered(orig_Init orig) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)MissedContent.Items.ScrapWhiteSuppressed.tier != 5) { return orig.Invoke(); } MissedContent.Items.ScrapWhiteSuppressed.tier = (ItemTier)0; MissedContent.Items.ScrapGreenSuppressed.tier = (ItemTier)1; MissedContent.Items.ScrapRedSuppressed.tier = (ItemTier)2; IEnumerator result = orig.Invoke(); MissedContent.Items.ScrapWhiteSuppressed.tier = (ItemTier)5; MissedContent.Items.ScrapGreenSuppressed.tier = (ItemTier)5; MissedContent.Items.ScrapRedSuppressed.tier = (ItemTier)5; return result; } private static void RemoveFromCompletion(orig_ctor orig, GameCompletionStatsHelper self) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(MissedContent.Items.ScrapWhiteSuppressed.itemIndex)); PickupDef pickupDef2 = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(MissedContent.Items.ScrapGreenSuppressed.itemIndex)); PickupDef pickupDef3 = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(MissedContent.Items.ScrapRedSuppressed.itemIndex)); self.encounterablePickups.Remove(pickupDef); self.encounterablePickups.Remove(pickupDef2); self.encounterablePickups.Remove(pickupDef3); } private static void FixPickupDisplayTooSmallDueToLossyScale(orig_RefreshPickupDisplays orig, VoidSuppressorBehavior self) { //IL_001a: 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) Transform transform = ((Component)self.pickupDisplays[0]).transform; float num = 0.89628005f / transform.parent.localScale.x; transform.localScale = new Vector3(num, num, num); orig.Invoke(self); } private static void AddPriceHologram(orig_PreStartClient orig, VoidSuppressorBehavior self) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_003c: 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) orig.Invoke(self); GameObject val = new GameObject("PriceTransform"); val.transform.SetParent(((Component)self).transform, false); val.transform.localPosition = new Vector3(0.2f, 1f, 2f); HologramProjector val2 = ((Component)self).GetComponent<HologramProjector>(); if ((Object)(object)val2 == (Object)null) { val2 = ((Component)self).gameObject.AddComponent<HologramProjector>(); } val2.disableHologramRotation = true; val.transform.localEulerAngles = new Vector3(0f, 180f, 0f); val2.hologramPivot = val.transform; } } public class WConfig { public static ConfigFile ConfigFile = new ConfigFile(Paths.ConfigPath + "\\Wolfo.WolfoFixes.cfg", true); public static ConfigEntry<bool> cfgTestMultiplayer; public static ConfigEntry<bool> cfgTestLogbook; public static ConfigEntry<bool> cfgLoadOrder; public static void Awake() { InitConfig(); } public static void InitConfig() { cfgTestLogbook = ConfigFile.Bind<bool>("Testing", "Everything Logbook", false, "Add all items, equipments and mobs to logbook, including untiered and cut."); cfgTestMultiplayer = ConfigFile.Bind<bool>("Testing", "Multiplayer Test", false, "Allows you to join yourself via connect localhost:7777"); cfgLoadOrder = ConfigFile.Bind<bool>("Testing", "Debugging", false, "Log prints when certain events happen"); } } [BepInPlugin("com.Wolfo.WolfoLibrary", "WolfoLibrary", "1.3.4")] public class WolfoLib : BaseUnityPlugin { public void Awake() { Log.log = ((BaseUnityPlugin)this).Logger; Commands.Awake(); Test.Awake(); SkinStuff.Start(); } public void Start() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) Commands.cheatsEnabled = Chainloader.PluginInfos.ContainsKey("iHarbHD.DebugToolkit"); WConfig.Awake(); Test.Start(); ExtraActions.Start(); Tags.Start(); ShrineHalcyonFixes.Start(); VoidElite.VoidAffix(); VoidSuppressor.SuppresedScrap(); VoidSuppressor.FixInteractable(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(CallLate)); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/OptionPickup/OptionPickerPanel.prefab").WaitForCompletion().GetComponent<PickupPickerPanel>() .maxColumnCount = 3; } public void CallLate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) Equipment.GroundEnemies.colorIndex = (ColorIndex)5; } } public static class ArrayUtil { public static T[] Remove<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Except(items).ToArray(); } } public class AssetUtils { public static string GetPathToFile(string assemblyDir, string modFolder, string assetFolder) { if (Directory.Exists(Path.Combine(assemblyDir, modFolder + assetFolder))) { return Path.Combine(assemblyDir, modFolder + assetFolder); } if (Directory.Exists(Path.Combine(assemblyDir, "plugins\\" + modFolder + assetFolder))) { return Path.Combine(assemblyDir, assetFolder); } Debug.LogError((object)("COULD NOT FIND " + assetFolder + " FOLDER")); return assemblyDir; } public static string GetPathToFile(string assemblyDir, string modFolder, string assetFolder, string fileName) { return Path.Combine(GetPathToFile(assemblyDir, modFolder, assetFolder), fileName); } } public static class ExtraActions { [CompilerGenerated] private static class <>O { public static hook_OnEnter <0>__BrotherPhase1; public static hook_Start <1>__VoidlingStart; public static hook_OnEnter <2>__FalseSonPhase1; public static hook_OnExit <3>__Mission1Tunnel_OnExit; public static hook_OnEnter <4>__CutsceneTransformation_OnEnter; public static hook_PreStartClient <5>__Stage_PreStartClient; public static Manipulator <6>__MonsterDCCSGenerateHook; } public static Action onMithrixPhase1; public static Action onVoidlingPhase1; public static Action onFalseSonPhase1; public static Action onSolusWing; public static Action onSolusHeart; public static Action onStagePreStartClient; public static Action<DirectorCardCategorySelection> onMonsterDCCS; 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 object obj = <>O.<0>__BrotherPhase1; if (obj == null) { hook_OnEnter val = BrotherPhase1; <>O.<0>__BrotherPhase1 = val; obj = (object)val; } Phase1.OnEnter += (hook_OnEnter)obj; object obj2 = <>O.<1>__VoidlingStart; if (obj2 == null) { hook_Start val2 = VoidlingStart; <>O.<1>__VoidlingStart = val2; obj2 = (object)val2; } VoidRaidGauntletController.Start += (hook_Start)obj2; object obj3 = <>O.<2>__FalseSonPhase1; if (obj3 == null) { hook_OnEnter val3 = FalseSonPhase1; <>O.<2>__FalseSonPhase1 = val3; obj3 = (object)val3; } Phase1.OnEnter += (hook_OnEnter)obj3; object obj4 = <>O.<3>__Mission1Tunnel_OnExit; if (obj4 == null) { hook_OnExit val4 = Mission1Tunnel_OnExit; <>O.<3>__Mission1Tunnel_OnExit = val4; obj4 = (object)val4; } Mission1Tunnel.OnExit += (hook_OnExit)obj4; object obj5 = <>O.<4>__CutsceneTransformation_OnEnter; if (obj5 == null) { hook_OnEnter val5 = CutsceneTransformation_OnEnter; <>O.<4>__CutsceneTransformation_OnEnter = val5; obj5 = (object)val5; } CutsceneTransformation.OnEnter += (hook_OnEnter)obj5; object obj6 = <>O.<5>__Stage_PreStartClient; if (obj6 == null) { hook_PreStartClient val6 = Stage_PreStartClient; <>O.<5>__Stage_PreStartClient = val6; obj6 = (object)val6; } Stage.PreStartClient += (hook_PreStartClient)obj6; object obj7 = <>O.<6>__MonsterDCCSGenerateHook; if (obj7 == null) { Manipulator val7 = MonsterDCCSGenerateHook; <>O.<6>__MonsterDCCSGenerateHook = val7; obj7 = (object)val7; } ClassicStageInfo.RebuildCards += (Manipulator)obj7; } private static void Stage_PreStartClient(orig_PreStartClient orig, Stage self) { orig.Invoke(self); onStagePreStartClient?.Invoke(); } private static void CutsceneTransformation_OnEnter(orig_OnEnter orig, CutsceneTransformation self) { orig.Invoke(self); onSolusHeart?.Invoke(); } private static void Mission1Tunnel_OnExit(orig_OnExit orig, Mission1Tunnel self) { orig.Invoke(self); onSolusWing?.Invoke(); } private static void VoidlingStart(orig_Start orig, VoidRaidGauntletController self) { orig.Invoke(self); onVoidlingPhase1?.Invoke(); } public static void MonsterDCCSGenerateHook(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.MatchStfld(x, "RoR2.ClassicStageInfo", "modifiableMonsterCategories") })) { val.EmitDelegate<Func<DirectorCardCategorySelection, DirectorCardCategorySelection>>((Func<DirectorCardCategorySelection, DirectorCardCategorySelection>)delegate(DirectorCardCategorySelection dccs) { if (Object.op_Implicit((Object)(object)dccs) && !(dccs is FamilyDirectorCardCategorySelection)) { onMonsterDCCS?.Invoke(dccs); } return dccs; }); } else { Debug.LogWarning((object)"IL Failed: SotV_EnemyRemovals"); } } private static void FalseSonPhase1(orig_OnEnter orig, Phase1 self) { orig.Invoke(self); onFalseSonPhase1?.Invoke(); } private static void BrotherPhase1(orig_OnEnter orig, Phase1 self) { orig.Invoke(self); onMithrixPhase1?.Invoke(); } } public class InstantiateModelParams : MonoBehaviour { public Vector3 CameraPosition = new Vector3(-1.5f, 1f, 3f); public Vector3 FocusPosition = new Vector3(0f, 1f, 0f); } public class DccsUtil { public static void RemoveCard(DirectorCardCategorySelection dccs, int cat, string card) { string text = ""; switch (cat) { case 2: text = "Basic Monsters"; break; case 1: text = "Minibosses"; break; case 0: text = "Champions"; break; } cat = dccs.FindCategoryIndexByName(text); if (cat != -1) { int num = FindSpawnCard(ref dccs.categories[cat].cards, card); if (num != -1) { Log.LogMessage("Removed " + card + " from " + (object)SceneInfo.instance.sceneDef); ArrayUtils.ArrayRemoveAtAndResize<DirectorCard>(ref dccs.categories[cat].cards, num, 1); return; } } Log.LogWarning("Failed to remove " + card + " from " + (object)SceneInfo.instance.sceneDef); } public static int FindSpawnCard(ref DirectorCard[] insert, string LookingFor) { for (int i = 0; i < insert.Length; i++) { if (Object.op_Implicit((Object)(object)insert[i].GetSpawnCard()) && ((Object)insert[i].GetSpawnCard()).name.EndsWith(LookingFor)) { return i; } } return -1; } public static DirectorCard GetDirectorCard(ref DirectorCard[] insert, string LookingFor) { for (int i = 0; i < insert.Length; i++) { if (Object.op_Implicit((Object)(object)insert[i].GetSpawnCard()) && ((Object)insert[i].GetSpawnCard()).name.EndsWith(LookingFor)) { return insert[i]; } } return null; } } public class HLang { } public class AdvancedPickupDropTable : BasicPickupDropTable { private bool generated; public bool clearAfterGenerating; public bool unbiasedByItemCount = false; public float eliteEquipmentWeight; public override UniquePickup GeneratePickupPreReplacement(Xoroshiro128Plus rng) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) RegenerateReal(); return PickupDropTable.GeneratePickupFromWeightedSelection(rng, base.selector); } public override void GenerateDistinctPickupsPreReplacement(List<UniquePickup> dest, int desiredCount, Xoroshiro128Plus rng) { RegenerateReal(); PickupDropTable.GenerateDistinctFromWeightedSelection<UniquePickup>(dest, desiredCount, rng, base.selector); } public override void Regenerate(Run run) { generated = false; } public void RegenerateReal() { if (!generated) { generated = true; if (unbiasedByItemCount) { GenerateUnbiased(Run.instance); } else { ((BasicPickupDropTable)this).RegenerateDropTable(Run.instance); } AddEliteEquip(Run.instance); } } private void GenerateUnbiased(Run run) { base.selector.Clear(); AddUnbiased(run.availableTier1DropList, base.tier1Weight); AddUnbiased(run.availableTier2DropList, base.tier2Weight); AddUnbiased(run.availableTier3DropList, base.tier3Weight); AddUnbiased(run.availableBossDropList, base.bossWeight); AddUnbiased(run.availableLunarItemDropList, base.lunarItemWeight); AddUnbiased(run.availableLunarEquipmentDropList, base.lunarEquipmentWeight); AddUnbiased(run.availableLunarCombinedDropList, base.lunarCombinedWeight); AddUnbiased(run.availableEquipmentDropList, base.equipmentWeight); AddUnbiased(run.availableVoidTier1DropList, base.voidTier1Weight); AddUnbiased(run.availableVoidTier2DropList, base.voidTier2Weight); AddUnbiased(run.availableVoidTier3DropList, base.voidTier3Weight); AddUnbiased(run.availableVoidBossDropList, base.voidBossWeight); AddUnbiased(run.availableFoodTierDropList, base.foodTierWeight); } private void AddUnbiased(List<PickupIndex> sourceDropList, float chance) { //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_0042: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (chance <= 0f || sourceDropList.Count == 0) { return; } float num = chance / (float)sourceDropList.Count; foreach (PickupIndex sourceDrop in sourceDropList) { if (!((BasicPickupDropTable)this).IsFilterRequired() || ((BasicPickupDropTable)this).PassesFilter(sourceDrop)) { base.selector.AddChoice(new UniquePickup { pickupIndex = sourceDrop }, chance); } } } private void AddEliteEquip(Run run) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (eliteEquipmentWeight == 0f) { return; } List<EquipmentIndex> eliteEquipment = ModUtil.GetEliteEquipment(); float num = (unbiasedByItemCount ? (eliteEquipmentWeight / (float)eliteEquipment.Count) : eliteEquipmentWeight); foreach (EquipmentIndex item in eliteEquipment) { base.selector.AddChoice(new UniquePickup { pickupIndex = PickupCatalog.FindPickupIndex(item) }, num); } } } public class ForcedTeamCSC : CharacterSpawnCard { public TeamIndex teamIndexOverride = (TeamIndex)2; public override void Spawn(Vector3 position, Quaternion rotation, DirectorSpawnRequest directorSpawnRequest, ref SpawnResult result) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) directorSpawnRequest.teamIndexOverride = teamIndexOverride; ((CharacterSpawnCard)this).Spawn(position, rotation, directorSpawnRequest, ref result); } } public class SkinStuff { 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) SkinDefParams val = Addressables.LoadAssetAsync<SkinDefParams>((object)"6517af04dc3e7ce45a55f09e04c96772").WaitForCompletion(); SkinDefParams val2 = Addressables.LoadAssetAsync<SkinDefParams>((object)"4c92b69e995926b46876ed3c644a2e81").WaitForCompletion(); val.minionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[3] { new MinionSkinReplacement { minionBodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)"2340146f44941cc45aa8edc354ad77ae").WaitForCompletion(), minionSkin = Addressables.LoadAssetAsync<SkinDef>((object)"510231c58a9944e45be8b90f5b41a4d0").WaitForCompletion() }, new MinionSkinReplacement { minionBodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)"521223397dd4da74694c073e63c3183b").WaitForCompletion(), minionSkin = Addressables.LoadAssetAsync<SkinDef>((object)"37af658961eb1d64b91d03d8098da0f2").WaitForCompletion() }, new MinionSkinReplacement { minionBodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)"442aea01d301dec41a4a7c28e112d737").WaitForCompletion(), minionSkin = Addressables.LoadAssetAsync<SkinDef>((object)"a725c698056caf04790c1f808f62d948").WaitForCompletion() } }; val2.minionSkinReplacements = ArrayUtils.Clone<MinionSkinReplacement>(val.minionSkinReplacements); ((Component)Addressables.LoadAssetAsync<GameObject>((object)"ff7711aebac29b148a7312a3cae20572").WaitForCompletion().transform.GetChild(0).GetChild(0)).gameObject.AddComponent<OperatorGunColorReplacer>(); Addressables.LoadAssetAsync<GameObject>((object)"de1037cdfdf9bdc4f833708daffdf33d").WaitForCompletion().AddComponent<OperatorLobbySyncDroneSkinToMainSkin>(); } } public class OperatorLobbySyncDroneSkinToMainSkin : MonoBehaviour { private Transform droneSlotL; private Transform droneSlotR; private ModelSkinController controller; private Material mat1 = Addressables.LoadAssetAsync<Material>((object)"a5e2282a0ad1c474696de2fe1ddd09d4").WaitForCompletion(); private Material mat2 = Addressables.LoadAssetAsync<Material>((object)"4172ed2e16de6f04b8be2f6377521abb").WaitForCompletion(); private Material mat3 = Addressables.LoadAssetAsync<Material>((object)"448eba93c01ca6046970593a3cc2d234").WaitForCompletion(); public void OnEnable() { controller = ((Component)this).GetComponentInChildren<ModelSkinController>(); controller.onSkinApplied += Controller_onSkinApplied; Transform child = ((Component)this).transform.GetChild(0).GetChild(0).GetChild(0) .GetChild(1); droneSlotL = child.GetChild(0).GetChild(0); droneSlotR = child.GetChild(1).GetChild(0); } public void OnDisable() { controller.onSkinApplied -= Controller_onSkinApplied; } private void Controller_onSkinApplied(int index) { //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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0148: Unknown result type (might be due to invalid IL or missing references) if (controller.skins[index]._runtimeSkin == null) { Debug.LogWarning((object)"No runtime skin"); return; } Material material = mat1; Material material2 = mat2; Material material3 = mat3; if (controller.skins[index].runtimeSkin.minionSkinTemplates.Length != 0) { BodyIndex val = BodyCatalog.FindBodyIndex("DTGunnerDroneBody"); BodyIndex val2 = BodyCatalog.FindBodyIndex("DTHealingDroneBody"); BodyIndex val3 = BodyCatalog.FindBodyIndex("DTHaulerDroneBody"); Enumerator<MinionSkinTemplate> enumerator = controller.skins[index].runtimeSkin.minionSkinTemplates.GetEnumerator(); try { while (enumerator.MoveNext()) { MinionSkinTemplate current = enumerator.Current; if (current.minionSkin._runtimeSkin == null) { current.minionSkin.Bake(); } Material defaultMaterial = ((RendererInfoTemplate)current.minionSkin.runtimeSkin.rendererInfoTemplates[0]).data.defaultMaterial; if ((Object)(object)defaultMaterial != (Object)null) { if (current.minionBodyIndex == val) { material = defaultMaterial; } else if (current.minionBodyIndex == val2) { material2 = defaultMaterial; } else if (current.minionBodyIndex == val3) { material3 = defaultMaterial; } } } } finally { ((IDisposable)enumerator).Dispose(); } } ((Renderer)((Component)droneSlotL.GetChild(2).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = material; ((Renderer)((Component)droneSlotR.GetChild(2).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = material; ((Renderer)((Component)droneSlotL.GetChild(1).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = material2; ((Renderer)((Component)droneSlotR.GetChild(1).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = material2; ((Renderer)((Component)droneSlotL.GetChild(3).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = material3; ((Renderer)((Component)droneSlotR.GetChild(3).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = material3; } } public class OperatorGunColorReplacer : MonoBehaviour { public static Dictionary<SkinDef, Color> skinDefDic = new Dictionary<SkinDef, Color>(); public ModelSkinController skinController; public void Awake() { skinController = ((Component)this).GetComponent<ModelSkinController>(); skinController.onSkinApplied += Apply; } public void OnDisable() { skinController.onSkinApplied -= Apply; } public void Apply(int index) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) if (skinDefDic.TryGetValue(skinController.skins[index], out var value)) { ChildLocator component = ((Component)this).GetComponent<ChildLocator>(); Transform val = component.FindChild("ChargeVFX"); Transform child = val.GetChild(0); ((Component)child.GetChild(0)).GetComponent<ParticleSystem>().startColor = ((Color)(ref value)).AlphaMultiplied(0.2667f); ((Component)child.GetChild(1)).GetComponent<ParticleSystem>().startColor = value; ParticleSystemRenderer component2 = ((Component)child.GetChild(2)).GetComponent<ParticleSystemRenderer>(); ((Renderer)component2).material = Object.Instantiate<Material>(((Renderer)component2).material); ((Renderer)component2).material.SetColor("_TintColor", value); TrailRenderer component3 = ((Component)child.GetChild(2)).GetComponent<TrailRenderer>(); ((Renderer)component3).material = Object.Instantiate<Material>(((Renderer)component3).material); ((Renderer)component3).material.SetColor("_TintColor", value); } } } public class SandyInteractableMaterialOverrider : MonoBehaviour { public SceneDef sceneDef; public Material material; public void OnEnable() { if (!((Object)(object)SceneCatalog.mostRecentSceneDef == (Object)(object)sceneDef)) { } } } public static class Tags { public static ItemTag EvolutionBlacklist = (ItemTag)94; public static ItemTag ScavengerBlacklist = (ItemTag)95; public static BasicPickupDropTable dtMonsterTeamLunar; public static BasicPickupDropTable dtAISafeBoss; public static void AddTag(ItemDef def, ItemTag tag) { ArrayUtils.ArrayAppend<ItemTag>(ref def.tags, ref tag); } public static void RemoveTag(ItemDef def, ItemTag tag) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) int num = Array.IndexOf(def.tags, tag); if (num != -1) { ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref def.tags, num, 1); } } public static void RemoveTag(ItemDef def, int index) { ArrayUtils.ArrayRemoveAtAndResize<ItemTag>(ref def.tags, index, 1); } 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected I4, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Expected I4, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected I4, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: 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(); dtMonsterTeamLunar = ScriptableObject.CreateInstance<BasicPickupDropTable>(); ((Object)dtMonsterTeamLunar).name = "dtMonsterTeamLunar"; dtMonsterTeamLunar.tier1Weight = 0f; dtMonsterTeamLunar.tier2Weight = 0f; dtMonsterTeamLunar.tier3Weight = 0f; dtMonsterTeamLunar.lunarItemWeight = 1f; 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(); dtAISafeBoss = ScriptableObject.CreateInstance<BasicPickupDropTable>(); ((Object)dtAISafeBoss).name = "dtAISafeBoss"; dtAISafeBoss.tier1Weight = 0f; dtAISafeBoss.tier2Weight = 0f; dtAISafeBoss.tier3Weight = 0f; dtAISafeBoss.bossWeight = 1f; ItemTag[] array = new ItemTag[6]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); array[5] = (ItemTag)(int)ScavengerBlacklist; ItemTag[] bannedItemTags = (ItemTag[])(object)array; ItemTag[] array2 = new ItemTag[10]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); array2[4] = (ItemTag)(int)EvolutionBlacklist; array2[5] = (ItemTag)(int)ScavengerBlacklist; ItemTag[] bannedItemTags2 = (ItemTag[])(object)array2; ItemTag[] array3 = new ItemTag[9]; RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); array3[4] = (ItemTag)(int)ScavengerBlacklist; ItemTag[] bannedItemTags3 = (ItemTag[])(object)array3; val.bannedItemTags = bannedItemTags2; val2.bannedItemTags = bannedItemTags2; val3.bannedItemTags = bannedItemTags2; dtMonsterTeamLunar.bannedItemTags = bannedItemTags2; val4.bannedItemTags = bannedItemTags3; val5.bannedItemTags = bannedItemTags3; val6.bannedItemTags = bannedItemTags3; val7.bannedItemTags = bannedItemTags; val8.bannedItemTags = bannedItemTags; val9.bannedItemTags = bannedItemTags; dtAISafeBoss.bannedItemTags = bannedItemTags; } } public static class ModUtil { public enum SkinVariant { Default, Snow, Sand } public static List<EquipmentIndex> GetEliteEquipment(bool droppableOnly = true) { //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) List<EquipmentIndex> list = new List<EquipmentIndex>(); try { for (int i = 0; i < EquipmentCatalog.equipmentDefs.Length; i++) { EquipmentDef val = EquipmentCatalog.equipmentDefs[i]; if (Object.op_Implicit((Object)(object)val.passiveBuffDef) && Object.op_Implicit((Object)(object)val.passiveBuffDef.eliteDef) && ((val.dropOnDeathChance > 0f && (!Object.op_Implicit((Object)(object)Run.instance) || !Run.instance.expansionLockedEquipment.Contains(val.equipmentIndex))) || !droppableOnly)) { list.Add(val.equipmentIndex); } } if (!droppableOnly) { list.Remove(MissedContent.Equipment.EliteSecretSpeedEquipment.equipmentIndex); list.Remove(Equipment.EliteYellowEquipment.equipmentIndex); list.Remove(Equipment.EliteGoldEquipment.equipmentIndex); } } catch (Exception ex) { Debug.LogWarning((object)ex); } return list; } public static SkinVariant GetInteractableSkinFromStage(SceneDef scene) { switch (scene.baseSceneName) { case "snowyforest": case "nest": case "frozenwall": case "itfrozenwall": return SkinVariant.Snow; case "goolake": case "itgoolake": case "lemuriantemple": case "ironalluvium": case "ironalluvium2": case "repurposedcrater": return SkinVariant.Sand; default: return SkinVariant.Default; } } } public static class DLCS { public static ExpansionDef DLC1 = Addressables.LoadAssetAsync<ExpansionDef>((object)"d4f30c23b971a9b428e2796dc04ae099").WaitForCompletion(); public static ExpansionDef DLC2 = Addressables.LoadAssetAsync<ExpansionDef>((object)"851f234056d389b42822523d1be6a167").WaitForCompletion(); public static ExpansionDef DLC3 = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC3/DLC3.asset").WaitForCompletion(); public static EntitlementDef entitlementDLC1 = Addressables.LoadAssetAsync<EntitlementDef>((object)"0166774839e0bd345bb11554aecbfd32").WaitForCompletion(); public static EntitlementDef entitlementDLC2 = Addressables.LoadAssetAsync<EntitlementDef>((object)"68fcfaddae5157f4581a1fc209e4eac6").WaitForCompletion(); public static EntitlementDef entitlementDLC3 = Addressables.LoadAssetAsync<EntitlementDef>((object)"6673dacf8c8aa87409fc73e6da34684b").WaitForCompletion(); } public static class SceneList { public static SceneDef Blackbeach = Addressables.LoadAssetAsync<SceneDef>((object)"c129d2b9e62c31b4ba165091d1ae2c50").WaitForCompletion(); public static SceneDef Blackbeach2 = Addressables.LoadAssetAsync<SceneDef>((object)"f87198140bf9b5a4f82e206231df9091").WaitForCompletion(); public static SceneDef Golemplains = Addressables.LoadAssetAsync<SceneDef>((object)"8ba24a95e46b3944280a4b66afd0c4dc").WaitForCompletion(); public static SceneDef Golemplains2 = Addressables.LoadAssetAsync<SceneDef>((object)"657a62eb3e4c409429c91ba6fdb7d921").WaitForCompletion(); public static SceneDef SulfurPools = Addressables.LoadAssetAsync<SceneDef>((object)"796f9b67682b3db4c8c5af7294d0490c").WaitForCompletion(); public static SceneDef RootJungle = Addressables.LoadAssetAsync<SceneDef>((object)"ced489f798226594db0d115af2101a9b").WaitForCompletion(); public static SceneDef Habitat = Addressables.LoadAssetAsync<SceneDef>((object)"0b33829c6cdfad34a8160c6ae17edfcc").WaitForCompletion(); public static SceneDef HabitatFall = Addressables.LoadAssetAsync<SceneDef>((object)"962a6a8a56f584b468a4835c82c11951").WaitForCompletion(); public static SceneDef itGolemPlains = Addressables.LoadAssetAsync<SceneDef>((object)"dda7dbdf013275747949dfc522842635").WaitForCompletion(); public static SceneDef itGoolake = Addressables.LoadAssetAsync<SceneDef>((object)"0a35bec906d067941a8a378b963e9e9d").WaitForCompletion(); public static SceneDef itAncientLoft = Addressables.LoadAssetAsync<SceneDef>((object)"568295b69af09c241968fa18ca37b56d").WaitForCompletion(); public static SceneDef itFrozenwall = Addressables.LoadAssetAsync<SceneDef>((object)"0ab15976715ddd6438e2e5bd6ddbe224").WaitForCompletion(); public static SceneDef itDampCave = Addressables.LoadAssetAsync<SceneDef>((object)"c33b24f6ebf27db49a5cfb88dbe9b8ff").WaitForCompletion(); public static SceneDef itSkyMeadow = Addressables.LoadAssetAsync<SceneDef>((object)"6a2712b5c8cf36f44b34c128f2759522").WaitForCompletion(); public static SceneDef itMoon = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/itmoon/itmoon.asset").WaitForCompletion(); public static SceneDef Moon2 = Addressables.LoadAssetAsync<SceneDef>((object)"5d69f3396feb7ba428d1e53a44479594").WaitForCompletion(); public static SceneDef MysterySpace = Addressables.LoadAssetAsync<SceneDef>((object)"1303cd0450cbaf140970e7afd5162314").WaitForCompletion(); public static SceneDef VoidStage = Addressables.LoadAssetAsync<SceneDef>((object)"66e0cfba315981a40afae481363ea0da").WaitForCompletion(); public static SceneDef VoidRaid = Addressables.LoadAssetAsync<SceneDef>((object)"223a0f0a86052654a9e473d13f77cb41").WaitForCompletion(); } public static class MissedContent { public static class Items { public static ItemDef ScrapWhiteSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapWhiteSuppressed.asset").WaitForCompletion(); public static ItemDef ScrapGreenSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapGreenSuppressed.asset").WaitForCompletion(); public static ItemDef ScrapRedSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapRedSuppressed.asset").WaitForCompletion(); } public static class Equipment { public static EquipmentDef EliteEarthEquipment = Addressables.LoadAssetAsync<EquipmentDef>((object)"463f8f6917dd8af40860b023a520f051").WaitForCompletion(); public static EquipmentDef EliteSecretSpeedEquipment = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/EliteSecretSpeedEquipment.asset").WaitForCompletion(); } public static class BodyPrefabs { public static CharacterBody SquidTurretBody = Addressables.LoadAssetAsync<GameObject>((object)"5290eaf612d386740ac26f289e06b62f").WaitForCompletion().GetComponent<CharacterBody>(); public static CharacterBody BeetleGuardAllyBody = Addressables.LoadAssetAsync<GameObject>((object)"e21e3b9cdc2802148986eda1c923c9a1").WaitForCompletion().GetComponent<CharacterBody>(); public static CharacterBody RoboBallGreenBuddyBody = Addressables.LoadAssetAsync<GameObject>((object)"d64335d9c1517cb4a8764a0de1d01a03").WaitForCompletion().GetComponent<CharacterBody>(); public static CharacterBody RoboBallRedBuddyBody = Addressables.LoadAssetAsync<GameObject>((object)"e8a603acea1fa2249a83c0257a9f5f10").WaitForCompletion().GetComponent<CharacterBody>(); } public static class GameEndings { public static GameEndingDef EscapeSequenceFailed = Addressables.LoadAssetAsync<GameEndingDef>((object)"RoR2/Base/ClassicRun/EscapeSequenceFailed.asset").WaitForCompletion(); } public static class Survivors { public static SurvivorDef VoidSurvivor = Addressables.LoadAssetAsync<SurvivorDef>((object)"dc32bd426643dce478dd1b04fd07cdf6").WaitForCompletion(); } public static class Elites { public static EliteDef edSecretSpeed = Addressables.LoadAssetAsync<EliteDef>((object)"9752d818bdea9b449845fc4df8aed07a").WaitForCompletion(); public static EliteDef CollectiveWeak = Addressables.LoadAssetAsync<EliteDef>((object)"5834fbe05a0d4ce4eae57f87aae57920").WaitForCompletion(); } } } namespace WolfoLibrary.Testing { internal class Commands { [CompilerGenerated] private static class <>O { public static hook_VerifyLocalSteamUser <0>__EntitlementAbstractions_VerifyLocalSteamUser; public static Action<Inventory> <1>__OnInventoryChangedGlobal; } public static bool cheatsEnabled = false; public static List<EntitlementDef> disabledDefs; public static bool voidItems = true; public static void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__EntitlementAbstractions_VerifyLocalSteamUser; if (obj == null) { hook_VerifyLocalSteamUser val = EntitlementAbstractions_VerifyLocalSteamUser; <>O.<0>__EntitlementAbstractions_VerifyLocalSteamUser = val; obj = (object)val; } EntitlementAbstractions.VerifyLocalSteamUser += (hook_VerifyLocalSteamUser)obj; } private static bool EntitlementAbstractions_VerifyLocalSteamUser(orig_VerifyLocalSteamUser orig, EntitlementDef entitlementDef) { if (disabledDefs != null && disabledDefs.Contains(entitlementDef)) { return false; } return orig.Invoke(entitlementDef); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCToggleVoidFiend(ConCommandArgs args) { if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderBody)) { Debug.Log((object)"No Body"); return; } VoidSurvivorController component = ((Component)((ConCommandArgs)(ref args)).senderBody).GetComponent<VoidSurvivorController>(); if (!Object.op_Implicit((Object)(object)component)) { Debug.Log((object)"No Void Fiend"); return; } component.corruptionPerCrit *= -1f; component.corruptionForFullDamage *= -1f; component.corruptionPerSecondOutOfCombat *= -1f; component.corruptionPerSecondInCombat *= -1f; component._corruption = 0f; Debug.Log((object)((component.corruptionPerCrit > 0f) ? "Enabled" : "DisabledVoid Fiend Corruption")); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCToggleVoidItems(ConCommandArgs args) { if (voidItems) { Inventory.onInventoryChangedGlobal -= ContagiousItemManager.OnInventoryChangedGlobal; } else { Inventory.onInventoryChangedGlobal += ContagiousItemManager.OnInventoryChangedGlobal; } Debug.Log((object)(voidItems ? "Enabled" : "DisabledVoid Item Corruption")); } [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCToggleDLC(ConCommandArgs args) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) int valueOrDefault = ((ConCommandArgs)(ref args)).TryGetArgInt(0).GetValueOrDefault(0); valueOrDefault--; if (valueOrDefault == -1) { Debug.Log((object)"Need expansion number"); return; } if (disabledDefs == null) { disabledDefs = new List<EntitlementDef>(); } EntitlementDef entitlementDef = EntitlementCatalog.GetEntitlementDef((EntitlementIndex)valueOrDefault); if (disabledDefs.Contains(entitlementDef)) { disabledDefs.Remove(entitlementDef); Debug.Log((object)("Reallowing" + Language.GetString(entitlementDef.nameToken))); } else { disabledDefs.Add(entitlementDef); Debug.Log((object)("Disabling" + Language.GetString(entitlementDef.nameToken))); } EntitlementManager.CCEntitlementForceRefresh(args); } [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCLoad(ConCommandArgs args) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)("Loading: " + ((ConCommandArgs)(ref args)).TryGetArgString(0))); Debug.Log((object)Addressables.LoadAssetAsync<Object>((object)((ConCommandArgs)(ref args)).TryGetArgString(0)).WaitForCompletion()); } [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCRandomUnlock(ConCommandArgs args) { if (!cheatsEnabled) { Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed"); return; } int valueOrDefault = ((ConCommandArgs)(ref args)).TryGetArgInt(0).GetValueOrDefault(1); int num = 0; while (num < valueOrDefault) { int num2 = Run.instance.runRNG.RangeInt(0, UnlockableCatalog.unlockableCount); UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef((UnlockableIndex)num2); if (unlockableDef.hidden) { continue; } num++; foreach (NetworkUser readOnlyInstances in NetworkUser.readOnlyInstancesList) { if (readOnlyInstances.isParticipating) { readOnlyInstances.ServerHandleUnlock(unlockableDef); Debug.Log((object)("Granting " + Language.GetString(unlockableDef.nameToken))); } } } } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CC_clear_notifs(ConCommandArgs args) { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); UserProfile userProfile = firstLocalUser.userProfile; StatSheet statSheet = userProfile.statSheet; if (userProfile != null) { userProfile.ClearAllAchievementNotifications(); } } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CC_AllUnlocks(ConCommandArgs args) { //IL_00ff: Unknown result type (might be due to invalid IL or missing references) if (!cheatsEnabled) { Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed"); return; } LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); UserProfile userProfile = firstLocalUser.userProfile; StatSheet statSheet = userProfile.statSheet; if (userProfile != null) { for (int i = 0; AchievementManager.achievementDefs.Length > i; i++) { userProfile.AddAchievement(AchievementManager.achievementDefs[i].identifier, false); } for (int j = 0; UnlockableCatalog.unlockableCount > j; j++) { statSheet.AddUnlockable((UnlockableIndex)j); } for (int k = 0; BodyCatalog.bodyCount > k; k++) { statSheet.PushStatValue(PerBodyStatDef.timesSummoned, (BodyIndex)k, 1uL); } for (int l = 0; SurvivorCatalog.survivorCount > l; l++) { statSheet.PushStatValue(PerBodyStatDef.totalWins, SurvivorCatalog.survivorIndexToBodyIndex[l], 1uL); } for (int m = 0; PickupCatalog.pickupCount > m; m++) { userProfile.SetPickupDiscovered(new PickupIndex(m), true); } userProfile.ClearAllAchievementNotifications(); userProfile.RequestEventualSave(); } } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CC_RemoveUnlocks(ConCommandArgs args) { if (!cheatsEnabled) { Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed"); return; } LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); UserProfile userProfile = firstLocalUser.userProfile; StatSheet statSheet = userProfile.statSheet; if (userProfile != null) { for (int i = 0; UnlockableCatalog.unlockableCount > i; i++) { statSheet.RemoveUnlockable((UnlockableIndex)i); } int num = userProfile.achievementsList.Count - 1; while (0 <= num) { userProfile.RevokeAchievement(userProfile.achievementsList[num]); num--; } userProfile.RequestEventualSave(); } } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCSimuSoftlock(ConCommandArgs args) { //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0164: 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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown if (!cheatsEnabled) { Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed"); return; } if (!Object.op_Implicit((Object)(object)Run.instance)) { Debug.LogWarning((object)"No Run"); } if (!(Run.instance is InfiniteTowerRun)) { Debug.LogWarning((object)"No Simu Run"); } InfiniteTowerRun val = (InfiniteTowerRun)Run.instance; try { if (Object.op_Implicit((Object)(object)val.waveController)) { val.waveController.OnAllEnemiesDefeatedServer(); val.waveController.ForceFinish(); } else { val.OnWaveAllEnemiesDefeatedServer((InfiniteTowerWaveController)null); val.CleanUpCurrentWave(); if (Object.op_Implicit((Object)(object)val.waveInstance)) { Object.Destroy((Object)(object)val.waveInstance); } if (!val.IsStageTransitionWave()) { val.BeginNextWave(); } } if (Object.op_Implicit((Object)(object)val.safeWardController) && !(val.safeWardController.wardStateMachine.state is Active)) { val.safeWardController.wardStateMachine.SetState((EntityState)new Active()); } } catch (Exception ex) { ((Run)val).PickNextStageSceneFromCurrentSceneDestinations(); DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)val.stageTransitionPortalCard, new DirectorPlacementRule { minDistance = 0f, maxDistance = val.stageTransitionPortalMaxDistance, placementMode = (PlacementMode)1, position = ((Component)val.safeWardController).transform.position, spawnOnTarget = ((Component)val.safeWardController).transform }, val.safeWardRng)); Chat.AddMessage((ChatMessageBase)new SimpleChatMessage { baseToken = val.stageTransitionChatToken }); if (Object.op_Implicit((Object)(object)val.safeWardController)) { val.safeWardController.WaitForPortal(); } Debug.LogWarning((object)ex.ToString()); } Debug.LogWarning((object)"Report any errors"); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCAllItems(ConCommandArgs args) { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Invalid comparison between Unknown and I4 //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Invalid comparison between Unknown and I4 //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Invalid comparison between Unknown and I4 //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Invalid comparison between Unknown and I4 //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Invalid comparison between Unknown and I4 //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Invalid comparison between Unknown and I4 if (!cheatsEnabled) { Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed"); return; } int valueOrDefault = ((ConCommandArgs)(ref args)).TryGetArgInt(0).GetValueOrDefault(0); if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster) || !NetworkServer.active) { return; } if (valueOrDefault == 1) { for (int i = 0; i < ItemCatalog.itemCount; i++) { try { ((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItemPermanent((ItemIndex)i, 1); } catch (Exception) { } } ((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItemPermanent(Items.HealthDecay, 999999); ContagiousItemManager.originalToTransformed = Array.Empty<ItemIndex>(); ContagiousItemManager.transformationInfos = ReadOnlyArray<TransformationInfo>.op_Implicit(Array.Empty<TransformationInfo>()); } else { for (int j = 0; j < ItemCatalog.itemCount; j++) { ItemDef itemDef = ItemCatalog.GetItemDef((ItemIndex)j); if ((int)itemDef.tier == 5) { continue; } if (valueOrDefault != 2 && (int)itemDef.tier != 5 && (int)itemDef.tier != 9 && (int)itemDef.tier != 6 && (int)itemDef.tier != 7 && (int)itemDef.tier != 8) { try { ((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItemPermanent((ItemIndex)j, 1); } catch (Exception) { } } try { ((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItemPermanent((ItemIndex)j, 1); } catch (Exception) { } } } Object.Destroy((Object)(object)((Component)((ConCommandArgs)(ref args)).senderMaster).GetComponent<MasterSuicideOnTimer>()); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCALLBuffs(ConCommandArgs args) { if (!cheatsEnabled) { Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed"); } else if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderBody) && NetworkServer.active) { CharacterBody senderBody = ((ConCommandArgs)(ref args)).senderBody; for (int i = 0; i < BuffCatalog.buffCount; i++) { ((ConCommandArgs)(ref args)).senderBody.AddBuff((BuffIndex)i); } } } } internal class Commands_Lists { [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_CurrentStats(ConCommandArgs args) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Invalid comparison between Unknown and I4 //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Invalid comparison between Unknown and I4 StatSheet val = null; if (PlayerCharacterMasterController.instances.Count != 0) { val = PlayerCharacterMasterController.instances[0].master.playerStatsComponent.currentStats; } else { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); UserProfile userProfile = firstLocalUser.userProfile; val = userProfile.statSheet; } if (val == null) { Debug.Log((object)"No Players"); return; } string text = ""; for (int i = 0; i < val.fields.Length; i++) { StatDef statDef = val.fields[i].statDef; if ((int)statDef.dataType == 0) { if (((StatField)(ref val.fields[i])).ulongValue != 0) { text += string.Format("\n[{0}] {1} | {2}", new object[3] { i, statDef.name, ((StatField)(ref val.fields[i])).ulongValue }); } } else if ((int)statDef.dataType == 1 && ((StatField)(ref val.fields[i])).doubleValue > 0.0) { text += string.Format("\n[{0}] {1} | {2}", new object[3] { i, statDef.name, ((StatField)(ref val.fields[i])).doubleValue }); } } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_StatDef(ConCommandArgs args) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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) string text = ""; StatField[] fieldsTemplate = StatSheet.fieldsTemplate; foreach (StatField val in fieldsTemplate) { text = text + "\n" + val.statDef.name + " | " + Language.GetString(val.statDef.displayToken); } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_SceneDef(ConCommandArgs args) { //IL_0008: 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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_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) string text = ""; Enumerator<SceneDef> enumerator = SceneCatalog.allSceneDefs.GetEnumerator(); try { while (enumerator.MoveNext()) { SceneDef current = enumerator.Current; if (!current.isOfflineScene) { string[] obj = new string[5] { text, "\n", current.cachedName, " | ", null }; Color environmentColor = current.environmentColor; obj[4] = ((object)(Color)(ref environmentColor)).ToString(); text = string.Concat(obj); } } } finally { ((IDisposable)enumerator).Dispose(); } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCListCategoriesInPercent(ConCommandArgs args) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)ClassicStageInfo.instance)) { Debug.Log((object)"Must be on stage"); } DirectorCardCategorySelection interactableCategories = ClassicStageInfo.instance.interactableCategories; if (!Object.op_Implicit((Object)(object)interactableCategories)) { Debug.Log((object)"No DCCS"); } float num = interactableCategories.SumOfAllCategories(); string text = "--" + SceneInfo.instance.sceneDef.cachedName + "--\n"; Category[] categories = interactableCategories.categories; foreach (Category val in categories) { text = text + val.name + " | " + val.selectionWeight / num * 100f + "%\n"; } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_RuleDef(ConCommandArgs args) { string text = ""; foreach (RuleDef allRuleDef in RuleCatalog.allRuleDefs) { text = text + "\n" + allRuleDef.globalName; foreach (RuleChoiceDef choice in allRuleDef.choices) { text = text + "\n-" + choice.globalName; } } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_EffectDef(ConCommandArgs args) { string text = ""; EffectDef[] entries = EffectCatalog.entries; foreach (EffectDef val in entries) { text = text + "\n" + val.prefabName; } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_CombatDirector(ConCommandArgs args) { //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_007f: Unknown result type (might be due to invalid IL or missing references) SceneDirector val = Object.FindFirstObjectByType<SceneDirector>(); if (!Object.op_Implicit((Object)(object)ClassicStageInfo.instance)) { Debug.Log((object)"No SceneDirector"); return; } string text = string.Empty; float num = ClassicStageInfo.instance.modifiableMonsterCategories.SumOfAllCategories(); for (int i = 0; i < ClassicStageInfo.instance.monsterSelection.Count; i++) { ChoiceInfo<DirectorCard> val2 = ClassicStageInfo.instance.monsterSelection.choices[i]; text += string.Format("\n{0} | {1}", new object[2] { ((Object)val2.value.spawnCard).name, val2.weight / num * 100f + "%" }); } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_SceneDirector(ConCommandArgs args) { //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_0067: 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) SceneDirector val = Object.FindFirstObjectByType<SceneDirector>(); if (!Object.op_Implicit((Object)(object)val)) { Debug.Log((object)"No SceneDirector"); return; } string text = string.Empty; float num = ClassicStageInfo.instance.interactableCategories.SumOfAllCategories(); WeightedSelection<DirectorCard> val2 = val.GenerateInteractableCardSelection(); for (int i = 0; i < val2.Count; i++) { ChoiceInfo<DirectorCard> val3 = val2.choices[i]; text += string.Format("\n{0} | {1}", new object[2] { ((Object)val3.value.spawnCard).name, val3.weight / num * 100f + "%" }); } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_PickupDef(ConCommandArgs args) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) string text = ""; for (int i = 0; i < PickupCatalog.entries.Length; i++) { PickupDef val = PickupCatalog.entries[i]; text += string.Format("{3}|{0} | <color=#{2}>{1}</color>\n", val.internalName, Language.GetString(val.nameToken), ColorUtility.ToHtmlStringRGB(val.baseColor), i); } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_MusicDef(ConCommandArgs args) { string text = ""; for (int i = 0; i < MusicTrackCatalog.musicTrackDefs.Length; i++) { MusicTrackDef val = MusicTrackCatalog.musicTrackDefs[i]; text += string.Format("{0} | {1}\n", new object[2] { val.cachedName, val.comment }); } Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_BuffDefFlags(ConCommandArgs args) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) string text = "\n--HiddenBuffs--"; string text2 = "\n--IgnoredByNectar--"; string text3 = "\n--IgnoredByNoxThorn--"; BuffDef[] buffDefs = BuffCatalog.buffDefs; foreach (BuffDef val in buffDefs) { if (val.isHidden) { text = text + "\n" + ((Object)val).name; continue; } if (((Enum)val.flags).HasFlag((Enum)(object)(Flags)1)) { text3 = text3 + "\n" + ((Object)val).name; } if (val.ignoreGrowthNectar && !val.isDebuff && !val.isCooldown && !val.isDOT) { text2 = text2 + "\n" + ((Object)val).name; } } Debug.Log((object)text); Debug.Log((object)text2); Debug.Log((object)text3); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_BodyFlags(ConCommandArgs args) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) string empty = string.Empty; CharacterBody[] bodyPrefabBodyComponents = BodyCatalog.bodyPrefabBodyComponents; foreach (CharacterBody val in bodyPrefabBodyComponents) { Debug.LogFormat("\n{0}\n{1}", new object[2] { ((Object)val).name, val.bodyFlags }); } Debug.LogFormat(empty, Array.Empty<object>()); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_SimuWaves(ConCommandArgs args) { //IL_0166: 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) List<DetachParticleOnDestroyAndEndEmission> list = Resources.FindObjectsOfTypeAll<DetachParticleOnDestroyAndEndEmission>().ToList(); foreach (DetachParticleOnDestroyAndEndEmission item in list) { if (Object.op_Implicit((Object)(object)((Component)item).GetComponent<EffectComponent>())) { if (((Behaviour)item).enabled && (Object)(object)item.particleSystem != (Object)null) { Debug.LogWarning((object)((Object)((Component)item).transform.root).name); } else { Debug.Log((object)((Object)((Component)item).transform.root).name); } } } List<InfiniteTowerWaveCategory> list2 = Resources.FindObjectsOfTypeAll<InfiniteTowerWaveCategory>().ToList(); foreach (InfiniteTowerWaveCategory item2 in list2) { string text = "_____\n" + ((Object)item2).name; for (int i = 0; i < item2.wavePrefabs.Length; i++) { Transform child = item2.wavePrefabs[i].wavePrefab.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab.transform.GetChild(0).GetChild(1); text += string.Format("\n<color=#{2}>{0}</color>\n<color=#{3}>{1}</color>\nWeight:{4}", Language.GetString(((Component)child.GetChild(0)).GetComponent<InfiniteTowerWaveCounter>().token), Language.GetString(((Component)child.GetChild(1)).GetComponent<LanguageTextMeshController>().token), ColorUtility.ToHtmlStringRGB(((Graphic)((Component)child.GetChild(0)).GetComponent<TextMeshProUGUI>()).color), ColorUtility.ToHtmlStringRGB(((Graphic)((Component)child.GetChild(1)).GetComponent<TextMeshProUGUI>()).color), item2.wavePrefabs[i].weight); } Debug.Log((object)text); } } [ConCommand(/*Could not decode attribute arguments.*/)] public unsafe static void CCList_ItemTags(ConCommandArgs args) { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < ItemCatalog.allItemDefs.Length; i++) { ItemDef val = (ItemDef)Unsafe.Read<object>((void*)ItemCatalog.allItemDefs[i]); string text = "\n__" + ((Object)val).name + " | " + Language.GetString(val.nameToken) + "__"; for (int j = 0; j < val.tags.Length; j++) { text = text + "\n" + ((object)(ItemTag)(ref val.tags[j])).ToString(); } Debug.Log((object)text); } } [ConCommand(/*Could not decode attribute arguments.*/)] public unsafe static void CCList_ItemCategory(ConCommandArgs args) { //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Invalid comparison between Unknown and I4 //IL_0070: Unknown result type (might be due to invalid IL or missing references) string text = "______\nItems tagged as Damage"; string text2 = "______\nItems tagged as Healing"; string text3 = "______\nItems tagged as Utility"; string text4 = "______\nItems tagged as AIBlacklist"; string text5 = "______\nItems tagged as CannotDuplicate"; for (int i = 0; i < ItemCatalog.allItemDefs.Length; i++) { ItemDef val = (ItemDef)Unsafe.Read<object>((void*)ItemCatalog.allItemDefs[i]); if ((int)val.tier != 5) { string text6 = string.Format("\n<color=#{1}>{0}</color>", new object[2] { Language.GetString(val.nameToken), ColorCatalog.GetColorHexString(val.colorIndex) }); if (Array.IndexOf(val.tags, (ItemTag)1) != -1) { text += text6; } if (Array.IndexOf(val.tags, (ItemTag)2) != -1) { text2 += text6; } if (Array.IndexOf(val.tags, (ItemTag)3) != -1) { text3 += text6; } if (Array.IndexOf(val.tags, (ItemTag)4) != -1) { text4 += text6; } if (Array.IndexOf(val.tags, (ItemTag)15) != -1) { text5 += text6; } } } Debug.Log((object)text); Debug.Log((object)text2); Debug.Log((object)text3); Debug.Log((object)text4); Debug.Log((object)text5); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CCList_DCCS(ConCommandArgs args) { //IL_0040: 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_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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) List<DirectorCardCategorySelection> list = new List<DirectorCardCategorySelection>(); foreach (IResourceLocator resourceLocator in Addressables.ResourceLocators) { foreach (object key in resourceLocator.Keys) { DirectorCardCategorySelection val = Addressables.LoadAssetAsync<DirectorCardCategorySelection>(key).WaitForCompletion(); if ((Object)(object)val != (Object)null) { CollectionUtils.AddDistinct<DirectorCardCategorySelection>((IList<DirectorCardCategorySelection>)list, val); } Addressables.LoadAssetAsync<SpawnCard>(key).WaitForCompletion(); Addressables.LoadAssetAsync<DccsPool>(key).WaitForCompletion(); } } List<DirectorCardCategorySelection> list2 = new List<DirectorCardCategorySelection>(); List<DirectorCardCategorySelection> list3 = new List<DirectorCardCategorySelection>(); List<DirectorCardCategorySelection> list4 = new List<DirectorCardCategorySelection>(); List<DirectorCardCategorySelection> list5 = new List<DirectorCardCategorySelection>(); List<DirectorCardCategorySelection> list6 = Resources.FindObjectsOfTypeAll<DirectorCardCategorySelection>().ToList(); List<DccsPool> list7 = Resources.FindObjectsOfTypeAll<DccsPool>().OfType<DccsPool>().ToList(); List<CharacterSpawnCard> list8 = Resources.FindObjectsOfTypeAll<CharacterSpawnCard>().OfType<CharacterSpawnCard>().ToList(); List<InteractableSpawnCard> list9 = Resources.FindObjectsOfTypeAll<InteractableSpawnCard>().OfType<InteractableSpawnCard>().ToList(); foreach (DirectorCardCategorySelection item in list) { list6.Remove(item); if (item is FamilyDirectorCardCategorySelection) { list4.Add(item); } else if (((Object)item).name.Contains("Interactables")) { list2.Add(item); } else if (((Object)item).name.Contains("Monsters")) { list3.Add(item); } else { list5.Add(item); } } list3.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name)); list2.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name)); list4.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name)); list5.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name)); list6.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name)); list7.Sort((DccsPool x, DccsPool y) => string.Compare(((Object)x).name, ((Object)y).name)); list8.Sort((CharacterSpawnCard x, CharacterSpawnCard y) => string.Compare(((Object)x).name, ((Object)y).name)); list9.Sort((InteractableSpawnCard x, InteractableSpawnCard y) => string.Compare(((Object)x).name, ((Object)y).name)); Debug.Log((object)"\nDCCS | All Interactables"); DumpDCCSList(list2); Debug.Log((object)"\nDCCS | All Monsters"); DumpDCCSList(list3); Debug.Log((object)"\nDCCS | All Families"); DumpDCCSList(list4); Debug.Log((object)"\nDCCS | Misc"); DumpDCCSList(list5); Debug.Log((object)"\nDCCS | Not Vanilla"); DumpDCCSList(list6); Debug.Log((object)"\nDP | All DccsPools"); for (int i = 0; list7.Count > i; i++) { string text = "\n--------------------\n"; text += ((Object)list7[i]).name; for (int j = 0; list7[i].poolCategories.Length > j; j++) { Category val2 = list7[i].poolCategories[j]; text = text + "\n--[" + j + "]--" + val2.name; for (int k = 0; val2.alwaysIncluded.Length > k; k++) { text = text + "\n[" + k + "] " + ((Object)val2.alwaysIncluded[k].dccs).name + " wt:" + val2.alwaysIncluded[k].weight; } for (int l = 0; val2.includedIfConditionsMet.Length > l; l++) { text = text + "\n[" + l + "] " + ((Object)((PoolEntry)val2.includedIfConditionsMet[l]).dccs).name + " wt:" + ((PoolEntry)val2.includedIfConditionsMet[l]).weight; } for (int m = 0; val2.includedIfNoConditionsMet.Length > m; m++) { text = text + "\n[" + m + "] " + ((Object)val2.includedIfNoConditionsMet[m].dccs).name + " wt:" + val2.includedIfNoConditionsMet[m].weight; } } Debug.Log((object)text); } Debug.Log((object)"--\nCharacterSpawnCards\n--"); for (int n = 0; list8.Count > n; n++) { Debug.Log((object)(((Object)list8[n]).name + " Cost:" + ((SpawnCard)list8[n]).directorCreditCost)); } Debug.Log((object)"--\nInteractableSpawnCards\n--"); for (int num = 0; list9.Count > num; num++) { Debug.Log((object)(((Object)list9[num]).name + " Cost:" + ((SpawnCard)list9[num]).directorCreditCost)); } } public static void DumpDCCSList(List<DirectorCardCategorySelection> allDCCS) { //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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; allDCCS.Count > i; i++) { string text = "\n-------------------\n"; text += ((Object)allDCCS[i]).name; DirectorCardCategorySelection obj = allDCCS[i]; FamilyDirectorCardCategorySelection val = (FamilyDirectorCardCategorySelection)(object)((obj is FamilyDirectorCardCategorySelection) ? obj : null); if (Object.op_Implicit((Object)(object)val)) { text = text + "\nfamilyStart: " + val.minimumStageCompletion; text = text + "\nfamilyEnd: " + val.maximumStageCompletion; } for (int j = 0; allDCCS[i].categories.Length > j; j++) { Category val2 = allDCCS[i].categories[j]; text = text + "\n--[" + j + "]--" + val2.name + "-- wt:" + allDCCS[i].categories[j].selectionWeight; for (int k = 0; val2.cards.Length > k; k++) { text = text + "\n[" + k + "] "; text = (Object.op_Implicit((Object)(object)val2.cards[k].spawnCard) ? (text + ((Object)val2.cards[k].spawnCard).name) : (text + "NULL Spawn Card")); text = text + " wt:" + val2.cards[k].selectionWeight + " minStage:" + val2.cards[k].minimumStageCompletions; if (Object.op_Implicit((Object)(object)val2.cards[k].forbiddenUnlockableDef) || !string.IsNullOrEmpty(val2.cards[k].forbiddenUnlockable)) { text = text + " forbiddenWhen: " + val2.cards[k].forbiddenUnlockable + (object)val2.cards[k].forbiddenUnlockableDef; } } } Debug.Log((object)text); } } } internal class Test { [CompilerGenerated] private static class <>O { public static hook_GetOptionsFromPickupState <0>__CommandWithEveryItem; public static Manipulator <1>__ServerAuthManager_HandleSetClientAuth; public static hook_GetUserMaster <2>__Run_GetUserMaster; public static hook_OnLobbyJoined_bool_string <3>__SteamworksLobbyManager_OnLobbyJoined_bool_string; } public static void Awake() { } public static void Start() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //I