Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of FruityBossDrop v1.2.3
BossDropRework.dll
Decompiled 5 months agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using UnityEngine; using UnityEngine.AddressableAssets; [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 = "")] [assembly: AssemblyCompany("BossDropRework")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BossDropRework")] [assembly: AssemblyTitle("BossDropRework")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace BossDropRework; [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.RiskOfBrainrot.FruityBossDrops", "FruityBossDrops", "1.2.2")] [R2APISubmoduleDependency(new string[] { "LanguageAPI", "ContentAddition", "DirectorAPI" })] public class BossDropReworkPlugin : BaseUnityPlugin { public delegate void BossDropChanceHandler(CharacterBody victim, CharacterBody attacker, ref float dropChance); public delegate void TricornFireHandler(CharacterBody attacker, CharacterBody victim, ref bool shouldFire); public const string guid = "com.RiskOfBrainrot.FruityBossDrops"; public const string teamName = "RiskOfBrainrot"; public const string modName = "FruityBossDrops"; public const string version = "1.2.2"; public static BuffDef bossHunterDebuff; private int tricornDebuffDuration = 999; private bool reworkTricorn = true; public static ExplicitPickupDropTable hordeDropTable; public static PluginInfo PInfo { get; private set; } internal static ConfigFile CustomConfigFile { get; private set; } public static ConfigEntry<float> LesserDropChance { get; set; } public static ConfigEntry<float> EliteDropChance { get; set; } public static ConfigEntry<float> ChampionDropChance { get; set; } public static ConfigEntry<float> ChampionEliteDropChance { get; set; } public static ConfigEntry<float> SpecialBossDropChance { get; set; } public static ConfigEntry<bool> ForceDropsFromAurelionite { get; set; } public static ConfigEntry<bool> ReworkTricorn { get; set; } public static ConfigEntry<bool> ReworkVultures { get; set; } public static ConfigEntry<bool> ReworkPrinters { get; set; } public static ConfigEntry<float> TricornDamageCoefficient { get; set; } public static ConfigEntry<float> TricornProcCoefficient { get; set; } public static GameObject overgrownPrinterPrefab => LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/DuplicatorWild"); public static event BossDropChanceHandler ModifyBossItemDropChance; public static event TricornFireHandler ShouldTricornFireAndBreak; public void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_01bb: 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_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: 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_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) CustomConfigFile = new ConfigFile(Paths.ConfigPath + "\\FruityBossDrops.cfg", true); LesserDropChance = CustomConfigFile.Bind<float>("Trophy Drops", "Droprate for Non-Elite Lessers", 0.5f, "Includes Horde of Many"); EliteDropChance = CustomConfigFile.Bind<float>("Trophy Drops", "Droprate for Elite Lessers", 2f, "Includes Horde of Many"); ChampionDropChance = CustomConfigFile.Bind<float>("Trophy Drops", "Droprate for Non-Elite Champions", 6f, ""); ChampionEliteDropChance = CustomConfigFile.Bind<float>("Trophy Drops", "Droprate for Elite Champions", 10f, ""); SpecialBossDropChance = CustomConfigFile.Bind<float>("Trophy Drops", "Droprate for Special Bosses", 14f, "Affects AWU"); ForceDropsFromAurelionite = CustomConfigFile.Bind<bool>("Trophy Drops", "Force Drops From Aurelionite", true, "Force Aurelionite to drop a Halcyon Seed on death, replacing the portal loot with 1 green for each player. Recommended to set to false for use with GildedCoastPlus"); ReworkTricorn = CustomConfigFile.Bind<bool>("Reworks", "Rework Tricorn", true, ""); ReworkVultures = CustomConfigFile.Bind<bool>("Reworks", "Rework Wake of Vultures", true, "Turns it into a Horde of Many trophy"); ReworkPrinters = CustomConfigFile.Bind<bool>("Reworks", "Rework Overgrown Printers", true, "Removes Overgrown Printers from the game"); TricornDamageCoefficient = CustomConfigFile.Bind<float>("Tricorn", "Tricorn Damage Coefficient", 70f, "Multiply by 100 for % ie 70 is 7000%"); TricornProcCoefficient = CustomConfigFile.Bind<float>("Tricorn", "Tricorn Proc Coefficient", 5f, "Most attacks default to 1. Recommended to install ProcPatcher"); bossHunterDebuff = ScriptableObject.CreateInstance<BuffDef>(); bossHunterDebuff.buffColor = new Color(0.2f, 0.9f, 0.8f, 1f); bossHunterDebuff.canStack = false; bossHunterDebuff.isDebuff = true; BuffDef obj = bossHunterDebuff; obj.flags = (Flags)(obj.flags | 1); ((Object)bossHunterDebuff).name = "TrophyHunterDebuff"; bossHunterDebuff.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/LunarSkillReplacements/texBuffLunarDetonatorIcon.tif").WaitForCompletion(); ContentAddition.AddBuffDef(bossHunterDebuff); BossesDropBossItems(); if (ReworkTricorn.Value) { TricornRework(); } if (ReworkVultures.Value) { WakeOfVulturesRework(); } if (ReworkPrinters.Value) { DirectorAPI.InteractableActions += DeleteYellowPrinters; } } private void BossesDropBossItems() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown BossGroup.Awake += new hook_Awake(RemoveBossItemDropsFromTeleporter); GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(BossesDropTrophies); } private void DeleteYellowPrinters(DccsPool pool, StageInfo currentStage) { Helpers.RemoveExistingInteractable(InteractableNames.PrinterOvergrown3D); } private void RemoveBossItemDropsFromTeleporter(orig_Awake orig, BossGroup self) { orig.Invoke(self); self.bossDropChance = 0f; } public static float InvokeModifyBossItemDropChance(CharacterBody victim, CharacterBody attacker, ref float dropChance) { BossDropReworkPlugin.ModifyBossItemDropChance?.Invoke(victim, attacker, ref dropChance); return dropChance; } public void BossesDropTrophies(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); if ((int)damageReport.victimTeamIndex == 1) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; if ((Object)(object)attackerBody == (Object)null || (Object)(object)victimBody == (Object)null) { return; } BodyIndex bodyIndex = victimBody.bodyIndex; if ((bodyIndex == BodyCatalog.FindBodyIndex("TitanGoldBody") && !ForceDropsFromAurelionite.Value) || victimBody.healthComponent.alive) { return; } CharacterMaster attackerMaster = damageReport.attackerMaster; ItemDef val = null; int participatingPlayerCount = Run.instance.participatingPlayerCount; PickupDropTable dropTable; float dropChance = GetBaseBossItemDropChanceFromBody(victimBody, out dropTable); if (dropChance > 0f && (Object)(object)dropTable != (Object)null) { Debug.Log((object)bodyIndex); if (InvokeModifyBossItemDropChance(victimBody, attackerBody, ref dropChance) > 0f && Util.CheckRoll(dropChance, attackerMaster)) { UniquePickup val2 = dropTable.GeneratePickup(Run.instance.bossRewardRng); Vector3 val3 = (Object.op_Implicit((Object)(object)victimBody) ? victimBody.corePosition : Vector3.zero); Vector3 val4 = val3 - attackerBody.corePosition; Vector3 normalized = ((Vector3)(ref val4)).normalized; PickupDropletController.CreatePickupDroplet(val2, val3, normalized * 15f, false); } } } public static float GetBaseBossItemDropChanceFromBody(CharacterBody body, out PickupDropTable dropTable) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) DeathRewards deathRewardsFromTarget = GetDeathRewardsFromTarget(body); if ((Object)(object)deathRewardsFromTarget == (Object)null || (Object)(object)deathRewardsFromTarget.bossDropTable == (Object)null) { dropTable = null; return 0f; } dropTable = deathRewardsFromTarget.bossDropTable; BodyIndex bodyIndex = body.bodyIndex; if (bodyIndex == BodyCatalog.FindBodyIndex("TitanGoldBody")) { return ForceDropsFromAurelionite.Value ? 100 : 0; } if (deathRewardsFromTarget.goldReward == 0) { return 0f; } if (bodyIndex == BodyCatalog.FindBodyIndex("SuperRoboBallBossBody") || bodyIndex == BodyCatalog.FindBodyIndex("VultureHunterBody")) { return SpecialBossDropChance.Value; } bool isChampion = body.isChampion; bool flag = body.isElite || bodyIndex == BodyCatalog.FindBodyIndex("ElectricWormBody"); if (isChampion) { if (flag) { return ChampionEliteDropChance.Value; } return ChampionDropChance.Value; } if (flag) { return EliteDropChance.Value; } return LesserDropChance.Value; } public static DeathRewards GetDeathRewardsFromTarget(HurtBox hurtBox) { if ((Object)(object)hurtBox == (Object)null) { return null; } HealthComponent healthComponent = hurtBox.healthComponent; if ((Object)(object)healthComponent == (Object)null) { return null; } return GetDeathRewardsFromTarget(healthComponent.body); } public static DeathRewards GetDeathRewardsFromTarget(CharacterBody enemyBody) { if ((Object)(object)enemyBody == (Object)null) { return null; } return ((Component)enemyBody).GetComponent<DeathRewards>(); } private void TricornRework() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown EquipmentSlot.FireBossHunter += new hook_FireBossHunter(FireTricornFix); ModifyBossItemDropChance += TricornDropChance; LanguageAPI.Add("EQUIPMENT_BOSSHUNTER_PICKUP", "Cripple a large monster and claim its <style=cIsDamage>trophy</style> after it dies. Consumed on use."); LanguageAPI.Add("EQUIPMENT_BOSSHUNTER_DESC", "Targets any enemy capable of dropping a <style=cIsDamage>unique reward</style>, " + $"dealing <style=cIsDamage>{TricornDamageCoefficient.Value * 100f}% damage</style>, " + "then <style=cIsUtility>Crippling and Hemorrhaging</style> it " + $"for <style=cIsUtility>{tricornDebuffDuration}</style> seconds. " + "When the enemy dies, it has a 100% chance to drop it's <style=cIsDamage>trophy</style>. Equipment is <style=cIsUtility>consumed</style> on use."); } private void TricornDropChance(CharacterBody victim, CharacterBody attacker, ref float dropChance) { if (victim.HasBuff(bossHunterDebuff) && dropChance != 0f) { dropChance = 100f; } } public static bool GetTricornFireAndBreak(CharacterBody attacker, CharacterBody victim, ref bool shouldFire) { BossDropReworkPlugin.ShouldTricornFireAndBreak?.Invoke(attacker, victim, ref shouldFire); return shouldFire; } private bool FireTricornFix(orig_FireBossHunter orig, EquipmentSlot self) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02de: 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_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_044c: 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_045a: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: 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_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Expected O, but got Unknown //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Expected O, but got Unknown //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) self.UpdateTargets(Equipment.BossHunter.equipmentIndex, true); HurtBox hurtBox = self.currentTarget.hurtBox; DeathRewards deathRewardsFromTarget = GetDeathRewardsFromTarget(hurtBox); if (Object.op_Implicit((Object)(object)hurtBox) && Object.op_Implicit((Object)(object)deathRewardsFromTarget)) { HealthComponent healthComponent = hurtBox.healthComponent; if ((Object)(object)healthComponent != (Object)null) { CharacterBody characterBody = self.characterBody; CharacterBody body = healthComponent.body; if ((Object)(object)body != (Object)null && (Object)(object)characterBody != (Object)null) { bool flag = false; Vector3 val = (Object.op_Implicit((Object)(object)body) ? body.corePosition : Vector3.zero); Vector3 val2 = val - characterBody.corePosition; Vector3 normalized = ((Vector3)(ref val2)).normalized; Object val3 = (val3 = (Object)(object)(((Object)(object)body != (Object)null) ? body.master : null)); if (Object.op_Implicit(val3)) { bool shouldFire = true; if (GetTricornFireAndBreak(characterBody, body, ref shouldFire)) { body.AddBuff(bossHunterDebuff); flag = true; } if (reworkTricorn) { DamageInfo val4 = new DamageInfo(); val4.attacker = ((Component)self).gameObject; val4.force = normalized * 1500f; val4.damage = characterBody.damage * TricornDamageCoefficient.Value; val4.procCoefficient = TricornProcCoefficient.Value; healthComponent.TakeDamage(val4); body.AddTimedBuffAuthority(Buffs.Cripple.buffIndex, (float)tricornDebuffDuration); DotController.InflictDot(((Component)healthComponent).gameObject, val4.attacker, hurtBox, (DotIndex)6, (float)tricornDebuffDuration, 1f, (uint?)null); } else { body.master.TrueKill(((Component)this).gameObject, (GameObject)null, default(DamageTypeCombo)); } } CharacterModel component = ((Component)hurtBox.hurtBoxGroup).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component)) { TemporaryOverlayInstance val5 = TemporaryOverlayManager.AddOverlay(((Component)component).gameObject); val5.duration = 0.1f; val5.animateShaderAlpha = true; val5.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val5.destroyComponentOnEnd = true; val5.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashBright"); val5.AddToCharacterModel(component); TemporaryOverlayInstance val6 = TemporaryOverlayManager.AddOverlay(((Component)component).gameObject); val6.duration = 1.2f; val6.animateShaderAlpha = true; val6.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val6.destroyComponentOnEnd = true; val6.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matGhostEffect"); val6.AddToCharacterModel(component); } DamageInfo val7 = new DamageInfo(); val7.attacker = ((Component)self).gameObject; val7.force = -normalized * 2500f; self.healthComponent.TakeDamageForce(val7, true, false); GameObject val8 = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BossHunterKillEffect"); Quaternion rotation = Util.QuaternionSafeLookRotation(normalized, Vector3.up); EffectManager.SpawnEffect(val8, new EffectData { origin = val, rotation = rotation }, true); ModelLocator component2 = ((Component)this).gameObject.GetComponent<ModelLocator>(); CharacterModel val9; if ((Object)(object)component2 == (Object)null) { val9 = null; } else { Transform modelTransform = component2.modelTransform; val9 = (((Object)(object)modelTransform != (Object)null) ? ((Component)modelTransform).GetComponent<CharacterModel>() : null); } CharacterModel val10 = val9; if (Object.op_Implicit((Object)(object)val10)) { foreach (GameObject equipmentDisplayObject in val10.GetEquipmentDisplayObjects(Equipment.BossHunter.equipmentIndex)) { if (((Object)equipmentDisplayObject).name.Contains("DisplayTricorn")) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BossHunterHatEffect"), new EffectData { origin = equipmentDisplayObject.transform.position, rotation = equipmentDisplayObject.transform.rotation, scale = equipmentDisplayObject.transform.localScale.x }, true); } else { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BossHunterGunEffect"), new EffectData { origin = equipmentDisplayObject.transform.position, rotation = Util.QuaternionSafeLookRotation(val - equipmentDisplayObject.transform.position, Vector3.up), scale = equipmentDisplayObject.transform.localScale.x }, true); } } } if (Object.op_Implicit((Object)(object)(((Object)(object)characterBody != (Object)null) ? characterBody.inventory : null)) && flag) { CharacterMasterNotificationQueue.SendTransformNotification(self.characterBody.master, self.characterBody.inventory.currentEquipmentIndex, Equipment.BossHunterConsumed.equipmentIndex, (TransformationType)0); self.characterBody.inventory.SetEquipmentIndex(Equipment.BossHunterConsumed.equipmentIndex); } self.InvalidateCurrentTarget(); return true; } } } return false; } private void WakeOfVulturesRework() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown ItemDef val = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/HeadHunter/HeadHunter.asset").WaitForCompletion(); val.tier = (ItemTier)4; val.deprecatedTier = (ItemTier)4; PickupDefEntry val2 = default(PickupDefEntry); val2.pickupDef = (Object)(object)val; hordeDropTable = ScriptableObject.CreateInstance<ExplicitPickupDropTable>(); ((PickupDropTable)hordeDropTable).canDropBeReplaced = true; hordeDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { val2 }; BossGroup.OnMemberDiscovered += new hook_OnMemberDiscovered(SetHordeDropTable); } private void SetHordeDropTable(orig_OnMemberDiscovered orig, BossGroup self, CharacterMaster memberMaster) { orig.Invoke(self, memberMaster); CharacterBody body = memberMaster.GetBody(); if (Object.op_Implicit((Object)(object)body) && !body.isChampion) { DeathRewards component = ((Component)body).GetComponent<DeathRewards>(); if (Object.op_Implicit((Object)(object)component)) { component.bossDropTable = (PickupDropTable)(object)hordeDropTable; } } } private void SetDropTableForHordesOfMany(orig_Awake orig, DeathRewards self) { orig.Invoke(self); CharacterBody characterBody = self.characterBody; if (Object.op_Implicit((Object)(object)characterBody) && characterBody.isBoss && (Object)(object)self.bossDropTable == (Object)null) { self.bossDropTable = (PickupDropTable)(object)hordeDropTable; } } }