Decompiled source of VanillaArtifactsPlus v3.4.2
VanillaArtifactsPlus.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.CodeDom.Compiler; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using HG; using IL.RoR2; using IL.RoR2.Artifacts; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On; using On.RoR2; using On.RoR2.Artifacts; using On.RoR2.UI; using On.RoR2.UI.LogBook; using R2API; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Artifacts; using RoR2.CharacterAI; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Navigation; using RoR2.Projectile; using RoR2.UI; using RoR2.UI.LogBook; 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("VanillaArtifactsPlus")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+8eaf4b32fb9318d19834ae1f32ee4139bf19747f")] [assembly: AssemblyProduct("VanillaArtifactsPlus")] [assembly: AssemblyTitle("VanillaArtifactsPlus")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace VanillaArtifactsPlus { public class Command { [CompilerGenerated] private static class <>O { public static hook_RebuildPickupGroups <0>__AddEliteEquipmentsToCommand; public static hook_IsEquipmentAvailable <1>__Make_EliteEquipmentAvailable; } public static void OnArtifactDisable() { } public static void OnArtifactEnable() { } public static void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown object obj = <>O.<0>__AddEliteEquipmentsToCommand; if (obj == null) { hook_RebuildPickupGroups val = AddEliteEquipmentsToCommand; <>O.<0>__AddEliteEquipmentsToCommand = val; obj = (object)val; } PickupTransmutationManager.RebuildPickupGroups += (hook_RebuildPickupGroups)obj; object obj2 = <>O.<1>__Make_EliteEquipmentAvailable; if (obj2 == null) { hook_IsEquipmentAvailable val2 = Make_EliteEquipmentAvailable; <>O.<1>__Make_EliteEquipmentAvailable = val2; obj2 = (object)val2; } Run.IsEquipmentAvailable += (hook_IsEquipmentAvailable)obj2; } private static bool Make_EliteEquipmentAvailable(orig_IsEquipmentAvailable orig, Run self, EquipmentIndex equipmentIndex) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(equipmentIndex); if (Object.op_Implicit((Object)(object)equipmentDef) && Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef)) { return !self.IsEquipmentExpansionLocked(equipmentIndex); } return orig.Invoke(self, equipmentIndex); } private static void AddEliteEquipmentsToCommand(orig_RebuildPickupGroups orig) { List<EquipmentDef> list = new List<EquipmentDef>(); 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) { list.Add(eliteEquipmentDef); eliteEquipmentDef.canDrop = true; eliteEquipmentDef.isBoss = true; eliteEquipmentDef.isLunar = false; } } orig.Invoke(); for (int j = 0; j < list.Count; j++) { list[j].canDrop = false; } } } public class Devotion { [CompilerGenerated] private static class <>O { public static hook_Rebuild <0>__AddLemurianInventory; public static hook_SetOptionsFromInteractor <1>__VoidForLemurians; public static hook_DropScrapOnDeath <2>__ScrapForVoids; public static hook_Start <3>__TeleportMoreOften; public static Manipulator <4>__NoFogLemurianDamage; } public static void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown object obj = <>O.<0>__AddLemurianInventory; if (obj == null) { hook_Rebuild val = AddLemurianInventory; <>O.<0>__AddLemurianInventory = val; obj = (object)val; } ScoreboardController.Rebuild += (hook_Rebuild)obj; object obj2 = <>O.<1>__VoidForLemurians; if (obj2 == null) { hook_SetOptionsFromInteractor val2 = VoidForLemurians; <>O.<1>__VoidForLemurians = val2; obj2 = (object)val2; } PickupPickerController.SetOptionsFromInteractor += (hook_SetOptionsFromInteractor)obj2; object obj3 = <>O.<2>__ScrapForVoids; if (obj3 == null) { hook_DropScrapOnDeath val3 = ScrapForVoids; <>O.<2>__ScrapForVoids = val3; obj3 = (object)val3; } DevotionInventoryController.DropScrapOnDeath += (hook_DropScrapOnDeath)obj3; object obj4 = <>O.<3>__TeleportMoreOften; if (obj4 == null) { hook_Start val4 = TeleportMoreOften; <>O.<3>__TeleportMoreOften = val4; obj4 = (object)val4; } DevotedLemurianController.Start += (hook_Start)obj4; GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lemurian/Fireball.prefab").WaitForCompletion(); GameObject val6 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LemurianBruiser/LemurianBigFireball.prefab").WaitForCompletion(); val5.GetComponent<ProjectileDamage>().damageType.damageSource = (DamageSource)1; val6.GetComponent<ProjectileDamage>().damageType.damageSource = (DamageSource)1; GameObject val7 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/DevotedLemurianBody.prefab").WaitForCompletion(); GameObject val8 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/DevotedLemurianBruiserBody.prefab").WaitForCompletion(); CharacterBody component = val7.GetComponent<CharacterBody>(); CharacterBody component2 = val8.GetComponent<CharacterBody>(); component.bodyFlags = (BodyFlags)(component.bodyFlags | 1); component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 1); component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x8000); component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x8000); component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x10); component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x10); object obj5 = <>O.<4>__NoFogLemurianDamage; if (obj5 == null) { Manipulator val9 = NoFogLemurianDamage; <>O.<4>__NoFogLemurianDamage = val9; obj5 = (object)val9; } FogDamageController.MyFixedUpdate += (Manipulator)obj5; } private static void NoFogLemurianDamage(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val.Next.Operand = 0f; } else { Debug.LogWarning((object)"IL Failed : IL.RoR2.FogDamageController.FixedUpdate"); } } private static void ScrapForVoids(orig_DropScrapOnDeath orig, DevotionInventoryController self, ItemIndex devotionItem, CharacterBody minionBody) { //IL_0003: 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_0010: 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_009c: 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_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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected I4, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, devotionItem, minionBody); PickupIndex val = PickupIndex.none; ItemDef itemDef = ItemCatalog.GetItemDef(devotionItem); if ((Object)(object)itemDef != (Object)null) { ItemTier tier = itemDef.tier; ItemTier val2 = tier; switch (val2 - 3) { case 0: val = PickupCatalog.FindPickupIndex(MiscPickups.LunarCoin.miscPickupIndex); break; case 3: val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapWhite"); break; case 4: val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapGreen"); break; case 5: val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapRed"); break; case 6: val = PickupCatalog.FindPickupIndex("ItemIndex.ScrapYellow"); break; } } if (val != PickupIndex.none) { PickupDropletController.CreatePickupDroplet(val, minionBody.corePosition, Vector3.down * 15f); } } private static void TeleportMoreOften(orig_Start orig, DevotedLemurianController self) { orig.Invoke(self); self._leashDistSq = 16000f; } private static void VoidForLemurians(orig_SetOptionsFromInteractor orig, PickupPickerController self, Interactor activator) { bool flag = Object.op_Implicit((Object)(object)((Component)self).GetComponent<LemurianEggController>()); if (flag) { if (WConfig.DevotionAllowVoids.Value) { ItemTierCatalog.GetItemTierDef((ItemTier)6).canScrap = true; ItemTierCatalog.GetItemTierDef((ItemTier)7).canScrap = true; ItemTierCatalog.GetItemTierDef((ItemTier)8).canScrap = true; } if (WConfig.DevotionAllowLunars.Value) { ItemTierCatalog.GetItemTierDef((ItemTier)3).canScrap = true; } } orig.Invoke(self, activator); if (flag) { if (WConfig.DevotionAllowVoids.Value) { ItemTierCatalog.GetItemTierDef((ItemTier)6).canScrap = false; ItemTierCatalog.GetItemTierDef((ItemTier)7).canScrap = false; ItemTierCatalog.GetItemTierDef((ItemTier)8).canScrap = false; } if (WConfig.DevotionAllowLunars.Value) { ItemTierCatalog.GetItemTierDef((ItemTier)3).canScrap = false; } } } private static void AddLemurianInventory(orig_Rebuild orig, ScoreboardController self) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!WConfig.DevotionInventory.Value || DevotionInventoryController.InstanceList.Count <= 0) { return; } List<CharacterMaster> list = new List<CharacterMaster>(); Inventory val3 = default(Inventory); foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!instance.isConnected) { continue; } list.Add(instance.master); if (!WConfig.DevotionShowAllInventory.Value) { continue; } CharacterMaster master = instance.master; MinionGroup val = MinionGroup.FindGroup(((NetworkBehaviour)master).netId); if (val == null) { continue; } MinionOwnership[] members = val.members; foreach (MinionOwnership val2 in members) { if (Object.op_Implicit((Object)(object)val2) && ((Component)val2).TryGetComponent<Inventory>(ref val3) && val3.GetItemCount(Items.LemurianHarness) > 0) { list.Add(((Component)val2).GetComponent<CharacterMaster>()); break; } } } if (!WConfig.DevotionShowAllInventory.Value) { CharacterMaster master2 = LocalUserManager.readOnlyLocalUsersList.First().cachedMasterController.master; MinionGroup val4 = MinionGroup.FindGroup(((NetworkBehaviour)master2).netId); if (val4 != null) { MinionOwnership[] members2 = val4.members; DevotedLemurianController val6 = default(DevotedLemurianController); foreach (MinionOwnership val5 in members2) { if (Object.op_Implicit((Object)(object)val5) && ((Component)((Component)val5).GetComponent<CharacterMaster>()).TryGetComponent<DevotedLemurianController>(ref val6)) { list.Add(((Component)val5).GetComponent<CharacterMaster>()); break; } } } } self.SetStripCount(list.Count); for (int k = 0; k < list.Count; k++) { self.stripAllocator.elements[k].SetMaster(list[k]); } } } public class Dissonance { [CompilerGenerated] private static class <>O { public static hook_RebuildCards <0>__DissoanceLunerEliteAll; public static hook_HandleMixEnemyArtifact <1>__FindSkinForSkinnedEnemies; } public static DirectorCard DissoGolem; public static DirectorCard DissoTitan; public static DirectorCard DissoVermin; public static DirectorCard DissoVerminFlying; public static DirectorCard DissoBeetle; public static DirectorCard DissoBeetleGuard; public static DirectorCard DissoBeetleQueen; public static List<SpawnCard> LunarifiedList; public static void Start() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown Mixenemymaker(); object obj = <>O.<0>__DissoanceLunerEliteAll; if (obj == null) { hook_RebuildCards val = DissoanceLunerEliteAll; <>O.<0>__DissoanceLunerEliteAll = val; obj = (object)val; } ClassicStageInfo.RebuildCards += (hook_RebuildCards)obj; object obj2 = <>O.<1>__FindSkinForSkinnedEnemies; if (obj2 == null) { hook_HandleMixEnemyArtifact val2 = FindSkinForSkinnedEnemies; <>O.<1>__FindSkinForSkinnedEnemies = val2; obj2 = (object)val2; } ClassicStageInfo.HandleMixEnemyArtifact += (hook_HandleMixEnemyArtifact)obj2; } public static void DissoanceLunerEliteAll(orig_RebuildCards orig, ClassicStageInfo self, DirectorCardCategorySelection forcedMonsterCategory, DirectorCardCategorySelection forcedInteractableCategory) { //IL_0043: 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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Invalid comparison between Unknown and I4 //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, forcedMonsterCategory, forcedInteractableCategory); if (!((Object)(object)self != (Object)null)) { return; } if (LunarifiedList != null) { Debug.Log((object)"Dissonance : Un-Lunar"); for (int i = 0; i < LunarifiedList.Count; i++) { LunarifiedList[i].eliteRules = (EliteRules)0; } LunarifiedList = null; } if (!Object.op_Implicit((Object)(object)RunArtifactManager.instance) || !RunArtifactManager.instance.IsArtifactEnabled(Artifacts.mixEnemyArtifactDef) || (!(SceneInfo.instance.sceneDef.baseSceneName == "moon2") && !(SceneInfo.instance.sceneDef.baseSceneName == "itmoon"))) { return; } Debug.Log((object)"Dissonance : Lunar"); WeightedSelection<DirectorCard> monsterSelection = ClassicStageInfo.instance.monsterSelection; LunarifiedList = new List<SpawnCard>(); for (int j = 0; j < monsterSelection.Count; j++) { ChoiceInfo<DirectorCard> choice = monsterSelection.GetChoice(j); if ((int)choice.value.spawnCard.eliteRules != 2) { choice.value.spawnCard.eliteRules = (EliteRules)2; LunarifiedList.Add(choice.value.spawnCard); } } } public static void Mixenemymaker() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown DirectorCardCategorySelection val = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/MixEnemy/dccsMixEnemy.asset").WaitForCompletion(); DirectorCard val2 = new DirectorCard { spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav"), preventOverhead = false, selectionWeight = 1, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)0 }; DirectorCard val3 = new DirectorCard { spawnCard = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscHermitCrab"), selectionWeight = 1, preventOverhead = false, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)2 }; val.categories[0].selectionWeight = 3f; val.categories[1].selectionWeight = 3f; val.categories[2].selectionWeight = 4f; val.categories[3].cards = val.categories[3].cards.Remove(val.categories[3].cards[0]); val.AddCard(0, val2); DissoVermin = val.categories[2].cards[11]; DissoVerminFlying = val.categories[2].cards[2]; DissoBeetle = val.categories[2].cards[1]; DissoBeetleGuard = val.categories[1].cards[0]; DissoBeetleQueen = val.categories[0].cards[0]; DissoGolem = val.categories[1].cards[5]; DissoTitan = val.categories[0].cards[9]; DirectorCard val4 = null; DirectorCard val5 = null; val4 = val.categories[2].cards[10]; val.categories[2].cards[10] = val3; val5 = val.categories[1].cards[10]; val.categories[1].cards[10] = val4; val.AddCard(0, val5); } public static void FindSkinForSkinnedEnemies(orig_HandleMixEnemyArtifact orig, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: 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_0245: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: 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_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(monsterCategories, rng); if (DissoTitan != null) { switch (rng.RangeInt(1, 5)) { case 1: DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanBlackBeach.asset").WaitForCompletion(); break; case 2: DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanDampCave.asset").WaitForCompletion(); break; case 3: DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGolemPlains.asset").WaitForCompletion(); break; case 4: DissoTitan.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGooLake.asset").WaitForCompletion(); break; } } if (DissoGolem != null) { switch (rng.RangeInt(1, 5)) { case 1: DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolem.asset").WaitForCompletion(); break; case 2: DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemNature.asset").WaitForCompletion(); break; case 3: DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemSandy.asset").WaitForCompletion(); break; case 4: DissoGolem.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Golem/cscGolemSnowy.asset").WaitForCompletion(); break; } } if (DissoVermin != null) { switch (rng.RangeInt(1, 3)) { case 1: DissoVermin.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/Vermin/cscVermin.asset").WaitForCompletion(); break; case 2: DissoVermin.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/Vermin/cscVerminSnowy.asset").WaitForCompletion(); break; } } if (DissoVerminFlying != null) { switch (rng.RangeInt(1, 3)) { case 1: DissoVerminFlying.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/FlyingVermin/cscFlyingVermin.asset").WaitForCompletion(); break; case 2: DissoVerminFlying.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/FlyingVermin/cscFlyingVerminSnowy.asset").WaitForCompletion(); break; } } if (DissoBeetle != null) { switch (rng.RangeInt(1, 3)) { case 1: DissoBeetle.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetle.asset").WaitForCompletion(); break; case 2: DissoBeetle.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetleSulfur.asset").WaitForCompletion(); break; } } if (DissoBeetleGuard != null) { switch (rng.RangeInt(1, 3)) { case 1: DissoBeetleGuard.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetleGuard.asset").WaitForCompletion(); break; case 2: DissoBeetleGuard.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetleGuardSulfur.asset").WaitForCompletion(); break; } } if (DissoBeetleQueen != null) { switch (rng.RangeInt(1, 3)) { case 1: DissoBeetleQueen.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetleQueen.asset").WaitForCompletion(); break; case 2: DissoBeetleQueen.spawnCard = (SpawnCard)(object)Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetleQueenSulfur.asset").WaitForCompletion(); break; } } } } public class Enigma { [CompilerGenerated] private static class <>O { public static hook_CalculateEquipmentCooldownScale <0>__EnigmaCooldownReduction; public static Action<EquipmentSlot, EquipmentIndex> <1>__EquipmentSlot_onServerEquipmentActivated; public static Action <2>__SetTier; public static Action <3>__SetLang; public static hook_BuildPickupEntries <4>__LogBookController_BuildPickupEntries; public static hook_GetPickupStatus <5>__LogBookController_GetPickupStatus; } public static ItemTierDef artifactItemTier = null; public static ItemDef enigmaFragmentDef = null; public static ItemDef eliteEnigmaFragmentDef = null; public static float EnigmaFragmentCooldownReduction = 0.88f; public static Color CustomColor = Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)24)); public static void Start() { //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) if (!WConfig.EnigmaInterrupt.Value) { LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BossHunter").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BossHunterConsumed").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Recycle").enigmaCompatible = false; } if (WConfig.EnigmaMovement.Value) { LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Jetpack").enigmaCompatible = true; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/FireBallDash").enigmaCompatible = true; } else { LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Jetpack").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/FireBallDash").enigmaCompatible = false; } LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Tonic").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/Meteor").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/BurnNearby").enigmaCompatible = false; LegacyResourcesAPI.Load<EquipmentDef>("equipmentdefs/CrippleWard").enigmaCompatible = true; Addressables.LoadAssetAsync<BuffDef>((object)"0cabe49fb119dcf4188d2a8c2e65edd2").WaitForCompletion().eliteDef = null; } public static void MakeEnigmaFragment() { //IL_0060: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown artifactItemTier = ScriptableObject.CreateInstance<ItemTierDef>(); ((Object)artifactItemTier).name = "ArtifactItemsItemTierDef"; artifactItemTier.isDroppable = false; if (WConfig.DisplayEnigmaInLog.Value) { artifactItemTier.isDroppable = true; } artifactItemTier.canScrap = false; artifactItemTier.canRestack = true; artifactItemTier.colorIndex = (ColorIndex)24; artifactItemTier.darkColorIndex = (ColorIndex)24; artifactItemTier.tier = (ItemTier)10; artifactItemTier.bgIconTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/ArtifactsVanilla/artifactBg.png"); ContentAddition.AddItemTierDef(artifactItemTier); GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/PickupModels/Artifacts/PickupEnigma"), "PickupEnigmaFragment", false); GameObject val2 = new GameObject("cameraPos"); GameObject val3 = new GameObject("focusPoint"); val2.transform.SetParent(val.transform, false); val3.transform.SetParent(val.transform, false); val2.transform.localPosition = new Vector3(-1.5f, 1f, 3f); ModelPanelParameters val4 = val.AddComponent<ModelPanelParameters>(); val4.cameraPositionTransform = val2.transform; val4.focusPointTransform = val3.transform; GameObject val5 = PrefabAPI.InstantiateClone(val, "PickupEnigmaFragmentElite", false); enigmaFragmentDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)enigmaFragmentDef).name = "EnigmaFragment"; enigmaFragmentDef.nameToken = "ITEM_ENIGMAFRAGMENT_NAME"; enigmaFragmentDef.pickupToken = "ITEM_ENIGMAFRAGMENT_PICKUP"; enigmaFragmentDef.descriptionToken = "ITEM_ENIGMAFRAGMENT_DESC"; enigmaFragmentDef.pickupIconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/ArtifactsVanilla/enigmaFragment.png"); enigmaFragmentDef.pickupModelPrefab = val; enigmaFragmentDef.loreToken = ""; enigmaFragmentDef.hidden = false; enigmaFragmentDef.canRemove = false; enigmaFragmentDef.deprecatedTier = (ItemTier)5; ItemAPI.Add(new CustomItem(enigmaFragmentDef, Array.Empty<ItemDisplayRule>())); object obj = <>O.<0>__EnigmaCooldownReduction; if (obj == null) { hook_CalculateEquipmentCooldownScale val6 = EnigmaCooldownReduction; <>O.<0>__EnigmaCooldownReduction = val6; obj = (object)val6; } Inventory.CalculateEquipmentCooldownScale += (hook_CalculateEquipmentCooldownScale)obj; Material val7 = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"926e293c755c1964bb9a6612e94e76df").WaitForCompletion()); MeshRenderer component = ((Component)val5.transform.GetChild(0)).GetComponent<MeshRenderer>(); val7.SetTexture("_NormalTex", ((Renderer)component).material.GetTexture("_NormalTex")); val7.SetFloat("_NormalStrength", 2f); ((Renderer)component).material = val7; eliteEnigmaFragmentDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)eliteEnigmaFragmentDef).name = "EnigmaFragmentElite"; eliteEnigmaFragmentDef.nameToken = "ITEM_ENIGMAFRAGMENTELITE_NAME"; eliteEnigmaFragmentDef.pickupToken = "ITEM_ENIGMAFRAGMENTELITE_PICKUP"; eliteEnigmaFragmentDef.descriptionToken = "ITEM_ENIGMAFRAGMENTELITE_DESC"; eliteEnigmaFragmentDef.pickupIconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/ArtifactsVanilla/enigmaFragmentElite.png"); eliteEnigmaFragmentDef.pickupModelPrefab = val5; eliteEnigmaFragmentDef.loreToken = ""; eliteEnigmaFragmentDef.hidden = false; eliteEnigmaFragmentDef.canRemove = false; eliteEnigmaFragmentDef.deprecatedTier = (ItemTier)5; ItemAPI.Add(new CustomItem(eliteEnigmaFragmentDef, Array.Empty<ItemDisplayRule>())); EquipmentSlot.onServerEquipmentActivated += EquipmentSlot_onServerEquipmentActivated; ((ResourceAvailability)(ref ItemTierCatalog.availability)).CallWhenAvailable((Action)SetTier); ((ResourceAvailability)(ref ArtifactCatalog.availability)).CallWhenAvailable((Action)SetLang); } public static void SetLang() { Artifacts.Enigma.descriptionToken = "ARTIFACT_ENIGMA_NEW_DESCRIPTION"; } public static void SetTier() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) enigmaFragmentDef._itemTierDef = artifactItemTier; eliteEnigmaFragmentDef._itemTierDef = artifactItemTier; artifactItemTier.dropletDisplayPrefab = LegacyResourcesAPI.LoadAsync<GameObject>("Prefabs/ItemPickups/EquipmentOrb").WaitForCompletion(); } private static void EquipmentSlot_onServerEquipmentActivated(EquipmentSlot self, EquipmentIndex eq) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Invalid comparison between Unknown and I4 //IL_0072: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)self.characterBody) || !Object.op_Implicit((Object)(object)self.inventory)) { return; } int itemCount = self.inventory.GetItemCount(eliteEnigmaFragmentDef); if (itemCount > 0) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(eq); BuffIndex val = BuffCatalog.eliteBuffIndices[self.rng.RangeInt(0, BuffCatalog.eliteBuffIndices.Length)]; if ((int)val != -1) { self.characterBody.AddTimedBuff(val, equipmentDef.cooldown * 0.75f * (float)itemCount); } } } private static float EnigmaCooldownReduction(orig_CalculateEquipmentCooldownScale orig, Inventory self) { int itemCount = self.GetItemCount(enigmaFragmentDef); if (itemCount > 0) { float num = orig.Invoke(self); return num * Mathf.Pow(EnigmaFragmentCooldownReduction, (float)itemCount); } return orig.Invoke(self); } public static void CallLate() { //IL_0039: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown int num = (int)((1f - EnigmaFragmentCooldownReduction) * 100f); LanguageAPI.Add("ITEM_ENIGMAFRAGMENT_DESC", string.Format(Language.GetString("ITEM_ENIGMAFRAGMENT_DESC"), num)); EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(EquipmentCatalog.FindEquipmentIndex("EQUIPMENT_IMPULSEFROSTSHIELD")); if ((Object)(object)equipmentDef != (Object)null) { equipmentDef.enigmaCompatible = false; EquipmentCatalog.enigmaEquipmentList.Remove(equipmentDef.equipmentIndex); } equipmentDef = EquipmentCatalog.GetEquipmentDef(EquipmentCatalog.FindEquipmentIndex("EQUIPMENT_REUSER")); if ((Object)(object)equipmentDef != (Object)null) { equipmentDef.enigmaCompatible = false; EquipmentCatalog.enigmaEquipmentList.Remove(equipmentDef.equipmentIndex); } equipmentDef = EquipmentCatalog.GetEquipmentDef(EquipmentCatalog.FindEquipmentIndex("EQUIPMENT_Reducer")); if ((Object)(object)equipmentDef != (Object)null) { equipmentDef.enigmaCompatible = false; EquipmentCatalog.enigmaEquipmentList.Remove(equipmentDef.equipmentIndex); } if ((Object)(object)enigmaFragmentDef != (Object)null) { object obj = <>O.<4>__LogBookController_BuildPickupEntries; if (obj == null) { hook_BuildPickupEntries val = LogBookController_BuildPickupEntries; <>O.<4>__LogBookController_BuildPickupEntries = val; obj = (object)val; } LogBookController.BuildPickupEntries += (hook_BuildPickupEntries)obj; object obj2 = <>O.<5>__LogBookController_GetPickupStatus; if (obj2 == null) { hook_GetPickupStatus val2 = LogBookController_GetPickupStatus; <>O.<5>__LogBookController_GetPickupStatus = val2; obj2 = (object)val2; } LogBookController.GetPickupStatus += (hook_GetPickupStatus)obj2; } } private static EntryStatus LogBookController_GetPickupStatus(orig_GetPickupStatus orig, ref Entry entry, UserProfile viewerProfile) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0024: Invalid comparison between Unknown and I4 //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_002e: 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_0063: Unknown result type (might be due to invalid IL or missing references) PickupIndex val = (PickupIndex)entry.extraData; PickupDef pickupDef = PickupCatalog.GetPickupDef(val); ItemIndex val2 = (ItemIndex)((pickupDef == null) ? (-1) : ((int)pickupDef.itemIndex)); if ((int)val2 != -1) { ItemDef itemDef = ItemCatalog.GetItemDef(val2); if ((Object)(object)itemDef._itemTierDef == (Object)(object)artifactItemTier && viewerProfile.HasUnlockable(itemDef.unlockableDef)) { return (EntryStatus)4; } } return orig.Invoke(ref entry, viewerProfile); } private static Entry[] LogBookController_BuildPickupEntries(orig_BuildPickupEntries orig, Dictionary<ExpansionDef, bool> expansionAvailability) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)enigmaFragmentDef)) { UnlockableDef unlockableDef = Addressables.LoadAssetAsync<UnlockableDef>((object)"5f4704377f63edd48930460f5aa7a964").WaitForCompletion(); enigmaFragmentDef.unlockableDef = unlockableDef; eliteEnigmaFragmentDef.unlockableDef = unlockableDef; PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(enigmaFragmentDef.itemIndex)).unlockableDef = unlockableDef; PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(eliteEnigmaFragmentDef.itemIndex)).unlockableDef = unlockableDef; } Entry[] result = orig.Invoke(expansionAvailability); artifactItemTier.isDroppable = false; return result; } public static GenericPickupController EnigmaFragmentMaker(orig_CreatePickup orig, ref CreatePickupInfo createPickupInfo) { //IL_0002: 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_0017: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) PickupDef pickupDef = PickupCatalog.GetPickupDef(((CreatePickupInfo)(ref createPickupInfo)).pickupIndex); if (pickupDef != null && (int)pickupDef.equipmentIndex != -1) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(pickupDef.equipmentIndex); bool flag = Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef) && equipmentDef.passiveBuffDef.isElite; bool flag2 = false; if (flag) { flag2 = true; ((CreatePickupInfo)(ref createPickupInfo)).pickupIndex = PickupCatalog.FindPickupIndex(eliteEnigmaFragmentDef.itemIndex); } else if (equipmentDef.enigmaCompatible) { flag2 = true; ((CreatePickupInfo)(ref createPickupInfo)).pickupIndex = PickupCatalog.FindPickupIndex(enigmaFragmentDef.itemIndex); } GenericPickupController val = orig.Invoke(ref createPickupInfo); if (flag2 && Object.op_Implicit((Object)(object)((Component)val).gameObject) && Object.op_Implicit((Object)(object)val.pickupDisplay)) { Util.PlaySound("Play_item_proc_crit_cooldown", ((Component)val).gameObject); if (flag) { val.pickupDisplay.tier3ParticleEffect.SetActive(true); val.pickupDisplay.bossParticleEffect.SetActive(true); } else { val.pickupDisplay.tier1ParticleEffect.SetActive(true); } val.pickupDisplay.equipmentParticleEffect.SetActive(true); } return val; } return orig.Invoke(ref createPickupInfo); } public static void EnigmaEquipmentGranter(orig_AttemptGrant orig, GenericPickupController self, CharacterBody body) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Invalid comparison between Unknown and I4 //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00cf: 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_00e2: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) EquipmentIndex equipmentIndex = ((PickupIndex)(ref self.pickupIndex)).equipmentIndex; if ((int)equipmentIndex == -1) { orig.Invoke(self, body); return; } bool flag = (int)body.inventory.currentEquipmentIndex != -1; if (!flag && PickupCatalog.GetPickupDef(self.pickupIndex).itemIndex == enigmaFragmentDef.itemIndex) { self.pickupIndex = PickupCatalog.FindPickupIndex(EnigmaArtifactManager.GetRandomEquipment(EnigmaArtifactManager.serverInitialEquipmentRng, 0)); Util.PlaySound("Play_UI_insufficient_funds", ((Component)self).gameObject); Util.PlaySound("Play_UI_insufficient_funds", ((Component)self).gameObject); if (((NetworkBehaviour)body.master).hasAuthority) { CharacterMasterNotificationQueue notificationQueueForMaster = CharacterMasterNotificationQueue.GetNotificationQueueForMaster(body.master); TransformationInfo val = new TransformationInfo((TransformationType)0, (object)enigmaFragmentDef); NotificationInfo val2 = new NotificationInfo((object)EquipmentCatalog.GetEquipmentDef(((PickupIndex)(ref self.pickupIndex)).pickupDef.equipmentIndex), val); notificationQueueForMaster.PushNotification(val2, 6f); } } orig.Invoke(self, body); if (flag) { EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(equipmentIndex); EquipmentIndex equipmentIndex2 = Equipment.Fruit.equipmentIndex; if (Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef) && equipmentDef.passiveBuffDef.isElite) { equipmentIndex2 = Equipment.AffixRed.equipmentIndex; } CreatePickupInfo val3 = default(CreatePickupInfo); val3.position = ((Component)self).transform.position; val3.rotation = ((Component)self).transform.rotation; ((CreatePickupInfo)(ref val3)).pickupIndex = PickupCatalog.FindPickupIndex(equipmentIndex2); GenericPickupController.CreatePickup(ref val3); Object.Destroy((Object)(object)((Component)self).gameObject); } } } public class Evolution { [CompilerGenerated] private static class <>O { public static Manipulator <0>__Evolution_MoreItems; public static hook_OnServerCardSpawnedGlobal <1>__Evo_VoidTeamCorrupted; } public static BasicPickupDropTable dtMonsterTeamLunarItem = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static ItemTag evoBlacklist = (ItemTag)94; public static void Start() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected I4, but got Unknown //IL_011d: 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_0128: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier1Item.asset").WaitForCompletion(); BasicPickupDropTable val2 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier2Item.asset").WaitForCompletion(); BasicPickupDropTable val3 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier3Item.asset").WaitForCompletion(); ItemTag[] array = new ItemTag[7]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); array[6] = (ItemTag)(int)evoBlacklist; ItemTag[] bannedItemTags = (val3.bannedItemTags = (val2.bannedItemTags = (val.bannedItemTags = (ItemTag[])(object)array))); dtMonsterTeamLunarItem.bannedItemTags = bannedItemTags; dtMonsterTeamLunarItem.tier1Weight = 0f; dtMonsterTeamLunarItem.tier2Weight = 0f; dtMonsterTeamLunarItem.tier3Weight = 0f; dtMonsterTeamLunarItem.lunarItemWeight = 1f; ((PickupDropTable)dtMonsterTeamLunarItem).canDropBeReplaced = false; ((Object)dtMonsterTeamLunarItem).name = "dtMonsterTeamLunarItem"; if (!Chainloader.PluginInfos.ContainsKey("com.Moffein.EvolutionConfig")) { object obj = <>O.<0>__Evolution_MoreItems; if (obj == null) { Manipulator val4 = Evolution_MoreItems; <>O.<0>__Evolution_MoreItems = val4; obj = (object)val4; } MonsterTeamGainsItemsArtifactManager.GrantMonsterTeamItem += (Manipulator)obj; } object obj2 = <>O.<1>__Evo_VoidTeamCorrupted; if (obj2 == null) { hook_OnServerCardSpawnedGlobal val5 = Evo_VoidTeamCorrupted; <>O.<1>__Evo_VoidTeamCorrupted = val5; obj2 = (object)val5; } MonsterTeamGainsItemsArtifactManager.OnServerCardSpawnedGlobal += (hook_OnServerCardSpawnedGlobal)obj2; } private static void Evo_VoidTeamCorrupted(orig_OnServerCardSpawnedGlobal orig, SpawnResult spawnResult) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Invalid comparison between Unknown and I4 //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(spawnResult); CharacterMaster val = (Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) ? spawnResult.spawnedInstance.GetComponent<CharacterMaster>() : null); if (!Object.op_Implicit((Object)(object)val) || (int)val.teamIndex != 4) { return; } val.inventory.AddItemsFrom(MonsterTeamGainsItemsArtifactManager.monsterTeamInventory); Enumerator<TransformationInfo> enumerator = ContagiousItemManager.transformationInfos.GetEnumerator(); try { while (enumerator.MoveNext()) { TransformationInfo current = enumerator.Current; ContagiousItemManager.TryForceReplacement(val.inventory, current.originalItem); } } finally { ((IDisposable)enumerator).Dispose(); } } private static void Evolution_MoreItems(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.Inventory", "GiveItem") })) { val.EmitDelegate<Func<ItemIndex, ItemIndex>>((Func<ItemIndex, ItemIndex>)delegate(ItemIndex item) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_0057: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_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_005c: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) ItemDef itemDef = ItemCatalog.GetItemDef(item); if ((int)itemDef.tier == 3) { PickupIndex val2 = ((PickupDropTable)dtMonsterTeamLunarItem).GenerateDrop(MonsterTeamGainsItemsArtifactManager.treasureRng); if (val2 != PickupIndex.none) { PickupDef pickupDef = PickupCatalog.GetPickupDef(val2); if (pickupDef != null) { return pickupDef.itemIndex; } } } return item; }); val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1) }); val.EmitDelegate<Func<int, int>>((Func<int, int>)delegate(int amount) { if (WConfig.EvoMoreItems.Value) { bool flag = false; if (WConfig.EvoMoreAfterLoop.Value && MonsterTeamGainsItemsArtifactManager.currentItemIterator > 5) { flag = true; } else if (!WConfig.EvoMoreAfterLoop.Value) { flag = true; } if (flag) { switch ((MonsterTeamGainsItemsArtifactManager.currentItemIterator - 1) % MonsterTeamGainsItemsArtifactManager.dropPattern.Length) { case 0: case 1: return 3; case 2: case 3: return 2; case 4: return 1; } } } return amount; }); } else { Debug.LogWarning((object)"IL Failed: Evolution_MoreItems"); } } } public class Honor { [CompilerGenerated] private static class <>O { public static hook_BeginEncounter <0>__Honor_ForceSpecialEliteType; public static hook_Initialize <1>__Honor_SimuForceSpecialEliteType; public static hook_UpdateItemAvailability <2>__RemoveFireTrailFromWorm; public static hook_OnOutOfDangerChanged <3>__PreventPerfectedMithrixFromRegenningShield; public static hook_AddMinion <4>__MinionsInheritHonor; public static hook_NotEliteOnlyArtifactActive <5>__AllowNormalTiersHonor; } public static List<EliteDef> minionEliteDefs; public static void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown object obj = <>O.<0>__Honor_ForceSpecialEliteType; if (obj == null) { hook_BeginEncounter val = Honor_ForceSpecialEliteType; <>O.<0>__Honor_ForceSpecialEliteType = val; obj = (object)val; } ScriptedCombatEncounter.BeginEncounter += (hook_BeginEncounter)obj; object obj2 = <>O.<1>__Honor_SimuForceSpecialEliteType; if (obj2 == null) { hook_Initialize val2 = Honor_SimuForceSpecialEliteType; <>O.<1>__Honor_SimuForceSpecialEliteType = val2; obj2 = (object)val2; } InfiniteTowerExplicitSpawnWaveController.Initialize += (hook_Initialize)obj2; object obj3 = <>O.<2>__RemoveFireTrailFromWorm; if (obj3 == null) { hook_UpdateItemAvailability val3 = RemoveFireTrailFromWorm; <>O.<2>__RemoveFireTrailFromWorm = val3; obj3 = (object)val3; } CharacterBody.UpdateItemAvailability += (hook_UpdateItemAvailability)obj3; Addressables.LoadAssetAsync<EliteDef>((object)"RoR2/DLC1/EliteEarth/edEarthHonor.asset").WaitForCompletion().healthBoostCoefficient = 2f; } public static void OnArtifactEnable() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown if (!NetworkServer.active) { return; } WConfig.cfgEliteWorms_Changed(null, null); Honor_EliteTiers(activate: true); if (WConfig.Honor_PerfectMithrix.Value) { object obj = <>O.<3>__PreventPerfectedMithrixFromRegenningShield; if (obj == null) { hook_OnOutOfDangerChanged val = PreventPerfectedMithrixFromRegenningShield; <>O.<3>__PreventPerfectedMithrixFromRegenningShield = val; obj = (object)val; } CharacterBody.OnOutOfDangerChanged += (hook_OnOutOfDangerChanged)obj; } if (WConfig.Honor_EliteMinions.Value) { object obj2 = <>O.<4>__MinionsInheritHonor; if (obj2 == null) { hook_AddMinion val2 = MinionsInheritHonor; <>O.<4>__MinionsInheritHonor = val2; obj2 = (object)val2; } MinionGroup.AddMinion += (hook_AddMinion)obj2; } } public static void OnArtifactDisable() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown WConfig.cfgEliteWorms_Changed(null, null); Honor_EliteTiers(activate: false); if (WConfig.Honor_PerfectMithrix.Value) { object obj = <>O.<3>__PreventPerfectedMithrixFromRegenningShield; if (obj == null) { hook_OnOutOfDangerChanged val = PreventPerfectedMithrixFromRegenningShield; <>O.<3>__PreventPerfectedMithrixFromRegenningShield = val; obj = (object)val; } CharacterBody.OnOutOfDangerChanged -= (hook_OnOutOfDangerChanged)obj; } if (WConfig.Honor_EliteMinions.Value) { object obj2 = <>O.<4>__MinionsInheritHonor; if (obj2 == null) { hook_AddMinion val2 = MinionsInheritHonor; <>O.<4>__MinionsInheritHonor = val2; obj2 = (object)val2; } MinionGroup.AddMinion -= (hook_AddMinion)obj2; } } public static void Honor_EliteTiers(bool activate) { //IL_011f: 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_012a: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown if (activate) { minionEliteDefs = new List<EliteDef>(); EliteDef[] eliteDefs = EliteCatalog.eliteDefs; foreach (EliteDef val in eliteDefs) { if (((Object)val).name.EndsWith("Honor") && val.IsAvailable()) { minionEliteDefs.Add(val); } } if (WConfig.Honor_EliteMinionsNoGilded.Value) { minionEliteDefs.Remove(Elites.AurelioniteHonor); } } else { minionEliteDefs = null; } if (!WConfig.Honor_RedoneElites.Value) { return; } float num = 2f; if (activate) { object obj = <>O.<5>__AllowNormalTiersHonor; if (obj == null) { hook_NotEliteOnlyArtifactActive val2 = AllowNormalTiersHonor; <>O.<5>__AllowNormalTiersHonor = val2; obj = (object)val2; } CombatDirector.NotEliteOnlyArtifactActive += (hook_NotEliteOnlyArtifactActive)obj; CombatDirector.eliteTiers[0].isAvailable = (EliteRules rules) => false; num = 0.5f; } else { object obj2 = <>O.<5>__AllowNormalTiersHonor; if (obj2 == null) { hook_NotEliteOnlyArtifactActive val3 = AllowNormalTiersHonor; <>O.<5>__AllowNormalTiersHonor = val3; obj2 = (object)val3; } CombatDirector.NotEliteOnlyArtifactActive -= (hook_NotEliteOnlyArtifactActive)obj2; CombatDirector.eliteTiers[0].isAvailable = (EliteRules rules) => CombatDirector.NotEliteOnlyArtifactActive(); } EliteDef[] eliteDefs2 = EliteCatalog.eliteDefs; foreach (EliteDef val4 in eliteDefs2) { if (!((Object)val4).name.EndsWith("Honor")) { val4.healthBoostCoefficient = Mathf.LerpUnclamped(1f, val4.healthBoostCoefficient, num); val4.damageBoostCoefficient = Mathf.LerpUnclamped(1f, val4.damageBoostCoefficient, num); } } } private static bool AllowNormalTiersHonor(orig_NotEliteOnlyArtifactActive orig) { return true; } public static bool DisableHonorEliteTier(orig_IsEliteOnlyArtifactActive orig) { return false; } private static void Honor_SimuForceSpecialEliteType(orig_Initialize orig, InfiniteTowerExplicitSpawnWaveController self, int waveIndex, Inventory enemyInventory, GameObject spawnTargetObject) { if (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.EliteOnly) && WConfig.Honor_PerfectMithrix.Value) { string name = ((Object)self.spawnList[0].spawnCard).name; if (name.StartsWith("cscBrother")) { self.spawnList[0].eliteDef = Elites.Lunar; } else if (name.StartsWith("cscScavLunar")) { self.spawnList[0].eliteDef = Elites.Lunar; } else if (name.StartsWith("cscMiniVoidR")) { self.spawnList[0].eliteDef = Elites.Void; } else if (name.StartsWith("cscITVoidMe")) { self.spawnList[0].eliteDef = Elites.Void; } else if (name.StartsWith("cscVoidInfestor")) { self.spawnList[0].eliteDef = Elites.Void; } else if (name.StartsWith("cscFalseSon")) { self.spawnList[0].eliteDef = Elites.Aurelionite; } else if (name.StartsWith("cscTitanGold") && Run.instance.IsExpansionEnabled(Elites.Aurelionite.eliteEquipmentDef.requiredExpansion)) { self.spawnList[0].eliteDef = Elites.Aurelionite; } } orig.Invoke(self, waveIndex, enemyInventory, spawnTargetObject); } private static void Honor_ForceSpecialEliteType(orig_BeginEncounter orig, ScriptedCombatEncounter self) { //IL_0117: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!RunArtifactManager.instance.IsArtifactEnabled(Artifacts.EliteOnly) || !WConfig.Honor_PerfectMithrix.Value) { return; } string name = ((Object)self.spawns[0].spawnCard).name; bool flag = false; EquipmentDef val = null; if (name.StartsWith("cscBrother") || name.StartsWith("cscScavLunar")) { flag = true; val = Equipment.AffixLunar; } else if (name.StartsWith("cscMiniVoidR") || name.StartsWith("cscVoidInfe")) { flag = true; val = Equipment.EliteVoidEquipment; } else if (name.StartsWith("cscFalseSon") || name.StartsWith("cscTitanGold")) { val = Equipment.EliteAurelioniteEquipment; if (Run.instance.IsExpansionEnabled(val.requiredExpansion)) { flag = true; } } if (flag) { for (int i = 0; i < self.combatSquad.memberCount; i++) { self.combatSquad.membersList[i].inventory.SetEquipmentIndex(val.equipmentIndex); } } } private static void RemoveFireTrailFromWorm(orig_UpdateItemAvailability orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)((Component)self).GetComponent<WormBodyPositions2>())) { self.itemAvailability.hasFireTrail = false; } } public static void PreventPerfectedMithrixFromRegenningShield(orig_OnOutOfDangerChanged orig, CharacterBody self) { orig.Invoke(self); if (((Object)self).name.StartsWith("Bro")) { self.outOfDangerStopwatch = -1000f; } } public static void MinionsInheritHonor(orig_AddMinion orig, NetworkInstanceId ownerId, MinionOwnership minion) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Invalid comparison between Unknown and I4 //IL_0073: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(ownerId, minion); if (NetworkServer.active) { Inventory component = ((Component)minion).gameObject.GetComponent<Inventory>(); if (Object.op_Implicit((Object)(object)component) && (int)component.currentEquipmentIndex == -1 && minionEliteDefs.Count > 0) { int index = Main.Random.Next(minionEliteDefs.Count); component.SetEquipmentIndex(minionEliteDefs[index].eliteEquipmentDef.equipmentIndex); } } } } public class Kin { [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1; public static hook_HandleSingleMonsterTypeArtifact <1>__ClassicStageInfo_HandleSingleMonsterTypeArtifact; } public static DirectorCardCategorySelection KinBackup = ScriptableObject.CreateInstance<DirectorCardCategorySelection>(); public static SpawnCard KinNoRepeat; public static void Start() { //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_002c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown ((Object)KinBackup).name = "dcccBackupKinHelper"; object obj = <>O.<0>__IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1; if (obj == null) { Manipulator val = IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1; <>O.<0>__IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1 = val; obj = (object)val; } ClassicStageInfo.HandleSingleMonsterTypeArtifact += (Manipulator)obj; object obj2 = <>O.<1>__ClassicStageInfo_HandleSingleMonsterTypeArtifact; if (obj2 == null) { hook_HandleSingleMonsterTypeArtifact val2 = ClassicStageInfo_HandleSingleMonsterTypeArtifact; <>O.<1>__ClassicStageInfo_HandleSingleMonsterTypeArtifact = val2; obj2 = (object)val2; } ClassicStageInfo.HandleSingleMonsterTypeArtifact += (hook_HandleSingleMonsterTypeArtifact)obj2; } private static void IL_ClassicStageInfo_HandleSingleMonsterTypeArtifact1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 40f) })) { val.Next.Operand = 50f; int index = val.Index; val.Index = index + 1; val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 50f) }); val.Next.Operand = 60f; } else { Debug.LogWarning((object)"IL Failed: IL.IL_ClassicStageInfo_HandleMixEnemyArtifact"); } } private static void IL_ClassicStageInfo_HandleMixEnemyArtifact(ILContext il) { } private static void ClassicStageInfo_HandleSingleMonsterTypeArtifact(orig_HandleSingleMonsterTypeArtifact orig, DirectorCardCategorySelection monsterCategories, Xoroshiro128Plus rng) { KinBackup.CopyFrom(monsterCategories); orig.Invoke(monsterCategories, rng); int num = 0; SpawnCard spawnCard = monsterCategories.categories[0].cards[0].spawnCard; if ((Object)(object)spawnCard == (Object)(object)KinNoRepeat) { do { num++; monsterCategories.CopyFrom(KinBackup); orig.Invoke(monsterCategories, rng); spawnCard = monsterCategories.categories[0].cards[0].spawnCard; } while (num < 15 && (Object)(object)spawnCard == (Object)(object)KinNoRepeat); } if ((Object)(object)spawnCard != (Object)(object)KinNoRepeat) { Debug.Log((object)(num + " Cycles until non repeat")); KinNoRepeat = spawnCard; } else if (num == 10) { Debug.Log((object)(num + " Cycles, stop looking for non repeat")); } KinBackup.Clear(); } } public class KinBossDropsForEnemies { public static CharacterMaster tempClayMan; public static void Start() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00a2: 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_00b6: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0105: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: 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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0283: 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_029f: 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_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: 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_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0384: 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_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) SerializablePickupIndex val = default(SerializablePickupIndex); val.pickupName = "ItemIndex.SprintWisp"; SerializablePickupIndex bossPickup = val; val = default(SerializablePickupIndex); val.pickupName = "ItemIndex.BeetleGland"; SerializablePickupIndex bossPickup2 = val; val = default(SerializablePickupIndex); val.pickupName = "ItemIndex.RoboBallBuddy"; SerializablePickupIndex bossPickup3 = val; val = default(SerializablePickupIndex); val.pickupName = "ItemIndex.FireballsOnHit"; SerializablePickupIndex bossPickup4 = val; val = default(SerializablePickupIndex); val.pickupName = "ItemIndex.ShinyPearl"; SerializablePickupIndex bossPickup5 = val; val = default(SerializablePickupIndex); val.pickupName = "ItemIndex.VoidMegaCrabItem"; SerializablePickupIndex bossPickup6 = val; DeathRewards component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/GolemBody").GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.Knurl" }; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Halcyonite/HalcyoniteBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.Knurl" }; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/BeetleBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup2; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/BeetleGuardBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup2; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/JellyfishBody").GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.NovaOnLowHealth" }; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/WispBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/GreaterWispBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup; component = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/ArchWispBody").GetComponent<DeathRewards>(); if (Object.op_Implicit((Object)(object)component)) { component.bossPickup = bossPickup; } component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LemurianBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup4; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LemurianBruiserBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup4; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Scorchling/ScorchlingBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = bossPickup4; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayBruiserBody").GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.SiphonOnLowHealth" }; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayGrenadierBody").GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.SiphonOnLowHealth" }; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ImpBody").GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.BleedOnHitAndExplode" }; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ParentBody").GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.ParentEgg" }; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Child/ChildBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.ParentEgg" }; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/RoboBallMiniBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup3; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/VultureBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup3; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarExploderBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup5; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarGolemBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup5; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarWispBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup5; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/BrotherBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup5; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/BrotherHurtBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup5; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/MinorConstructBody").GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.MinorConstructOnKill" }; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/VoidMegaCrabBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup6; component = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/NullifierBody").GetComponent<DeathRewards>(); component.bossPickup = bossPickup6; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidJailer/VoidJailerBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = bossPickup6; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidBarnacle/VoidBarnacleBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = bossPickup6; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/VoidInfestorBody.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = bossPickup6; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase1.prefab").WaitForCompletion().AddComponent<DeathRewards>(); component.bossPickup = bossPickup6; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase2.prefab").WaitForCompletion().AddComponent<DeathRewards>(); component.bossPickup = bossPickup6; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase3.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = bossPickup6; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBody.prefab").WaitForCompletion().AddComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.TitanGoldDuringTP" }; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBodyLunarShard.prefab").WaitForCompletion().AddComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.TitanGoldDuringTP" }; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBodyBrokenLunarShard.prefab").WaitForCompletion().GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.TitanGoldDuringTP" }; } public static void ModBossDropChanger() { //IL_0024: 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_0037: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)tempClayMan != (Object)null) { DeathRewards component = tempClayMan.bodyPrefab.GetComponent<DeathRewards>(); component.bossPickup = new SerializablePickupIndex { pickupName = "ItemIndex.SiphonOnLowHealth" }; } } } public class Rebirth { [CompilerGenerated] private static class <>O { public static hook_BeginGameOver <0>__StoreRebirthAlways; public static hook_SetOptionsFromInteractor <1>__MoreRebirth; } public static void Start() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown if (WConfig.RebirthChanges.Value) { object obj = <>O.<0>__StoreRebirthAlways; if (obj == null) { hook_BeginGameOver val = StoreRebirthAlways; <>O.<0>__StoreRebirthAlways = val; obj = (object)val; } Run.BeginGameOver += (hook_BeginGameOver)obj; object obj2 = <>O.<1>__MoreRebirth; if (obj2 == null) { hook_SetOptionsFromInteractor val2 = MoreRebirth; <>O.<1>__MoreRebirth = val2; obj2 = (object)val2; } PickupPickerController.SetOptionsFromInteractor += (hook_SetOptionsFromInteractor)obj2; } } private static void StoreRebirthAlways(orig_BeginGameOver orig, Run self, GameEndingDef gameEndingDef) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Invalid comparison between Unknown and I4 //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Invalid comparison between Unknown and I4 //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, gameEndingDef); if (!NetworkServer.active || !Object.op_Implicit((Object)(object)RunArtifactManager.instance) || !RunArtifactManager.instance.IsArtifactEnabled(Artifacts.Rebirth) || !WConfig.RebirthStoreAlways.Value) { return; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if ((int)instance.networkUser.rebirthItem != -1) { continue; } List<ItemIndex> list = new List<ItemIndex>(); List<ItemIndex> itemAcquisitionOrder = instance.master.inventory.itemAcquisitionOrder; for (int i = 0; i < itemAcquisitionOrder.Count; i++) { ItemDef itemDef = ItemCatalog.GetItemDef(itemAcquisitionOrder[i]); if ((int)itemDef.tier != 5 && (int)itemDef.tier != 3 && !itemDef.ContainsTag((ItemTag)22) && !itemDef.ContainsTag((ItemTag)10)) { list.Add(itemAcquisitionOrder[i]); } } if (list.Count > 0) { int index = self.treasureRng.RangeInt(0, list.Count); instance.networkUser.CallCmdStoreRebirthItems(list[index]); Debug.Log((object)("Random Rebirth store : " + (object)ItemCatalog.GetItemDef(list[index]))); } } } private static void MoreRebirth(orig_SetOptionsFromInteractor orig, PickupPickerController self, Interactor activator) { if (self.isRebirthChoice) { ItemTierCatalog.GetItemTierDef((ItemTier)3).canScrap = true; ItemTierCatalog.GetItemTierDef((ItemTier)6).canScrap = true; ItemTierCatalog.GetItemTierDef((ItemTier)7).canScrap = true; ItemTierCatalog.GetItemTierDef((ItemTier)8).canScrap = true; ItemTierCatalog.GetItemTierDef((ItemTier)9).canScrap = true; } orig.Invoke(self, activator); if (self.isRebirthChoice) { ItemTierCatalog.GetItemTierDef((ItemTier)3).canScrap = false; ItemTierCatalog.GetItemTierDef((ItemTier)6).canScrap = false; ItemTierCatalog.GetItemTierDef((ItemTier)7).canScrap = false; ItemTierCatalog.GetItemTierDef((ItemTier)8).canScrap = false; ItemTierCatalog.GetItemTierDef((ItemTier)9).canScrap = false; } } } public class Sacrifice { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnPrePopulateSceneServer <>9__3_0; internal void <Start>b__3_0(orig_OnPrePopulateSceneServer orig, SceneDirector sceneDirector) { if (WConfig.SacrificeMoreEnemySpawns.Value) { sceneDirector.monsterCredit = (int)((float)sceneDirector.monsterCredit * 1.5f); } orig.Invoke(sceneDirector);