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 AiQueOdio v1.9.5
AiqueOdio.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.RoR2; using On.RoR2.Artifacts; using On.RoR2.Items; using On.RoR2.Orbs; using On.RoR2.UI; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using RoR2; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Orbs; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyCompany("AiqueOdio")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Ai Que Odio Difficulty")] [assembly: AssemblyFileVersion("1.9.5.0")] [assembly: AssemblyInformationalVersion("1.9.5")] [assembly: AssemblyProduct("AiqueOdio")] [assembly: AssemblyTitle("AiqueOdio")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.9.5.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 AiqueOdio { internal sealed class AcquisitionSuppression<T> where T : class { private readonly Dictionary<T, int> depths = new Dictionary<T, int>(); internal bool Contains(T inventory) { if (inventory != null) { return depths.ContainsKey(inventory); } return false; } internal void Enter(T inventory) { if (inventory != null) { depths.TryGetValue(inventory, out var value); depths[inventory] = value + 1; } } internal void Exit(T inventory) { if (inventory != null && depths.TryGetValue(inventory, out var value)) { if (value <= 1) { depths.Remove(inventory); } else { depths[inventory] = value - 1; } } } internal void Clear() { depths.Clear(); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.seuusuario.aiqueodio", "Ai Que Odio Difficulty", "1.9.5")] public sealed class AiqueOdioPlugin : BaseUnityPlugin { private sealed class TrophyProfileKeyCache { internal string fileName; internal string key; } [CompilerGenerated] private static class <>O { public static Manipulator <0>__ApplyBlueArtifactScaling; public static Action<Run, RuleBook> <1>__OnRunSetRuleBookGlobal; public static Action<Run> <2>__OnRunStartGlobal; public static Action<Run> <3>__OnRunDestroyGlobal; public static Action<Stage> <4>__OnStageStartGlobal; public static Action<SpawnResult> <5>__OnSpawnedServerGlobal; public static Action <6>__OnFixedUpdate; public static Action<CharacterBody> <7>__OnBodyStartGlobal; public static hook_RecalculateStats <8>__CapMithrixMovement; public static hook_OnFixedUpdateForTenthSecond <9>__FixSojournTranscendence; public static Manipulator <10>__FixRunicLensProcChain; public static hook_OnGenerateInteractableCardSelection <11>__ModifyCommandInteractables; public static hook_CreateTerminals <12>__ExpandDroneShop; public static hook_Start <13>__ConfigureDroneShop; public static hook_ShouldDisplayHologram <14>__ShouldDisplayDroneShopPrice; public static hook_SetCloseOnTerminalPurchase <15>__KeepDroneShopSinglePurchase; public static hook_EnsureMonsterTeamItemCount <16>__SuppressAutomaticEvolutionItems; public static hook_HandleInventoryChanged <17>__NotifyInventoryWithoutDestroyedDisplays; public static hook_OnInventoryChanged <18>__SkipDestroyedInventoryDisplay; public static hook_UpdateDisplay <19>__UpdateDisplayWithTonicIndicator; public static hook_FixedUpdate <20>__UpdateMonsterTemporaryIcons; public static hook_GetLocalizedStringByToken <21>__GetLocalizedStringByToken; public static hook_ConstructChatString <22>__ConstructLocalizedMonsterChat; public static hook_ConstructChatString <23>__ConstructLocalizedStagePauseChat; public static hook_DispatchDrone <24>__BlackDroneDispatched; public static hook_OpenSummonReturnMaster <25>__BlackDroneRepaired; public static hook_AttemptGrant <26>__BlackDronePickedUp; public static hook_Perform <27>__BlackDroneSummoned; public static hook_GiveItemPermanent_ItemIndex_int <28>__BlackPermanentReceived; public static hook_GiveItemTemp <29>__BlackTemporaryReceived; public static hook_OnArrival <30>__IgnoreBlackItemTransfer; public static hook_TryTransform <31>__IgnoreBlackTransformation; public static Action<Run> <32>__ResetBlackArtifact; public static Manipulator <33>__InjectCommandQueueTooltips; public static Action<MPButton, PickupDef> <34>__AddCommandQueueSelectionTooltip; public static Func<string, string> <35>__GetString; public static Converter<ItemIndex, PickupIndex> <36>__FindPickupIndex; public static hook_TogglePauseScreen <37>__PreserveManualPauseMenu; public static Action<Stage> <38>__ScheduleStagePause; public static Action<Run> <39>__ResetPauseInventory; public static Action<BlastAttack, DamageInfo> <40>__ApplyRunicLensProcMask; public static Action<Run> <41>__ResetTrophyRun; public static Action<Stage> <42>__TrackTrophyStage; public static Action<Run, GameEndingDef> <43>__FinishTrophyRun; public static Action <44>__UpdateTrophySync; public static hook_Update <45>__UpdateSurvivorTrophy; } public const string PluginGuid = "com.seuusuario.aiqueodio"; public const string PluginName = "Ai Que Odio Difficulty"; public const string PluginVersion = "1.9.5"; private const float DifficultyScaling = 3.02f; private const float FirstItemTimeSeconds = 1f; private const float ItemIntervalSeconds = 60f; private const float ItemIntervalReductionPerStage = 2f; private const float MinimumItemIntervalSeconds = 15f; private const int PermanentTonicStage = 5; private const int IrradiantPearlStartStage = 3; private const int IndividualDronePrices = -1; private const float DuplicateSoundWindowSeconds = 0.5f; private const float ItemVisualFadeInSeconds = 0.35f; private const float ItemVisualShowcaseSeconds = 2f; private const float ItemVisualTravelSeconds = 0.85f; private const string AudioFileName = "GabiDandoPiti.wav"; private const string ScrapperAddress = "RoR2/Base/Scrapper/iscScrapper.asset"; private const string TripleDroneShopAddress = "RoR2/DLC3/TripleDroneShop/iscTripleDroneShop.asset"; private const string MonsterInventoryPrefabPath = "Prefabs/NetworkedObjects/MonsterTeamGainsItemsArtifactInventory"; private const uint SndAsync = 1u; private const uint SndNoDefault = 2u; private const uint SndFileName = 131072u; private static readonly string[] AllowedBossItemNames = new string[7] { "lightninggland", "conductor", "shinypearl", "fireballsonhit", "parentegg", "bleedonhitandexplode", "knurl" }; private static readonly string[] AllowedFoodItemNames = new string[3] { "Stew", "BonusHealthBoost", "CookedSteak" }; private static readonly string[] BlockedWhiteItemNames = new string[8] { "tooth", "barrieronkill", "sprintbonus", "increasedamageonmultikill", "igniteonkill", "healwhilesafe", "crowbar", "hoof" }; private static readonly string[] BlockedGreenItemNames = new string[11] { "seed", "infusion", "movespeedonkill", "huntersharpoon", "bandolier", "jumpboost", "sprintarmor", "warcryonmultikill", "attackspeedonmultikill", "bonusgoldpackonkill", "explodeondeath" }; private static readonly string[] AllowedRedItemNames = new string[3] { "Duplicator", "MoreMissile", "ImmuneToDebuff" }; private static readonly string[] BlockedRedItemNames = new string[5] { "ghostonkill", "plant", "laserturbine", "randomequipmenttrigger", "utilityskillmagazine" }; private static readonly string[] StationaryTurretNames = new string[2] { "turret1", "gunnerturret" }; private static DifficultyDef difficultyDef; private static DifficultyIndex difficultyIndex; private static readonly AmbientLevelCapOverride AmbientLevelCap = new AmbientLevelCapOverride(); private static Run ambientLevelCapRun; private static ArtifactDef esmaltePinkArtifactDef; private static ArtifactDef esmalteRosaArtifactDef; private static ArtifactDef esmalteRoxoArtifactDef; private static ArtifactDef esmaltePretoArtifactDef; private static ArtifactDef esmalteAzulArtifactDef; private static InteractableSpawnCard scrapperSpawnCard; private static InteractableSpawnCard tripleDroneShopSpawnCard; private static GameObject monsterItemDisplayObject; private static Inventory monsterItemDisplayInventory; private static EnemyInfoPanelInventoryProvider monsterItemDisplayProvider; private static readonly Dictionary<ItemIndex, int> MonsterItemStacks = new Dictionary<ItemIndex, int>(); private static string pitiAudioPath; private static float lastPitiPlayTime = float.NegativeInfinity; private static int itemsGivenByTime; private static int lastIrradiantPearlGrantStage; private static float lastItemGrantTime; private static float nextItemGrantTime; private static bool tonicDisplayAdded; private static bool tonicBuffConfirmed; private static readonly Dictionary<SpawnCard, InteractableSpawnCard> DroneShopSpawnCards = new Dictionary<SpawnCard, InteractableSpawnCard>(); private static readonly HashSet<SpawnCard> LegendaryDroneShopSpawnCards = new HashSet<SpawnCard>(); private static readonly Queue<(ItemIndex itemIndex, int displayCount)> MonsterItemVisualQueue = new Queue<(ItemIndex, int)>(); private static AiqueOdioPlugin instance; private static Coroutine monsterItemVisualCoroutine; private static GameObject monsterItemVisualCanvas; private static int monsterItemVisualSequence; private static int lastMonsterItemVisualSequence; private static readonly BlackArtifactLedger BlackLedger = new BlackArtifactLedger(); private static readonly AcquisitionSuppression<Inventory> BlackTransformations = new AcquisitionSuppression<Inventory>(); private static int blackTransferDepth; private static int blackDroneAcquisitionDepth; private static ILHook commandQueueTooltipHook; private static readonly FieldInfo InventoryDisplaySubscribers = typeof(Inventory).GetField("onInventoryChanged", BindingFlags.Instance | BindingFlags.NonPublic); private const string StagePauseActorToken = "AIQUEODIO_STAGE_PAUSE_ACTOR"; private static readonly (string Portuguese, string English)[] DeathQuotes = new(string, string)[8] { ("\"AI, QUE MOD DIFÍCIL!!! AI, QUE ÓDIO!!!\"", "\"THIS MOD IS SO HARD!!! AI, QUE ÓDIO!!!\""), ("\"Nmrl, tem um mod que abre o jogo e aparece 'Vitória', não?\"", "\"Seriously, is there a mod that just says 'Victory' when I launch the game?\""), ("\"Não tem um mod que dá pra jogar enquanto eu durmo não? pprt.\"", "\"Isn't there a mod that plays for me while I sleep? For real.\""), ("\"Tá a fim de botar na dificuldade Sunny não?\"", "\"How about switching to Sunny difficulty?\""), ("\"Slk, mod mó cota esse, pprt 67\"", "\"Bruh, this mod takes forever. No cap. 67.\""), ("\"Eu vô vê e te aviso o dia que vou entrar de novo, pdc?\"", "\"I'll let you know when I'm ready to play again, alright?\""), ("\"Experimente tomar cápsulas de ômega 3\"", "\"Try taking omega-3 supplements.\""), ("\"Mod bucha pprt\"", "\"This mod is brutal, for real.\"") }; private static readonly FieldInfo MithrixMoveSpeedField = typeof(CharacterBody).GetField("<moveSpeed>k__BackingField", BindingFlags.Instance | BindingFlags.NonPublic); private static readonly HashSet<ItemIndex> MonsterTemporaryItemTypes = new HashSet<ItemIndex>(); private static int lastMonsterDuplicatorCount = -1; private static uint pendingPanelRunId; private static uint pendingPanelInventoryId; private static bool pendingPanelTonicActive; private static float nextPanelSyncRequestTime; private static float nextPanelBindTime; private static Coroutine stagePauseCoroutine; private static Coroutine pauseInventoryCoroutine; private static Stage lastAutoPauseStage; private static PauseStopController changedPauseController; private static bool previousMultiplayerPause; private static bool preserveLocalPauseMenu; private static readonly HashSet<uint> StagePauseReadyUsers = new HashSet<uint>(); private static Type pauseQueueManagerType; private static PropertyInfo pauseQueueTab; private static FieldInfo pauseQueueContainer; private static readonly MethodInfo NativePauseStop = typeof(PauseStopController).GetMethod("PauseStop", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); private static readonly FieldInfo SojournBodyField = typeof(SojournVehicleBase).GetField("characterBody", BindingFlags.Instance | BindingFlags.NonPublic); private static readonly FieldInfo SojournHealthField = typeof(SojournVehicle).GetField("totalHealth", BindingFlags.Instance | BindingFlags.NonPublic); private static readonly ConditionalWeakTable<UserProfile, TrophyProfileKeyCache> TrophyProfileKeys = new ConditionalWeakTable<UserProfile, TrophyProfileKeyCache>(); private static SurvivorTrophyFile trophyFile; private static bool trophyReadFailed; private static string trophyPath; private static int trophyMask; private static int trophyStage; private static bool trophyStarted; private static bool trophyQualified; private static float nextTrophySync; private static readonly Dictionary<LocalUser, SurvivorTrophyRecord> TrophyParticipants = new Dictionary<LocalUser, SurvivorTrophyRecord>(); private static Texture tonicPanelTexture; private static readonly FieldInfo DisplayIconsField = typeof(ItemInventoryDisplay).GetField("itemIcons", BindingFlags.Instance | BindingFlags.NonPublic); private static readonly MethodInfo DisplayIconCountChanged = typeof(ItemInventoryDisplay).GetMethod("OnIconCountChanged", BindingFlags.Instance | BindingFlags.NonPublic); private static readonly MethodInfo DisplayLayoutIcons = typeof(ItemInventoryDisplay).GetMethod("LayoutAllIcons", BindingFlags.Instance | BindingFlags.NonPublic); [DllImport("winmm.dll", CharSet = CharSet.Unicode, EntryPoint = "PlaySoundW", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PlaySoundNative(string soundPath, IntPtr module, uint flags); private void Awake() { //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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown instance = this; Log.Init(((BaseUnityPlugin)this).Logger); LoadAudioPath(); NetworkingAPI.RegisterMessageType<PlayPitiMessage>(); NetworkingAPI.RegisterMessageType<ShowMonsterItemMessage>(); NetworkingAPI.RegisterMessageType<MonsterPanelStateMessage>(); NetworkingAPI.RegisterMessageType<RequestMonsterPanelStateMessage>(); LoadDefinitions(); RegisterLanguageTokens(); difficultyIndex = DifficultyAPI.AddDifficulty(difficultyDef); ContentAddition.AddArtifactDef(esmaltePinkArtifactDef); ContentAddition.AddArtifactDef(esmalteRosaArtifactDef); ContentAddition.AddArtifactDef(esmalteRoxoArtifactDef); ContentAddition.AddArtifactDef(esmaltePretoArtifactDef); ContentAddition.AddArtifactDef(esmalteAzulArtifactDef); object obj = <>O.<0>__ApplyBlueArtifactScaling; if (obj == null) { Manipulator val = ApplyBlueArtifactScaling; <>O.<0>__ApplyBlueArtifactScaling = val; obj = (object)val; } Run.RecalculateDifficultyCoefficentInternal += (Manipulator)obj; InstallBlackArtifact(); ReviveSafety.Install(); InstallSurvivorTrophies(); SubscribeHooks(); Log.Info("AI, QUE ÓDIO!!! v1.9.5 carregado com sucesso!"); } private void OnDestroy() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_015f: 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_016a: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Expected O, but got Unknown //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Expected O, but got Unknown //IL_031f: 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_032a: Expected O, but got Unknown //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Expected O, but got Unknown RestoreAmbientLevelCap(); RemoveBlackArtifact(); ReviveSafety.Remove(); object obj = <>O.<0>__ApplyBlueArtifactScaling; if (obj == null) { Manipulator val = ApplyBlueArtifactScaling; <>O.<0>__ApplyBlueArtifactScaling = val; obj = (object)val; } Run.RecalculateDifficultyCoefficentInternal -= (Manipulator)obj; RemoveSurvivorTrophies(); RemovePauseInventoryHooks(); RoR2Application.onLoad = (Action)Delegate.Remove(RoR2Application.onLoad, new Action(InitializeCommandQueueTooltips)); ILHook obj2 = commandQueueTooltipHook; if (obj2 != null) { obj2.Dispose(); } commandQueueTooltipHook = null; Run.onRunSetRuleBookGlobal -= OnRunSetRuleBookGlobal; Run.onRunStartGlobal -= OnRunStartGlobal; Run.onRunDestroyGlobal -= OnRunDestroyGlobal; Stage.onStageStartGlobal -= OnStageStartGlobal; SpawnCard.onSpawnedServerGlobal -= OnSpawnedServerGlobal; RoR2Application.onFixedUpdate -= OnFixedUpdate; CharacterBody.onBodyStartGlobal -= OnBodyStartGlobal; object obj3 = <>O.<8>__CapMithrixMovement; if (obj3 == null) { hook_RecalculateStats val2 = CapMithrixMovement; <>O.<8>__CapMithrixMovement = val2; obj3 = (object)val2; } CharacterBody.RecalculateStats -= (hook_RecalculateStats)obj3; object obj4 = <>O.<9>__FixSojournTranscendence; if (obj4 == null) { hook_OnFixedUpdateForTenthSecond val3 = FixSojournTranscendence; <>O.<9>__FixSojournTranscendence = val3; obj4 = (object)val3; } SojournVehicle.OnFixedUpdateForTenthSecond -= (hook_OnFixedUpdateForTenthSecond)obj4; object obj5 = <>O.<10>__FixRunicLensProcChain; if (obj5 == null) { Manipulator val4 = FixRunicLensProcChain; <>O.<10>__FixRunicLensProcChain = val4; obj5 = (object)val4; } MeteorAttackOnHighDamageBodyBehavior.DetonateRunicLensMeteor -= (Manipulator)obj5; object obj6 = <>O.<11>__ModifyCommandInteractables; if (obj6 == null) { hook_OnGenerateInteractableCardSelection val5 = ModifyCommandInteractables; <>O.<11>__ModifyCommandInteractables = val5; obj6 = (object)val5; } CommandArtifactManager.OnGenerateInteractableCardSelection -= (hook_OnGenerateInteractableCardSelection)obj6; object obj7 = <>O.<12>__ExpandDroneShop; if (obj7 == null) { hook_CreateTerminals val6 = ExpandDroneShop; <>O.<12>__ExpandDroneShop = val6; obj7 = (object)val6; } DroneVendorMultiShopController.CreateTerminals -= (hook_CreateTerminals)obj7; object obj8 = <>O.<13>__ConfigureDroneShop; if (obj8 == null) { hook_Start val7 = ConfigureDroneShop; <>O.<13>__ConfigureDroneShop = val7; obj8 = (object)val7; } DroneVendorMultiShopController.Start -= (hook_Start)obj8; object obj9 = <>O.<14>__ShouldDisplayDroneShopPrice; if (obj9 == null) { hook_ShouldDisplayHologram val8 = ShouldDisplayDroneShopPrice; <>O.<14>__ShouldDisplayDroneShopPrice = val8; obj9 = (object)val8; } DroneVendorMultiShopController.ShouldDisplayHologram -= (hook_ShouldDisplayHologram)obj9; object obj10 = <>O.<15>__KeepDroneShopSinglePurchase; if (obj10 == null) { hook_SetCloseOnTerminalPurchase val9 = KeepDroneShopSinglePurchase; <>O.<15>__KeepDroneShopSinglePurchase = val9; obj10 = (object)val9; } DroneVendorMultiShopController.SetCloseOnTerminalPurchase -= (hook_SetCloseOnTerminalPurchase)obj10; object obj11 = <>O.<16>__SuppressAutomaticEvolutionItems; if (obj11 == null) { hook_EnsureMonsterTeamItemCount val10 = SuppressAutomaticEvolutionItems; <>O.<16>__SuppressAutomaticEvolutionItems = val10; obj11 = (object)val10; } MonsterTeamGainsItemsArtifactManager.EnsureMonsterTeamItemCount -= (hook_EnsureMonsterTeamItemCount)obj11; object obj12 = <>O.<17>__NotifyInventoryWithoutDestroyedDisplays; if (obj12 == null) { hook_HandleInventoryChanged val11 = NotifyInventoryWithoutDestroyedDisplays; <>O.<17>__NotifyInventoryWithoutDestroyedDisplays = val11; obj12 = (object)val11; } Inventory.HandleInventoryChanged -= (hook_HandleInventoryChanged)obj12; object obj13 = <>O.<18>__SkipDestroyedInventoryDisplay; if (obj13 == null) { hook_OnInventoryChanged val12 = SkipDestroyedInventoryDisplay; <>O.<18>__SkipDestroyedInventoryDisplay = val12; obj13 = (object)val12; } ItemInventoryDisplay.OnInventoryChanged -= (hook_OnInventoryChanged)obj13; object obj14 = <>O.<19>__UpdateDisplayWithTonicIndicator; if (obj14 == null) { hook_UpdateDisplay val13 = UpdateDisplayWithTonicIndicator; <>O.<19>__UpdateDisplayWithTonicIndicator = val13; obj14 = (object)val13; } ItemInventoryDisplay.UpdateDisplay -= (hook_UpdateDisplay)obj14; object obj15 = <>O.<20>__UpdateMonsterTemporaryIcons; if (obj15 == null) { hook_FixedUpdate val14 = UpdateMonsterTemporaryIcons; <>O.<20>__UpdateMonsterTemporaryIcons = val14; obj15 = (object)val14; } ItemInventoryDisplay.FixedUpdate -= (hook_FixedUpdate)obj15; object obj16 = <>O.<21>__GetLocalizedStringByToken; if (obj16 == null) { hook_GetLocalizedStringByToken val15 = GetLocalizedStringByToken; <>O.<21>__GetLocalizedStringByToken = val15; obj16 = (object)val15; } Language.GetLocalizedStringByToken -= (hook_GetLocalizedStringByToken)obj16; object obj17 = <>O.<22>__ConstructLocalizedMonsterChat; if (obj17 == null) { hook_ConstructChatString val16 = ConstructLocalizedMonsterChat; <>O.<22>__ConstructLocalizedMonsterChat = val16; obj17 = (object)val16; } SimpleChatMessage.ConstructChatString -= (hook_ConstructChatString)obj17; object obj18 = <>O.<23>__ConstructLocalizedStagePauseChat; if (obj18 == null) { hook_ConstructChatString val17 = ConstructLocalizedStagePauseChat; <>O.<23>__ConstructLocalizedStagePauseChat = val17; obj18 = (object)val17; } PlayerPauseChatMessage.ConstructChatString -= (hook_ConstructChatString)obj18; ClearMonsterItemVisuals(); DestroyMonsterItemDisplay(); MonsterItemStacks.Clear(); foreach (InteractableSpawnCard value in DroneShopSpawnCards.Values) { Object.Destroy((Object)(object)value); } DroneShopSpawnCards.Clear(); LegendaryDroneShopSpawnCards.Clear(); tripleDroneShopSpawnCard = null; if ((Object)(object)instance == (Object)(object)this) { instance = null; } } private void LoadAudioPath() { string text = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location) ?? string.Empty, "GabiDandoPiti.wav"); if (!File.Exists(text)) { pitiAudioPath = null; Log.Error("[AiQueOdio] GabiDandoPiti.wav não foi encontrado ao lado da DLL: " + text); } else { pitiAudioPath = text; Log.Info("[AiQueOdio] WAV pronto para reprodução pelo áudio nativo do Windows."); } } internal static void PlayPitiLocal() { if (string.IsNullOrEmpty(pitiAudioPath) || !File.Exists(pitiAudioPath)) { Log.Warning("[AiQueOdio] O áudio não tocou porque o WAV não está disponível."); return; } float realtimeSinceStartup = Time.realtimeSinceStartup; if (realtimeSinceStartup - lastPitiPlayTime < 0.5f) { return; } lastPitiPlayTime = realtimeSinceStartup; try { if (PlaySoundNative(pitiAudioPath, IntPtr.Zero, 131075u)) { Log.Info("[AiQueOdio] Reprodução do Piti iniciada."); } else { Log.Error("[AiQueOdio] O Windows recusou o WAV. Código: " + Marshal.GetLastWin32Error()); } } catch (Exception ex) { Log.Error("[AiQueOdio] Falha na reprodução do WAV: " + ex); } } private static void SubscribeHooks() { //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0135: 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_0140: Expected O, but got Unknown //IL_0155: 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_0160: Expected O, but got Unknown //IL_0175: 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_0180: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_01f5: 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_0200: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Expected O, but got Unknown //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Expected O, but got Unknown InstallPauseInventoryHooks(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(InitializeCommandQueueTooltips)); Run.onRunSetRuleBookGlobal += OnRunSetRuleBookGlobal; Run.onRunStartGlobal += OnRunStartGlobal; Run.onRunDestroyGlobal += OnRunDestroyGlobal; Stage.onStageStartGlobal += OnStageStartGlobal; SpawnCard.onSpawnedServerGlobal += OnSpawnedServerGlobal; RoR2Application.onFixedUpdate += OnFixedUpdate; CharacterBody.onBodyStartGlobal += OnBodyStartGlobal; object obj = <>O.<8>__CapMithrixMovement; if (obj == null) { hook_RecalculateStats val = CapMithrixMovement; <>O.<8>__CapMithrixMovement = val; obj = (object)val; } CharacterBody.RecalculateStats += (hook_RecalculateStats)obj; object obj2 = <>O.<9>__FixSojournTranscendence; if (obj2 == null) { hook_OnFixedUpdateForTenthSecond val2 = FixSojournTranscendence; <>O.<9>__FixSojournTranscendence = val2; obj2 = (object)val2; } SojournVehicle.OnFixedUpdateForTenthSecond += (hook_OnFixedUpdateForTenthSecond)obj2; object obj3 = <>O.<10>__FixRunicLensProcChain; if (obj3 == null) { Manipulator val3 = FixRunicLensProcChain; <>O.<10>__FixRunicLensProcChain = val3; obj3 = (object)val3; } MeteorAttackOnHighDamageBodyBehavior.DetonateRunicLensMeteor += (Manipulator)obj3; object obj4 = <>O.<11>__ModifyCommandInteractables; if (obj4 == null) { hook_OnGenerateInteractableCardSelection val4 = ModifyCommandInteractables; <>O.<11>__ModifyCommandInteractables = val4; obj4 = (object)val4; } CommandArtifactManager.OnGenerateInteractableCardSelection += (hook_OnGenerateInteractableCardSelection)obj4; object obj5 = <>O.<12>__ExpandDroneShop; if (obj5 == null) { hook_CreateTerminals val5 = ExpandDroneShop; <>O.<12>__ExpandDroneShop = val5; obj5 = (object)val5; } DroneVendorMultiShopController.CreateTerminals += (hook_CreateTerminals)obj5; object obj6 = <>O.<13>__ConfigureDroneShop; if (obj6 == null) { hook_Start val6 = ConfigureDroneShop; <>O.<13>__ConfigureDroneShop = val6; obj6 = (object)val6; } DroneVendorMultiShopController.Start += (hook_Start)obj6; object obj7 = <>O.<14>__ShouldDisplayDroneShopPrice; if (obj7 == null) { hook_ShouldDisplayHologram val7 = ShouldDisplayDroneShopPrice; <>O.<14>__ShouldDisplayDroneShopPrice = val7; obj7 = (object)val7; } DroneVendorMultiShopController.ShouldDisplayHologram += (hook_ShouldDisplayHologram)obj7; object obj8 = <>O.<15>__KeepDroneShopSinglePurchase; if (obj8 == null) { hook_SetCloseOnTerminalPurchase val8 = KeepDroneShopSinglePurchase; <>O.<15>__KeepDroneShopSinglePurchase = val8; obj8 = (object)val8; } DroneVendorMultiShopController.SetCloseOnTerminalPurchase += (hook_SetCloseOnTerminalPurchase)obj8; object obj9 = <>O.<16>__SuppressAutomaticEvolutionItems; if (obj9 == null) { hook_EnsureMonsterTeamItemCount val9 = SuppressAutomaticEvolutionItems; <>O.<16>__SuppressAutomaticEvolutionItems = val9; obj9 = (object)val9; } MonsterTeamGainsItemsArtifactManager.EnsureMonsterTeamItemCount += (hook_EnsureMonsterTeamItemCount)obj9; object obj10 = <>O.<17>__NotifyInventoryWithoutDestroyedDisplays; if (obj10 == null) { hook_HandleInventoryChanged val10 = NotifyInventoryWithoutDestroyedDisplays; <>O.<17>__NotifyInventoryWithoutDestroyedDisplays = val10; obj10 = (object)val10; } Inventory.HandleInventoryChanged += (hook_HandleInventoryChanged)obj10; object obj11 = <>O.<18>__SkipDestroyedInventoryDisplay; if (obj11 == null) { hook_OnInventoryChanged val11 = SkipDestroyedInventoryDisplay; <>O.<18>__SkipDestroyedInventoryDisplay = val11; obj11 = (object)val11; } ItemInventoryDisplay.OnInventoryChanged += (hook_OnInventoryChanged)obj11; object obj12 = <>O.<19>__UpdateDisplayWithTonicIndicator; if (obj12 == null) { hook_UpdateDisplay val12 = UpdateDisplayWithTonicIndicator; <>O.<19>__UpdateDisplayWithTonicIndicator = val12; obj12 = (object)val12; } ItemInventoryDisplay.UpdateDisplay += (hook_UpdateDisplay)obj12; object obj13 = <>O.<20>__UpdateMonsterTemporaryIcons; if (obj13 == null) { hook_FixedUpdate val13 = UpdateMonsterTemporaryIcons; <>O.<20>__UpdateMonsterTemporaryIcons = val13; obj13 = (object)val13; } ItemInventoryDisplay.FixedUpdate += (hook_FixedUpdate)obj13; object obj14 = <>O.<21>__GetLocalizedStringByToken; if (obj14 == null) { hook_GetLocalizedStringByToken val14 = GetLocalizedStringByToken; <>O.<21>__GetLocalizedStringByToken = val14; obj14 = (object)val14; } Language.GetLocalizedStringByToken += (hook_GetLocalizedStringByToken)obj14; object obj15 = <>O.<22>__ConstructLocalizedMonsterChat; if (obj15 == null) { hook_ConstructChatString val15 = ConstructLocalizedMonsterChat; <>O.<22>__ConstructLocalizedMonsterChat = val15; obj15 = (object)val15; } SimpleChatMessage.ConstructChatString += (hook_ConstructChatString)obj15; object obj16 = <>O.<23>__ConstructLocalizedStagePauseChat; if (obj16 == null) { hook_ConstructChatString val16 = ConstructLocalizedStagePauseChat; <>O.<23>__ConstructLocalizedStagePauseChat = val16; obj16 = (object)val16; } PlayerPauseChatMessage.ConstructChatString += (hook_ConstructChatString)obj16; } private void LoadDefinitions() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown Sprite val = LoadEmbeddedSprite("Dificuldade.png"); Sprite val2 = LoadEmbeddedSprite("Esmalte.png"); Sprite val3 = LoadEmbeddedSprite("EsmalteApagado.png"); difficultyDef = new DifficultyDef(3.02f, "AIQUEODIO_NAME", "AIQUEODIO_ICON", "AIQUEODIO_DESCRIPTION", new Color(1f, 0.4f, 0.7f), "od", true); if ((Object)(object)val != (Object)null) { difficultyDef.foundIconSprite = true; difficultyDef.iconSprite = val; } esmaltePinkArtifactDef = ScriptableObject.CreateInstance<ArtifactDef>(); esmaltePinkArtifactDef.cachedName = "ESMALTE_PINK"; esmaltePinkArtifactDef.nameToken = "ESMALTE_PINK_NAME"; esmaltePinkArtifactDef.descriptionToken = "ESMALTE_PINK_DESCRIPTION"; esmaltePinkArtifactDef.smallIconSelectedSprite = val2; esmaltePinkArtifactDef.smallIconDeselectedSprite = val3; esmalteRosaArtifactDef = CreateNailArtifact("ESMALTE_ROSA", val2, val3); esmalteRoxoArtifactDef = CreateNailArtifact("ESMALTE_ROXO", val2, val3); esmaltePretoArtifactDef = CreateNailArtifact("ESMALTE_PRETO", val2, val3); esmalteAzulArtifactDef = CreateNailArtifact("ESMALTE_AZUL", val2, val3); } private static Sprite LoadEmbeddedSprite(string fileName) { //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_0054: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) try { string text = "AiqueOdio." + fileName; using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(text); if (stream == null) { Log.Error("[AiQueOdio] Recurso não encontrado: " + text); return null; } using MemoryStream memoryStream = new MemoryStream(); stream.CopyTo(memoryStream); Texture2D val = new Texture2D(2, 2) { name = Path.GetFileNameWithoutExtension(fileName) }; if (!ImageConversion.LoadImage(val, memoryStream.ToArray())) { Object.Destroy((Object)(object)val); Log.Error("[AiQueOdio] Não foi possível decodificar " + fileName + "."); return null; } return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f)); } catch (Exception ex) { Log.Error("[AiQueOdio] Erro ao carregar " + fileName + ": " + ex.Message); return null; } } private static string GetLocalizedStringByToken(orig_GetLocalizedStringByToken orig, Language self, string token) { if (IsAiqueOdioRun(Run.instance) && !string.IsNullOrEmpty(token) && token.StartsWith("PLAYER_DEATH_QUOTE_", StringComparison.Ordinal)) { int num = (token.GetHashCode() & 0x7FFFFFFF) % DeathQuotes.Length; return orig.Invoke(self, $"AIQUEODIO_DEATH_QUOTE_{num}"); } return orig.Invoke(self, token); } private static void OnRunSetRuleBookGlobal(Run run, RuleBook ruleBook) { if (ambientLevelCapRun != run || !IsAiqueOdioRun(run)) { RestoreAmbientLevelCap(); } if (IsAiqueOdioRun(run) && ambientLevelCapRun == null) { ambientLevelCapRun = run; Run.ambientLevelCap = AmbientLevelCap.Apply(Run.ambientLevelCap); } } private static void RestoreAmbientLevelCap() { Run.ambientLevelCap = AmbientLevelCap.Restore(Run.ambientLevelCap); ambientLevelCapRun = null; } private static void OnRunStartGlobal(Run run) { ResetMonsterDuplicator(); ClearMonsterItemVisuals(); monsterItemVisualSequence = 0; lastMonsterItemVisualSequence = 0; itemsGivenByTime = 0; lastIrradiantPearlGrantStage = 0; lastItemGrantTime = 0f; nextItemGrantTime = 1f; tonicDisplayAdded = false; tonicBuffConfirmed = false; MonsterItemStacks.Clear(); difficultyDef.scalingValue = 3.02f; ResetMonsterPanelSync(); if (!HasMonsterItemSystems(run)) { return; } LoadTonicPanelTexture(); if (!NetworkServer.active) { RequestMonsterPanelState(); return; } Log.Info("[AiQueOdio] Sistemas dos esmaltes preparados."); RunArtifactManager val = RunArtifactManager.instance; if ((Object)(object)val == (Object)null) { Log.Error("[AiQueOdio] RunArtifactManager indisponível no início da partida."); return; } if (IsAiqueOdioRun(run)) { val.SetArtifactEnabledServer(Artifacts.Command, true); } CreateMonsterItemDisplay(); } private static void OnRunDestroyGlobal(Run run) { if (ambientLevelCapRun == run) { RestoreAmbientLevelCap(); } ResetMonsterDuplicator(); ClearMonsterItemVisuals(); DestroyMonsterItemDisplay(); MonsterItemStacks.Clear(); tonicDisplayAdded = false; tonicBuffConfirmed = false; ResetMonsterPanelSync(); } private static void CreateMonsterItemDisplay() { DestroyMonsterItemDisplay(); GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/MonsterTeamGainsItemsArtifactInventory"); if ((Object)(object)val == (Object)null) { Log.Error("[AiQueOdio] Não foi possível carregar o painel de itens dos monstros."); return; } monsterItemDisplayObject = Object.Instantiate<GameObject>(val); monsterItemDisplayInventory = monsterItemDisplayObject.GetComponent<Inventory>(); monsterItemDisplayProvider = monsterItemDisplayObject.GetComponent<EnemyInfoPanelInventoryProvider>(); TeamFilter component = monsterItemDisplayObject.GetComponent<TeamFilter>(); if ((Object)(object)monsterItemDisplayInventory == (Object)null || (Object)(object)monsterItemDisplayProvider == (Object)null || (Object)(object)component == (Object)null) { Log.Error("[AiQueOdio] O painel de itens dos monstros está incompleto."); Object.Destroy((Object)(object)monsterItemDisplayObject); monsterItemDisplayObject = null; monsterItemDisplayInventory = null; monsterItemDisplayProvider = null; } else { ConfigureMonsterPanelObject(monsterItemDisplayObject); monsterItemDisplayObject.SetActive(true); NetworkServer.Spawn(monsterItemDisplayObject); RefreshMonsterItemDisplay(); SendMonsterPanelState(); Log.Info("[AiQueOdio] Painel de itens dos monstros preparado sem ativar a Evolução."); } } private static void DestroyMonsterItemDisplay() { if ((Object)(object)monsterItemDisplayObject != (Object)null && NetworkServer.active) { NetworkServer.Destroy(monsterItemDisplayObject); } monsterItemDisplayObject = null; monsterItemDisplayInventory = null; monsterItemDisplayProvider = null; } private static void SuppressAutomaticEvolutionItems(orig_EnsureMonsterTeamItemCount orig, int itemCount) { if (!HasMonsterItemSystems(Run.instance) || IsArtifactEnabled(Artifacts.MonsterTeamGainsItems)) { orig.Invoke(itemCount); } } private static void OnSpawnedServerGlobal(SpawnResult spawnResult) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_009c: Invalid comparison between Unknown and I4 //IL_0046: 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_006b: 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) if (!HasMonsterItemSystems(Run.instance) || (Object)(object)spawnResult.spawnedInstance == (Object)null) { return; } if (IsAiqueOdioRun(Run.instance) && (Object)(object)spawnResult.spawnRequest?.spawnCard != (Object)null && LegendaryDroneShopSpawnCards.Contains(spawnResult.spawnRequest.spawnCard) && (Object)(object)spawnResult.spawnedInstance.GetComponent<DroneVendorMultiShopController>() != (Object)null) { spawnResult.spawnedInstance.AddComponent<LegendaryDroneShop>().choices = GetEligibleLegendaryDroneChoices(); } CharacterMaster component = spawnResult.spawnedInstance.GetComponent<CharacterMaster>(); if (!((Object)(object)component != (Object)null) || (int)component.teamIndex != 2 || !((Object)(object)component.inventory != (Object)null)) { return; } foreach (KeyValuePair<ItemIndex, int> monsterItemStack in MonsterItemStacks) { component.inventory.GiveItemPermanent(monsterItemStack.Key, monsterItemStack.Value); } InheritMonsterTemporaryItems(component); } private static void ModifyCommandInteractables(orig_OnGenerateInteractableCardSelection orig, SceneDirector sceneDirector, DirectorCardCategorySelection selection) { orig.Invoke(sceneDirector, selection); if (IsAiqueOdioRun(Run.instance) && selection?.categories != null) { ReplaceRepairableDronesWithShops(selection); } } private static void ReplaceRepairableDronesWithShops(DirectorCardCategorySelection selection) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_014f: 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_00d0: Invalid comparison between Unknown and I4 if (tripleDroneShopSpawnCard == null) { tripleDroneShopSpawnCard = Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/DLC3/TripleDroneShop/iscTripleDroneShop.asset").WaitForCompletion(); } if ((Object)(object)tripleDroneShopSpawnCard == (Object)null || !new DirectorCard { spawnCard = (SpawnCard)(object)tripleDroneShopSpawnCard }.IsAvailable()) { Log.Warning("[AiQueOdio] A loja de drones não está disponível nesta partida; os drones quebrados foram preservados."); return; } int num = 0; bool flag = GetEligibleLegendaryDroneChoices().Count > 0; for (int i = 0; i < selection.categories.Length; i++) { Category val = selection.categories[i]; if (val.cards == null) { continue; } DirectorCard[] array = (DirectorCard[])(object)new DirectorCard[val.cards.Length]; bool flag2 = false; for (int j = 0; j < val.cards.Length; j++) { DirectorCard val2 = val.cards[j]; SpawnCard val3 = ((val2 != null) ? val2.GetSpawnCard() : null); DroneDef val4 = FindConvertibleDrone(val3); bool flag3 = (Object)(object)val4 != (Object)null && (int)val4.tier == 2; if ((Object)(object)val4 == (Object)null || !val2.IsAvailable() || (flag3 && (!flag || !(val3 is InteractableSpawnCard)))) { array[j] = val2; continue; } InteractableSpawnCard orCreateDroneShopSpawnCard = GetOrCreateDroneShopSpawnCard(val3, flag3); array[j] = CloneDirectorCard(val2, (SpawnCard)(object)orCreateDroneShopSpawnCard); flag2 = true; num++; } if (flag2) { val.cards = array; selection.categories[i] = val; } } Log.Info($"[AiQueOdio] {num} carta(s) de drone quebrado convertida(s) " + "em lojas com uma escolha de cada drone elegível."); } private static DroneDef FindConvertibleDrone(SpawnCard spawnCard) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Invalid comparison between Unknown and I4 //IL_0039: 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: Invalid comparison between Unknown and I4 if ((Object)(object)spawnCard == (Object)null) { return null; } foreach (DroneDef allDroneDef in DroneCatalog.allDroneDefs) { if ((Object)(object)allDroneDef != (Object)null && !IsStationaryTurret(allDroneDef) && ((allDroneDef.canCombine && ((int)allDroneDef.tier == 0 || (int)allDroneDef.tier == 1)) || ((int)allDroneDef.tier == 2 && (Object)(object)GetDroneRepairPurchase(allDroneDef) != (Object)null)) && (Object)(object)allDroneDef.droneBrokenSpawnCard == (Object)(object)spawnCard) { return allDroneDef; } } return null; } private static InteractableSpawnCard GetOrCreateDroneShopSpawnCard(SpawnCard originalSpawnCard, bool legendary) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (DroneShopSpawnCards.TryGetValue(originalSpawnCard, out var value)) { return value; } value = Object.Instantiate<InteractableSpawnCard>((InteractableSpawnCard)((!legendary) ? ((object)tripleDroneShopSpawnCard) : ((object)(InteractableSpawnCard)originalSpawnCard))); ((SpawnCard)value).prefab = ((SpawnCard)tripleDroneShopSpawnCard).prefab; ((Object)value).name = "iscAiQueOdioDroneShop_" + ((Object)originalSpawnCard).name; ((SpawnCard)value).directorCreditCost = originalSpawnCard.directorCreditCost; InteractableSpawnCard val = (InteractableSpawnCard)(object)((originalSpawnCard is InteractableSpawnCard) ? originalSpawnCard : null); if (val != null) { value.maxSpawnsPerStage = val.maxSpawnsPerStage; } DroneShopSpawnCards.Add(originalSpawnCard, value); if (legendary) { LegendaryDroneShopSpawnCards.Add((SpawnCard)(object)value); } return value; } private static DirectorCard CloneDirectorCard(DirectorCard original, SpawnCard replacementSpawnCard) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: 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_0018: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0055: Expected O, but got Unknown return new DirectorCard { spawnCard = replacementSpawnCard, selectionWeight = original.selectionWeight, spawnDistance = original.spawnDistance, preventOverhead = original.preventOverhead, minimumStageCompletions = original.minimumStageCompletions, requiredUnlockableDef = original.requiredUnlockableDef, forbiddenUnlockableDef = original.forbiddenUnlockableDef }; } private static void ConfigureDroneShop(orig_Start orig, DroneVendorMultiShopController self) { orig.Invoke(self); if (!NetworkServer.active || !IsAiqueOdioRun(Run.instance)) { return; } if (self.doCloseOnTerminalPurchase != null) { for (int i = 0; i < self.doCloseOnTerminalPurchase.Length; i++) { self.doCloseOnTerminalPurchase[i] = true; } } if ((Object)(object)((Component)self).GetComponent<LegendaryDroneShop>() != (Object)null) { ConfigureLegendaryDronePrices(self); } DroneVendorTerminalBehavior[] terminals = self._terminals; Log.Info("[AiQueOdio] Loja de drones preparada com " + $"{((terminals != null) ? terminals.Length : 0)} escolha(s) única(s)."); } private static void ExpandDroneShop(orig_CreateTerminals orig, DroneVendorMultiShopController shop) { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Invalid comparison between Unknown and I4 //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !IsAiqueOdioRun(Run.instance)) { orig.Invoke(shop); return; } LegendaryDroneShop component = ((Component)shop).GetComponent<LegendaryDroneShop>(); ItemTier val = (ItemTier)(((Object)(object)component != (Object)null) ? 2 : ((int)SelectDroneShopTier(shop))); List<DroneIndex> list = (((Object)(object)component != (Object)null) ? component.choices : GetEligibleDroneChoices(shop, val)); if ((int)val == 1 && list != null && list.Count == 0) { val = (ItemTier)0; list = GetEligibleDroneChoices(shop, val); } if (list == null || list.Count == 0 || shop.terminalPositions == null || shop.terminalPositions.Length == 0) { Log.Warning("[AiQueOdio] A loja não pôde ser ampliada; usando o comportamento padrão."); orig.Invoke(shop); return; } RangeFloat tier1Chance = shop.tier1Chance; RangeFloat tier2Chance = shop.tier2Chance; RangeFloat tier3Chance = shop.tier3Chance; ExplicitPickupDropTable excludedDronesDropTable = shop.excludedDronesDropTable; shop.terminalPositions = CreateDroneTerminalPositions(shop, list.Count); SetFixedDroneShopTier(shop, val); if ((Object)(object)component != (Object)null) { shop.excludedDronesDropTable = null; } try { orig.Invoke(shop); } finally { shop.tier1Chance = tier1Chance; shop.tier2Chance = tier2Chance; shop.tier3Chance = tier3Chance; shop.excludedDronesDropTable = excludedDronesDropTable; } AssignEveryDroneOnce(shop, list); } private static PurchaseInteraction GetDroneRepairPurchase(DroneDef droneDef) { GameObject val = droneDef?.droneBrokenSpawnCard?.prefab; if (!((Object)(object)val != (Object)null)) { return null; } return val.GetComponent<PurchaseInteraction>(); } private static List<DroneIndex> GetEligibleLegendaryDroneChoices() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 //IL_0059: 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_00e0: Unknown result type (might be due to invalid IL or missing references) List<DroneIndex> list = new List<DroneIndex>(); Run val = Run.instance; if ((Object)(object)val == (Object)null) { return list; } foreach (DroneDef allDroneDef in DroneCatalog.allDroneDefs) { if (!((Object)(object)allDroneDef == (Object)null) && (int)allDroneDef.tier == 2 && !((Object)(object)allDroneDef.bodyPrefab == (Object)null) && val.IsDroneAvailable(allDroneDef.droneIndex) && !list.Contains(allDroneDef.droneIndex)) { PurchaseInteraction droneRepairPurchase = GetDroneRepairPurchase(allDroneDef); ExpansionDef requiredExpansion = allDroneDef.GetRequiredExpansion(); if (!((Object)(object)droneRepairPurchase == (Object)null) && (!((Object)(object)allDroneDef.requiredExpansion != (Object)null) || val.IsExpansionEnabled(allDroneDef.requiredExpansion)) && (!((Object)(object)requiredExpansion != (Object)null) || val.IsExpansionEnabled(requiredExpansion)) && (!((Object)(object)droneRepairPurchase.requiredExpansion != (Object)null) || val.IsExpansionEnabled(droneRepairPurchase.requiredExpansion))) { list.Add(allDroneDef.droneIndex); } } } return list; } private static void ConfigureLegendaryDronePrices(DroneVendorMultiShopController shop) { //IL_0022: 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_0087: 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_0099: Invalid comparison between Unknown and I4 //IL_00f3: Unknown result type (might be due to invalid IL or missing references) shop.Networkcost = -1; if (shop._terminals == null) { return; } DroneVendorTerminalBehavior[] terminals = shop._terminals; foreach (DroneVendorTerminalBehavior obj in terminals) { PickupDef pickupDef = PickupCatalog.GetPickupDef(obj.CurrentPickupIndex); DroneDef val = ((pickupDef != null) ? DroneCatalog.GetDroneDef(pickupDef.droneIndex) : null); PurchaseInteraction droneRepairPurchase = GetDroneRepairPurchase(val); PurchaseInteraction purchaseInteraction = obj.purchaseInteraction; if ((Object)(object)droneRepairPurchase == (Object)null || (Object)(object)purchaseInteraction == (Object)null) { if ((Object)(object)purchaseInteraction != (Object)null) { purchaseInteraction.Networkavailable = false; } Log.Warning("[AiQueOdio] Opção lendária desativada: preço de reparo indisponível."); } else { purchaseInteraction.NetworkcostType = droneRepairPurchase.costType; bool flag = (int)droneRepairPurchase.costType == 1 || droneRepairPurchase.automaticallyScaleCostWithDifficulty; purchaseInteraction.Networkcost = (flag ? Run.instance.GetDifficultyScaledCost(droneRepairPurchase.cost) : droneRepairPurchase.cost); purchaseInteraction.solitudeCost = purchaseInteraction.cost; Log.Info($"[AiQueOdio] Loja lendária: {((Object)val).name}, preço {purchaseInteraction.cost} ({purchaseInteraction.costType})."); } } } private static bool ShouldDisplayDroneShopPrice(orig_ShouldDisplayHologram orig, DroneVendorMultiShopController shop, GameObject viewer) { if (!IsAiqueOdioRun(Run.instance) || shop.cost != -1) { return orig.Invoke(shop, viewer); } return false; } private static ItemTier SelectDroneShopTier(DroneVendorMultiShopController shop) { //IL_0010: 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) if (Run.instance.stageClearCount >= 3) { float num = EvaluateDroneTierChance(shop.tier1Chance); float num2 = EvaluateDroneTierChance(shop.tier2Chance); float num3 = num + num2; if (!(num3 <= 0f)) { if (shop.rng.nextNormalizedFloat * num3 < num) { return (ItemTier)0; } return (ItemTier)1; } return (ItemTier)0; } return (ItemTier)0; } private static float EvaluateDroneTierChance(RangeFloat chance) { //IL_001a: 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_002d: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp(Run.instance.difficultyCoefficient, 0f, 10f); return chance.min + num / 10f * (chance.max - chance.min); } private static List<DroneIndex> GetEligibleDroneChoices(DroneVendorMultiShopController shop, ItemTier tier) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_004f: 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) List<DroneIndex> obj = (((int)tier == 1) ? Run.instance.availableTier2DroneList : Run.instance.availableTier1DroneList); List<DroneIndex> list = new List<DroneIndex>(obj.Count); foreach (DroneIndex item in obj) { DroneDef droneDef = DroneCatalog.GetDroneDef(item); if (!list.Contains(item) && !IsStationaryTurret(droneDef) && !IsDroneExcluded(shop, item)) { list.Add(item); } } return list; } private static bool IsStationaryTurret(DroneDef droneDef) { if ((Object)(object)droneDef != (Object)null) { if (!ContainsAny(((Object)droneDef).name, StationaryTurretNames)) { GameObject bodyPrefab = droneDef.bodyPrefab; if (!ContainsAny((bodyPrefab != null) ? ((Object)bodyPrefab).name : null, StationaryTurretNames)) { SpawnCard droneBrokenSpawnCard = droneDef.droneBrokenSpawnCard; return ContainsAny((droneBrokenSpawnCard != null) ? ((Object)droneBrokenSpawnCard).name : null, StationaryTurretNames); } } return true; } return false; } private static void SetFixedDroneShopTier(DroneVendorMultiShopController shop, ItemTier selectedTier) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Invalid comparison between Unknown and I4 //IL_0046: 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) shop.tier1Chance = CreateFixedRange(((int)selectedTier == 0) ? 1f : 0f); shop.tier2Chance = CreateFixedRange(((int)selectedTier == 1) ? 1f : 0f); shop.tier3Chance = CreateFixedRange(((int)selectedTier == 2) ? 1f : 0f); } private static RangeFloat CreateFixedRange(float value) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) return new RangeFloat { min = value, max = value }; } private static Transform[] CreateDroneTerminalPositions(DroneVendorMultiShopController shop, int terminalCount) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) Transform[] terminalPositions = shop.terminalPositions; Transform[] array = (Transform[])(object)new Transform[terminalCount]; if (terminalCount <= terminalPositions.Length) { if (terminalCount == 1) { array[0] = terminalPositions[terminalPositions.Length / 2]; return array; } for (int i = 0; i < terminalCount; i++) { int num = Mathf.RoundToInt((float)i * ((float)terminalPositions.Length - 1f) / ((float)terminalCount - 1f)); array[i] = terminalPositions[num]; } return array; } Array.Copy(terminalPositions, array, terminalPositions.Length); Vector3 val = Vector3.zero; Transform[] array2 = terminalPositions; foreach (Transform val2 in array2) { val += val2.position; } val /= (float)terminalPositions.Length; Vector3 val3 = ((terminalPositions.Length > 1) ? (terminalPositions[^1].position - terminalPositions[0].position) : ((Component)shop).transform.right); val3.y = 0f; if (((Vector3)(ref val3)).sqrMagnitude < 0.01f) { val3 = ((Component)shop).transform.right; } ((Vector3)(ref val3)).Normalize(); float num2 = ((terminalPositions.Length > 1) ? (Vector3.Distance(terminalPositions[0].position, terminalPositions[^1].position) / (float)(terminalPositions.Length - 1)) : 1.25f); num2 = Mathf.Max(num2, 1.25f); int num3 = terminalCount - terminalPositions.Length; float num4 = num2 * (float)(terminalPositions.Length - 1) * 0.5f; Quaternion rotation = terminalPositions[terminalPositions.Length / 2].rotation; for (int k = 0; k < num3; k++) { int num5 = k / 2 + 1; float num6 = ((k % 2 == 0) ? 1f : (-1f)); Vector3 position = val + val3 * num6 * (num4 + num2 * (float)num5); GameObject val4 = new GameObject($"AiQueOdioDroneTerminalPosition{k + 1}"); val4.transform.position = position; val4.transform.rotation = rotation; val4.transform.SetParent(((Component)shop).transform, true); array[terminalPositions.Length + k] = val4.transform; } return array; } private static void AssignEveryDroneOnce(DroneVendorMultiShopController shop, List<DroneIndex> candidates) { //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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (shop._terminals == null || shop._terminals.Length != candidates.Count) { Log.Warning("[AiQueOdio] A quantidade de terminais não corresponde às opções de drones."); return; } List<DroneIndex> list = new List<DroneIndex>(candidates); DroneVendorTerminalBehavior[] terminals = shop._terminals; UniquePickup val2 = default(UniquePickup); foreach (DroneVendorTerminalBehavior obj in terminals) { DroneIndex val = shop.rng.NextElementUniform<DroneIndex>(list); list.Remove(val); ((UniquePickup)(ref val2))..ctor(PickupCatalog.FindPickupIndex(val)); val2.upgradeValue = shop.droneUpgradeCount; UniquePickup val3 = val2; obj.SetPickup(val3, false); } } private static bool IsDroneExcluded(DroneVendorMultiShopController shop, DroneIndex droneIndex) { //IL_003c: 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) if (shop.excludedDronesDropTable?.pickupEntries == null) { return false; } PickupDefEntry[] pickupEntries = shop.excludedDronesDropTable.pickupEntries; for (int i = 0; i < pickupEntries.Length; i++) { Object pickupDef = pickupEntries[i].pickupDef; DroneDef val = (DroneDef)(object)((pickupDef is DroneDef) ? pickupDef : null); if (val != null && val.droneIndex == droneIndex) { return true; } } return false; } private static void KeepDroneShopSinglePurchase(orig_SetCloseOnTerminalPurchase orig, DroneVendorMultiShopController self, PurchaseInteraction purchaseInteraction, bool closeOnPurchase) { orig.Invoke(self, purchaseInteraction, IsAiqueOdioRun(Run.instance) || closeOnPurchase); } private static void OnStageStartGlobal(Stage stage) { //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) if (!HasMonsterItemSystems(Run.instance)) { return; } if (!NetworkServer.active) { RequestMonsterPanelState(); RefreshMonsterItemDisplay(); return; } string text = (((Object)(object)stage.sceneDef != (Object)null) ? stage.sceneDef.baseSceneName : string.Empty); if ((Object)(object)monsterItemDisplayInventory == (Object)null) { CreateMonsterItemDisplay(); } StartSafeAreaScrapper(stage); if (!string.Equals(text, "bazaar", StringComparison.Ordinal)) { int num = Run.instance.stageClearCount + 1; if (IsArtifactEnabled(esmalteRosaArtifactDef) && num >= 3 && num > lastIrradiantPearlGrantStage) { int count = num - 3 + 1; GiveSpecificItemToMonsters(Items.ShinyPearl, count); lastIrradiantPearlGrantStage = num; BroadcastMonsterItem(Items.ShinyPearl.itemIndex, count); } if (IsArtifactEnabled(esmalteRoxoArtifactDef) && num >= 5) { EnsurePermanentTonicOnExistingMonsters(); AddTonicDisplayItems(); } if (IsArtifactEnabled(esmalteRoxoArtifactDef) && (num == 6 || text.StartsWith("moon", StringComparison.OrdinalIgnoreCase))) { GiveSpecificItemToMonsters(Items.CaptainDefenseMatrix, 1); BroadcastMonsterItem(Items.CaptainDefenseMatrix.itemIndex, 1); } } } private static void OnBodyStartGlobal(CharacterBody body) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Invalid comparison between Unknown and I4 if ((Object)(object)body != (Object)null) { InheritMonsterTemporaryItems(body.master); } if (NetworkServer.active && HasMonsterItemSystems(Run.instance) && !((Object)(object)body == (Object)null) && !((Object)(object)body.teamComponent == (Object)null) && (int)body.teamComponent.teamIndex == 2 && IsArtifactEnabled(esmalteRoxoArtifactDef) && Run.instance.stageClearCount + 1 >= 5) { EnsurePermanentTonic(body); } } private static void EnsurePermanentTonicOnExistingMonsters() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances != (Object)null && (int)readOnlyInstances.teamIndex == 2) { EnsurePermanentTonic(readOnlyInstances.GetBody()); } } } private static void EnsurePermanentTonic(CharacterBody body) { if (!((Object)(object)body == (Object)null) && !body.HasBuff(Buffs.TonicBuff)) { body.AddBuff(Buffs.TonicBuff); if (!tonicBuffConfirmed && body.HasBuff(Buffs.TonicBuff)) { tonicBuffConfirmed = true; Log.Info("[AiQueOdio] Verificação concluída: o Tônico permanente está ativo nos monstros."); } } } private static void AddTonicDisplayItems() { if (!tonicDisplayAdded && !((Object)(object)monsterItemDisplayInventory == (Object)null)) { tonicDisplayAdded = true; AddDisplayOnlyItem(Items.AutoCastEquipment, 4); RefreshMonsterItemDisplay(); SendMonsterPanelState(); BroadcastPermanentTonic(); Log.Info($"[AiQueOdio] Painel da fase {5} atualizado com 1 Tônico e 4 Gestos " + "(somente indicadores visuais)."); } } private static void AddDisplayOnlyItem(ItemDef itemDef, int count) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)monsterItemDisplayInventory == (Object)null) && !((Object)(object)itemDef == (Object)null) && count > 0) { monsterItemDisplayInventory.GiveItemPermanent(itemDef.itemIndex, count); } } private static void OnFixedUpdate() { UpdateMonsterPanelClient(); UpdateMonsterDuplicatorDuration(); Run val = Run.instance; if (!NetworkServer.active || (Object)(object)val == (Object)null || !IsArtifactEnabled(esmaltePinkArtifactDef)) { return; } float runStopwatch = val.GetRunStopwatch(); float monsterItemInterval = GetMonsterItemInterval(val); if (itemsGivenByTime > 0) { nextItemGrantTime = lastItemGrantTime + monsterItemInterval; } int num = 0; while (runStopwatch >= nextItemGrantTime) { num++; itemsGivenByTime++; if (itemsGivenByTime == 1) { lastItemGrantTime = 0f; } else { lastItemGrantTime = nextItemGrantTime; } monsterItemInterval = GetMonsterItemInterval(val); nextItemGrantTime = lastItemGrantTime + monsterItemInterval; } if (num > 0) { GiveRandomItemToMonsters(val, num); } } private static float GetMonsterItemInterval(Run run) { return GetMonsterItemInterval(run.stageClearCount + 1); } private static float GetMonsterItemInterval(int currentStage) { int num = Mathf.Max(0, currentStage - 1); float num2 = (float)(num * (num + 1)) * 2f * 0.5f; return Mathf.Max(15f, 60f - num2); } private static void GiveSpecificItemToMonsters(ItemDef itemDef, int count) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Run.instance != (Object)null && (Object)(object)itemDef != (Object)null) { GiveItemToMonsterTeam(itemDef.itemIndex, count, updateDisplayImmediately: false); } } private static void GiveRandomItemToMonsters(Run run, int count) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Invalid comparison between Unknown and I4 //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) List<PickupIndex> validMonsterItems = GetValidMonsterItems(run); if (validMonsterItems.Count == 0) { Log.Warning("[AiQueOdio] Nenhum item válido estava disponível."); return; } PickupDef val = null; for (int i = 0; i < count; i++) { if (validMonsterItems.Count == 0) { break; } PickupIndex val2 = run.treasureRng.NextElementUniform<PickupIndex>(validMonsterItems); PickupDef pickup = PickupCatalog.GetPickupDef(val2); if (pickup == null || (int)pickup.itemIndex == -1) { continue; } GiveItemToMonsterTeam(pickup.itemIndex, 1, updateDisplayImmediately: false); BroadcastMonsterItem(pickup.itemIndex, 1); val = pickup; if (!CanRollMonsterItem(pickup.itemIndex)) { validMonsterItems.RemoveAll((PickupIndex candidate) => PickupCatalog.GetPickupDef(candidate)?.itemIndex == (ItemIndex?)pickup.itemIndex); } } if (val == null) { return; } PlayPitiLocal(); try { NetMessageExtensions.Send((INetMessage)(object)default(PlayPitiMessage), (NetworkDestination)1); } catch (Exception ex) { Log.Error("[AiQueOdio] Falha ao enviar o áudio aos Clients: " + ex); } } private static List<PickupIndex> GetValidMonsterItems(Run run) { //IL_005e: 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_00b2: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Invalid comparison between Unknown and I4 //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) List<PickupIndex> list = new List<PickupIndex>(run.availableTier1DropList); int num = run.stageClearCount + 1; if (MonsterItemStageRules.Allows((ItemTier)1, num)) { list.AddRange(run.availableTier2DropList); list.AddRange(run.availableTier3DropList); list.AddRange(run.availableBossDropList); AddExplicitMonsterItemCandidate(run, list, Items.ShinyPearl); string[] allowedFoodItemNames = AllowedFoodItemNames; for (int i = 0; i < allowedFoodItemNames.Length; i++) { ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex(allowedFoodItemNames[i])); if ((Object)(object)itemDef != (Object)null && (int)itemDef.tier == 10) { AddExplicitMonsterItemCandidate(run, list, itemDef); } } } List<PickupIndex> list2 = new List<PickupIndex>(list.Count); foreach (PickupIndex item in list) { PickupDef pickupDef = PickupCatalog.GetPickupDef(item); ItemDef val = ((pickupDef != null && (int)pickupDef.itemIndex != -1) ? ItemCatalog.GetItemDef(pickupDef.itemIndex) : null); if (IsAllowedMonsterItem(val, num) && CanRollMonsterItem(val.itemIndex)) { list2.Add(item); } } return list2; } private static void AddExplicitMonsterItemCandidate(Run run, List<PickupIndex> candidates, ItemDef item) { //IL_000b: 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_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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)item == (Object)null) && run.IsItemAvailable(item.itemIndex) && (!((Object)(object)item.requiredExpansion != (Object)null) || run.IsExpansionEnabled(item.requiredExpansion))) { PickupIndex val = PickupCatalog.FindPickupIndex(item.itemIndex); if (val != PickupIndex.none && !candidates.Contains(val)) { candidates.Add(val); } } } private static bool IsAllowedMonsterItem(ItemDef item, int currentStage, bool ignoreStageRestrictions = false) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Invalid comparison between Unknown and I4 //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Invalid comparison between Unknown and I4 //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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected I4, but got Unknown if ((Object)(object)item == (Object)null) { return false; } if (!MonsterItemStageRules.Allows(item.tier, currentStage, ignoreStageRestrictions)) { return false; } if ((int)item.tier == 10) { return Array.Exists(AllowedFoodItemNames, (string name) => string.Equals(((Object)item).name, name, StringComparison.OrdinalIgnoreCase)); } if (item.ContainsTag((ItemTag)10)) { return false; } if ((int)item.tier == 2 && Array.Exists(AllowedRedItemNames, (string name) => string.Equals(((Object)item).name, name, StringComparison.OrdinalIgnoreCase))) { return true; } if (item.ContainsTag((ItemTag)4)) { return false; } ItemTier tier = item.tier; return (int)tier switch { 0 => !ContainsAny(((Object)item).name, BlockedWhiteItemNames), 1 => !ContainsAny(((Object)item).name, BlockedGreenItemNames), 2 => !ContainsAny(((Object)item).name, BlockedRedItemNames), 4 => ContainsAny(((Object)item).name, AllowedBossItemNames), _ => true, }; } private static bool ContainsAny(string value, string[] fragments) { if (string.IsNullOrEmpty(value)) { return false; } foreach (string value2 in fragments) { if (value.IndexOf(value2, StringComparison.OrdinalIgnoreCase) >= 0) { return true; } } return false; } private static void GiveItemToMonsterTeam(ItemIndex itemIndex, int count, bool updateDisplayImmediately = true, bool ignoreStageRestrictions = false) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_000e: 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_0030: 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_003c: 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_0070: Invalid comparison between Unknown and I4 //IL_009e: 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) if ((int)itemIndex == -1 || count <= 0) { return; } MonsterItemStacks.TryGetValue(itemIndex, out var value); count = GetMonsterItemGrantCount(itemIndex, count, value); if (count == 0) { return; } int monsterDuplicatorCount = GetMonsterDuplicatorCount(); MonsterItemStacks[itemIndex] = value + count; if (updateDisplayImmediately) { AddItemToMonsterDisplay(itemIndex, count); } else { AnnounceMonsterItemVisual(itemIndex, count); } foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances != (Object)null && (int)readOnlyInstances.teamIndex == 2) { Inventory inventory = readOnlyInstances.inventory; if (inventory != null) { inventory.GiveItemPermanent(itemIndex, count); } } } UpdateMonsterDuplicatorDuration(); DuplicateMonsterItemGrant(itemIndex, count, monsterDuplicatorCount, ignoreStageRestrictions); } private static void AddItemToMonsterDisplay(ItemIndex itemIndex, int count) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)monsterItemDisplayInventory == (Object)null) { Log.Warning("[AiQueOdio] O painel não recebeu o item porque seu inventário não existe."); return; } monsterItemDisplayInventory.GiveItemPermanent(itemIndex, count); RefreshMonsterItemDisplay(); } private static void AnnounceMonsterItemVisual(ItemIndex itemIndex, int displayCount) { //IL_000e: 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) int sequence = ++monsterItemVisualSequence; ShowMonsterItemLocal(itemIndex, sequence, displayCount); try { NetMessageExtensions.Send((INetMessage)(object)new ShowMonsterItemMessage(itemIndex, sequence, displayCount), (NetworkDestination)1); } catch (Exception ex) { Log.Error("[AiQueOdio] Falha ao enviar a animação do item aos Clients: " + ex); } } internal static void ShowMonsterItemLocal(ItemIndex itemIndex, int sequence, int displayCount = 0) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (sequence > lastMonsterItemVisualSequence && HasMonsterItemSystems(Run.instance) && !((Object)(object)ItemCatalog.GetItemDef(itemIndex) == (Object)null)) { lastMonsterItemVisualSequence = sequence; MonsterItemVisualQueue.Enqueue((itemIndex, displayCount)); if ((Object)(object)instance != (Object)null && monsterItemVisualCoroutine == null) { monsterItemVisualCoroutine = ((MonoBehaviour)instance).StartCoroutine(ProcessMonsterItemVisuals()); } } } private static IEnumerator ProcessMonsterItemVisuals() { try { yield return null; while (MonsterItemVisualQueue.Count > 0) { (ItemIndex itemIndex, int displayCount) visual = MonsterItemVisualQueue.Dequeue(); Run originatingRun = Run.instance; IEnumerator animation = ShowMonsterItemVisual(visual.itemIndex, visual.displayCount); try { while (true) { object current; try { if (!animation.MoveNext()) { break; } current = animation.Current; goto IL_00d6; } catch (Exception arg) { Log.Error($"[AiQueOdio] Falha na animação do item {visual.itemIndex}: {arg}"); } break; IL_00d6: yield return current; } } finally { (animation as IDisposable)?.Dispose(); DestroyMonsterItemVisualCanvas(); if (NetworkServer.active && (Object)(object)Run.instance == (Object)(object)originatingRun && visual.displayCount > 0) { AddItemToMonsterDisplay(visual.itemIndex, visual.displayCount); } } } } finally { monsterItemVisualCoroutine = null; } } private static IEnumerator ShowMonsterItemVisual(ItemIndex itemIndex, int count) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex); if ((Object)(object)itemDef == (Object)null || (Object)(object)itemDef.pickupIconSprite == (Object)null) { yield break; } GameObject val = new GameObject("AiQueOdioMonsterItemVisual", new Type[4] { typeof(RectTransform), typeof(Canvas), typeof(CanvasScaler), typeof(CanvasGroup) }); monsterItemVisualCanvas = val; GameObject canvasObject = val; Object.DontDestroyOnLoad((Object)(object)canvasObject); Canvas component = canvasObject.GetComponent<Canvas>(); component.renderMode = (RenderMode)0; component.overrideSorting = true; component.sortingOrder = 32767; CanvasScaler component2 = canvasObject.GetComponent<CanvasScaler>(); component2.uiScaleMode = (ScaleMode)1; component2.referenceResolution = new Vector2(1920f, 1080f); component2.matchWidthOrHeight = 0.5f; CanvasGroup canvasGroup = canvasObject.GetComponent<CanvasGroup>(); canvasGroup.alpha = 0f; canvasGroup.interactable = false; canvasGroup.blocksRaycasts = false; GameObject val2 = new GameObject("Item", new Type[2] { typeof(RectTransform), typeof(Image) }); val2.transform.SetParent(canvasObject.transform, false); RectTransform iconRoot = val2.GetComponent<RectTransform>(); iconRoot.anchorMin = new Vector2(0.5f, 0.5f); iconRoot.anchorMax = new Vector2(0.5f, 0.5f); iconRoot.pivot = new Vector2(0.5f, 0.5f); iconRoot.sizeDelta = new Vector2(84.375f, 84.375f); Image component3 = val2.GetComponent<Image>(); ((Graphic)component3).color = new Color(0.025f, 0.025f, 0.035f, 0.92f); ((Graphic)component3).raycastTarget = false; Outline outline = val2.AddComponent<Outline>(); ItemTierDef itemTierDef = ItemTierCatalog.GetItemTierDef(itemDef.tier); Color itemColor = (((Object)(object)itemTierDef != (Object)null) ? Color32.op_Implicit(ColorCatalog.GetColor(itemTierDef.colorIndex)) : Color.white); ((Shadow)outline).effectColor = new Color(itemColor.r, itemColor.g, itemColor.b, 0.95f); ((Shadow)outline).effectDistance = new Vector2(3f, -3f); ((Shadow)outline).useGraphicAlpha = true; GameObject val3 = new GameObject("Icon", new Type[2] { typeof(RectTransform), typeof(Image) }); val3.transform.SetParent((Transform)(object)iconRoot, false); RectTransform component4 = val3.GetComponent<RectTransform>(); component4.anchorMin = new Vector2(0.5f, 0.5f); component4.anchorMax = new Vector2(0.5f, 0.5f); component4.sizeDelta = new Vector2(70.875f, 70.875f); Image component5 = val3.GetComponent<Image>(); component5.sprite = itemDef.pickupIconSprite; component5.preserveAspect = true; ((Graphic)component5).raycastTarget = false; if (count > 1) { GameObject val4 = new GameObject("Count", new Type[2] { typeof(RectTransform), typeof(TextMeshProUGUI) }); val4.transform.SetParent((Transform)(object)iconRoot, false); RectTransform component6 = val4.GetComponent<RectTransform>(); component6.anchorMin = Vector2.zero; component6.anchorMax = Vector2.one; component6.offsetMin = new Vector2(2f, 0f); component6.offsetMax = new Vector2(-4f, -2f); TextMeshProUGUI component7 = val4.GetComponent<TextMeshProUGUI>(); ((TMP_Text)component7).text = $"×{count}"; ((TMP_Text)component7).fontSize = 27f; ((TMP_Text)component7).fontStyle = (FontStyles)1; ((TMP_Text)component7).alignment = (TextAlignmentOptions)1028; ((Graphic)component7).color = Color.white; ((TMP_Text)component7).outlineColor = Color32.op_Implicit(Color.black); ((TMP_Text)component7).outlineWidth = 0.2f; ((Graphic)component7).raycastTarget = false; } yield return null; if ((Object)(object)canvasObject == (Object)null) { yield break; } RectTransform canvasRect = canvasObject.GetComponent<RectTransform>(); Rect rect = canvasRect.rect; Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor(0f, ((Rect)(ref rect)).height * 0.33f); iconRoot.anchoredPosition = val5; Vector2 showcasePosition = val5; ((Transform)iconRoot).localScale = Vector3.one * 0.7f; float elapsed = 0f; while (elapsed < 0.35f) { if ((Object)(object)canvasObject == (Object)null || (Object)(object)iconRoot == (Object)null || (Object)(object)canvasGroup == (Object)null) { yield break; } elapsed += Time.unscaledDeltaTime; float num = Mathf.Clamp01(elapsed / 0.35f); float num2 = (canvasGroup.alpha = 1f - Mathf.Pow(1f - num, 3f)); float num4 = num2; ((Transform)iconRoot).localScale = Vector3.one * Mathf.Lerp(0.7f, 1f, num4); yield return null; } elapsed = 0.35f; while (elapsed < 2f) { if ((Object)(object)canvasObject == (Object)null || (Object)(object)iconRoot == (Object)null || (Object)(object)outline == (Object)null) { yield break; } elapsed += Time.unscaledDeltaTime; SetSquarePulse(iconRoot, outline, itemColor, elapsed); yield return null; } if (!((Object)(object)canvasRect == (Object)null)) { Vector2 targetPosition = FindMonsterItemPanelPosition(canvasRect); elapsed = 0f; while (elapsed < 0.85f && !((Object)(object)canvasObject == (Object)null) && !((Object)(object)iconRoot == (Object)null) && !((Object)(object)canvasGroup == (Object)null)) { elapsed += Time.unscaledDeltaTime; float num5 = Mathf.Clamp01(elapsed / 0.85f); float num6 = num5 * num5 * (3f - 2f * num5); iconRoot.anchoredPosition = Vector2.Lerp(showcasePosition, targetPosition, num6); ((Transform)iconRoot).localScale = Vector3.one * Mathf.Lerp(1f, 0.28f, num6); canvasGroup.alpha = Mathf.Lerp(1f, 0.35f, num6); yield return null; } } } private static void SetSquarePulse(RectTransform iconRoot, Outline outline, Color itemColor, float time) { //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_0037: 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: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) float num = 0.5f + 0.5f * Mathf.Sin(time * 7f); ((Transform)iconRoot).localScale = Vector3.one * (1f + 0.055f * num); ((Shadow)outline).effectColor = new Color(itemColor.r, itemColor.g, itemColor.b, Mathf.Lerp(0.65f, 1f, num)); } private static Vector2 FindMonsterItemPanelPosition(RectTransform canvasRect) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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) ItemInventoryDisplay[] array = Object.FindObjectsOfType<ItemInventoryDisplay>(); Vector2 result = default(Vector2); foreach (ItemInventoryDisplay val in array) { if ((Object)(object)val == (Object)null || !((Component)val).gameObject.activeInHierarchy || (Object)(object)((Component)val).GetComponentInParent<EnemyInfoPanel>() == (Object)null) { continue; } Transform transform = ((Component)val).transform; RectTransform val2 = (RectTransform)(object)((transform is RectTransform) ? transform : null); if (!((Object)(object)val2 == (Object)null)) { Canvas componentInParent = ((Component)val).GetComponentInParent<Canvas>(); Vector2 val3 = RectTransformUtility.WorldToScreenPoint(((Object)(object)componentInParent != (Object)null && (int)componentInParent.renderMode != 0) ? componentInParent.worldCamera : null, ((Transform)val2).position); if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRect, val3, (Camera)null, ref result)) { return result; } } } Rect rect = canvasRect.rect; float num = ((Rect)(ref rect)).width * 0.38f; rect = canvasRect.rect; return new Vector2(num, ((Rect)(ref rect)).height * 0.18f); } private static void ClearMonsterItemVisuals() { MonsterItemVisualQueue.Clear(); if (monsterItemVisualCoroutine != null && (Object)(object)instance != (Object)null) { ((MonoBehaviour)instance).StopCoroutine(monsterItemVisualCoroutine); } monsterItemVisualCoroutine = null; DestroyMonsterItemVisualCanvas(); } private static void DestroyMonsterItemVisualCanvas() { if ((Object)(object)monsterItemVisualCanvas != (Object)null) { Object.Destroy((Object)(object)monsterItemVisualCanvas); monsterItemVisualCanvas = null; } } private static void RefreshMonsterItemDisplay() { EnemyInfoPanelInventoryProvider obj = monsterItemDisplayProvider; if (obj != null) { obj.Refresh(); } EnemyInfoPanel.RefreshAll(); } private static bool IsAiqueOdioRun(Run run) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)run != (Object)null) { return run.selectedDifficulty == difficultyIndex; } return false; } private static bool IsArtifactEnabled(ArtifactDef artifact) { if ((Object)(object)artifact != (Object)null && (Object)(object)RunArtifactManager.instance != (Object)null) { return RunArtifactManager.instance.IsArtifactEnabled(artifact); } return false; } private static void InstallBlackArtifact() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0050: 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