Decompiled source of MirrorAndTrueArtifacts v1.0.0
TrueArtifacts.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; 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.Configuration; using EntityStates.LunarExploderMonster; using EntityStates.VoidInfestor; using HG; using IL.RoR2; using JetBrains.Annotations; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.VoidInfestor; using On.RoR2; using On.RoR2.UI; using R2API; using R2API.Utils; using RoR2; using RoR2.Artifacts; using RoR2.CharacterAI; using RoR2.ExpansionManagement; using RoR2.Networking; using RoR2.Projectile; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [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("TrueArtifacts")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+9f3a459bd4008723b9d6ec65668ad7f4a18dd557")] [assembly: AssemblyProduct("TrueArtifacts")] [assembly: AssemblyTitle("TrueArtifacts")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace TrueArtifacts; public class MirrorEnigma { public static MirrorEnigmaDropTable dtAnyTier = ScriptableObject.CreateInstance<MirrorEnigmaDropTable>(); public static void Start() { ((Object)dtAnyTier).name = "dtMirrorEnigmaAnyTier"; ((PickupDropTable)dtAnyTier).canDropBeReplaced = false; ((BasicPickupDropTable)dtAnyTier).tier1Weight = 1f; ((BasicPickupDropTable)dtAnyTier).tier2Weight = 1f; ((BasicPickupDropTable)dtAnyTier).tier3Weight = 1f; ((BasicPickupDropTable)dtAnyTier).lunarItemWeight = 1.1f; ((BasicPickupDropTable)dtAnyTier).bossWeight = 1.8f; ((BasicPickupDropTable)dtAnyTier).voidTier1Weight = 1.9f; ((BasicPickupDropTable)dtAnyTier).voidTier2Weight = 1.7f; ((BasicPickupDropTable)dtAnyTier).voidTier3Weight = 1.5f; ((BasicPickupDropTable)dtAnyTier).voidBossWeight = 1.4f; dtAnyTier.full_equipmentWeight = 0.5f; dtAnyTier.full_equipmentWeightLunar = 0.5f; dtAnyTier.full_equipmentWeightBoss = 0.5f; } public static void On_Artifact_Disable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown PickupDropTable.GenerateDrop -= new hook_GenerateDrop(PickupDropTable_GenerateDrop); PickupDropTable.GenerateUniqueDrops -= new hook_GenerateUniqueDrops(PickupDropTable_GenerateUniqueDrops); } public static void On_Artifact_Enable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown PickupDropTable.GenerateDrop += new hook_GenerateDrop(PickupDropTable_GenerateDrop); PickupDropTable.GenerateUniqueDrops += new hook_GenerateUniqueDrops(PickupDropTable_GenerateUniqueDrops); } public static void MatchTagsToDropTable(PickupDropTable self) { bool flag = false; ItemTag[] bannedItemTags = ((BasicPickupDropTable)dtAnyTier).bannedItemTags; ItemTag[] requiredItemTags = ((BasicPickupDropTable)dtAnyTier).requiredItemTags; if (self is BasicPickupDropTable) { ((BasicPickupDropTable)dtAnyTier).bannedItemTags = ((BasicPickupDropTable)((self is BasicPickupDropTable) ? self : null)).bannedItemTags; ((BasicPickupDropTable)dtAnyTier).requiredItemTags = ((BasicPickupDropTable)((self is BasicPickupDropTable) ? self : null)).requiredItemTags; } else if (self is ArenaMonsterItemDropTable) { ((BasicPickupDropTable)dtAnyTier).bannedItemTags = ((ArenaMonsterItemDropTable)((self is ArenaMonsterItemDropTable) ? self : null)).bannedItemTags; ((BasicPickupDropTable)dtAnyTier).requiredItemTags = ((ArenaMonsterItemDropTable)((self is ArenaMonsterItemDropTable) ? self : null)).requiredItemTags; } else { ((BasicPickupDropTable)dtAnyTier).bannedItemTags = (ItemTag[])(object)new ItemTag[0]; ((BasicPickupDropTable)dtAnyTier).requiredItemTags = (ItemTag[])(object)new ItemTag[0]; } if (requiredItemTags.Length != ((BasicPickupDropTable)dtAnyTier).requiredItemTags.Length) { flag = true; } else if (bannedItemTags.Length != ((BasicPickupDropTable)dtAnyTier).bannedItemTags.Length) { flag = true; } else if (((BasicPickupDropTable)dtAnyTier).bannedItemTags.Length != 0 || ((BasicPickupDropTable)dtAnyTier).requiredItemTags.Length != 0) { if (!requiredItemTags.SequenceEqual(((BasicPickupDropTable)dtAnyTier).requiredItemTags)) { flag = true; } else if (!bannedItemTags.SequenceEqual(((BasicPickupDropTable)dtAnyTier).bannedItemTags)) { flag = true; } } if (flag) { ((PickupDropTable)dtAnyTier).Regenerate(Run.instance); } } public static bool Roll(PickupDropTable dt, Xoroshiro128Plus rng) { if (!dt.canDropBeReplaced) { return false; } int num = MirrorEnigmaDropTable.replacementChance; if (dt is BasicPickupDropTable) { if (((BasicPickupDropTable)((dt is BasicPickupDropTable) ? dt : null)).bannedItemTags.Contains((ItemTag)4)) { num = MirrorEnigmaDropTable.replacementChanceMonster; } else if (((Object)dt).name.StartsWith("dtDupli")) { num = MirrorEnigmaDropTable.replacementChancePrinter; } else if (Object.op_Implicit((Object)(object)SceneInfo.instance) && SceneInfo.instance.sceneDef.baseSceneName == "bazaar") { num = MirrorEnigmaDropTable.replacementChancePrinter; } } return rng.RangeInt(0, 100) < num; } private static PickupIndex[] PickupDropTable_GenerateUniqueDrops(orig_GenerateUniqueDrops orig, PickupDropTable self, int maxDrops, Xoroshiro128Plus rng) { if (Roll(self, rng)) { MatchTagsToDropTable(self); return orig.Invoke((PickupDropTable)(object)dtAnyTier, maxDrops, rng); } return orig.Invoke(self, maxDrops, rng); } private static PickupIndex PickupDropTable_GenerateDrop(orig_GenerateDrop orig, PickupDropTable self, Xoroshiro128Plus rng) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0020: 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) if (Roll(self, rng)) { MatchTagsToDropTable(self); return orig.Invoke((PickupDropTable)(object)dtAnyTier, rng); } return orig.Invoke(self, rng); } } public class MirrorEnigmaDropTable : BasicPickupDropTable { public float bossEquipmentWeight; public float full_equipmentWeight; public float full_equipmentWeightLunar; public float full_equipmentWeightBoss; public bool didWeights = true; public static int replacementChance = 10; public static int replacementChanceMonster = 12; public static int replacementChancePrinter = 5; public void DoWeights(Run run) { didWeights = true; base.tier1Weight = 10f / (float)run.availableTier1DropList.Count; base.tier2Weight = 10f / (float)run.availableTier2DropList.Count; base.tier3Weight = 10f / (float)run.availableTier3DropList.Count; base.lunarItemWeight = 10f / (float)run.availableLunarItemDropList.Count; base.bossWeight = 10f / (float)run.availableBossDropList.Count; base.voidTier1Weight = 10f / (float)run.availableVoidTier1DropList.Count; base.voidTier2Weight = 10f / (float)run.availableVoidTier2DropList.Count; base.voidTier3Weight = 1f / (float)run.availableVoidTier3DropList.Count; base.voidBossWeight = 1f / (float)run.availableVoidBossDropList.Count; full_equipmentWeight = 5f / (float)run.availableEquipmentDropList.Count; full_equipmentWeightLunar = 5f / (float)run.availableLunarEquipmentDropList.Count; full_equipmentWeightBoss = 5f / (float)PickupTransmutationManager.equipmentBossGroup.Length; } public override void Regenerate(Run run) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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) if (base.bannedItemTags.Length == 0 && base.requiredItemTags.Length == 0) { base.equipmentWeight = full_equipmentWeight; base.lunarEquipmentWeight = full_equipmentWeightLunar; bossEquipmentWeight = full_equipmentWeightBoss; } else { base.equipmentWeight = 0f; base.lunarEquipmentWeight = 0f; bossEquipmentWeight = 0f; } ((BasicPickupDropTable)this).GenerateWeightedSelection(run); base.selector.AddChoice(PickupCatalog.FindPickupIndex(Items.Pearl.itemIndex), base.bossWeight); base.selector.AddChoice(PickupCatalog.FindPickupIndex(Items.ShinyPearl.itemIndex), base.bossWeight); base.selector.AddChoice(PickupCatalog.FindPickupIndex(Items.TitanGoldDuringTP.itemIndex), base.bossWeight); if (!(bossEquipmentWeight > 0f)) { return; } PickupIndex[] equipmentBossGroup = PickupTransmutationManager.equipmentBossGroup; for (int i = 0; i < equipmentBossGroup.Length; i++) { PickupIndex val = equipmentBossGroup[i]; if (!run.IsEquipmentExpansionLocked(((PickupIndex)(ref val)).equipmentIndex)) { base.selector.AddChoice(val, bossEquipmentWeight); } } } } public class MirrorFrailty { public static void On_Artifact_Disable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) JumpVolume.OnTriggerStay -= new hook_OnTriggerStay(JumpVolume_OnTriggerStay); SetGravity.OnEnable -= new hook_OnEnable(SetGravity_OnEnable); Run.baseGravity /= 2f; Physics.gravity = new Vector3(0f, Run.baseGravity, 0f); } public static void On_Artifact_Enable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) JumpVolume.OnTriggerStay += new hook_OnTriggerStay(JumpVolume_OnTriggerStay); SetGravity.OnEnable += new hook_OnEnable(SetGravity_OnEnable); Run.baseGravity *= 2f; Physics.gravity = new Vector3(0f, Run.baseGravity, 0f); } private static void JumpVolume_OnTriggerStay(orig_OnTriggerStay orig, JumpVolume self, Collider other) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, other); CharacterMotor component = ((Component)other).GetComponent<CharacterMotor>(); if (Object.op_Implicit((Object)(object)component) && component.hasEffectiveAuthority && !component.doNotTriggerJumpVolumes) { Debug.Log((object)component); component.velocity = self.jumpVelocity * 1.4f; } } private static void SetGravity_OnEnable(orig_OnEnable orig, SetGravity self) { self.newGravity *= 2f; orig.Invoke(self); } } public class MirrorGlass { public static void On_Artifact_Disable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients -= new StatHookEventHandler(R2API_Stats); CharacterBody.RecalculateStats -= new hook_RecalculateStats(CharacterBody_RecalculateStats); PickupDropletController.OnCollisionEnter -= new hook_OnCollisionEnter(DoubleItems); PurchaseInteraction.Start -= new hook_Start(DoubleItemPrices); } public static void On_Artifact_Enable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(R2API_Stats); CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); PickupDropletController.OnCollisionEnter += new hook_OnCollisionEnter(DoubleItems); PurchaseInteraction.Start += new hook_Start(DoubleItemPrices); } private static void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (self.isPlayerControlled) { self.isGlass = true; } } private static void R2API_Stats(CharacterBody sender, StatHookEventArgs args) { if (sender.isPlayerControlled) { args.baseCurseAdd += 1f; } } private static void DoubleItems(orig_OnCollisionEnter orig, PickupDropletController self, Collision collision) { //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) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Invalid comparison between Unknown and I4 //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_0033: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !self.alive) { return; } ItemIndex itemIndex = ((PickupIndex)(ref self.pickupIndex)).pickupDef.itemIndex; if ((int)itemIndex != -1) { ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex); if (((Object)itemDef).name.StartsWith("Scrap")) { orig.Invoke(self, collision); return; } } self.createPickupInfo.position = ((Component)self).transform.position; self.CreatePickup(); orig.Invoke(self, collision); } private static void DoubleItemPrices(orig_Start orig, PurchaseInteraction self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 orig.Invoke(self); if ((int)self.costType == 4 || (int)self.costType == 5 || (int)self.costType == 6 || (int)self.costType == 10) { self.cost *= 2; } } } public class MirrorHonor { public static float MaxLevel = 199f; public static void On_Artifact_Enable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown Run.RecalculateDifficultyCoefficent += new hook_RecalculateDifficultyCoefficent(Run_RecalculateDifficultyCoefficent); InfiniteTowerRun.RecalculateDifficultyCoefficentInternal += new hook_RecalculateDifficultyCoefficentInternal(InfiniteTowerRun_RecalculateDifficultyCoefficentInternal); MaxLevel = Math.Max((Run.ambientLevelCap + 1) * 2, MaxLevel); if (MaxLevel < 1000f) { MaxLevel = 999f; } } private static void InfiniteTowerRun_RecalculateDifficultyCoefficentInternal(orig_RecalculateDifficultyCoefficentInternal orig, InfiniteTowerRun self) { orig.Invoke(self); ((Run)self).difficultyCoefficient = ((Run)self).difficultyCoefficient * 2f; ((Run)self).compensatedDifficultyCoefficient = ((Run)self).compensatedDifficultyCoefficient * 2f; ((Run)self).ambientLevel = Mathf.Min((((Run)self).difficultyCoefficient - 1f) / 0.33f + 1f, 10000f); ((Run)self).ambientLevelFloor = Mathf.FloorToInt(((Run)self).ambientLevel); } private static void Run_RecalculateDifficultyCoefficent(orig_RecalculateDifficultyCoefficent orig, Run self) { orig.Invoke(self); self.difficultyCoefficient *= 2f; self.compensatedDifficultyCoefficient *= 2f; float num = 0.7f + (float)self.participatingPlayerCount * 0.3f; self.ambientLevel = Mathf.Min((self.difficultyCoefficient - num) / 0.33f + 1f, MaxLevel); self.ambientLevelFloor = Mathf.FloorToInt(self.ambientLevel); } public static void On_Artifact_Disable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown Run.RecalculateDifficultyCoefficent -= new hook_RecalculateDifficultyCoefficent(Run_RecalculateDifficultyCoefficent); InfiniteTowerRun.RecalculateDifficultyCoefficentInternal -= new hook_RecalculateDifficultyCoefficentInternal(InfiniteTowerRun_RecalculateDifficultyCoefficentInternal); } } public class MirrorKin { public static DccsPool dpAllFamilies; public static FamilyDirectorCardCategorySelection dccsFamilyTrueDisso; public static void MakeDCCSPool() { //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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: 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_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Expected O, but got Unknown //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Expected O, but got Unknown //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Expected O, but got Unknown //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Expected O, but got Unknown //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Expected O, but got Unknown //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Expected O, but got Unknown //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Expected O, but got Unknown //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Expected O, but got Unknown //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_00d2: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Expected O, but got Unknown //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_010e: Expected O, but got Unknown //IL_0110: 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_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown Debug.Log((object)"ALL FAMILY"); ExpansionDef val = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC1/Common/DLC1.asset").WaitForCompletion(); ExpansionDef val2 = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC2/Common/DLC2.asset").WaitForCompletion(); ExpansionDef[] requiredExpansions = (ExpansionDef[])(object)new ExpansionDef[1] { val }; ExpansionDef[] requiredExpansions2 = (ExpansionDef[])(object)new ExpansionDef[1] { val2 }; PoolEntry val3 = null; PoolEntry val4 = null; ConditionalPoolEntry val5 = null; ConditionalPoolEntry val6 = null; FamilyDirectorCardCategorySelection[] array = Object.FindObjectsOfType(typeof(FamilyDirectorCardCategorySelection)) as FamilyDirectorCardCategorySelection[]; for (int i = 0; i < array.Length; i++) { Debug.Log((object)((Object)array[i]).name); switch (((Object)array[i]).name) { case "dccsClayFamily": val3 = new PoolEntry { dccs = (DirectorCardCategorySelection)(object)array[i], weight = 1f }; break; case "dccsRoboBallFamily": val4 = new PoolEntry { dccs = (DirectorCardCategorySelection)(object)array[i], weight = 1f }; break; case "dccsVerminFamily": val5 = new ConditionalPoolEntry { requiredExpansions = requiredExpansions, dccs = (DirectorCardCategorySelection)(object)array[i], weight = 1f }; break; case "dccsWormsFamily": val6 = new ConditionalPoolEntry { requiredExpansions = requiredExpansions2, dccs = (DirectorCardCategorySelection)(object)array[i], weight = 1f }; break; } } dpAllFamilies = ScriptableObject.CreateInstance<DccsPool>(); ((Object)dpAllFamilies).name = "dpAllFamilies"; DccsPool obj = dpAllFamilies; Category[] array2 = new Category[1]; Category val7 = new Category(); val7.name = "Families"; val7.categoryWeight = 1f; val7.alwaysIncluded = (PoolEntry[])(object)new PoolEntry[9] { new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsBeetleFamily.asset").WaitForCompletion(), weight = 1f }, new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsGolemFamily.asset").WaitForCompletion(), weight = 1f }, new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsJellyfishFamily.asset").WaitForCompletion(), weight = 1f }, new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsWispFamily.asset").WaitForCompletion(), weight = 1f }, new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsLemurianFamily.asset").WaitForCompletion(), weight = 1f }, new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsImpFamily.asset").WaitForCompletion(), weight = 1f }, new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsParentFamily.asset").WaitForCompletion(), weight = 1f }, new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsMushroomFamily.asset").WaitForCompletion(), weight = 1f }, new PoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsLunarFamily.asset").WaitForCompletion(), weight = 1f } }; val7.includedIfConditionsMet = (ConditionalPoolEntry[])(object)new ConditionalPoolEntry[4] { new ConditionalPoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsGupFamily.asset").WaitForCompletion(), weight = 1f, requiredExpansions = requiredExpansions }, new ConditionalPoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/DLC1/Common/dccsConstructFamily.asset").WaitForCompletion(), weight = 1f, requiredExpansions = requiredExpansions }, new ConditionalPoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/DLC1/Common/dccsAcidLarvaFamily.asset").WaitForCompletion(), weight = 1f, requiredExpansions = requiredExpansions }, new ConditionalPoolEntry { dccs = (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/DLC1/Common/dccsVoidFamily.asset").WaitForCompletion(), weight = 1f, requiredExpansions = requiredExpansions } }; val7.includedIfNoConditionsMet = (PoolEntry[])(object)new PoolEntry[0]; array2[0] = val7; obj.poolCategories = (Category[])(object)array2; if (val3 != null) { PoolEntry[] alwaysIncluded = dpAllFamilies.poolCategories[0].alwaysIncluded; ConditionalPoolEntry[] includedIfConditionsMet = dpAllFamilies.poolCategories[0].includedIfConditionsMet; dpAllFamilies.poolCategories[0].alwaysIncluded = alwaysIncluded.Add(val3, val4); dpAllFamilies.poolCategories[0].includedIfConditionsMet = includedIfConditionsMet.Add(val5, val6); } ClassicStageInfo.HandleMixEnemyArtifact += new hook_HandleMixEnemyArtifact(RandomFamilyOnDissonance); dccsFamilyTrueDisso = ScriptableObject.CreateInstance<FamilyDirectorCardCategorySelection>(); ((Object)dccsFamilyTrueDisso).name = "dccsFamilyTrueDissonance"; ((DirectorCardCategorySelection)dccsFamilyTrueDisso).AddCategory("Champion", 3f); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).AddCategory("Miniboss", 3f); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).AddCategory("Basic Monsters", 4f); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).AddCategory("UniqueBosses", 0.3f); DirectorCard val8 = new DirectorCard(); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).AddCard(0, val8); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).AddCard(1, val8); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).AddCard(2, val8); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).AddCard(3, val8); } private static void RandomFamilyOnDissonance(orig_HandleMixEnemyArtifact orig, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng) { if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Main.Mirror_Kin)) { DirectorCardCategorySelection val = FindFamily(Dissonance: true); if ((Object)(object)val == (Object)null) { } if (val is FamilyDirectorCardCategorySelection) { ((MonoBehaviour)ClassicStageInfo.instance).StartCoroutine(ClassicStageInfo.instance.BroadcastFamilySelection(((FamilyDirectorCardCategorySelection)((val is FamilyDirectorCardCategorySelection) ? val : null)).selectionChatString)); } monsterCategories.CopyFrom(val); } else { orig.Invoke(monsterCategories, rng); } } public static void On_Artifact_Enable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown FamilyDirectorCardCategorySelection.IsAvailable += new hook_IsAvailable(AllowFamilyEventsEarlier); ClassicStageInfo.RebuildCards += new hook_RebuildCards(Force_Family_Event); if (Object.op_Implicit((Object)(object)ClassicStageInfo.instance) && Object.op_Implicit((Object)(object)Run.instance)) { ClassicStageInfo.instance.RebuildCards((DirectorCardCategorySelection)null, (DirectorCardCategorySelection)null); } EnemyInfoPanel.SetDisplayDataForViewer += new hook_SetDisplayDataForViewer(AddMirrorKinDisplay); EnemyInfoPanel.MarkDirty(); } private static void AddMirrorKinDisplay(orig_SetDisplayDataForViewer orig, HUD hud, List<BodyIndex> bodyIndices, ItemIndex[] itemAcquisitionOrderBuffer, int itemAcquisitonOrderLength, int[] itemStacks) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Invalid comparison between Unknown and I4 //IL_003f: 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_0073: Invalid comparison between Unknown and I4 //IL_0060: 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: Invalid comparison between Unknown and I4 //IL_0081: 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) if (Object.op_Implicit((Object)(object)ClassicStageInfo.instance)) { MirrorKinTracker component = ((Component)ClassicStageInfo.instance).GetComponent<MirrorKinTracker>(); if (Object.op_Implicit((Object)(object)component)) { if ((int)component.Enemy1 != -1) { bodyIndices.Add(component.Enemy1); } if ((int)component.Enemy2 != -1) { bodyIndices.Add(component.Enemy2); } if ((int)component.Enemy3 != -1) { bodyIndices.Add(component.Enemy3); } if ((int)component.Enemy4 != -1) { bodyIndices.Add(component.Enemy4); } } } orig.Invoke(hud, bodyIndices, itemAcquisitionOrderBuffer, itemAcquisitonOrderLength, itemStacks); } private static bool AllowFamilyEventsEarlier(orig_IsAvailable orig, FamilyDirectorCardCategorySelection self) { if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.stageClearCount >= 3) { return true; } return Object.op_Implicit((Object)(object)Run.instance) && self.minimumStageCompletion <= Run.instance.stageClearCount; } public static void On_Artifact_Disable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown FamilyDirectorCardCategorySelection.IsAvailable -= new hook_IsAvailable(AllowFamilyEventsEarlier); ClassicStageInfo.RebuildCards -= new hook_RebuildCards(Force_Family_Event); if (Object.op_Implicit((Object)(object)ClassicStageInfo.instance) && Object.op_Implicit((Object)(object)Run.instance)) { ClassicStageInfo.instance.RebuildCards((DirectorCardCategorySelection)null, (DirectorCardCategorySelection)null); } EnemyInfoPanel.SetDisplayDataForViewer -= new hook_SetDisplayDataForViewer(AddMirrorKinDisplay); EnemyInfoPanel.MarkDirty(); } public static List<DirectorCard> GenerateCandiateList(DirectorCardCategorySelection dccs) { List<DirectorCard> list = new List<DirectorCard>(); for (int i = 0; i < dccs.categories.Length; i++) { DirectorCard[] cards = dccs.categories[i].cards; foreach (DirectorCard item in cards) { list.Add(item); } } return list; } public static List<DirectorCardCategorySelection> GenerateCandiateListDCCS(DccsPool dccsPool) { List<DirectorCardCategorySelection> list = new List<DirectorCardCategorySelection>(); PoolEntry[] alwaysIncluded = dccsPool.poolCategories[0].alwaysIncluded; foreach (PoolEntry val in alwaysIncluded) { list.Add(val.dccs); } ConditionalPoolEntry[] includedIfConditionsMet = dccsPool.poolCategories[0].includedIfConditionsMet; foreach (ConditionalPoolEntry val2 in includedIfConditionsMet) { if (val2.requiredExpansions.Length != 0 && Run.instance.IsExpansionEnabled(val2.requiredExpansions[0])) { list.Add(((PoolEntry)val2).dccs); } } return list; } public static DirectorCardCategorySelection FindFamily(bool Dissonance) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"FindFamily"); ClassicStageInfo instance = ClassicStageInfo.instance; List<DirectorCard> list = null; Xoroshiro128Plus val = new Xoroshiro128Plus(instance.seedServer); if (Dissonance) { list = GenerateCandiateList(RoR2Content.mixEnemyMonsterCards); } else { if (!Object.op_Implicit((Object)(object)instance.monsterDccsPool)) { return null; } DirectorCardCategorySelection val2 = instance.monsterDccsPool.GenerateWeightedSelection().Evaluate(val.nextNormalizedFloat); if ((Object)(object)val2 != (Object)null) { list = GenerateCandiateList(val2); } } int num = Random.RandomRangeInt(0, 3); if (num == 2 && SceneCatalog.mostRecentSceneDef.cachedName == "voidstage") { return null; } DirectorCard val3 = list[val.RangeInt(0, list.Count)]; Debug.Log((object)("Family for " + (object)val3.spawnCard)); List<DirectorCardCategorySelection> list2 = GenerateCandiateListDCCS(dpAllFamilies); for (int i = 0; i < list2.Count; i++) { DirectorCardCategorySelection val4 = list2[i]; for (int j = 0; j < list2[i].categories.Length; j++) { Category val5 = val4.categories[j]; DirectorCard[] cards = val5.cards; foreach (DirectorCard val6 in cards) { if ((Object)(object)val6.spawnCard == (Object)(object)val3.spawnCard) { if (Dissonance || val4.IsAvailable()) { return val4; } Debug.Log((object)(((object)val4)?.ToString() + " is not available yet.")); return null; } } } } Debug.Log((object)("Could not find matching family for " + (object)val3.spawnCard)); if (Dissonance) { int index = val.RangeInt(0, list2.Count); return list2[index]; } return null; } public static DirectorCardCategorySelection MakeTrueDissoFamily() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown Debug.Log((object)"Making TrueDisso Family"); if ((Object)(object)TrueDissonance.dccsMixEnemyTRUE == (Object)null) { TrueDissonance.MakeDCCS(); } Xoroshiro128Plus val = new Xoroshiro128Plus(ClassicStageInfo.instance.seedServer); int num = val.RangeInt(0, TrueDissonance.dccsMixEnemyTRUE.categories[0].cards.Length); int num2 = val.RangeInt(0, TrueDissonance.dccsMixEnemyTRUE.categories[1].cards.Length); int num3 = val.RangeInt(0, TrueDissonance.dccsMixEnemyTRUE.categories[2].cards.Length); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).categories[0].cards[0] = TrueDissonance.dccsMixEnemyTRUE.categories[0].cards[num]; ((DirectorCardCategorySelection)dccsFamilyTrueDisso).categories[1].cards[0] = TrueDissonance.dccsMixEnemyTRUE.categories[1].cards[num2]; ((DirectorCardCategorySelection)dccsFamilyTrueDisso).categories[2].cards[0] = TrueDissonance.dccsMixEnemyTRUE.categories[2].cards[num3]; int num4 = TrueDissonance.dccsMixEnemyTRUE.FindCategoryIndexByName("UniqueBosses"); if (num4 > -1) { int num5 = val.RangeInt(0, TrueDissonance.dccsMixEnemyTRUE.categories[num4].cards.Length); ((DirectorCardCategorySelection)dccsFamilyTrueDisso).categories[3].cards[0] = TrueDissonance.dccsMixEnemyTRUE.categories[num4].cards[num5]; } int num6 = val.RangeInt(1, 20); int num7 = val.RangeInt(1, 21); dccsFamilyTrueDisso.selectionChatString = string.Format(Language.GetString("FAMILY_DISSONANT"), Language.GetString("FAMILY_DISSONANT_" + num6), Language.GetString("FAMILY_DISSONANT_0" + num7)); return (DirectorCardCategorySelection)(object)dccsFamilyTrueDisso; } private static void Force_Family_Event(orig_RebuildCards orig, ClassicStageInfo self, DirectorCardCategorySelection forcedMonsterCategory, DirectorCardCategorySelection forcedInteractableCategory) { //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected I4, but got Unknown //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected I4, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Expected I4, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected I4, but got Unknown //IL_01ae: 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_01fc: Unknown result type (might be due to invalid IL or missing references) float num = -1f; if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Main.True_Dissonance)) { forcedMonsterCategory = MakeTrueDissoFamily(); } else if (!Object.op_Implicit((Object)(object)RunArtifactManager.instance) || !RunArtifactManager.instance.IsArtifactEnabled(Artifacts.MixEnemy)) { if ((Object)(object)forcedMonsterCategory == (Object)null) { try { forcedMonsterCategory = FindFamily(Dissonance: false); } catch (Exception ex) { Debug.LogException(ex); forcedMonsterCategory = null; } } if ((Object)(object)forcedMonsterCategory == (Object)null && Object.op_Implicit((Object)(object)self.monsterDccsPool) && self.monsterDccsPool.poolCategories.Length > 1) { num = self.monsterDccsPool.poolCategories[0].categoryWeight; self.monsterDccsPool.poolCategories[0].categoryWeight = 0f; } else { num = ClassicStageInfo.monsterFamilyChance; ClassicStageInfo.monsterFamilyChance = 10f; } } orig.Invoke(self, forcedMonsterCategory, forcedInteractableCategory); if (num > -1f) { if (Object.op_Implicit((Object)(object)self.monsterDccsPool) && self.monsterDccsPool.poolCategories.Length != 0) { self.monsterDccsPool.poolCategories[0].categoryWeight = num; } else { ClassicStageInfo.monsterFamilyChance = num; } } if (!WConfig.MirrorKinDisplay.Value || !Object.op_Implicit((Object)(object)RunArtifactManager.instance) || RunArtifactManager.instance.IsArtifactEnabled(Artifacts.singleMonsterTypeArtifactDef)) { return; } SendMirrorKinTracker sendMirrorKinTracker = new SendMirrorKinTracker(); for (int i = 0; i < 4; i++) { BodyIndex val = (BodyIndex)(-1); if (i < self.monsterSelection.Count) { try { val = self.monsterSelection.choices[i].value.spawnCard.prefab.GetComponent<CharacterMaster>().bodyPrefab.GetComponent<CharacterBody>().bodyIndex; } catch (Exception ex2) { Debug.LogException(ex2); } } switch (i) { case 0: sendMirrorKinTracker.Enemy1 = (int)val; break; case 1: sendMirrorKinTracker.Enemy2 = (int)val; break; case 2: sendMirrorKinTracker.Enemy3 = (int)val; break; case 3: sendMirrorKinTracker.Enemy4 = (int)val; break; } } Chat.SendBroadcastChat((ChatMessageBase)(object)sendMirrorKinTracker); } } public class MirrorKinTracker : MonoBehaviour { public BodyIndex Enemy1 = (BodyIndex)(-1); public BodyIndex Enemy2 = (BodyIndex)(-1); public BodyIndex Enemy3 = (BodyIndex)(-1); public BodyIndex Enemy4 = (BodyIndex)(-1); } public class SendMirrorKinTracker : ChatMessageBase { public int Enemy1 = -1; public int Enemy2 = -1; public int Enemy3 = -1; public int Enemy4 = -1; public override string ConstructChatString() { //IL_0047: 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_005f: 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_00ed: 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_00ca: 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_00e2: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ClassicStageInfo.instance)) { MirrorKinTracker mirrorKinTracker = ((Component)ClassicStageInfo.instance).gameObject.GetComponent<MirrorKinTracker>(); if ((Object)(object)mirrorKinTracker == (Object)null) { mirrorKinTracker = ((Component)ClassicStageInfo.instance).gameObject.AddComponent<MirrorKinTracker>(); } mirrorKinTracker.Enemy1 = (BodyIndex)Enemy1; mirrorKinTracker.Enemy2 = (BodyIndex)Enemy2; mirrorKinTracker.Enemy3 = (BodyIndex)Enemy3; mirrorKinTracker.Enemy4 = (BodyIndex)Enemy4; if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Main.True_Dissonance)) { if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.stageClearCount > 9) { mirrorKinTracker.Enemy2 = (BodyIndex)Enemy1; mirrorKinTracker.Enemy3 = (BodyIndex)Enemy2; mirrorKinTracker.Enemy4 = (BodyIndex)Enemy3; mirrorKinTracker.Enemy1 = (BodyIndex)Enemy4; } else { mirrorKinTracker.Enemy4 = (BodyIndex)(-1); } } } EnemyInfoPanel.MarkDirty(); return null; } public override void Serialize(NetworkWriter writer) { ((ChatMessageBase)this).Serialize(writer); writer.Write(Enemy1); writer.Write(Enemy2); writer.Write(Enemy3); writer.Write(Enemy4); } public override void Deserialize(NetworkReader reader) { ((ChatMessageBase)this).Deserialize(reader); Enemy1 = reader.ReadInt32(); Enemy2 = reader.ReadInt32(); Enemy3 = reader.ReadInt32(); Enemy4 = reader.ReadInt32(); } } public class MirrorSacrifice { public static void Start() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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) Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Barrel1/Barrel1.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineBoss/ShrineBoss.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineBoss/ShrineBossSandy Variant.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineBoss/ShrineBossSnowy Variant.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCleanse/ShrineCleanse.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCleanse/ShrineCleanseSandy Variant.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCleanse/ShrineCleanseSnowy Variant.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineGoldshoresAccess/ShrineGoldshoresAccess.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/ShrineHalcyonite.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidCamp/VoidCamp.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/LemurianEgg/LemurianEgg.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/RadarTower/RadarTower.prefab").WaitForCompletion().AddComponent<MirrorSacrificeAllowed>(); } public static void On_Artifact_Enable() { if (NetworkServer.active) { SceneDirector.onGenerateInteractableCardSelection += OnGenerateInteractableCardSelection; } } public static void On_Artifact_Disable() { if (NetworkServer.active) { SceneDirector.onGenerateInteractableCardSelection -= OnGenerateInteractableCardSelection; } } private static void OnGenerateInteractableCardSelection(SceneDirector sceneDirector, DirectorCardCategorySelection dccs) { int num = dccs.FindCategoryIndexByName("Void Stuff"); if (num > -1 && dccs.categories[num].cards.Length >= 2) { dccs.categories[num].selectionWeight *= 2f; if (dccs.categories[num].cards[0].selectionWeight < 10) { DirectorCard obj = dccs.categories[num].cards[0]; obj.selectionWeight *= 3; } else if (dccs.categories[num].cards[1].selectionWeight < 10) { DirectorCard obj2 = dccs.categories[num].cards[1]; obj2.selectionWeight *= 3; } } dccs.RemoveCardsThatFailFilter((Predicate<DirectorCard>)Filter); } internal static bool Filter(DirectorCard card) { SpawnCard spawnCard = card.spawnCard; InteractableSpawnCard val = (InteractableSpawnCard)(object)((spawnCard is InteractableSpawnCard) ? spawnCard : null); if (Object.op_Implicit((Object)(object)val)) { if (val.skipSpawnWhenSacrificeArtifactEnabled) { return true; } if (val.skipSpawnWhenDevotionArtifactEnabled && RunArtifactManager.instance.IsArtifactEnabled(Artifacts.Devotion)) { return true; } GameObject prefab = card.spawnCard.prefab; return Object.op_Implicit((Object)(object)prefab.GetComponent<MirrorSacrificeAllowed>()); } return false; } } public class MirrorSacrificeAllowed : MonoBehaviour { } public class MirrorSwarms { public class MirrorSwarms_ServerSided : MonoBehaviour { public static List<MirrorSwarms_ServerSided> instances = new List<MirrorSwarms_ServerSided>(); public Inventory targetInventory; public Inventory originInventory; public CharacterMaster targetMaster; public CharacterMaster originMaster; public CharacterBody targetBody; public static readonly Func<ItemIndex, bool> defaultItemCopyFilterDelegate = DefaultItemCopyFilter; public void OnEnable() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) instances.Add(this); if (Object.op_Implicit((Object)(object)originMaster)) { targetMaster = ((Component)this).GetComponent<CharacterMaster>(); originMaster.networkIdentity.clientAuthorityOwner.clientOwnedObjects.Add(targetMaster.networkIdentity.netId); originInventory = ((Component)originMaster).GetComponent<Inventory>(); targetInventory = ((Component)targetMaster).GetComponent<Inventory>(); originInventory.onInventoryChanged += OriginInventory_onInventoryChanged; originInventory.HandleInventoryChanged(); originMaster.onBodyStart += OriginMaster_onBodyStart; targetMaster.onBodyStart += TargetMaster_onBodyStart; OriginMaster_onBodyStart(originMaster.GetBody()); TargetMaster_onBodyStart(targetMaster.GetBody()); } } private void RespawnIfInfestedDeath(CharacterBody obj) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Invalid comparison between Unknown and I4 Debug.Log((object)("Clone died " + (object)obj)); if (Object.op_Implicit((Object)(object)obj) && (int)obj.teamComponent.teamIndex != 1) { CreateDoppelganger(originMaster); } } private void TargetMaster_onBodyStart(CharacterBody obj) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)obj)) { targetBody = obj; obj.teamComponent.teamIndex = (TeamIndex)1; originMaster.networkIdentity.clientAuthorityOwner.clientOwnedObjects.Add(obj.networkIdentity.netId); targetMaster.networkIdentity.m_ClientAuthorityOwner = originMaster.networkIdentity.clientAuthorityOwner; obj.networkIdentity.m_ClientAuthorityOwner = originMaster.networkIdentity.clientAuthorityOwner; ((Component)obj).GetComponent<CharacterNetworkTransform>().hasEffectiveAuthority = false; } } private void OriginMaster_onBodyStart(CharacterBody obj) { } public void OnDisable() { instances.Remove(this); if (Object.op_Implicit((Object)(object)originInventory)) { originInventory.onInventoryChanged -= OriginInventory_onInventoryChanged; } if (Object.op_Implicit((Object)(object)originMaster)) { originMaster.onBodyStart -= OriginMaster_onBodyStart; } if (Object.op_Implicit((Object)(object)targetMaster)) { targetMaster.onBodyStart -= TargetMaster_onBodyStart; } RespawnIfInfestedDeath(targetBody); } private void OriginInventory_onInventoryChanged() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 //IL_00db: 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) originInventory.GiveItem(Items.CutHp, 1 - originInventory.GetItemCount(Items.CutHp)); if (Object.op_Implicit((Object)(object)targetInventory)) { if (Object.op_Implicit((Object)(object)targetBody) && (int)targetBody.teamComponent.teamIndex != 1) { targetInventory.RemoveItem(Items.CutHp, 1); targetInventory.RemoveItem(Items.AdaptiveArmor, 1); return; } targetInventory.itemAcquisitionOrder.Clear(); int[] itemStacks = targetInventory.itemStacks; int num = 0; ArrayUtils.SetAll<int>(itemStacks, ref num); targetInventory.AddItemsFrom(originInventory.itemStacks, defaultItemCopyFilterDelegate); targetInventory.SetEquipmentIndex(originInventory.currentEquipmentState.equipmentIndex); targetInventory.GiveItem(Items.AdaptiveArmor, 1); targetInventory.GiveItem(Items.CutHp, 1); targetInventory.infusionBonus = originInventory.infusionBonus; targetInventory.beadAppliedDamage = originInventory.beadAppliedDamage; targetInventory.beadAppliedHealth = originInventory.beadAppliedHealth; targetInventory.beadAppliedRegen = originInventory.beadAppliedRegen; } } private static bool DefaultItemCopyFilter(ItemIndex itemIndex) { return true; } } public class MirrorSwarms_MovementController : MonoBehaviour { public static List<MirrorSwarms_MovementController> instances = new List<MirrorSwarms_MovementController>(); public CharacterMaster originMaster; public CharacterMaster targetMaster; public CharacterBody originBody; public CharacterBody targetBody; public InputBankTest targetInput; public InputBankTest originInputs; public CharacterMotor targetMotor; public EquipmentSlot originEquipmentSlot; public HurtBox targetTarget; private float teleportAttemptTimer = 1f; public GameObject helperPrefab; public MirrorSwarms_IsHost originBodyIdentifier; public MirrorSwarms_IsClone targetBodyIdentifier; public void OnEnable() { if (Object.op_Implicit((Object)(object)originMaster)) { instances.Add(this); targetMaster = ((Component)this).GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)targetMaster)) { Object.Destroy((Object)(object)((Component)targetMaster).GetComponent<BaseAI>()); targetMaster.aiComponents = (BaseAI[])(object)new BaseAI[0]; } targetMaster.onBodyStart += TargetMaster_onBodyStart; originMaster.onBodyStart += OriginMaster_onBodyStart; OriginMaster_onBodyStart(originMaster.GetBody()); TargetMaster_onBodyStart(targetMaster.GetBody()); } helperPrefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab"); Debug.Log((object)("MirrorSwarms_MovementController.OnEnable " + ((object)originMaster)?.ToString() + " " + (object)targetMaster)); } private void OriginMaster_onBodyStart(CharacterBody obj) { if (Object.op_Implicit((Object)(object)obj)) { Debug.Log((object)("OriginMaster_onBodyStart " + (object)obj)); originBody = obj; originInputs = originBody.inputBank; originEquipmentSlot = originBody.equipmentSlot; SharedBodySetup(); } } public void SharedBodySetup() { if (!Object.op_Implicit((Object)(object)targetBody) || !Object.op_Implicit((Object)(object)originBody)) { return; } originBodyIdentifier = ((Component)originBody).gameObject.GetComponent<MirrorSwarms_IsHost>(); targetBodyIdentifier = ((Component)targetBody).gameObject.GetComponent<MirrorSwarms_IsClone>(); if ((Object)(object)originBodyIdentifier == (Object)null) { originBodyIdentifier = ((Component)originBody).gameObject.AddComponent<MirrorSwarms_IsHost>(); } if ((Object)(object)targetBodyIdentifier == (Object)null) { targetBodyIdentifier = ((Component)targetBody).gameObject.AddComponent<MirrorSwarms_IsClone>(); } originBodyIdentifier.otherBody = targetBody; originBodyIdentifier.otherLink = targetBodyIdentifier; targetBodyIdentifier.otherBody = originBody; targetBodyIdentifier.otherLink = originBodyIdentifier; VoidSurvivorController component = ((Component)targetBody).GetComponent<VoidSurvivorController>(); if (Object.op_Implicit((Object)(object)component)) { VoidSurvivorController component2 = ((Component)originBody).GetComponent<VoidSurvivorController>(); MirrorSwarms_SyncVoidSurv mirrorSwarms_SyncVoidSurv = ((Component)targetBody).GetComponent<MirrorSwarms_SyncVoidSurv>(); if (!Object.op_Implicit((Object)(object)mirrorSwarms_SyncVoidSurv)) { mirrorSwarms_SyncVoidSurv = ((Component)targetBody).gameObject.AddComponent<MirrorSwarms_SyncVoidSurv>(); } mirrorSwarms_SyncVoidSurv.originVoidSurv = component2; } ChefController component3 = ((Component)targetBody).GetComponent<ChefController>(); if (Object.op_Implicit((Object)(object)component3)) { ChefController component4 = ((Component)originBody).GetComponent<ChefController>(); MirrorSwarms_SyncCHEF mirrorSwarms_SyncCHEF = ((Component)targetBody).GetComponent<MirrorSwarms_SyncCHEF>(); if (!Object.op_Implicit((Object)(object)mirrorSwarms_SyncCHEF)) { mirrorSwarms_SyncCHEF = ((Component)targetBody).gameObject.AddComponent<MirrorSwarms_SyncCHEF>(); } mirrorSwarms_SyncCHEF.originCHEF = component4; } } private void TargetMaster_onBodyStart(CharacterBody obj) { if (Object.op_Implicit((Object)(object)obj)) { Debug.Log((object)("TargetMaster_onBodyStart " + (object)obj)); targetBody = obj; ((Component)targetBody).GetComponent<NetworkIdentity>().ForceAuthority(true); targetInput = targetBody.inputBank; targetMotor = targetBody.characterMotor; targetBody.AddTimedBuff(Buffs.HiddenInvincibility, 5f); SharedBodySetup(); } } public void FixedUpdate() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: 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_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)targetInput) || !Object.op_Implicit((Object)(object)originBody)) { return; } if (Object.op_Implicit((Object)(object)originEquipmentSlot)) { targetTarget = originEquipmentSlot.currentTarget.hurtBox; if ((Object)(object)targetTarget == (Object)null) { originEquipmentSlot.ConfigureTargetFinderForEnemies(); targetTarget = originEquipmentSlot.targetFinder.GetResults().FirstOrDefault(); } } if (Object.op_Implicit((Object)(object)targetTarget)) { InputBankTest obj = targetInput; Vector3 val = ((Component)targetTarget).transform.position - targetInput.aimOrigin; obj.aimDirection = ((Vector3)(ref val)).normalized; } else { targetInput.aimDirection = originInputs.aimDirection; } targetInput.interact = originInputs.interact; targetInput.activateEquipment = originInputs.activateEquipment; float num = Vector3.Distance(originBody.corePosition, targetBody.corePosition); if (!(num > 40f)) { return; } teleportAttemptTimer -= Time.fixedDeltaTime; if (teleportAttemptTimer <= 0f) { teleportAttemptTimer = 1f; Vector3 val2 = originBody.characterMotor.velocity / 10f; val2.y = 0f; float num2 = Random.Range(1f, 3f); float num3 = Random.Range(1f, 3f); if (Random.Range(0, 2) == 1) { num2 *= -1f; } if (Random.Range(0, 2) == 1) { num3 *= -1f; } Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(originBody.corePosition.x + num2, originBody.corePosition.y, originBody.corePosition.z + num3); val3 += val2; TeleportHelper.TeleportBody(targetBody, val3, false); GameObject teleportEffectPrefab = Run.instance.GetTeleportEffectPrefab(((Component)targetBody).gameObject); if (Object.op_Implicit((Object)(object)teleportEffectPrefab)) { EffectManager.SimpleEffect(teleportEffectPrefab, val3, Quaternion.identity, true); } targetBody.AddTimedBuff(Buffs.IgnoreFallDamage, 3f); targetMotor.rootMotion = originBody.characterMotor.rootMotion; targetMotor.moveDirection = originBody.characterMotor.moveDirection; targetMotor.velocity = originBody.characterMotor.velocity; } } public void Update() { //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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)originInputs)) { ((ButtonState)(ref targetInput.skill1)).PushState(originInputs.skill1.down); ((ButtonState)(ref targetInput.skill2)).PushState(originInputs.skill2.down); ((ButtonState)(ref targetInput.skill4)).PushState(originInputs.skill4.down); if (originInputs.interact.wasDown) { targetInput.moveVector = Vector3.zeroVector; return; } targetInput.moveVector = originInputs.moveVector; ((ButtonState)(ref targetInput.skill3)).PushState(originInputs.skill3.down); targetInput.sprint = originInputs.sprint; targetInput.jump = originInputs.jump; } } public void OnDisable() { instances.Remove(this); targetMaster.onBodyStart -= TargetMaster_onBodyStart; originMaster.onBodyStart -= OriginMaster_onBodyStart; if (Object.op_Implicit((Object)(object)originBodyIdentifier)) { originBodyIdentifier.numberOfClones--; } } } public class MirrorSwarms_BodyLinker : MonoBehaviour { public CharacterBody thisBody; public CharacterBody otherBody; public MirrorSwarms_BodyLinker otherLink; public bool added; public int numberOfClones; public float preEqualizedMoveSpeed; public float preEqualizedAcceleration; public void Add(MirrorSwarms_BodyLinker link) { if (Object.op_Implicit((Object)(object)link) && !link.added) { link.added = true; numberOfClones++; } } public void OnEnable() { thisBody = ((Component)this).GetComponent<CharacterBody>(); } public void OnDisable() { if (Object.op_Implicit((Object)(object)otherLink)) { otherLink.numberOfClones--; } } } public class MirrorSwarms_SyncVoidSurv : MonoBehaviour { public VoidSurvivorController originVoidSurv; public VoidSurvivorController targetVoidSurv; public void OnEnable() { if (!Object.op_Implicit((Object)(object)targetVoidSurv)) { targetVoidSurv = ((Component)this).GetComponent<VoidSurvivorController>(); } if (Object.op_Implicit((Object)(object)targetVoidSurv)) { targetVoidSurv.corruptionForFullDamage = 0f; targetVoidSurv.corruptionForFullHeal = 0f; targetVoidSurv.corruptionFractionPerSecondWhileCorrupted = 0f; targetVoidSurv.corruptionPerCrit = 0f; targetVoidSurv.corruptionPerSecondOutOfCombat = 0f; targetVoidSurv.corruptionPerSecondInCombat = 0f; } } public void FixedUpdate() { if (Object.op_Implicit((Object)(object)originVoidSurv)) { targetVoidSurv._corruption = originVoidSurv.corruption; } } } public class MirrorSwarms_SyncCHEF : MonoBehaviour { public ChefController originCHEF; public ChefController targetCHEF; public void OnEnable() { if (!Object.op_Implicit((Object)(object)targetCHEF)) { targetCHEF = ((Component)this).GetComponent<ChefController>(); } } public void FixedUpdate() { if (Object.op_Implicit((Object)(object)originCHEF)) { targetCHEF.localCleaverFired = originCHEF.localCleaverFired; targetCHEF._cleaverAway = originCHEF._cleaverAway; targetCHEF._recallCleaver = originCHEF._recallCleaver; } } } public class MirrorSwarms_IsClone : MirrorSwarms_BodyLinker { } public class MirrorSwarms_IsHost : MirrorSwarms_BodyLinker { } public class SendMirrorSwarms : ChatMessageBase { public GameObject originMaster; public GameObject targetMaster; public override string ConstructChatString() { Debug.Log((object)("SendMirrorSwarms | " + ((object)originMaster)?.ToString() + " " + (object)targetMaster)); CharacterMaster component = originMaster.GetComponent<CharacterMaster>(); if (NetworkServer.active) { MirrorSwarms_ServerSided mirrorSwarms_ServerSided = targetMaster.AddComponent<MirrorSwarms_ServerSided>(); mirrorSwarms_ServerSided.originMaster = component; mirrorSwarms_ServerSided.OnEnable(); } if (Object.op_Implicit((Object)(object)component) && ((NetworkBehaviour)component.playerCharacterMasterController.networkUser).isLocalPlayer) { MirrorSwarms_MovementController mirrorSwarms_MovementController = targetMaster.AddComponent<MirrorSwarms_MovementController>(); mirrorSwarms_MovementController.originMaster = component; mirrorSwarms_MovementController.OnEnable(); } else { CharacterMaster component2 = originMaster.GetComponent<CharacterMaster>(); Object.Destroy((Object)(object)targetMaster.GetComponent<BaseAI>()); component2.aiComponents = (BaseAI[])(object)new BaseAI[0]; } return null; } public override void Serialize(NetworkWriter writer) { ((ChatMessageBase)this).Serialize(writer); writer.Write(originMaster); writer.Write(targetMaster); } public override void Deserialize(NetworkReader reader) { ((ChatMessageBase)this).Deserialize(reader); originMaster = reader.ReadGameObject(); targetMaster = reader.ReadGameObject(); } } public static void Start() { } public static void On_Artifact_Disable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown CharacterMaster.Respawn -= new hook_Respawn(NewClone_OnRespawn); CharacterMaster.TransformBody -= new hook_TransformBody(Transform_Clones_ForDebug); CharacterBody.GetVisibilityLevel_TeamIndex -= new hook_GetVisibilityLevel_TeamIndex(MakeMirrorsInvisible); CharacterBody.RecalculateStats -= new hook_RecalculateStats(MatchSpeed); CharacterBody.AddMultiKill -= new hook_AddMultiKill(CharacterBody_AddMultiKill); SkillLocator.ResetSkills -= new hook_ResetSkills(SkillLocator_ResetSkills); } public static void On_Artifact_Enable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown CharacterMaster.Respawn += new hook_Respawn(NewClone_OnRespawn); CharacterMaster.TransformBody += new hook_TransformBody(Transform_Clones_ForDebug); CharacterBody.GetVisibilityLevel_TeamIndex += new hook_GetVisibilityLevel_TeamIndex(MakeMirrorsInvisible); CharacterBody.RecalculateStats += new hook_RecalculateStats(MatchSpeed); CharacterBody.AddMultiKill += new hook_AddMultiKill(CharacterBody_AddMultiKill); SkillLocator.ResetSkills += new hook_ResetSkills(SkillLocator_ResetSkills); Items.CutHp.hidden = true; } private static void Transform_Clones_ForDebug(orig_TransformBody orig, CharacterMaster self, string bodyName) { orig.Invoke(self, bodyName); foreach (MirrorSwarms_ServerSided instance in MirrorSwarms_ServerSided.instances) { if ((Object)(object)instance.originMaster == (Object)(object)self && Object.op_Implicit((Object)(object)instance.targetMaster)) { orig.Invoke(instance.targetMaster, bodyName); } } } private static void SkillLocator_ResetSkills(orig_ResetSkills orig, SkillLocator self) { orig.Invoke(self); MirrorSwarms_BodyLinker mirrorSwarms_BodyLinker = default(MirrorSwarms_BodyLinker); if (((Component)self).TryGetComponent<MirrorSwarms_BodyLinker>(ref mirrorSwarms_BodyLinker) && Object.op_Implicit((Object)(object)mirrorSwarms_BodyLinker.otherBody) && Object.op_Implicit((Object)(object)mirrorSwarms_BodyLinker.otherBody.skillLocator)) { orig.Invoke(mirrorSwarms_BodyLinker.otherBody.skillLocator); } } private static void MatchSpeed(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); MirrorSwarms_BodyLinker mirrorSwarms_BodyLinker = default(MirrorSwarms_BodyLinker); if (((Component)self).TryGetComponent<MirrorSwarms_BodyLinker>(ref mirrorSwarms_BodyLinker)) { self.hasOneShotProtection = true; mirrorSwarms_BodyLinker.preEqualizedMoveSpeed = self.moveSpeed; mirrorSwarms_BodyLinker.preEqualizedAcceleration = self.acceleration; if (Object.op_Implicit((Object)(object)mirrorSwarms_BodyLinker.otherLink) && mirrorSwarms_BodyLinker.otherBody.moveSpeed != self.moveSpeed && mirrorSwarms_BodyLinker.otherBody._isSprinting == self._isSprinting) { float moveSpeed = (mirrorSwarms_BodyLinker.preEqualizedMoveSpeed + mirrorSwarms_BodyLinker.otherLink.preEqualizedMoveSpeed) / 2f; float acceleration = (mirrorSwarms_BodyLinker.preEqualizedAcceleration + mirrorSwarms_BodyLinker.otherLink.preEqualizedAcceleration) / 2f; self.moveSpeed = moveSpeed; self.acceleration = acceleration; mirrorSwarms_BodyLinker.otherBody.moveSpeed = moveSpeed; mirrorSwarms_BodyLinker.otherBody.acceleration = acceleration; } } } private static void CharacterBody_AddMultiKill(orig_AddMultiKill orig, CharacterBody self, int kills) { orig.Invoke(self, kills); MirrorSwarms_BodyLinker mirrorSwarms_BodyLinker = default(MirrorSwarms_BodyLinker); if (((Component)self).TryGetComponent<MirrorSwarms_BodyLinker>(ref mirrorSwarms_BodyLinker) && Object.op_Implicit((Object)(object)mirrorSwarms_BodyLinker.otherBody)) { orig.Invoke(mirrorSwarms_BodyLinker.otherBody, kills); } } private static VisibilityLevel MakeMirrorsInvisible(orig_GetVisibilityLevel_TeamIndex orig, CharacterBody self, TeamIndex observerTeam) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Invalid comparison between Unknown and I4 //IL_0041: 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_0027: Invalid comparison between Unknown and I4 //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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) if (Object.op_Implicit((Object)(object)((Component)self).GetComponent<MirrorSwarms_IsClone>())) { if ((int)observerTeam == 1) { return orig.Invoke(self, observerTeam); } if ((int)observerTeam != 4) { return (VisibilityLevel)1; } } return orig.Invoke(self, observerTeam); } private static CharacterBody NewClone_OnRespawn(orig_Respawn orig, CharacterMaster self, Vector3 footPosition, Quaternion rotation, bool wasRevivedMidStage) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) CharacterBody result = orig.Invoke(self, footPosition, rotation, wasRevivedMidStage); if (Object.op_Implicit((Object)(object)self.playerCharacterMasterController)) { CreateDoppelganger(self); } return result; } private static void CreateDoppelganger(CharacterMaster srcCharacterMaster) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00cd: 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_00e0: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown if ((Object)(object)srcCharacterMaster == (Object)null) { Debug.LogWarning((object)"Attempted to make Clone of null master"); return; } MasterCopySpawnCard val = MasterCopySpawnCard.FromMaster(srcCharacterMaster, true, true, (Action<CharacterMaster>)null); if (Object.op_Implicit((Object)(object)val)) { Vector3 corePosition = srcCharacterMaster.GetBody().corePosition; float num = Random.Range(1f, 3f); float num2 = Random.Range(1f, 3f); if (Random.Range(0, 2) == 1) { num *= -1f; } if (Random.Range(0, 2) == 1) { num2 *= -1f; } Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(corePosition.x + num, corePosition.y, corePosition.z + num2); DirectorPlacementRule val2 = new DirectorPlacementRule { position = position, placementMode = (PlacementMode)0 }; DirectorSpawnRequest val3 = new DirectorSpawnRequest((SpawnCard)(object)val, val2, Run.instance.bossRewardRng); val3.teamIndexOverride = (TeamIndex)1; val3.ignoreTeamMemberLimit = true; val3.summonerBodyObject = srcCharacterMaster.GetBodyObject(); val3.onSpawnedServer = (Action<SpawnResult>)Delegate.Combine(val3.onSpawnedServer, (Action<SpawnResult>)delegate(SpawnResult result) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) Chat.SendBroadcastChat((ChatMessageBase)(object)new SendMirrorSwarms { originMaster = ((Component)srcCharacterMaster).gameObject, targetMaster = result.spawnedInstance }); }); DirectorCore.instance.TrySpawnObject(val3); Debug.Log((object)("Summoner : " + (object)val3.summonerBodyObject)); Object.Destroy((Object)(object)val); } } } public class TrueCommand { public class RainbowItemThing : MonoBehaviour { public Color color = Color.white; public Color colorOne = Color.white; public Color colorTwo = Color.white; private int colorIndex = 0; private float progress = 1000f; public Light TargetLight; public Highlight TargetHighlight; public ParticleSystem particleSystem; public bool isForUi = false; public void Start() { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Main.True_Command)) { if (isForUi) { return; } Transform child = ((Component)this).gameObject.transform.GetChild(0); for (int i = 1; i < child.childCount; i++) { ((Component)child.GetChild(i)).gameObject.SetActive(true); Light componentInChildren = ((Component)child.GetChild(i)).GetComponentInChildren<Light>(true); if (Object.op_Implicit((Object)(object)componentInChildren)) { ((Component)componentInChildren).gameObject.SetActive(false); } if (child.GetChild(i).childCount > 1) { ((Component)child.GetChild(i).GetChild(2)).gameObject.SetActive(false); } } TargetHighlight = ((Component)this).GetComponent<Highlight>(); TargetHighlight.highlightColor = (HighlightColor)3; colorIndex = Random.RandomRangeInt(0, 6); TargetLight = ((Component)child.GetChild(2)).GetComponentInChildren<Light>(true); if (Object.op_Implicit((Object)(object)TargetLight)) { ((Component)TargetLight).gameObject.SetActive(true); LightIntensityCurve component = ((Component)TargetLight).gameObject.GetComponent<LightIntensityCurve>(); component.maxIntensity *= 10f; } ((Component)child.GetChild(3).GetChild(2)).gameObject.SetActive(true); particleSystem = ((Component)child.GetChild(3).GetChild(2)).GetComponent<ParticleSystem>(); ((Component)this).GetComponent<GenericDisplayNameProvider>().SetDisplayToken("ARTIFACT_COMMAND_CUBE_RAINBOW"); } else { Object.Destroy((Object)(object)this); } } public void FixedUpdate() { //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: 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_01be: 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_0064: 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_0075: 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_008b: 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_0095: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00ee: 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_00fc: 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_010e: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) progress += 0.01f; if (progress >= 1f) { progress = 0f; switch (colorIndex) { case 0: colorOne = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)3)); colorTwo = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)5)); break; case 1: colorOne = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)5)); colorTwo = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)13)); break; case 2: colorOne = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)13)); colorTwo = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)2)); break; case 3: colorOne = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)2)); colorTwo = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)4)); break; case 4: colorOne = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)4)); colorTwo = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)25)); break; case 5: colorOne = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)25)); colorTwo = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)3)); colorIndex = -1; break; default: colorIndex = -1; break; } colorIndex++; } color = colorOne * (1f - progress) + colorTwo * progress; if (Object.op_Implicit((Object)(object)particleSystem)) { TargetHighlight.CustomColor = color; TargetLight.color = color; particleSystem.startColor = color; } } } public static void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown PickupDropletController.CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 += new hook_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3(PickupDropletController_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3); PickupTransmutationManager.RebuildPickupGroups += new hook_RebuildPickupGroups(AddEliteEquipmentsToCommand); LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/CommandCube").AddComponent<RainbowItemThing>(); } private static void AddEliteEquipmentsToCommand(orig_RebuildPickupGroups orig) { for (int i = 0; i < EliteCatalog.eliteDefs.Length; i++) { EliteDef val = EliteCatalog.eliteDefs[i]; EquipmentDef eliteEquipmentDef = val.eliteEquipmentDef; if ((Object)(object)eliteEquipmentDef != (Object)null && !((Object)val).name.EndsWith("Gold") && eliteEquipmentDef.dropOnDeathChance > 0f) { eliteEquipmentDef.canDrop = true; eliteEquipmentDef.isBoss = true; eliteEquipmentDef.isLunar = false; } } orig.Invoke(); for (int j = 0; j < EliteCatalog.eliteDefs.Length; j++) { EliteDef val2 = EliteCatalog.eliteDefs[j]; EquipmentDef eliteEquipmentDef2 = val2.eliteEquipmentDef; if ((Object)(object)eliteEquipmentDef2 != (Object)null && eliteEquipmentDef2.dropOnDeathChance > 0f) { eliteEquipmentDef2.canDrop = false; } } } private static void PickupDropletController_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3(orig_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3 orig, CreatePickupInfo pickupInfo, Vector3 position, Vector3 velocity) { //IL_0023: 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_0025: Unknown result type (might be due to invalid IL or missing references) if (RunArtifactManager.instance.IsArtifactEnabled(Main.True_Command)) { ref PickupArtifactFlag artifactFlag = ref pickupInfo.artifactFlag; artifactFlag = (PickupArtifactFlag)((uint)artifactFlag | 1u); } orig.Invoke(pickupInfo, position, velocity); } public static void On_Artifact_Enable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0054: 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_00aa: 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) PickupPickerController.SetOptionsFromPickupForCommandArtifact += new hook_SetOptionsFromPickupForCommandArtifact(Override_Command_Options); SceneDirector.onGenerateInteractableCardSelection += CommandArtifactManager.OnGenerateInteractableCardSelection; Run.IsItemAvailable += new hook_IsItemAvailable(Run_IsItemAvailable); Run.IsEquipmentAvailable += new hook_IsEquipmentAvailable(Run_IsEquipmentAvailable); FirstTimeOverrideJunk(); int value = PickupCatalog.FindPickupIndex(Items.SkullCounter.itemIndex).value; if (PickupTransmutationManager.pickupGroupMap[value] != null) { float num = 1f - (float)PickupTransmutationManager.pickupGroupMap[value].Length / 1000f; int maxColumnCount = PickupTransmutationManager.pickupGroupMap[value].Length / 12; GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/UI/CommandPickerPanel"); val.transform.localScale = Vector3.one * num; val.GetComponent<PickupPickerPanel>().maxColumnCount = maxColumnCount; } } public static void On_Artifact_Disable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0058: 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) PickupPickerController.SetOptionsFromPickupForCommandArtifact -= new hook_SetOptionsFromPickupForCommandArtifact(Override_Command_Options); SceneDirector.onGenerateInteractableCardSelection -= CommandArtifactManager.OnGenerateInteractableCardSelection; Run.IsItemAvailable -= new hook_IsItemAvailable(Run_IsItemAvailable); Run.IsEquipmentAvailable -= new hook_IsEquipmentAvailable(Run_IsEquipmentAvailable); LegacyResourcesAPI.Load<GameObject>("Prefabs/UI/CommandPickerPanel").transform.localScale = Vector3.one; if (Object.op_Implicit((Object)(object)Run.instance)) { Run.instance.availableEquipment.Remove(Equipment.QuestVolatileBattery.equipmentIndex); } } private static bool Run_IsEquipmentAvailable(orig_IsEquipmentAvailable orig, Run self, EquipmentIndex equipmentIndex) { //IL_0001: 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_0019: Unknown result type (might be due to invalid IL or missing references) if (equipmentIndex == Equipment.QuestVolatileBattery.equipmentIndex) { return true; } return orig.Invoke(self, equipmentIndex); } private static bool Run_IsItemAvailable(orig_IsItemAvailable orig, Run self, ItemIndex itemIndex) { //IL_0001: 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_0018: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex); if (Object.op_Implicit((Object)(object)itemDef) && (int)itemDef.tier > 9) { return true; } return orig.Invoke(self, itemIndex); } public static void FirstTimeOverrideJunk() { //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_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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_0095: Expected I4, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) int value = PickupCatalog.FindPickupIndex(Items.SkullCounter.itemIndex).value; if (PickupTransmutationManager.pickupGroupMap[value] != null) { return; } List<List<PickupIndex>> list = new List<List<PickupIndex>>(); List<List<PickupIndex>> list2 = new List<List<PickupIndex>>(); for (int i = 0; i < ItemTierCatalog.allItemTierDefs.Length + 2; i++) { list.Add(new List<PickupIndex>()); } Enumerator<ItemDef> enumerator = ItemCatalog.allItemDefs.GetEnumerator(); try { while (enumerator.MoveNext()) { ItemDef current = enumerator.Current; list[(int)current.tier].Add(PickupCatalog.itemIndexToPickupIndex[current.itemIndex]); } } finally { ((IDisposable)enumerator).Dispose(); } List<PickupIndex> list3 = new List<PickupIndex>(); for (int j = 0; j < list.Count; j++) { switch (j) { case 4: list3.AddRange(list[3]); break; case 3: list3.AddRange(list[4]); break; default: list3.AddRange(list[j]); break; case 5: break; } } Pickup