using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using ElementalReactionsMod.Achievements; using ElementalReactionsMod.Elements; using ElementalReactionsMod.Environment; using ElementalReactionsMod.Items; using ElementalReactionsMod.Loadout; using ElementalReactionsMod.Orbs; using ElementalReactionsMod.Reactions; using EntityStates; using EntityStates.AffixEarthHealer; using EntityStates.ClayBruiser.Weapon; using EntityStates.DefectiveUnit; using EntityStates.Events; using EntityStates.FriendUnit; using EntityStates.MiniMushroom; using EntityStates.RoboBallBoss.Weapon; using EntityStates.ScavMonster; using EntityStates.SolusAmalgamator; using EntityStates.VoidInfestor; using Grumpy; using HG; using HG.Reflection; using HarmonyLib; using IL.EntityStates.AcidLarva; using IL.EntityStates.AffixEarthHealer; using IL.EntityStates.DefectiveUnit; using IL.EntityStates.Destructible; using IL.EntityStates.VoidInfestor; using IL.RoR2; using IL.RoR2.Projectile; using ItemQualities; using ItemQualities.ContentManagement; using ItemQualities.Utilities.Extensions; using JetBrains.Annotations; using LookingGlass.ItemStatsNameSpace; using LookingGlass.LookingGlassLanguage; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using Newtonsoft.Json.Utilities; using On.EntityStates.ClayBruiser.Weapon; using On.EntityStates.FriendUnit; using On.EntityStates.MiniMushroom; using On.EntityStates.RoboBallBoss.Weapon; using On.EntityStates.ScavMonster; using On.EntityStates.SolusAmalgamator; using On.RoR2; using On.RoR2.UI.LogBook; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using Rewired.ComponentControls.Effects; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Artifacts; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using RoR2BepInExPack.GameAssetPathsBetter; using SS2; using Sandswept.Enemies.CannonballJellyfish; using TMPro; using ThreeEyedGames; using Unity.Collections; using Unity.Jobs; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Jobs; using UnityEngine.Networking; using UnityEngine.Rendering.PostProcessing; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ElementalReactionsMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+f50cb26eda7990cbe120c1ca80656e0bdf7f3c99")] [assembly: AssemblyProduct("ElementalReactionsMod")] [assembly: AssemblyTitle("ElementalReactionsMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [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 ElementalReactionsMod { public static class Assets { public static class AssetReferences { public static AssetReferenceT expansionIcon = new AssetReferenceT("64c84609674948a4d80e1fc588a1d8a9"); public static AssetReferenceT pyroBuffIcon = new AssetReferenceT("0daee0d7c66cf3349a5c729e74a12925"); public static AssetReferenceT hydroBuffIcon = new AssetReferenceT("7e274e591617cd94f851984046f5c921"); public static AssetReferenceT electroBuffIcon = new AssetReferenceT("a416b58f4ed2331488afcf4e6eba114f"); public static AssetReferenceT cryoBuffIcon = new AssetReferenceT("e38221f0cc59ebd4f96bfcc5034fde14"); public static AssetReferenceT anemoBuffIcon = new AssetReferenceT("2e957546a6b4ecf4088b8cb9a754aaaf"); public static AssetReferenceT geoBuffIcon = new AssetReferenceT("61c6caa41fc7e8c4abf6534fadeb89b0"); public static AssetReferenceT dendroBuffIcon = new AssetReferenceT("87b63bb49e9e2fa4f9d2a66665ee07a7"); public static AssetReferenceT quickenBuffIcon = new AssetReferenceT("fd1a80b8adab48644bde7e4c5d73fd13"); public static AssetReferenceT superconductBuffIcon = new AssetReferenceT("5fc2055e4d7c33348889a483e5a0df1b"); public static AssetReferenceT electroChargeBuffIcon = new AssetReferenceT("151966ab1f5e45043ab88e997d14ae7d"); public static AssetReferenceT pyroIcon = new AssetReferenceT("13e481dbe51e4d640ad603f14cb6bfe9"); public static AssetReferenceT hydroIcon = new AssetReferenceT("3eb8865e5a13b7742b66a47fbdd2aee7"); public static AssetReferenceT electroIcon = new AssetReferenceT("56c4fbbb5b62cb84abd0f8a9575caf3f"); public static AssetReferenceT cryoIcon = new AssetReferenceT("9435d25802bf8994a89c7275c9264810"); public static AssetReferenceT anemoIcon = new AssetReferenceT("38a3562c6487d3d459a11ab8ce19b418"); public static AssetReferenceT geoIcon = new AssetReferenceT("f972169ff42390a4da00e9b3eb915dbe"); public static AssetReferenceT dendroIcon = new AssetReferenceT("cdc71ccb0e628c74ba052480a5bc3cd4"); public static AssetReferenceT physicalSkillIcon = new AssetReferenceT("d4a1b90b0494f41468cc3891bf05e53a"); public static AssetReferenceT pyroSkillIcon = new AssetReferenceT("dc58e8263293feb4d800d43015d479c5"); public static AssetReferenceT hydroSkillIcon = new AssetReferenceT("e186d9590b77d8248abd9e77fbbd3f48"); public static AssetReferenceT electroSkillIcon = new AssetReferenceT("993b4bd8d5b61934f93b53275220256d"); public static AssetReferenceT cryoSkillIcon = new AssetReferenceT("d5fb27b74cc81cf409874d173f52e728"); public static AssetReferenceT anemoSkillIcon = new AssetReferenceT("7eee6493b891a1746a05e1b540b4eb4d"); public static AssetReferenceT geoSkillIcon = new AssetReferenceT("c88d96edd23da354696d9d9d66cd102f"); public static AssetReferenceT dendroSkillIcon = new AssetReferenceT("4e802f5ad484760438a8692950a15773"); public static AssetReferenceT genericElementActivatedEffect = new AssetReferenceT("0dcaf09df2cb8ab4c838c88c6d997a39"); public static AssetReferenceT genericElementOrbEffect = new AssetReferenceT("383d58c1367764647bb30cbdd0339ac0"); public static AssetReferenceT elementEnvironmentScreenEffect = new AssetReferenceT("55f9388a5a1f5834c9ee3506b9141ba8"); public static AssetReferenceT electroChargeTempVisualEffect = new AssetReferenceT("11147caefb6967a41ab27574e55d2a88"); public static AssetReferenceT quickenTempVisualEffect = new AssetReferenceT("8c00cd5f2a1b86c4ba23ceab51149285"); public static AssetReferenceT overloadEffect = new AssetReferenceT("a7c7911aead178a499a9803ee81dd5a3"); public static AssetReferenceT superconductEffect = new AssetReferenceT("b2ee9cb3889cd7c4bb620fd72233099a"); public static AssetReferenceT superconductTempVisualEffect = new AssetReferenceT("b46ea4e21788bdc418384e2de927414e"); public static AssetReferenceT swirlEffect = new AssetReferenceT("7afc921af72c23941980c334193ee394"); public static AssetReferenceT crystallizeSpawnOrbEffect = new AssetReferenceT("b71c0d9d0e04e4f42a27e5067bc57920"); public static AssetReferenceT crystallizePickup = new AssetReferenceT("677d6b93d9a81fa44b68adbcd2288857"); public static AssetReferenceT bloomIcon = new AssetReferenceT("cd5c3c5b432da044d8ab88e45c4ca562"); public static AssetReferenceT bloomObject = new AssetReferenceT("3208908270e8db14489bfb68079f0dcd"); public static AssetReferenceT bloomMaterial = new AssetReferenceT("c74a8fba09c05e843afab90abce26e10"); public static AssetReferenceT bloomFresnelMask = new AssetReferenceT("77d939fda7dde4048a33fccac924a029"); public static AssetReferenceT bloomTransparent = new AssetReferenceT("ff18c4fae117474409f084cf24b74999"); public static AssetReferenceT bloomExplosion = new AssetReferenceT("1a5da254110bef7488484791f3220e83"); public static AssetReferenceT burgeonExplosion = new AssetReferenceT("016343dff8c6ed345a37610401ac69b4"); public static AssetReferenceT hyperbloomOrb = new AssetReferenceT("84548caf27cac6b44b9f23e11e0c447d"); public static AssetReferenceT visionHolderMaterial = new AssetReferenceT("e3301a4ccd084f4428b3b23e85dc1733"); public static AssetReferenceT delusionPickupModel = new AssetReferenceT("9f3cf544c7630a04fa25214a5197c191"); public static AssetReferenceT delusionDisplayModel = new AssetReferenceT("79b9b2b62c2a66a439fad33cb020271a"); public static AssetReferenceT delusionLogo = new AssetReferenceT("8c75207915d01ff4280ac8f0e15b5aad"); public static AssetReferenceT delusionItemIcon = new AssetReferenceT("884bdf224e0646e43b6dc1b6a2675c92"); public static AssetReferenceT delusionPyroItemIcon = new AssetReferenceT("c43b3123149962f4ba691794e52b3e43"); public static AssetReferenceT delusionHydroItemIcon = new AssetReferenceT("cf1b789b5d942b142bd2ceff8f57f3a7"); public static AssetReferenceT delusionElectroItemIcon = new AssetReferenceT("6556071d8b734a34c9ed73fe8f085b54"); public static AssetReferenceT delusionCryoItemIcon = new AssetReferenceT("c18bd1206fb57a545b75e8ebe1277ae4"); public static AssetReferenceT delusionAnemoItemIcon = new AssetReferenceT("d2783fcd777fdc443b2413bea0a67ee4"); public static AssetReferenceT delusionGeoItemIcon = new AssetReferenceT("41fc2191bdd38634aa9d5d2f99a338c4"); public static AssetReferenceT delusionDendroItemIcon = new AssetReferenceT("3bedb54f341b8b448b9c0a1cd9dcdd7b"); public static AssetReferenceT delusionBuffIcon = new AssetReferenceT("6eea3353a4d395843b4cd63335aa6de1"); public static AssetReferenceT delusionHitEffect = new AssetReferenceT("65c647fb4bb695846b19becd2e583081"); public static AssetReferenceT delusionRamp = new AssetReferenceT("77c55f158f600e048ab3cecb73f7b2b6"); public static AssetReferenceT delusionOrbRamp = new AssetReferenceT("18f28cc4480fabe408617d74510efcb1"); public static AssetReferenceT instructorsTeaCupPickupModel = new AssetReferenceT("b51b42d6d9466d845a1d09da7a916642"); public static AssetReferenceT instructorsTeaCupDisplayModel = new AssetReferenceT("aa757ec80808fa94f8b3e34811f93f35"); public static AssetReferenceT instructorsTeaCupMaterial = new AssetReferenceT("21fcdb5cd2cf4b44fa0b04fe96e09702"); public static AssetReferenceT instructorsTeaCupFresnelMask = new AssetReferenceT("053b6932d6b15d5488c3626eb00c31ec"); public static AssetReferenceT instructorsTeaCupItemIcon = new AssetReferenceT("371e6f4214277484c90a8755fa3e42e1"); public static AssetReferenceT moonWheelPickupModel = new AssetReferenceT("7e50ea908069f874fac56c93f70a328d"); public static AssetReferenceT moonWheelDisplayModel = new AssetReferenceT("061359f9d76adfe429aa42f3b25caeb8"); public static AssetReferenceT moonWheelVisionIcon = new AssetReferenceT("af83aeca078a68443bf1583507eab088"); public static AssetReferenceT moonWheelVisionRamp = new AssetReferenceT("1f819082df45cdf44b5b8f019b4a90b5"); public static AssetReferenceT moonWheelItemIcon = new AssetReferenceT("00f1f0088ad92dc4eb41b80b7aef67f2"); public static AssetReferenceT elementalMasteryAchievementIcon = new AssetReferenceT("9547acf0f18b5a547a0533b84299b100"); public static AssetReferenceT lunarVFXSymbol = new AssetReferenceT("044f325621315c64a8a6b0b7277ff9b3"); public static AssetReferenceT lunarDecal = new AssetReferenceT("4cff496a700287245a5591fc5f7e1906"); public static AssetReferenceT lunarChargedLightningEffect = new AssetReferenceT("558b1898670f29e4f8aba548a3357090"); public static AssetReferenceT lunarChargeBuffIcon = new AssetReferenceT("ef41e115d6e9b3b45816e1afb73c5a0f"); public static AssetReferenceT lunarBloomEffect = new AssetReferenceT("623c28827e49bf041ade36cdd7cdf922"); public static AssetReferenceT lunarBloomBuffIcon = new AssetReferenceT("b14c2afa0ea1ba6449927fb72cbbd016"); public static AssetReferenceT lunarBloomChargingBuffIcon = new AssetReferenceT("dc667ee18bd31314a9c85d4ba5590cbf"); public static AssetReferenceT lunarCrystallizeController = new AssetReferenceT("151ca516e4a36dc4b9071f8c9957d1e4"); public static AssetReferenceT lunarCrystallizeActivatedEffect = new AssetReferenceT("6eb753463343f764385e8aaad94cbecf"); } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Action> <>9__13_0; public static Action> <>9__13_1; public static Action> <>9__13_2; public static EffectCondition <>9__13_24; public static Action> <>9__13_3; public static EffectCondition <>9__13_25; public static Action> <>9__13_4; public static Action> <>9__13_5; public static Action> <>9__13_6; public static EffectCondition <>9__13_27; public static Action> <>9__13_7; public static Action> <>9__13_10; public static Action> <>9__13_11; public static Action> <>9__13_15; public static Action> <>9__13_16; public static EffectCondition <>9__13_37; public static Action> <>9__13_18; public static Action> <>9__13_22; internal void b__13_0(AsyncOperationHandle x) { //IL_0032: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) EffectComponent val = x.Result.AddComponent(); val.positionAtReferencedTransform = true; val.parentToReferencedTransform = true; val.applyScale = true; VFXAttributes val2 = x.Result.AddComponent(); val2.vfxPriority = (VFXPriority)1; val2.vfxIntensity = (VFXIntensity)0; val2.DoNotPool = false; x.Result.AddComponent(); GenericElementEffectComponent genericElementEffectComponent = x.Result.AddComponent(); ParticleSystem component = ((Component)x.Result.transform.GetChild(0)).GetComponent(); ParticleSystem component2 = ((Component)x.Result.transform.GetChild(1)).GetComponent(); ParticleSystem component3 = ((Component)x.Result.transform.GetChild(2)).GetComponent(); genericElementEffectComponent.icon = ((Component)x.Result.transform.GetChild(0)).GetComponent(); genericElementEffectComponent.particlesToRecolor = (ParticleSystem[])(object)new ParticleSystem[3] { component, component2, component3 }; x.Result.AddComponent().trackedParticleSystem = component; ScaleParticleSystemDuration val3 = x.Result.AddComponent(); val3.initialDuration = 0.7f; val3.particleSystems = (ParticleSystem[])(object)new ParticleSystem[3] { component, component2, component3 }; genericElementEffectComponent.particleDuration = val3; ((Renderer)((Component)x.Result.transform.GetChild(1)).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_FalseSonBoss.matLunarGazeFireLaser3_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); x.Result.AddComponent(); AddNewEffectDef(x.Result); } internal void b__13_1(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_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_00aa: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) EffectComponent val = x.Result.AddComponent(); val.positionAtReferencedTransform = false; val.parentToReferencedTransform = false; VFXAttributes val2 = x.Result.AddComponent(); val2.vfxPriority = (VFXPriority)1; val2.vfxIntensity = (VFXIntensity)0; val2.DoNotPool = false; OrbEffect val3 = x.Result.AddComponent(); val3.startVelocity1 = new Vector3(-30f, -7f, -30f); val3.startVelocity2 = new Vector3(30f, 7f, 30f); val3.movementCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); val3.endEffect = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Treebot.OmniImpactVFXSlashSyringe_prefab), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); x.Result.AddComponent(); ParticleSystem component = ((Component)x.Result.transform.GetChild(0)).GetComponent(); ((Renderer)((Component)component).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matWideGlow_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); GenericElementEffectComponent genericElementEffectComponent = x.Result.AddComponent(); genericElementEffectComponent.trailsToRecolor = (TrailRenderer[])(object)new TrailRenderer[1] { ((Component)x.Result.transform.GetChild(1)).GetComponent() }; genericElementEffectComponent.particlesToRecolor = (ParticleSystem[])(object)new ParticleSystem[2] { component, ((Component)x.Result.transform.GetChild(2)).GetComponent() }; AddNewEffectDef(x.Result); } internal void b__13_2(AsyncOperationHandle x) { //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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) Mesh sharedMesh = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.mdlVFXDonut1_fbx_donut1Mesh_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Material val = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_Common_VFX.matOmniHitspark1GenericAdditive_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); Texture val2 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX_ParticleMasks.texGlowPaintMask_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); val.SetTexture("_MainTex", val2); val.SetTextureOffset("_MainTex", new Vector2(0.1f, 0.1f)); val.SetColor("_TintColor", Color.white); val.SetTexture("_Cloud1Tex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Nullifier.texNullifierSkySparse_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val.SetTextureScale("_Cloud1Tex", new Vector2(6f, 0.7f)); val.SetVector("_CutoffScroll", new Vector4(0f, 2f, 0f, 0f)); val.SetInt("_ZTest", 0); val.EnableKeyword("USE_CLOUDS"); val.SetFloat("_Boost", 2f); Material val3 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Items_SpeedBoostPickup.matSpeedBoostPickupTraill_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val3.SetTexture("_MainTex", val2); val3.SetTextureScale("_MainTex", new Vector2(1f, 1f)); val3.SetTextureOffset("_MainTex", new Vector2(0.25f, 0f)); val3.SetColor("_TintColor", Color.white); val3.SetTexture("_Cloud1Tex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Items_SpeedBoostPickup.texNegateAttackTrail_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val3.SetTextureScale("_Cloud1Tex", new Vector2(2f, 4f)); val3.SetVector("_CutoffScroll", new Vector4(5f, 10f, -20f, 4f)); val3.SetInt("_ZTest", 0); val3.SetFloat("_AlphaBoost", 0.09f); val3.DisableKeyword("DISABLEREMAP"); Transform child = x.Result.transform.GetChild(0); Transform child2 = x.Result.transform.GetChild(1); ElementalEnvironmentScreenEffect elementalEnvironmentScreenEffect = x.Result.AddComponent(); elementalEnvironmentScreenEffect.halfL = ((Component)child).GetComponent(); elementalEnvironmentScreenEffect.halfR = ((Component)child2).GetComponent(); ((Renderer)elementalEnvironmentScreenEffect.halfL).sharedMaterials = (Material[])(object)new Material[2] { val, val3 }; ((Component)child).GetComponent().sharedMesh = sharedMesh; ((Renderer)elementalEnvironmentScreenEffect.halfR).sharedMaterials = (Material[])(object)new Material[2] { val, val3 }; ((Component)child2).GetComponent().sharedMesh = sharedMesh; } internal void b__13_3(AsyncOperationHandle x) { //IL_0010: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown VFXAttributes val = x.Result.AddComponent(); val.vfxPriority = (VFXPriority)1; val.vfxIntensity = (VFXIntensity)0; val.DoNotPool = false; Transform child = x.Result.transform.GetChild(0); ((Component)child).GetComponent().trailMaterial = electroTrailMaterial; ((Component)child.GetChild(0)).GetComponent().trailMaterial = darkElectricTrailMaterial; DestroyOnTimer val2 = x.Result.AddComponent(); val2.duration = 0.25f; TemporaryVisualEffect val3 = x.Result.AddComponent(); val3.exitComponents = (MonoBehaviour[])(object)new MonoBehaviour[1] { (MonoBehaviour)val2 }; val3.visualTransform = child; GameObject result = x.Result; object obj = <>9__13_24; if (obj == null) { EffectCondition val4 = (CharacterBody body) => body.HasBuff(Buffs.electroChargeBuff); <>9__13_24 = val4; obj = (object)val4; } TempVisualEffectAPI.AddTemporaryVisualEffect(result, (EffectCondition)obj, false, ""); } internal bool b__13_24(CharacterBody body) { return body.HasBuff(Buffs.electroChargeBuff); } internal void b__13_4(AsyncOperationHandle x) { //IL_0010: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown VFXAttributes val = x.Result.AddComponent(); val.vfxPriority = (VFXPriority)1; val.vfxIntensity = (VFXIntensity)0; val.DoNotPool = false; Transform child = x.Result.transform.GetChild(0); ((Component)child).GetComponent().trailMaterial = dendroElectricTrailMaterial; ((Component)child.GetChild(0)).GetComponent().trailMaterial = darkElectricTrailMaterial; DestroyOnTimer val2 = x.Result.AddComponent(); val2.duration = 0.25f; TemporaryVisualEffect val3 = x.Result.AddComponent(); val3.exitComponents = (MonoBehaviour[])(object)new MonoBehaviour[1] { (MonoBehaviour)val2 }; val3.visualTransform = child; GameObject result = x.Result; object obj = <>9__13_25; if (obj == null) { EffectCondition val4 = (CharacterBody body) => body.HasBuff(Buffs.quickenBuff); <>9__13_25 = val4; obj = (object)val4; } TempVisualEffectAPI.AddTemporaryVisualEffect(result, (EffectCondition)obj, false, ""); } internal bool b__13_25(CharacterBody body) { return body.HasBuff(Buffs.quickenBuff); } internal void b__13_5(AsyncOperationHandle x) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass13_1 CS$<>8__locals3 = new <>c__DisplayClass13_1(); EffectComponent val = x.Result.AddComponent(); val.positionAtReferencedTransform = true; val.parentToReferencedTransform = false; VFXAttributes val2 = x.Result.AddComponent(); val2.vfxPriority = (VFXPriority)2; val2.vfxIntensity = (VFXIntensity)1; val2.DoNotPool = false; ShakeEmitter val3 = x.Result.AddComponent(); val3.amplitudeTimeDecay = true; val3.duration = 0.2f; val3.radius = 45f; val3.scaleShakeRadiusWithLocalScale = false; val3.wave = new Wave { amplitude = 0.7f, frequency = 30f, cycleOffset = 0f }; x.Result.AddComponent(); CS$<>8__locals3.ringParticleRenderer = ((Component)x.Result.transform.Find("OverloadRing")).GetComponent(); CS$<>8__locals3.ringParticleRenderer.mesh = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.mdlVFXDonut1_fbx_donut1Mesh_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); AsyncOperationHandle val4 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC3_SolusAmalgamator.matSolusAmalgamatorTrackingBombRing_mat), (AsyncReferenceHandleUnloadType)2); val4.Completed += delegate(AsyncOperationHandle y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //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) Material val7 = new Material(y.Result); val7.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampTeslaCoil_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); ((Renderer)CS$<>8__locals3.ringParticleRenderer).sharedMaterial = val7; }; Material sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matTracerBright_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("OverloadSmallFlash")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("OverloadFlash")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("OverloadSparks")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("OverloadDistortion")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matDistortionFaded_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Component)x.Result.transform.Find("OverloadElectricity")).GetComponent().trailMaterial = electroTrailMaterial; ((Component)x.Result.transform.Find("OverloadElectricityDark")).GetComponent().trailMaterial = darkElectricTrailMaterial; ((Renderer)((Component)x.Result.transform.Find("OverloadFire")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Gravekeeper.matOmniExplosion1ArchWisp_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Transform val5 = x.Result.transform.Find("OverloadLight"); val2.optionalLights = (Light[])(object)new Light[1] { ((Component)val5).GetComponent() }; LightIntensityCurve val6 = ((Component)val5).gameObject.AddComponent(); val6.timeMax = 0.4f; val6.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); x.Result.AddComponent().duration = 0.7f; AddNewEffectDef(x.Result, "Play_FalseSon_MeridianWill_Lightning_Initial"); } internal void b__13_6(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) EffectComponent val = x.Result.AddComponent(); val.positionAtReferencedTransform = true; val.parentToReferencedTransform = false; VFXAttributes val2 = x.Result.AddComponent(); val2.vfxPriority = (VFXPriority)2; val2.vfxIntensity = (VFXIntensity)1; val2.DoNotPool = false; x.Result.AddComponent(); x.Result.AddComponent().duration = 0.7f; ((Renderer)((Component)x.Result.transform.Find("SuperconductSphere")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_EliteIce.matAffixWhiteSphereIndicator_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("SuperconductMist")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Chef.matChefSecondaryFrostVFX_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("SuperconductSnowflakes")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Chef.matChefSecondarySnowflakeVFX_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); AddNewEffectDef(x.Result, "Play_freezeDrone_impact"); } internal void b__13_7(AsyncOperationHandle x) { //IL_0010: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown VFXAttributes val = x.Result.AddComponent(); val.vfxPriority = (VFXPriority)1; val.vfxIntensity = (VFXIntensity)0; val.DoNotPool = false; Transform child = x.Result.transform.GetChild(0); ((Renderer)((Component)child).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Chef.matChefSecondaryFrostVFX_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); DestroyOnTimer val2 = x.Result.AddComponent(); val2.duration = 0.6f; TemporaryVisualEffect val3 = x.Result.AddComponent(); val3.exitComponents = (MonoBehaviour[])(object)new MonoBehaviour[1] { (MonoBehaviour)val2 }; val3.visualTransform = child; GameObject result = x.Result; object obj = <>9__13_27; if (obj == null) { EffectCondition val4 = (CharacterBody body) => body.HasBuff(Buffs.superconductBuff); <>9__13_27 = val4; obj = (object)val4; } TempVisualEffectAPI.AddTemporaryVisualEffect(result, (EffectCondition)obj, false, ""); } internal bool b__13_27(CharacterBody body) { return body.HasBuff(Buffs.superconductBuff); } internal void b__13_10(AsyncOperationHandle x) { ElementalReactionManager.bloomSpawnOrb = PrefabAPI.InstantiateClone(x.Result, "BloomSpawnOrbEffect"); ElementalReactionManager.bloomSpawnOrb.AddComponent(); ElementalReactionManager.bloomSpawnOrb.AddComponent(); Object.Destroy((Object)(object)ElementalReactionManager.bloomSpawnOrb.GetComponent()); Object.Destroy((Object)(object)ElementalReactionManager.bloomSpawnOrb.GetComponent()); AddNewEffectDef(ElementalReactionManager.bloomSpawnOrb); } internal void b__13_11(AsyncOperationHandle x) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass13_3 CS$<>8__locals7 = new <>c__DisplayClass13_3(); x.Result.AddComponent(); CS$<>8__locals7.characterBody = x.Result.AddComponent(); CS$<>8__locals7.characterBody.baseNameToken = "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_BLOOM_OBJECT_NAME"; CS$<>8__locals7.characterBody.bodyFlags = (BodyFlags)260; AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.bloomIcon, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle val8) { CS$<>8__locals7.characterBody.portraitIcon = (Texture)(object)val8.Result.texture; }; HealthComponent val2 = x.Result.AddComponent(); val2.dontShowHealthbar = true; val2.body = CS$<>8__locals7.characterBody; CS$<>8__locals7.characterBody.baseMaxHealth = 1f; CS$<>8__locals7.characterBody.healthComponent = val2; x.Result.AddComponent(); HurtBoxGroup val3 = ((Component)x.Result.transform.GetChild(0)).gameObject.AddComponent(); ModelLocator val4 = x.Result.AddComponent(); val4.modelTransform = ((Component)val3).transform; val4.dontDetatchFromParent = true; val3.mainHurtBox = ((Component)((Component)val3).transform.GetChild(0).GetChild(0).GetChild(0)).gameObject.AddComponent(); val3.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val3.mainHurtBox }; val3.mainHurtBox.healthComponent = val2; val3.mainHurtBox.isBullseye = true; RotateItem val5 = ((Component)((Component)val3).transform.GetChild(0).GetChild(0)).gameObject.AddComponent(); val5.spinSpeed = 80f; ObjectScaleCurve val6 = ((Component)val5).gameObject.AddComponent(); val6.timeMax = 0.2f; val6.overallCurve = AnimationCurve.EaseInOut(0f, 0.3f, 1f, 1f); val6.useOverallCurveOnly = true; ((Renderer)((Component)((Component)val6).transform.Find("BloomStartDistortion")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matDistortionFaded_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); SpecialObjectAttributes val7 = x.Result.AddComponent(); val7.grabbable = true; val7.massOverride = 0f; val7.hullClassification = (HullClassification)0; val7.orientToFloor = true; x.Result.AddComponent(); x.Result.AddComponent(); x.Result.AddComponent(); x.Result.AddComponent().cannotBeDeleted = true; x.Result.AddComponent(); x.Result.AddComponent().deployableSlot = ElementalReactionManager.bloomDeployableSlot; Content.AddProjectilePrefab(x.Result); } internal void b__13_15(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_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) EffectComponent val = x.Result.AddComponent(); val.positionAtReferencedTransform = false; val.parentToReferencedTransform = false; VFXAttributes val2 = x.Result.AddComponent(); val2.vfxPriority = (VFXPriority)2; val2.vfxIntensity = (VFXIntensity)0; val2.DoNotPool = false; OrbEffect val3 = x.Result.AddComponent(); val3.startVelocity1 = new Vector3(-3f, 20f, -3f); val3.startVelocity2 = new Vector3(3f, 25f, 3f); val3.movementCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); AddNewEffectDef(x.Result); } internal void b__13_16(AsyncOperationHandle x) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass13_7 CS$<>8__locals18 = new <>c__DisplayClass13_7(); x.Result.AddComponent(); TeamFilter val = x.Result.AddComponent(); val.defaultTeam = (TeamIndex)1; x.Result.AddComponent().duration = 10f; ProjectileNetworkTransform val2 = x.Result.AddComponent(); val2.interpolationFactor = 2f; val2.positionTransmitInterval = 0.066666f; GravitatePickup val3 = ((Component)x.Result.transform.Find("GravitationController")).gameObject.AddComponent(); val3.rigidbody = x.Result.GetComponent(); val3.maxSpeed = 40f; val3.acceleration = 5f; val3.teamFilter = val; val3.gravitateAtFullHealth = true; Transform child = x.Result.transform.GetChild(0); CS$<>8__locals18.model = ((Component)child.GetChild(0)).gameObject; CS$<>8__locals18.crystallizeRings = CS$<>8__locals18.model.transform.Find("CrystallizeRings"); CS$<>8__locals18.startVFX = CS$<>8__locals18.model.transform.Find("CrystallizeStartGlow"); ((Renderer)((Component)CS$<>8__locals18.startVFX.Find("CrystallizeStartDistortion")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matDistortionFaded_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); AsyncOperationHandle val4 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matOmniRing1Generic_mat), (AsyncReferenceHandleUnloadType)2); val4.Completed += delegate(AsyncOperationHandle val5) { ((Renderer)((Component)CS$<>8__locals18.crystallizeRings).GetComponent()).sharedMaterial = val5.Result; ((Renderer)((Component)CS$<>8__locals18.startVFX.Find("CrystallizeStartRing")).GetComponent()).sharedMaterial = val5.Result; }; ((Renderer)((Component)CS$<>8__locals18.model.transform.Find("CrystallizeRays")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_FalseSonBoss.matLunarGazeFireLaser3_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); CS$<>8__locals18.model.gameObject.AddComponent().spinSpeed = 120f; CrystallizeController crystallizeController = ((Component)x.Result.transform.Find("PickupTrigger")).gameObject.AddComponent(); crystallizeController.teamFilter = val; crystallizeController.baseGameObject = x.Result; crystallizeController.gravitateCollider = ((Component)val3).GetComponent(); crystallizeController.teamRecolorParticle = (ParticleSystem[])(object)new ParticleSystem[2] { ((Component)CS$<>8__locals18.crystallizeRings).GetComponent(), ((Component)CS$<>8__locals18.startVFX.Find("CrystallizeStartRing")).GetComponent() }; x.Result.AddComponent(); val4 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Elites_EliteAurelionite.matEliteAurelioniteAffixDisplay_mat), (AsyncReferenceHandleUnloadType)2); val4.Completed += delegate(AsyncOperationHandle val5) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass13_8 CS$<>8__locals20 = new <>c__DisplayClass13_8 { crystallizeMat = new Material(val5.Result) }; CS$<>8__locals20.crystallizeMat.SetNormal(0.1f); AsyncOperationHandle val6 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampGrandparent_png), (AsyncReferenceHandleUnloadType)2); val6.Completed += delegate(AsyncOperationHandle y) { CS$<>8__locals20.crystallizeMat.SetTexture("_FresnelRamp", y.Result); }; CS$<>8__locals20.crystallizeMat.EnableKeyword("FRESNEL_EMISSION"); CS$<>8__locals20.crystallizeMat.SetFloat("_FresnelBoost", 20f); CS$<>8__locals20.crystallizeMat.SetFloat("_FresnelPower", 1.5f); ((Renderer)CS$<>8__locals18.model.GetComponent()).sharedMaterial = CS$<>8__locals20.crystallizeMat; }; Content.AddNetworkedObjectPrefab(x.Result); } internal void b__13_18(AsyncOperationHandle x) { //IL_002d: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown <>c__DisplayClass13_9 CS$<>8__locals7 = new <>c__DisplayClass13_9 { delusionActiveEffect = PrefabAPI.InstantiateClone(x.Result, "DelusionActiveEffect", false) }; VFXAttributes val = CS$<>8__locals7.delusionActiveEffect.AddComponent(); val.vfxPriority = (VFXPriority)2; val.vfxIntensity = (VFXIntensity)0; val.DoNotPool = false; ParticleSystem component = ((Component)CS$<>8__locals7.delusionActiveEffect.transform.GetChild(0).GetChild(0)).GetComponent(); MainModule main = component.main; ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.3f, 0.35f, 0.4f)); ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0; TemporaryVisualEffect component2 = CS$<>8__locals7.delusionActiveEffect.GetComponent(); DelusionTemporaryVisualEffect delusionTemporaryVisualEffect = CS$<>8__locals7.delusionActiveEffect.AddComponent(); component2.enterComponents = component2.enterComponents.Append((MonoBehaviour)(object)delusionTemporaryVisualEffect).ToArray(); ((Behaviour)delusionTemporaryVisualEffect).enabled = false; AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_title_PostProcessing.ppLocalDoppelganger_asset), (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle y) { PostProcessProfile val4 = Object.Instantiate(y.Result); val4.RemoveSettings(); PostProcessVolume component3 = ((Component)CS$<>8__locals7.delusionActiveEffect.transform.GetChild(1).GetChild(0)).GetComponent(); RuntimeUtilities.DestroyProfile(component3.profile, true); component3.sharedProfile = val4; ((Component)component3).GetComponent().ppWeightCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 0.5f); CS$<>8__locals7.delusionActiveEffect.GetComponent().ppWeightCurve = AnimationCurve.EaseInOut(0f, 0.5f, 1f, 0f); }; GameObject obj = CS$<>8__locals7.delusionActiveEffect; object obj2 = <>9__13_37; if (obj2 == null) { EffectCondition val3 = (CharacterBody body) => body.HasBuff(Buffs.delusionActiveBuff); <>9__13_37 = val3; obj2 = (object)val3; } TempVisualEffectAPI.AddTemporaryVisualEffect(obj, (EffectCondition)obj2, false, ""); } internal bool b__13_37(CharacterBody body) { return body.HasBuff(Buffs.delusionActiveBuff); } internal void b__13_22(AsyncOperationHandle x) { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_0127: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Grandparent.matGrandParentSunCore_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_Common_ColorRamps.texRampConstructLaserTypeB_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val.SetFloat("_Boost", 1.5f); val.SetFloat("_AlphaBoost", 7f); val.SetFloat("_AlphaBias", 0.5f); val.SetFloat("_FresnelPower", -1f); Material val2 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Items_ExtraStatsOnLevelUp.matBeadsEnlightenGlow_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val2.SetColor("_TintColor", new Color(1f, 0.5f, 0.3f)); val2.SetTextureScale("_MainTex", new Vector2(1f, 0.5f)); val2.SetTextureOffset("_MainTex", new Vector2(0f, 0.5f)); val2.SetTextureScale("_Cloud2Tex", new Vector2(5f, -0.6f)); val2.SetTextureOffset("_Cloud2Tex", new Vector2(0f, 0.6f)); val2.SetFloat("_Boost", 1f); val2.SetFloat("_AlphaBoost", 0.5f); val2.SetFloat("_FresnelPower", 0f); LunarCrystallizeController lunarCrystallizeController = x.Result.AddComponent(); lunarCrystallizeController.moondrift1 = ((Component)x.Result.transform.GetChild(0).GetChild(0)).gameObject; CreateMoondrift(lunarCrystallizeController.moondrift1, val, val2); lunarCrystallizeController.moondrift2 = ((Component)x.Result.transform.GetChild(1).GetChild(0)).gameObject; CreateMoondrift(lunarCrystallizeController.moondrift2, val, val2); lunarCrystallizeController.moondrift3 = ((Component)x.Result.transform.GetChild(2).GetChild(0)).gameObject; CreateMoondrift(lunarCrystallizeController.moondrift3, val, val2); } } [CompilerGenerated] private sealed class <>c__DisplayClass13_1 { public ParticleSystemRenderer ringParticleRenderer; internal void b__26(AsyncOperationHandle y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //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) Material val = new Material(y.Result); val.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampTeslaCoil_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); ((Renderer)ringParticleRenderer).sharedMaterial = val; } } [CompilerGenerated] private sealed class <>c__DisplayClass13_3 { public CharacterBody characterBody; internal void b__29(AsyncOperationHandle x) { characterBody.portraitIcon = (Texture)(object)x.Result.texture; } } [CompilerGenerated] private sealed class <>c__DisplayClass13_7 { public Transform crystallizeRings; public Transform startVFX; public GameObject model; internal void b__33(AsyncOperationHandle x) { ((Renderer)((Component)crystallizeRings).GetComponent()).sharedMaterial = x.Result; ((Renderer)((Component)startVFX.Find("CrystallizeStartRing")).GetComponent()).sharedMaterial = x.Result; } internal void b__34(AsyncOperationHandle x) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass13_8 CS$<>8__locals6 = new <>c__DisplayClass13_8 { crystallizeMat = new Material(x.Result) }; CS$<>8__locals6.crystallizeMat.SetNormal(0.1f); AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampGrandparent_png), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle y) { CS$<>8__locals6.crystallizeMat.SetTexture("_FresnelRamp", y.Result); }; CS$<>8__locals6.crystallizeMat.EnableKeyword("FRESNEL_EMISSION"); CS$<>8__locals6.crystallizeMat.SetFloat("_FresnelBoost", 20f); CS$<>8__locals6.crystallizeMat.SetFloat("_FresnelPower", 1.5f); ((Renderer)model.GetComponent()).sharedMaterial = CS$<>8__locals6.crystallizeMat; } } [CompilerGenerated] private sealed class <>c__DisplayClass13_8 { public Material crystallizeMat; internal void b__35(AsyncOperationHandle y) { crystallizeMat.SetTexture("_FresnelRamp", y.Result); } } [CompilerGenerated] private sealed class <>c__DisplayClass13_9 { public GameObject delusionActiveEffect; internal void b__36(AsyncOperationHandle y) { PostProcessProfile val = Object.Instantiate(y.Result); val.RemoveSettings(); PostProcessVolume component = ((Component)delusionActiveEffect.transform.GetChild(1).GetChild(0)).GetComponent(); RuntimeUtilities.DestroyProfile(component.profile, true); component.sharedProfile = val; ((Component)component).GetComponent().ppWeightCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 0.5f); delusionActiveEffect.GetComponent().ppWeightCurve = AnimationCurve.EaseInOut(0f, 0.5f, 1f, 0f); } } public static ExpansionDef elementalReactionExpansionDef; public static GameObject elementalReactionManagerPrefab; public static GameObject elementLoadoutRowUI; public static Material visionMaterial; public static Material electroTrailMaterial; public static Material darkElectricTrailMaterial; public static Material dendroElectricTrailMaterial; public static Material genericElementEffectMaterial; public static string AddressablesDirectory { get; private set; } internal static void LoadAddressables() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) AddressablesDirectory = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)ElementalReactionsPlugin.instance).Info.Location), "Addressables"); Addressables.LoadContentCatalogAsync(Path.Combine(AddressablesDirectory, "catalog.json"), (string)null).WaitForCompletion(); } public static void Initialize() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: 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_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Expected O, but got Unknown //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Expected O, but got Unknown //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_074f: Unknown result type (might be due to invalid IL or missing references) //IL_0783: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_079b: Expected O, but got Unknown //IL_07ac: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07db: Unknown result type (might be due to invalid IL or missing references) //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_0853: Unknown result type (might be due to invalid IL or missing references) //IL_086d: Unknown result type (might be due to invalid IL or missing references) //IL_0872: Unknown result type (might be due to invalid IL or missing references) //IL_087b: Unknown result type (might be due to invalid IL or missing references) //IL_0885: Expected O, but got Unknown //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_08e8: Unknown result type (might be due to invalid IL or missing references) //IL_0901: Unknown result type (might be due to invalid IL or missing references) //IL_0906: Unknown result type (might be due to invalid IL or missing references) //IL_090f: Unknown result type (might be due to invalid IL or missing references) //IL_0919: Expected O, but got Unknown //IL_0944: Unknown result type (might be due to invalid IL or missing references) //IL_0960: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_098a: Unknown result type (might be due to invalid IL or missing references) //IL_098f: Unknown result type (might be due to invalid IL or missing references) //IL_09dc: Unknown result type (might be due to invalid IL or missing references) //IL_09e1: Unknown result type (might be due to invalid IL or missing references) //IL_09f6: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Unknown result type (might be due to invalid IL or missing references) //IL_0a55: Unknown result type (might be due to invalid IL or missing references) //IL_0a5a: Unknown result type (might be due to invalid IL or missing references) //IL_0a75: Unknown result type (might be due to invalid IL or missing references) //IL_0a7a: Unknown result type (might be due to invalid IL or missing references) //IL_0aa8: Unknown result type (might be due to invalid IL or missing references) //IL_0aad: Unknown result type (might be due to invalid IL or missing references) LoadAddressables(); elementalReactionManagerPrefab = PrefabAPI.CreateEmptyPrefab("ElementalReactionManager"); elementalReactionManagerPrefab.AddComponent(); AddAkBank(elementalReactionManagerPrefab, RoR2_DLC2_FalseSon.FalseSonBody_prefab); AddAkBank(elementalReactionManagerPrefab, RoR2_Base_Bandit2.Bandit2Body_prefab); AddAkBank(elementalReactionManagerPrefab, RoR2_DLC2_Seeker.SeekerBody_prefab); elementalReactionExpansionDef = ScriptableObject.CreateInstance(); ((Object)elementalReactionExpansionDef).name = "ElementalReactionExpansionDef"; elementalReactionExpansionDef.nameToken = "DS_GAMING_ELEMENTAL_REACTIONS_EXPANSION_NAME"; elementalReactionExpansionDef.descriptionToken = "DS_GAMING_ELEMENTAL_REACTIONS_EXPANSION_DESCRIPTION"; elementalReactionExpansionDef.iconSprite = Addressables.LoadAssetAsync((object)AssetReferences.expansionIcon).WaitForCompletion(); elementalReactionExpansionDef.disabledIconSprite = Addressables.LoadAssetAsync((object)RoR2_Base_Common_MiscIcons.texUnlockIcon_png).WaitForCompletion(); elementalReactionExpansionDef.runBehaviorPrefab = elementalReactionManagerPrefab; elementalReactionExpansionDef.requiredEntitlement = null; Content.AddExpansionDef(elementalReactionExpansionDef); elementalReactionManagerPrefab.AddComponent().requiredExpansion = elementalReactionExpansionDef; CreateGenericElementEffectMaterial(); AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.genericElementActivatedEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0032: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = true; val3.applyScale = true; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)1; val4.vfxIntensity = (VFXIntensity)0; val4.DoNotPool = false; x.Result.AddComponent(); GenericElementEffectComponent genericElementEffectComponent = x.Result.AddComponent(); ParticleSystem component = ((Component)x.Result.transform.GetChild(0)).GetComponent(); ParticleSystem component2 = ((Component)x.Result.transform.GetChild(1)).GetComponent(); ParticleSystem component3 = ((Component)x.Result.transform.GetChild(2)).GetComponent(); genericElementEffectComponent.icon = ((Component)x.Result.transform.GetChild(0)).GetComponent(); genericElementEffectComponent.particlesToRecolor = (ParticleSystem[])(object)new ParticleSystem[3] { component, component2, component3 }; x.Result.AddComponent().trackedParticleSystem = component; ScaleParticleSystemDuration val5 = x.Result.AddComponent(); val5.initialDuration = 0.7f; val5.particleSystems = (ParticleSystem[])(object)new ParticleSystem[3] { component, component2, component3 }; genericElementEffectComponent.particleDuration = val5; ((Renderer)((Component)x.Result.transform.GetChild(1)).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_FalseSonBoss.matLunarGazeFireLaser3_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); x.Result.AddComponent(); AddNewEffectDef(x.Result); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.genericElementOrbEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_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_00aa: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = false; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)1; val4.vfxIntensity = (VFXIntensity)0; val4.DoNotPool = false; OrbEffect val5 = x.Result.AddComponent(); val5.startVelocity1 = new Vector3(-30f, -7f, -30f); val5.startVelocity2 = new Vector3(30f, 7f, 30f); val5.movementCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); val5.endEffect = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Treebot.OmniImpactVFXSlashSyringe_prefab), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); x.Result.AddComponent(); ParticleSystem component = ((Component)x.Result.transform.GetChild(0)).GetComponent(); ((Renderer)((Component)component).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matWideGlow_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); GenericElementEffectComponent genericElementEffectComponent = x.Result.AddComponent(); genericElementEffectComponent.trailsToRecolor = (TrailRenderer[])(object)new TrailRenderer[1] { ((Component)x.Result.transform.GetChild(1)).GetComponent() }; genericElementEffectComponent.particlesToRecolor = (ParticleSystem[])(object)new ParticleSystem[2] { component, ((Component)x.Result.transform.GetChild(2)).GetComponent() }; AddNewEffectDef(x.Result); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.elementEnvironmentScreenEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) Mesh sharedMesh = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.mdlVFXDonut1_fbx_donut1Mesh_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Material val3 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_Common_VFX.matOmniHitspark1GenericAdditive_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); Texture val4 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX_ParticleMasks.texGlowPaintMask_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); val3.SetTexture("_MainTex", val4); val3.SetTextureOffset("_MainTex", new Vector2(0.1f, 0.1f)); val3.SetColor("_TintColor", Color.white); val3.SetTexture("_Cloud1Tex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Nullifier.texNullifierSkySparse_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val3.SetTextureScale("_Cloud1Tex", new Vector2(6f, 0.7f)); val3.SetVector("_CutoffScroll", new Vector4(0f, 2f, 0f, 0f)); val3.SetInt("_ZTest", 0); val3.EnableKeyword("USE_CLOUDS"); val3.SetFloat("_Boost", 2f); Material val5 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Items_SpeedBoostPickup.matSpeedBoostPickupTraill_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val5.SetTexture("_MainTex", val4); val5.SetTextureScale("_MainTex", new Vector2(1f, 1f)); val5.SetTextureOffset("_MainTex", new Vector2(0.25f, 0f)); val5.SetColor("_TintColor", Color.white); val5.SetTexture("_Cloud1Tex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Items_SpeedBoostPickup.texNegateAttackTrail_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val5.SetTextureScale("_Cloud1Tex", new Vector2(2f, 4f)); val5.SetVector("_CutoffScroll", new Vector4(5f, 10f, -20f, 4f)); val5.SetInt("_ZTest", 0); val5.SetFloat("_AlphaBoost", 0.09f); val5.DisableKeyword("DISABLEREMAP"); Transform child = x.Result.transform.GetChild(0); Transform child2 = x.Result.transform.GetChild(1); ElementalEnvironmentScreenEffect elementalEnvironmentScreenEffect = x.Result.AddComponent(); elementalEnvironmentScreenEffect.halfL = ((Component)child).GetComponent(); elementalEnvironmentScreenEffect.halfR = ((Component)child2).GetComponent(); ((Renderer)elementalEnvironmentScreenEffect.halfL).sharedMaterials = (Material[])(object)new Material[2] { val3, val5 }; ((Component)child).GetComponent().sharedMesh = sharedMesh; ((Renderer)elementalEnvironmentScreenEffect.halfR).sharedMaterials = (Material[])(object)new Material[2] { val3, val5 }; ((Component)child2).GetComponent().sharedMesh = sharedMesh; }; Mesh ringMesh = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.mdlVFXDonut2_fbx_donut2Mesh_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); electroTrailMaterial = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_FalseSonBoss.matPrimeDevastatorChargeVFX2_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); electroTrailMaterial.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampTeslaCoil_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); electroTrailMaterial.SetFloat("_Boost", 2f); darkElectricTrailMaterial = new Material(electroTrailMaterial); darkElectricTrailMaterial.SetColor("_TintColor", Color.black); darkElectricTrailMaterial.SetInt("_DstBlend", 10); Texture dendroRampTex = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampOrbitalLaser_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); dendroElectricTrailMaterial = new Material(electroTrailMaterial); dendroElectricTrailMaterial.SetTexture("_RemapTex", dendroRampTex); dendroElectricTrailMaterial.SetColor("_TintColor", new Color(0.5f, 1f, 0f)); dendroElectricTrailMaterial.SetFloat("_Boost", 4f); Material dendroLeafMat = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Seeker.matSeekerLotus_mat_bfd003ca), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); dendroLeafMat.SetColor("_TintColor", Color.white); Material bloomCoreExplosionMat = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matOmniRing1Generic_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); bloomCoreExplosionMat.SetTexture("_MainTex", AssetAsyncReferenceManager.LoadAsset(AssetReferences.bloomTransparent, (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); bloomCoreExplosionMat.SetTexture("_RemapTex", dendroRampTex); bloomCoreExplosionMat.SetFloat("_AlphaBoost", 1f); bloomCoreExplosionMat.SetFloat("_Boost", 1f); bloomCoreExplosionMat.SetInt("_SrcBlend", 5); bloomCoreExplosionMat.SetInt("_DstBlend", 1); Material genericRingMat = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_BFG.matBeamSphereBeam_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); genericRingMat.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampTwotoneEnvironment_jpg), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); genericRingMat.SetFloat("_AlphaBoost", 3f); genericRingMat.EnableKeyword("VERTEXCOLOR"); genericRingMat.SetVector("_CutoffScroll", new Vector4(25f, 0f, -10f, 0f)); val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.electroChargeTempVisualEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0010: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown VFXAttributes val3 = x.Result.AddComponent(); val3.vfxPriority = (VFXPriority)1; val3.vfxIntensity = (VFXIntensity)0; val3.DoNotPool = false; Transform child = x.Result.transform.GetChild(0); ((Component)child).GetComponent().trailMaterial = electroTrailMaterial; ((Component)child.GetChild(0)).GetComponent().trailMaterial = darkElectricTrailMaterial; DestroyOnTimer val4 = x.Result.AddComponent(); val4.duration = 0.25f; TemporaryVisualEffect val5 = x.Result.AddComponent(); val5.exitComponents = (MonoBehaviour[])(object)new MonoBehaviour[1] { (MonoBehaviour)val4 }; val5.visualTransform = child; GameObject result = x.Result; object obj = <>c.<>9__13_24; if (obj == null) { EffectCondition val6 = (CharacterBody body) => body.HasBuff(Buffs.electroChargeBuff); <>c.<>9__13_24 = val6; obj = (object)val6; } TempVisualEffectAPI.AddTemporaryVisualEffect(result, (EffectCondition)obj, false, ""); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.quickenTempVisualEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0010: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown VFXAttributes val3 = x.Result.AddComponent(); val3.vfxPriority = (VFXPriority)1; val3.vfxIntensity = (VFXIntensity)0; val3.DoNotPool = false; Transform child = x.Result.transform.GetChild(0); ((Component)child).GetComponent().trailMaterial = dendroElectricTrailMaterial; ((Component)child.GetChild(0)).GetComponent().trailMaterial = darkElectricTrailMaterial; DestroyOnTimer val4 = x.Result.AddComponent(); val4.duration = 0.25f; TemporaryVisualEffect val5 = x.Result.AddComponent(); val5.exitComponents = (MonoBehaviour[])(object)new MonoBehaviour[1] { (MonoBehaviour)val4 }; val5.visualTransform = child; GameObject result = x.Result; object obj = <>c.<>9__13_25; if (obj == null) { EffectCondition val6 = (CharacterBody body) => body.HasBuff(Buffs.quickenBuff); <>c.<>9__13_25 = val6; obj = (object)val6; } TempVisualEffectAPI.AddTemporaryVisualEffect(result, (EffectCondition)obj, false, ""); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.overloadEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)1; val4.DoNotPool = false; ShakeEmitter val5 = x.Result.AddComponent(); val5.amplitudeTimeDecay = true; val5.duration = 0.2f; val5.radius = 45f; val5.scaleShakeRadiusWithLocalScale = false; val5.wave = new Wave { amplitude = 0.7f, frequency = 30f, cycleOffset = 0f }; x.Result.AddComponent(); ParticleSystemRenderer ringParticleRenderer = ((Component)x.Result.transform.Find("OverloadRing")).GetComponent(); ringParticleRenderer.mesh = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.mdlVFXDonut1_fbx_donut1Mesh_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); AsyncOperationHandle val6 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC3_SolusAmalgamator.matSolusAmalgamatorTrackingBombRing_mat), (AsyncReferenceHandleUnloadType)2); val6.Completed += delegate(AsyncOperationHandle y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //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) Material val9 = new Material(y.Result); val9.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampTeslaCoil_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); ((Renderer)ringParticleRenderer).sharedMaterial = val9; }; Material sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matTracerBright_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("OverloadSmallFlash")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("OverloadFlash")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("OverloadSparks")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("OverloadDistortion")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matDistortionFaded_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Component)x.Result.transform.Find("OverloadElectricity")).GetComponent().trailMaterial = electroTrailMaterial; ((Component)x.Result.transform.Find("OverloadElectricityDark")).GetComponent().trailMaterial = darkElectricTrailMaterial; ((Renderer)((Component)x.Result.transform.Find("OverloadFire")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Gravekeeper.matOmniExplosion1ArchWisp_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Transform val7 = x.Result.transform.Find("OverloadLight"); val4.optionalLights = (Light[])(object)new Light[1] { ((Component)val7).GetComponent() }; LightIntensityCurve val8 = ((Component)val7).gameObject.AddComponent(); val8.timeMax = 0.4f; val8.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); x.Result.AddComponent().duration = 0.7f; AddNewEffectDef(x.Result, "Play_FalseSon_MeridianWill_Lightning_Initial"); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.superconductEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)1; val4.DoNotPool = false; x.Result.AddComponent(); x.Result.AddComponent().duration = 0.7f; ((Renderer)((Component)x.Result.transform.Find("SuperconductSphere")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_EliteIce.matAffixWhiteSphereIndicator_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("SuperconductMist")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Chef.matChefSecondaryFrostVFX_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("SuperconductSnowflakes")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Chef.matChefSecondarySnowflakeVFX_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); AddNewEffectDef(x.Result, "Play_freezeDrone_impact"); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.superconductTempVisualEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0010: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown VFXAttributes val3 = x.Result.AddComponent(); val3.vfxPriority = (VFXPriority)1; val3.vfxIntensity = (VFXIntensity)0; val3.DoNotPool = false; Transform child = x.Result.transform.GetChild(0); ((Renderer)((Component)child).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Chef.matChefSecondaryFrostVFX_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); DestroyOnTimer val4 = x.Result.AddComponent(); val4.duration = 0.6f; TemporaryVisualEffect val5 = x.Result.AddComponent(); val5.exitComponents = (MonoBehaviour[])(object)new MonoBehaviour[1] { (MonoBehaviour)val4 }; val5.visualTransform = child; GameObject result = x.Result; object obj = <>c.<>9__13_27; if (obj == null) { EffectCondition val6 = (CharacterBody body) => body.HasBuff(Buffs.superconductBuff); <>c.<>9__13_27 = val6; obj = (object)val6; } TempVisualEffectAPI.AddTemporaryVisualEffect(result, (EffectCondition)obj, false, ""); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.swirlEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)0; val4.DoNotPool = false; x.Result.AddComponent(); GenericElementEffectComponent genericElementEffectComponent = x.Result.AddComponent(); ParticleSystemRenderer component = ((Component)x.Result.transform.GetChild(0)).GetComponent(); genericElementEffectComponent.particlesToRecolor = (ParticleSystem[])(object)new ParticleSystem[1] { ((Component)component).GetComponent() }; component.mesh = ringMesh; ((Renderer)component).sharedMaterial = genericRingMat; x.Result.AddComponent().duration = 0.4f; AddNewEffectDef(x.Result, "Play_bandit2_shift_exit"); }; AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(AssetReferences.bloomMaterial, (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle x) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) x.Result.SetHopooMaterial(); AsyncOperationHandle val3 = AssetAsyncReferenceManager.LoadAsset(AssetReferences.bloomFresnelMask, (AsyncReferenceHandleUnloadType)2); val3.Completed += delegate(AsyncOperationHandle y) { x.Result.SetTexture("_FresnelMask", y.Result); }; x.Result.SetTexture("_FresnelRamp", dendroRampTex); x.Result.EnableKeyword("FRESNEL_EMISSION"); x.Result.SetFloat("_FresnelBoost", 7f); x.Result.SetFloat("_FresnelPower", 1.6f); x.Result.SetEmission(0.25f); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.HealthOrbEffect_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { ElementalReactionManager.bloomSpawnOrb = PrefabAPI.InstantiateClone(x.Result, "BloomSpawnOrbEffect"); ElementalReactionManager.bloomSpawnOrb.AddComponent(); ElementalReactionManager.bloomSpawnOrb.AddComponent(); Object.Destroy((Object)(object)ElementalReactionManager.bloomSpawnOrb.GetComponent()); Object.Destroy((Object)(object)ElementalReactionManager.bloomSpawnOrb.GetComponent()); AddNewEffectDef(ElementalReactionManager.bloomSpawnOrb); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.bloomObject, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) x.Result.AddComponent(); CharacterBody characterBody = x.Result.AddComponent(); characterBody.baseNameToken = "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_BLOOM_OBJECT_NAME"; characterBody.bodyFlags = (BodyFlags)260; AsyncOperationHandle val3 = AssetAsyncReferenceManager.LoadAsset(AssetReferences.bloomIcon, (AsyncReferenceHandleUnloadType)2); val3.Completed += delegate(AsyncOperationHandle val10) { characterBody.portraitIcon = (Texture)(object)val10.Result.texture; }; HealthComponent val4 = x.Result.AddComponent(); val4.dontShowHealthbar = true; val4.body = characterBody; characterBody.baseMaxHealth = 1f; characterBody.healthComponent = val4; x.Result.AddComponent(); HurtBoxGroup val5 = ((Component)x.Result.transform.GetChild(0)).gameObject.AddComponent(); ModelLocator val6 = x.Result.AddComponent(); val6.modelTransform = ((Component)val5).transform; val6.dontDetatchFromParent = true; val5.mainHurtBox = ((Component)((Component)val5).transform.GetChild(0).GetChild(0).GetChild(0)).gameObject.AddComponent(); val5.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val5.mainHurtBox }; val5.mainHurtBox.healthComponent = val4; val5.mainHurtBox.isBullseye = true; RotateItem val7 = ((Component)((Component)val5).transform.GetChild(0).GetChild(0)).gameObject.AddComponent(); val7.spinSpeed = 80f; ObjectScaleCurve val8 = ((Component)val7).gameObject.AddComponent(); val8.timeMax = 0.2f; val8.overallCurve = AnimationCurve.EaseInOut(0f, 0.3f, 1f, 1f); val8.useOverallCurveOnly = true; ((Renderer)((Component)((Component)val8).transform.Find("BloomStartDistortion")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matDistortionFaded_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); SpecialObjectAttributes val9 = x.Result.AddComponent(); val9.grabbable = true; val9.massOverride = 0f; val9.hullClassification = (HullClassification)0; val9.orientToFloor = true; x.Result.AddComponent(); x.Result.AddComponent(); x.Result.AddComponent(); x.Result.AddComponent().cannotBeDeleted = true; x.Result.AddComponent(); x.Result.AddComponent().deployableSlot = ElementalReactionManager.bloomDeployableSlot; Content.AddProjectilePrefab(x.Result); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.bloomExplosion, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0092: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)1; val4.DoNotPool = false; ShakeEmitter val5 = x.Result.AddComponent(); val5.amplitudeTimeDecay = true; val5.duration = 0.2f; val5.radius = 55f; val5.scaleShakeRadiusWithLocalScale = false; val5.wave = new Wave { amplitude = 0.35f, frequency = 30f, cycleOffset = 0f }; x.Result.AddComponent(); ParticleSystemRenderer component = ((Component)x.Result.transform.Find("BloomRing")).GetComponent(); component.mesh = ringMesh; Material val6 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_BFG.matBeamSphereBeam_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val6.SetTexture("_RemapTex", dendroRampTex); val6.SetVector("_CutoffScroll", new Vector4(40f, 0f, -20f, 0f)); ((Renderer)component).sharedMaterial = val6; AsyncOperationHandle val7 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_EliteEarth.matAffixEarthSphereIndicator_mat), (AsyncReferenceHandleUnloadType)2); val7.Completed += delegate(AsyncOperationHandle y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown Material val10 = new Material(y.Result); val10.SetTexture("_RemapTex", dendroRampTex); val10.SetFloat("_SrcBlendFloat", 1f); val10.SetFloat("_DstBlendFloat", 1f); ((Renderer)((Component)x.Result.transform.Find("BloomSphere")).GetComponent()).sharedMaterial = val10; }; ((Renderer)((Component)x.Result.transform.Find("BloomExplosionCore")).GetComponent()).sharedMaterial = bloomCoreExplosionMat; Material sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matTracerBright_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("BloomSparks")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("BloomPetals")).GetComponent()).sharedMaterial = dendroLeafMat; Transform val8 = x.Result.transform.Find("Light"); val4.optionalLights = (Light[])(object)new Light[1] { ((Component)val8).GetComponent() }; LightIntensityCurve val9 = ((Component)val8).gameObject.AddComponent(); val9.timeMax = 0.3f; val9.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); x.Result.AddComponent().duration = 1f; AddNewEffectDef(x.Result, "Play_seeker_skill1_impact"); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.burgeonExplosion, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)1; val4.DoNotPool = false; ShakeEmitter val5 = x.Result.AddComponent(); val5.amplitudeTimeDecay = true; val5.duration = 0.25f; val5.radius = 55f; val5.scaleShakeRadiusWithLocalScale = false; val5.wave = new Wave { amplitude = 0.55f, frequency = 30f, cycleOffset = 0f }; x.Result.AddComponent(); Texture burgeonRamp = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampWilloWispExplosion2_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ParticleSystemRenderer component = ((Component)x.Result.transform.Find("BloomRing")).GetComponent(); component.mesh = ringMesh; Material val6 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_BFG.matBeamSphereBeam_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val6.SetTexture("_RemapTex", burgeonRamp); val6.SetInt("_SrcBlend", 5); val6.SetVector("_CutoffScroll", new Vector4(55f, 0f, -25f, 0f)); ((Renderer)component).sharedMaterial = val6; AsyncOperationHandle val7 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_BurnNearby.matHelfireRangeIndicator_mat), (AsyncReferenceHandleUnloadType)2); val7.Completed += delegate(AsyncOperationHandle y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown Material val11 = new Material(y.Result); val11.SetTexture("_RemapTex", burgeonRamp); val11.SetFloat("_SrcBlendFloat", 5f); val11.SetFloat("_DstBlendFloat", 1f); ((Renderer)((Component)x.Result.transform.Find("BloomSphere")).GetComponent()).sharedMaterial = val11; }; Material val8 = new Material(bloomCoreExplosionMat); val8.SetTexture("_RemapTex", burgeonRamp); ((Renderer)((Component)x.Result.transform.Find("BloomExplosionCore")).GetComponent()).sharedMaterial = val8; Material sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matTracerBright_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("BloomSparks")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("BloomPetals")).GetComponent()).sharedMaterial = dendroLeafMat; Transform val9 = x.Result.transform.Find("Light"); val4.optionalLights = (Light[])(object)new Light[1] { ((Component)val9).GetComponent() }; LightIntensityCurve val10 = ((Component)val9).gameObject.AddComponent(); val10.timeMax = 0.35f; val10.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); x.Result.AddComponent().duration = 1f; AddNewEffectDef(x.Result, "Play_seeker_skill1_impact"); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.hyperbloomOrb, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = false; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)0; val4.DoNotPool = false; OrbEffect val5 = x.Result.AddComponent(); val5.startVelocity1 = new Vector3(-3f, 20f, -3f); val5.startVelocity2 = new Vector3(3f, 25f, 3f); val5.movementCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); val5.endEffect = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Treebot.OmniImpactVFXSlashSyringe_prefab), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); val5.endEffectScale = 1.5f; x.Result.AddComponent(); Transform val6 = x.Result.transform.Find("HyperbloomOrbCoreBillboard"); ((Renderer)((Component)val6).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matTracerBright_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Component)val6).gameObject.AddComponent(); Transform val7 = x.Result.transform.Find("HyperbloomOrbCoreLeafContainer"); RotateAroundAxis val8 = ((Component)val7).gameObject.AddComponent(); val8.relativeTo = (Space)1; val8.rotateAroundAxis = (RotationAxis)2; val8.fastRotationSpeed = 240f; val8.speed = (Speed)2; Material val9 = new Material(dendroLeafMat); val9.SetColor("_TintColor", new Color(0.1f, 0.6f, 0f)); ((Renderer)((Component)val7.GetChild(0).GetChild(0)).GetComponent()).sharedMaterial = val9; ((Renderer)((Component)val7.GetChild(1).GetChild(0)).GetComponent()).sharedMaterial = val9; ((Renderer)((Component)val7.GetChild(2).GetChild(0)).GetComponent()).sharedMaterial = val9; AsyncOperationHandle val10 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_EliteEarth.matAffixEarthTrailBloblets_mat), (AsyncReferenceHandleUnloadType)2); val10.Completed += delegate(AsyncOperationHandle y) { ((Renderer)((Component)x.Result.transform.Find("HyperbloomOrbTrailOuter")).GetComponent()).sharedMaterial = y.Result; }; AddNewEffectDef(x.Result); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.crystallizeSpawnOrbEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_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) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = false; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)0; val4.DoNotPool = false; OrbEffect val5 = x.Result.AddComponent(); val5.startVelocity1 = new Vector3(-3f, 20f, -3f); val5.startVelocity2 = new Vector3(3f, 25f, 3f); val5.movementCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); AddNewEffectDef(x.Result); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.crystallizePickup, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) x.Result.AddComponent(); TeamFilter val3 = x.Result.AddComponent(); val3.defaultTeam = (TeamIndex)1; x.Result.AddComponent().duration = 10f; ProjectileNetworkTransform val4 = x.Result.AddComponent(); val4.interpolationFactor = 2f; val4.positionTransmitInterval = 0.066666f; GravitatePickup val5 = ((Component)x.Result.transform.Find("GravitationController")).gameObject.AddComponent(); val5.rigidbody = x.Result.GetComponent(); val5.maxSpeed = 40f; val5.acceleration = 5f; val5.teamFilter = val3; val5.gravitateAtFullHealth = true; Transform child = x.Result.transform.GetChild(0); GameObject model = ((Component)child.GetChild(0)).gameObject; Transform crystallizeRings = model.transform.Find("CrystallizeRings"); Transform startVFX = model.transform.Find("CrystallizeStartGlow"); ((Renderer)((Component)startVFX.Find("CrystallizeStartDistortion")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matDistortionFaded_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); AsyncOperationHandle val6 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matOmniRing1Generic_mat), (AsyncReferenceHandleUnloadType)2); val6.Completed += delegate(AsyncOperationHandle val7) { ((Renderer)((Component)crystallizeRings).GetComponent()).sharedMaterial = val7.Result; ((Renderer)((Component)startVFX.Find("CrystallizeStartRing")).GetComponent()).sharedMaterial = val7.Result; }; ((Renderer)((Component)model.transform.Find("CrystallizeRays")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_FalseSonBoss.matLunarGazeFireLaser3_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); model.gameObject.AddComponent().spinSpeed = 120f; CrystallizeController crystallizeController = ((Component)x.Result.transform.Find("PickupTrigger")).gameObject.AddComponent(); crystallizeController.teamFilter = val3; crystallizeController.baseGameObject = x.Result; crystallizeController.gravitateCollider = ((Component)val5).GetComponent(); crystallizeController.teamRecolorParticle = (ParticleSystem[])(object)new ParticleSystem[2] { ((Component)crystallizeRings).GetComponent(), ((Component)startVFX.Find("CrystallizeStartRing")).GetComponent() }; x.Result.AddComponent(); val6 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Elites_EliteAurelionite.matEliteAurelioniteAffixDisplay_mat), (AsyncReferenceHandleUnloadType)2); val6.Completed += delegate(AsyncOperationHandle val7) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) Material crystallizeMat = new Material(val7.Result); crystallizeMat.SetNormal(0.1f); AsyncOperationHandle val8 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampGrandparent_png), (AsyncReferenceHandleUnloadType)2); val8.Completed += delegate(AsyncOperationHandle y) { crystallizeMat.SetTexture("_FresnelRamp", y.Result); }; crystallizeMat.EnableKeyword("FRESNEL_EMISSION"); crystallizeMat.SetFloat("_FresnelBoost", 20f); crystallizeMat.SetFloat("_FresnelPower", 1.5f); ((Renderer)model.GetComponent()).sharedMaterial = crystallizeMat; }; Content.AddNetworkedObjectPrefab(x.Result); }; visionMaterial = AssetAsyncReferenceManager.LoadAsset(AssetReferences.visionHolderMaterial, (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); visionMaterial.SetHopooMaterial().Specular(0.4f, 3f, ignoreAlpha: false); visionMaterial.SetNormal(1.3f); visionMaterial.SetFloat("_RampInfo", 1f); val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.delusionHitEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Expected O, but got Unknown EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)1; val4.DoNotPool = false; ShakeEmitter val5 = x.Result.AddComponent(); val5.amplitudeTimeDecay = true; val5.duration = 0.25f; val5.radius = 75f; val5.scaleShakeRadiusWithLocalScale = false; val5.wave = new Wave { amplitude = 0.2f, frequency = 10f, cycleOffset = 0f }; x.Result.AddComponent(); Texture val6 = AssetAsyncReferenceManager.LoadAsset(AssetReferences.delusionRamp, (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Material val7 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matOmniHitspark3Generic_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val7.SetTexture("_RemapTex", val6); val7.SetFloat("_AlphaBoost", 1.2f); ((Renderer)((Component)x.Result.transform.GetChild(2)).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matTracerBrightTransparent_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.GetChild(3)).GetComponent()).sharedMaterial = val7; Material val8 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_VoidSurvivor.matVoidSurvivorBlasterSphereAreaIndicator_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val8.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(AssetReferences.delusionOrbRamp, (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val8.EnableKeyword("VERTEXCOLOR"); ((Renderer)((Component)x.Result.transform.GetChild(4)).GetComponent()).sharedMaterial = val8; ((Renderer)((Component)x.Result.transform.GetChild(5)).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matOmniHitspark2Generic_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.GetChild(6)).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matInverseDistortion_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Material val9 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matWideGlow_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val9.SetTexture("_RemapTex", val6); val9.SetFloat("_InvFade", 0.25f); val9.SetFloat("_Boost", 2f); val9.SetInt("_ZTest", 8); val9.SetFloat("_DepthOffset", -3f); ((Renderer)((Component)x.Result.transform.GetChild(7)).GetComponent()).sharedMaterial = val9; ((Renderer)((Component)x.Result.transform.GetChild(8)).GetComponent()).sharedMaterial = val9; Light component = ((Component)x.Result.transform.Find("DelusionHitLight")).GetComponent(); val4.optionalLights = (Light[])(object)new Light[1] { component }; LightIntensityCurve val10 = ((Component)component).gameObject.AddComponent(); val10.timeMax = 0.35f; val10.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); GenericElementEffectComponent genericElementEffectComponent = x.Result.AddComponent(); ParticleSystemRenderer component2 = ((Component)x.Result.transform.GetChild(0)).GetComponent(); component2.mesh = ringMesh; ((Renderer)component2).sharedMaterial = genericRingMat; genericElementEffectComponent.icon = ((Component)x.Result.transform.GetChild(9)).GetComponent(); genericElementEffectComponent.particlesToRecolor = (ParticleSystem[])(object)new ParticleSystem[8] { ((Component)component2).GetComponent(), ((Component)x.Result.transform.GetChild(1)).GetComponent(), ((Component)x.Result.transform.GetChild(2)).GetComponent(), ((Component)x.Result.transform.GetChild(3)).GetComponent(), ((Component)x.Result.transform.GetChild(4)).GetComponent(), ((Component)x.Result.transform.GetChild(7)).GetComponent(), ((Component)x.Result.transform.GetChild(8)).GetComponent(), ((Component)x.Result.transform.GetChild(9)).GetComponent() }; genericElementEffectComponent.lightToRecolor = component; x.Result.AddComponent().duration = 0.6f; AddNewEffectDef(x.Result, "Play_item_lunar_secondaryReplace_explode"); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Tonic.TonicBuffEffect_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002d: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown GameObject delusionActiveEffect = PrefabAPI.InstantiateClone(x.Result, "DelusionActiveEffect", false); VFXAttributes val3 = delusionActiveEffect.AddComponent(); val3.vfxPriority = (VFXPriority)2; val3.vfxIntensity = (VFXIntensity)0; val3.DoNotPool = false; ParticleSystem component = ((Component)delusionActiveEffect.transform.GetChild(0).GetChild(0)).GetComponent(); MainModule main = component.main; ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.3f, 0.35f, 0.4f)); ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0; TemporaryVisualEffect component2 = delusionActiveEffect.GetComponent(); DelusionTemporaryVisualEffect delusionTemporaryVisualEffect = delusionActiveEffect.AddComponent(); component2.enterComponents = component2.enterComponents.Append((MonoBehaviour)(object)delusionTemporaryVisualEffect).ToArray(); ((Behaviour)delusionTemporaryVisualEffect).enabled = false; AsyncOperationHandle val4 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_title_PostProcessing.ppLocalDoppelganger_asset), (AsyncReferenceHandleUnloadType)2); val4.Completed += delegate(AsyncOperationHandle y) { PostProcessProfile val6 = Object.Instantiate(y.Result); val6.RemoveSettings(); PostProcessVolume component3 = ((Component)delusionActiveEffect.transform.GetChild(1).GetChild(0)).GetComponent(); RuntimeUtilities.DestroyProfile(component3.profile, true); component3.sharedProfile = val6; ((Component)component3).GetComponent().ppWeightCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 0.5f); delusionActiveEffect.GetComponent().ppWeightCurve = AnimationCurve.EaseInOut(0f, 0.5f, 1f, 0f); }; GameObject obj = delusionActiveEffect; object obj2 = <>c.<>9__13_37; if (obj2 == null) { EffectCondition val5 = (CharacterBody body) => body.HasBuff(Buffs.delusionActiveBuff); <>c.<>9__13_37 = val5; obj2 = (object)val5; } TempVisualEffectAPI.AddTemporaryVisualEffect(obj, (EffectCondition)obj2, false, ""); }; Material lunarVFXSymbol = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matOmniRing1Generic_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); lunarVFXSymbol.SetTexture("_MainTex", AssetAsyncReferenceManager.LoadAsset(AssetReferences.lunarVFXSymbol, (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); lunarVFXSymbol.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampTritoneSmoothed_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); lunarVFXSymbol.SetFloat("_AlphaBoost", 4.5f); lunarVFXSymbol.SetFloat("_DepthOffset", -3f); lunarVFXSymbol.SetFloat("_InvFade", 0.35f); lunarVFXSymbol.SetFloat("_ZTest", 8f); Material kuuvahkiTrail = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Seeker.matSpiritPunchSoftRay_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Material lunarLineMaterial = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Elites_EliteBead.matEliteBeadSpikeGrowthRing_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); lunarLineMaterial.SetTexture("_RemapTex", lunarVFXSymbol.GetTexture("_RemapTex")); lunarLineMaterial.SetTextureScale("_MainTex", new Vector2(10f, -0.1f)); lunarLineMaterial.EnableKeyword("VERTEXCOLOR"); Mesh lunarLineMesh = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.mdlVFXDonut1_fbx_donut1Mesh_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Material lunarDecal = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_LunarExploder.matLunarExploderDeathDecal_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); ((Object)lunarDecal).name = "matLunarDecal"; lunarDecal.SetColor("_Color", new Color(8f, 8f, 8f)); lunarDecal.SetTexture("_MaskTex", AssetAsyncReferenceManager.LoadAsset(AssetReferences.lunarDecal, (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); lunarDecal.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampGalaxy_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); lunarDecal.SetFloat("_AlphaBoost", 0.5f); lunarDecal.SetTexture("_Cloud1Tex", (Texture)null); lunarDecal.SetTexture("_Cloud2Tex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common.texCloudWaterFoam3_tga), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.lunarChargedLightningEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)1; val4.DoNotPool = false; ShakeEmitter val5 = x.Result.AddComponent(); val5.amplitudeTimeDecay = true; val5.duration = 0.25f; val5.radius = 80f; val5.scaleShakeRadiusWithLocalScale = false; val5.wave = new Wave { amplitude = 0.6f, frequency = 40f, cycleOffset = 0f }; x.Result.AddComponent(); AsyncOperationHandle val6 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_FalseSonBoss.matPrimeDevastatorChargeVFX1_mat), (AsyncReferenceHandleUnloadType)2); val6.Completed += delegate(AsyncOperationHandle y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //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_0038: Unknown result type (might be due to invalid IL or missing references) Material val13 = new Material(y.Result); val13.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampTeslaCoil_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val13.SetColor("_TintColor", Color.white); val13.SetInt("_DstBlend", 10); ((Component)x.Result.transform.Find("LunarChargedLightning")).GetComponent().trailMaterial = val13; }; ParticleSystemRenderer donutParticleRenderer = ((Component)x.Result.transform.Find("LunarChargedDonut5")).GetComponent(); donutParticleRenderer.mesh = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.mdlVFXDonut5_fbx_donut5Mesh_), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); val6 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC3_MealPrep.matMealPrepUIFlames2_mat), (AsyncReferenceHandleUnloadType)2); val6.Completed += delegate(AsyncOperationHandle y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //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) Material val13 = new Material(y.Result); val13.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2.texRampTritoneHShrine_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); ((Renderer)donutParticleRenderer).sharedMaterial = val13; }; Material sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matTracerBright_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("LunarChargedFlash")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("LunarChargedSparks")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("LunarChargedDistortion")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matInverseDistortion_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Component)x.Result.transform.Find("LunarChargedElectricity")).GetComponent().trailMaterial = electroTrailMaterial; ((Component)x.Result.transform.Find("LunarChargedElectricityDark")).GetComponent().trailMaterial = darkElectricTrailMaterial; ((Renderer)((Component)x.Result.transform.Find("LunarChargedLunarSymbol")).GetComponent()).sharedMaterial = lunarVFXSymbol; ParticleSystemRenderer component = ((Component)x.Result.transform.Find("LunarChargedLunarLines")).GetComponent(); ((Renderer)component).sharedMaterial = lunarLineMaterial; component.mesh = lunarLineMesh; Transform val7 = x.Result.transform.Find("LunarChargedKuuvahkiRise"); ((Component)val7).GetComponent().trailMaterial = kuuvahkiTrail; RotateObject val8 = ((Component)val7).gameObject.AddComponent(); val8.rotationSpeed = new Vector3(0f, 40f, 0f); Transform val9 = x.Result.transform.Find("LunarChargedKuuvahkiRing"); ((Component)val9).GetComponent().trailMaterial = kuuvahkiTrail; RotateObject val10 = ((Component)val9).gameObject.AddComponent(); val10.rotationSpeed = new Vector3(0f, 100f, 0f); Transform val11 = x.Result.transform.Find("LunarChargedLight"); val4.optionalLights = (Light[])(object)new Light[1] { ((Component)val11).GetComponent() }; LightIntensityCurve val12 = ((Component)val11).gameObject.AddComponent(); val12.timeMax = 0.4f; val12.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); x.Result.AddComponent().duration = 0.75f; AddNewEffectDef(x.Result, "Play_item_use_lighningArm"); }; ElementalReactionManager.lunarChargeEnemyStrikePrefab = PrefabAPI.CreateEmptyPrefab("LunarChargeEnemyInstance"); ElementalReactionManager.lunarChargeEnemyStrikePrefab.AddComponent(); val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_meridian_DisableSkillsLightning.LightningStrikePredictionEffect_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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) EnemyLunarChargeInstance.warningPrefab = PrefabAPI.InstantiateClone(x.Result, "LunarChargeWarningEffect"); EnemyLunarChargeInstance.warningPrefab.AddComponent(); EffectRetimer component = EnemyLunarChargeInstance.warningPrefab.GetComponent(); component.objectScaleCurves = null; Light component2 = ((Component)EnemyLunarChargeInstance.warningPrefab.transform.GetChild(0)).GetComponent(); component2.color = new Color(0.6f, 0.3f, 1f); component2.intensity = 10f; Transform child = EnemyLunarChargeInstance.warningPrefab.transform.GetChild(1); Object.Destroy((Object)(object)((Component)child).GetComponent()); MeshRenderer component3 = ((Component)child).GetComponent(); Material val3 = new Material(((Renderer)((Component)child).GetComponent()).sharedMaterial); val3.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampTeslaCoil_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); ((Renderer)component3).sharedMaterial = val3; ParticleSystemRenderer component4 = ((Component)((Component)child).transform.GetChild(0)).GetComponent(); Material val4 = new Material(((Renderer)component4).sharedMaterial); val4.SetColor("_TintColor", new Color(1f, 0.5f, 2f)); ((Renderer)component4).sharedMaterial = val4; GameObject val5 = new GameObject("LunarChargeWarningDecal", new Type[4] { typeof(MeshFilter), typeof(Decal), typeof(AnimateShaderAlpha), typeof(MeshRenderer) }); val5.transform.SetParent(EnemyLunarChargeInstance.warningPrefab.transform); val5.transform.localPosition = Vector3.zero; val5.transform.localScale = new Vector3(1.6f, 1.6f, 1.6f); val5.GetComponent().sharedMesh = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(Decalicious.DecalCube_asset), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Decal component5 = val5.GetComponent(); component5.RenderMode = (DecalRenderMode)0; component5.DrawAlbedo = true; component5.DrawNormalAndGloss = false; component5.Material = lunarDecal; component5.Fade = 1f; AnimateShaderAlpha component6 = ((Component)component5).gameObject.GetComponent(); component6.decal = component5; component6.alphaCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); component6.timeMax = 0.75f; component.animateShaderAlphas.Add(component6); ((Renderer)((Component)component5).GetComponent()).sharedMaterial = lunarDecal; ((Component)EnemyLunarChargeInstance.warningPrefab.transform.GetChild(2)).GetComponent().trailMaterial = electroTrailMaterial; AddNewEffectDef(EnemyLunarChargeInstance.warningPrefab); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.lunarBloomEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_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_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = false; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)1; val4.DoNotPool = false; ShakeEmitter val5 = x.Result.AddComponent(); val5.amplitudeTimeDecay = true; val5.duration = 1f; val5.radius = 125f; val5.scaleShakeRadiusWithLocalScale = false; val5.wave = new Wave { amplitude = 0.35f, frequency = 2.5f, cycleOffset = 0f }; x.Result.AddComponent(); Material sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matTracerBright_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("LunarBloomFlash")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("LunarBloomSparks")).GetComponent()).sharedMaterial = sharedMaterial; ((Renderer)((Component)x.Result.transform.Find("LunarBloomDistortion")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_TeamWarCry.matTeamWarCryDistortion_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("LunarBloomLunarSymbol")).GetComponent()).sharedMaterial = lunarVFXSymbol; ((Renderer)((Component)x.Result.transform.Find("LunarBloomSplash")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Seeker.matSpiritPunchSplashOpaque_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ParticleSystemRenderer component = ((Component)x.Result.transform.Find("LunarBloomRipple")).GetComponent(); ((Component)component).gameObject.AddComponent(); component.trailMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_AcidLarva.matAcidLarvaTrail_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Component)x.Result.transform.Find("LunarBloomOrbitTrails")).GetComponent().trailMaterial = component.trailMaterial; ((Renderer)((Component)x.Result.transform.Find("LunarBloomSplash")).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_AcidLarva.matAcidLarvaBlood_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ParticleSystemRenderer component2 = ((Component)x.Result.transform.Find("LunarBloomLunarLines")).GetComponent(); ((Renderer)component2).sharedMaterial = lunarLineMaterial; component2.mesh = lunarLineMesh; ParticleSystemRenderer component3 = ((Component)x.Result.transform.Find("LunarBloomLunarLines2")).GetComponent(); ((Renderer)component3).sharedMaterial = lunarLineMaterial; component3.mesh = lunarLineMesh; Transform val6 = x.Result.transform.Find("LunarBloomKuuvahkiRing"); ((Component)val6).GetComponent().trailMaterial = kuuvahkiTrail; RotateObject val7 = ((Component)val6).gameObject.AddComponent(); val7.rotationSpeed = new Vector3(0f, 100f, 0f); Transform val8 = x.Result.transform.Find("LunarBloomLight"); val4.optionalLights = (Light[])(object)new Light[1] { ((Component)val8).GetComponent() }; LightIntensityCurve val9 = ((Component)val8).gameObject.AddComponent(); val9.timeMax = 0.8f; val9.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); x.Result.AddComponent().duration = 1.5f; AddNewEffectDef(x.Result, "Play_seeker_skill4_win"); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.lunarCrystallizeController, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_0127: Unknown result type (might be due to invalid IL or missing references) Material val3 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Grandparent.matGrandParentSunCore_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val3.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_Common_ColorRamps.texRampConstructLaserTypeB_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val3.SetFloat("_Boost", 1.5f); val3.SetFloat("_AlphaBoost", 7f); val3.SetFloat("_AlphaBias", 0.5f); val3.SetFloat("_FresnelPower", -1f); Material val4 = new Material(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Items_ExtraStatsOnLevelUp.matBeadsEnlightenGlow_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); val4.SetColor("_TintColor", new Color(1f, 0.5f, 0.3f)); val4.SetTextureScale("_MainTex", new Vector2(1f, 0.5f)); val4.SetTextureOffset("_MainTex", new Vector2(0f, 0.5f)); val4.SetTextureScale("_Cloud2Tex", new Vector2(5f, -0.6f)); val4.SetTextureOffset("_Cloud2Tex", new Vector2(0f, 0.6f)); val4.SetFloat("_Boost", 1f); val4.SetFloat("_AlphaBoost", 0.5f); val4.SetFloat("_FresnelPower", 0f); LunarCrystallizeController lunarCrystallizeController = x.Result.AddComponent(); lunarCrystallizeController.moondrift1 = ((Component)x.Result.transform.GetChild(0).GetChild(0)).gameObject; CreateMoondrift(lunarCrystallizeController.moondrift1, val3, val4); lunarCrystallizeController.moondrift2 = ((Component)x.Result.transform.GetChild(1).GetChild(0)).gameObject; CreateMoondrift(lunarCrystallizeController.moondrift2, val3, val4); lunarCrystallizeController.moondrift3 = ((Component)x.Result.transform.GetChild(2).GetChild(0)).gameObject; CreateMoondrift(lunarCrystallizeController.moondrift3, val3, val4); }; val = AssetAsyncReferenceManager.LoadAsset(AssetReferences.lunarCrystallizeActivatedEffect, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) EffectComponent val3 = x.Result.AddComponent(); val3.positionAtReferencedTransform = true; val3.parentToReferencedTransform = true; VFXAttributes val4 = x.Result.AddComponent(); val4.vfxPriority = (VFXPriority)2; val4.vfxIntensity = (VFXIntensity)1; val4.DoNotPool = false; ShakeEmitter val5 = x.Result.AddComponent(); val5.amplitudeTimeDecay = true; val5.duration = 0.5f; val5.radius = 75f; val5.scaleShakeRadiusWithLocalScale = false; val5.wave = new Wave { amplitude = 0.2f, frequency = 10f, cycleOffset = 0f }; x.Result.AddComponent(); ParticleSystemRenderer component = ((Component)x.Result.transform.Find("LunarCrystallizeSpinDistortion")).GetComponent(); component.mesh = ringMesh; ((Renderer)component).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_ancientloft.matAncientLoft_WaterfallDistortion_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ParticleSystemRenderer component2 = ((Component)x.Result.transform.Find("LunarCrystallizeSpin")).GetComponent(); component2.mesh = ringMesh; ((Renderer)component2).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2.matGeodeCleanseVFX1_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)x.Result.transform.Find("LunarCrystallizeLunarSymbol")).GetComponent()).sharedMaterial = lunarVFXSymbol; ParticleSystemRenderer component3 = ((Component)x.Result.transform.Find("LunarCrystallizeLunarLines")).GetComponent(); ((Renderer)component3).sharedMaterial = lunarLineMaterial; component3.mesh = lunarLineMesh; Transform val6 = x.Result.transform.Find("LunarCrystallizeKuuvahkiRing"); ((Component)val6).GetComponent().trailMaterial = kuuvahkiTrail; RotateObject val7 = ((Component)val6).gameObject.AddComponent(); val7.rotationSpeed = new Vector3(0f, 100f, 0f); Transform val8 = x.Result.transform.Find("LunarCrystallizeLight"); val4.optionalLights = (Light[])(object)new Light[1] { ((Component)val8).GetComponent() }; LightIntensityCurve val9 = ((Component)val8).gameObject.AddComponent(); val9.timeMax = 0.55f; val9.curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); x.Result.AddComponent().duration = 0.7f; AddNewEffectDef(x.Result, "Play_Seeker_PalmBlast_HealImpact"); }; } private static void CreateMoondrift(GameObject moondrift, Material material, Material glowMaterial) { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) ((Renderer)((Component)moondrift.transform).GetComponent()).sharedMaterial = material; ((Renderer)((Component)moondrift.transform.GetChild(0)).GetComponent()).sharedMaterial = glowMaterial; AnimateShaderAlpha val = moondrift.AddComponent(); val.timeMax = 0.2f; val.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); AnimateShaderAlpha val2 = ((Component)moondrift.transform.GetChild(0)).gameObject.AddComponent(); val2.timeMax = 0.4f; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); ((Renderer)((Component)moondrift.transform.GetChild(1)).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX.matInverseDistortion_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)moondrift.transform.GetChild(2)).GetComponent()).sharedMaterial = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Child.matChildStarGlow_mat), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); } public static Material CreateVisionMaterial(AssetReferenceT icon, AssetReferenceT remapTex, float alphaBoost = 1f) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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_012b: Unknown result type (might be due to invalid IL or missing references) Material vision = new Material(Addressables.LoadAssetAsync((object)RoR2_Base_Shaders.HGOpaqueCloudRemap_shader).WaitForCompletion()); ((Object)vision).name = "ElementalReactionsVision"; vision.EnableKeyword("EMISSIONFROMALBEDO"); vision.EnableKeyword("DITHER"); vision.EnableKeyword("USE_CLOUDS"); vision.EnableKeyword("USE_UV1"); vision.EnableKeyword("_EMISSION"); AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(icon, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { vision.SetTexture("_MainTex", x.Result); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_Chef.texChefOilDecalMask_png), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) vision.SetTexture("_Cloud1Tex", x.Result); vision.SetTextureScale("_Cloud1Tex", new Vector2(1f, 0.3f)); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_VFX_ParticleMasks.texAlphaGradient2_png), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002e: 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) vision.SetTexture("_Cloud2Tex", x.Result); vision.SetTextureScale("_Cloud2Tex", new Vector2(1f, -1f)); vision.SetTextureOffset("_Cloud2Tex", new Vector2(0f, 1.08f)); }; val = AssetAsyncReferenceManager.LoadAsset(remapTex, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { vision.SetTexture("_RemapTex", x.Result); }; vision.SetVector("_CutoffScroll", new Vector4(0f, -1.5f, 0f, 0f)); vision.SetFloat("_AlphaBoost", alphaBoost); vision.SetFloat("_Cutoff", 0f); vision.Specular(0.7f, 9f, ignoreAlpha: false); vision.SetFloat("_RampInfo", 1f); return vision; } private static void CreateGenericElementEffectMaterial() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) genericElementEffectMaterial = new Material(Addressables.LoadAssetAsync((object)RoR2_Base_Shaders.HGCloudRemap_shader).WaitForCompletion()); ((Object)genericElementEffectMaterial).name = "ElementalReactionsElementIconVFX"; genericElementEffectMaterial.EnableKeyword("CLOUDOFFSET"); genericElementEffectMaterial.EnableKeyword("USE_CLOUDS"); genericElementEffectMaterial.EnableKeyword("VERTEXCOLOR"); genericElementEffectMaterial.EnableKeyword("EMISSIONFROMALBEDO"); genericElementEffectMaterial.EnableKeyword("_EMISSION"); genericElementEffectMaterial.SetFloat("_Boost", 5f); genericElementEffectMaterial.SetFloat("_AlphaBoost", 3f); genericElementEffectMaterial.SetTexture("_RemapTex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampDefault_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); genericElementEffectMaterial.SetFloat("_DepthOffset", -5f); genericElementEffectMaterial.SetFloat("_ZTest", 8f); genericElementEffectMaterial.SetTexture("_Cloud1Tex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_TiledTextures.texCloudDifferenceBW2_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); genericElementEffectMaterial.SetTexture("_Cloud2Tex", AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_TiledTextures.texCloudOrganicNormal_png), (AsyncReferenceHandleUnloadType)2).WaitForCompletion()); genericElementEffectMaterial.SetVector("_CutoffScroll", new Vector4(10f, -25f, 0f, -10f)); } public static Material CreateElementEffectMaterial(Texture icon) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown Material val = new Material(genericElementEffectMaterial); val.SetTexture("_MainTex", icon); return val; } private static void AddAkBank(GameObject prefab, string bodyGUID) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(bodyGUID), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { AkBank val2 = prefab.AddComponent(); AkBank component = x.Result.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { val2.data.WwiseObjectReference = component.data.WwiseObjectReference; } }; } [SystemInitializer(new Type[] { typeof(ElementCatalog) })] public static void AfterElementCatalogReady() { //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_003b: Unknown result type (might be due to invalid IL or missing references) AddElementLoadoutMenu(); SpecialObjectAttributes component = ((AssetReference)AssetReferences.bloomObject).LoadAssetAsync().WaitForCompletion().GetComponent(); component.damageTypeOverride.SetElement(DefaultElementDefs.dendroElement.index); DamageAPI.AddModdedDamageType(ref component.damageTypeOverride, DamageTypes.elementalReactionDamageType); } private static void AddElementLoadoutMenu() { //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_008f: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) GameObject val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_UI.CharacterSelectUIMain_prefab), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); CharacterSelectController component = val.GetComponent(); Array.Resize(ref component.primaryColorImages, component.primaryColorImages.Length + 1); Transform val2 = val.transform.Find("SafeArea/LeftHandPanel (Layer: Main)/SurvivorInfoPanel, Active (Layer: Secondary)"); Transform val3 = val2.Find("SubheaderPanel (Overview, Skills, Loadout)"); Transform val4 = val2.Find("ContentPanel (Overview, Skills, Loadout)"); GameObject val5 = Object.Instantiate(((Component)val3.Find("GenericMenuButton (Loadout)")).gameObject); val5.transform.SetParent(val3, false); val5.transform.localScale = Vector3.one; val5.transform.localEulerAngles = Vector3.zero; ((Object)val5).name = "GenericMenuButton (Elements)"; val5.transform.SetSiblingIndex(4); val5.GetComponent().token = "DS_GAMING_ELEMENTAL_REACTIONS_LOADOUT_ELEMENTS"; component.primaryColorImages[component.primaryColorImages.Length - 1] = val5.GetComponent(); GameObject val6 = Object.Instantiate(((Component)val4.Find("LoadoutPanel")).gameObject); val6.transform.SetParent(val4, false); val6.transform.localScale = Vector3.one; val6.transform.localEulerAngles = Vector3.zero; ((Object)val6).name = "ElementsPanel"; Object.Destroy((Object)(object)val6.GetComponent()); val6.SetActive(false); ElementLoadoutPanelController elementLoadoutPanelController = val6.AddComponent(); elementLoadoutPanelController.hoverTextDescription = ((Component)((Component)elementLoadoutPanelController).transform.Find("DescriptionPanel, Loadout/DescriptionPanelContent (Layer: Secondary)/DescriptionText")).GetComponent(); elementLoadoutPanelController.requiredUILayerKey = ((Component)val2).GetComponent(); ((Component)val3).GetComponent().headers.Add(new Header { headerButton = (MPButton)(object)val5.GetComponent(), headerName = Language.GetString("DS_GAMING_ELEMENTAL_REACTIONS_LOADOUT_ELEMENTS"), tmpHeaderText = (TextMeshProUGUI)(object)((Component)val5.transform.Find("ButtonText")).GetComponent(), headerRoot = val6, AreConsolePlatformsSupported = true, isPrimaryPlayerOnly = false }); elementLoadoutRowUI = PrefabAPI.InstantiateClone(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_UI.Row_prefab), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(), "ElementLoadoutRow", false); elementLoadoutRowUI.GetComponent().preferredHeight = 116f; Transform child = elementLoadoutRowUI.transform.GetChild(0); Object.DestroyImmediate((Object)(object)((Component)child).gameObject.GetComponent()); GridLayoutGroup val7 = ((Component)child).gameObject.AddComponent(); val7.cellSize = new Vector2(56f, 56f); ((LayoutGroup)val7).childAlignment = (TextAnchor)3; ((LayoutGroup)val7).padding.left = 128; val7.spacing = new Vector2(0f, 0f); Object.Destroy((Object)(object)((Component)child.GetChild(0)).gameObject); } private static void AddNewEffectDef(GameObject effectPrefab) { AddNewEffectDef(effectPrefab, ""); } private static void AddNewEffectDef(GameObject effectPrefab, string soundName) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown EffectDef val = new EffectDef(); val.prefab = effectPrefab; val.prefabEffectComponent = effectPrefab.GetComponent(); val.prefabName = ((Object)effectPrefab).name; val.prefabVfxAttributes = effectPrefab.GetComponent(); val.spawnSoundEventName = soundName; Content.AddEffectDef(val); } } public static class Buffs { public static BuffDef quickenBuff; public static BuffDef superconductBuff; public static BuffDef electroChargeBuff; public static BuffDef delusionActiveBuff; public static BuffDef lunarChargeBuff; public static BuffDefStockThresholdIcon lunarBloomBuff; public static BuffDef lunarCrystallizeBuff; public static BuffDef instructorsTeaCupQualityBase; public static BuffDef elementalEnvironmentHiddenBuff; public static void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) quickenBuff = Util.AddNewBuff("QuickenReaction", Addressables.LoadAssetAsync((object)Assets.AssetReferences.quickenBuffIcon).WaitForCompletion(), Color.white, canStack: false, isDebuff: true); superconductBuff = Util.AddNewBuff("SuperconductReaction", Addressables.LoadAssetAsync((object)Assets.AssetReferences.superconductBuffIcon).WaitForCompletion(), Color.white, canStack: false, isDebuff: true); electroChargeBuff = Util.AddNewBuff("ElectroChargeReaction", Addressables.LoadAssetAsync((object)Assets.AssetReferences.electroChargeBuffIcon).WaitForCompletion(), Color.white, canStack: false, isDebuff: true); electroChargeBuff.isDOT = true; delusionActiveBuff = Util.AddNewBuff("DelusionActive", Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionBuffIcon).WaitForCompletion(), Color.white, canStack: true, isDebuff: false); lunarChargeBuff = Util.AddNewBuff("LunarChargeReaction", Addressables.LoadAssetAsync((object)Assets.AssetReferences.lunarChargeBuffIcon).WaitForCompletion(), Color.white, canStack: false, isDebuff: true); lunarChargeBuff.isDOT = true; lunarBloomBuff = Util.AddNewBuff("LunarBloomVerdantDew", Addressables.LoadAssetAsync((object)Assets.AssetReferences.lunarBloomChargingBuffIcon).WaitForCompletion(), Color.white, canStack: true, isDebuff: false, isCooldown: false, hidden: false); lunarBloomBuff.iconOverrides = (StackIconOverride[])(object)new StackIconOverride[1] { new StackIconOverride { stackThreshold = 3, iconOverride = Addressables.LoadAssetAsync((object)Assets.AssetReferences.lunarBloomBuffIcon).WaitForCompletion(), colorOverride = Color.white } }; lunarCrystallizeBuff = Util.AddNewBuff("LunarCrystallizeMoondrift", null, Color.white, canStack: true, isDebuff: false, isCooldown: false, hidden: true); elementalEnvironmentHiddenBuff = Util.AddNewBuff("HiddenElementalEnvironment", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, hidden: true); if (ElementalReactionsPlugin.qualityModExists) { instructorsTeaCupQualityBase = Util.AddNewBuff("InstructorsTeaCupQuality", Addressables.LoadAssetAsync((object)Assets.AssetReferences.instructorsTeaCupItemIcon).WaitForCompletion(), Color.white, canStack: true, isDebuff: false); } } } public static class Config { public static string loadoutConfigFilePath = ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.ConfigFilePath.Replace(".cfg", "Loadouts.cfg"); public static Dictionary elementLoadoutConfigs = new Dictionary(); public static ConfigEntry CanSurvivorsUseElements() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Characters", "Survivors Use Elements", true, "Whether survivors are able to deal elemental damage with their skills.\nHost's config takes priority."); } public static ConfigEntry CanEnemiesUseElements() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Characters", "Enemies Use Elements", true, "Whether enemies are able to deal elemental damage with their skills.\nHost's config takes priority."); } public static ConfigEntry CanAlliesUseElements() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Characters", "Allies Use Elements", false, "Whether your non-player allies are able to deal elemental damage with their skills.\nHost's config takes priority."); } public static ConfigEntry CanEnemiesBeElemental() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Characters", "Elemental Characters", true, "Whether certain characters will naturally have an element permanently applied to them. (Eg. Wisps always have Pyro applied to them).\nHost's config takes priority."); } public static ConfigEntry LunarEnemyLunarReactions() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Characters", "Lunar Enemies", true, "Whether certain enemies will naturally have the Moon Wheel item, allowing them to trigger Lunar Reactions.\nHost's config takes priority."); } public static ConfigEntry PlayerReactionResistance() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Reactions", "Player Resist Mult", 25f, "The percent of the normal elemental reaction damage that will be dealt when hitting players.\nHost's config takes priority."); } public static ConfigEntry PlayerBloomResistance() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Reactions", "Player Bloom Resist Mult", 100f, "The percent of the normal Bloom reaction damage that will be dealt when hitting players. This is applied on top of all other bloom/reaction resistance configs.\nHost's config takes priority."); } public static ConfigEntry FriendlyFireBloomResistance() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Reactions", "Friendly Fire Bloom Resist Mult", 50f, "The percent of the normal Bloom reaction damage that will be dealt when hitting yourself or allies. This is applied on top of all other bloom/reaction resistance configs.\nHost's config takes priority."); } public static ConfigEntry AlwaysChooseDelusion() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Items", "Choose Delusion Elements", false, "Whether you will be able to choose the elements of Delusions.\nHost's config takes priority."); } public static ConfigEntry RerollUnusableItems() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Items", "Reroll Unusable Items", true, "Whether items from this mod will be rerolled if you don't have the elements required to use them.\nHost's config takes priority."); } public static ConfigEntry CanWeatherUseElements() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Environment", "Elemental Weather", true, "Whether weather effects in certain environments, such as the rain on the moon, will be able to apply elements.\nHost's config takes priority."); } public static ConfigEntry CanSS2StormsUseElements() { return ((BaseUnityPlugin)ElementalReactionsPlugin.instance).Config.Bind("Environment", "Elemental SS2 Storms", true, "Whether storms from Starstorm 2 will be able to apply elements.\nHost's config takes priority."); } [SystemInitializer(new Type[] { typeof(ElementCatalog), typeof(SurvivorCatalog) })] internal static void ReadConfigFile() { if (File.Exists(loadoutConfigFilePath)) { string[] array = File.ReadAllLines(loadoutConfigFilePath); foreach (string text in array) { string[] array2 = text.Split("=", 2); if (array2.Length != 2) { continue; } string[] array3 = array2[1].Split(", ").ToArray(); if (array3.Length != 4) { continue; } ElementDef[] array4 = new ElementDef[4] { DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement }; for (int j = 0; j < array3.Length; j++) { string text2 = array3[j].Trim(); ElementDef[] elementCatalog = ElementCatalog.elementCatalog; foreach (ElementDef elementDef in elementCatalog) { if (elementDef.cachedName == text2) { array4[j] = elementDef; break; } } } elementLoadoutConfigs.Add(array2[0].Trim(), array4); } } ElementLoadoutComponent.AddElementLoadoutComponents(); } public static ElementDef[] GetElementLoadoutFromConfig(string bodyName, out bool configExists) { configExists = false; ElementDef[] result = new ElementDef[4] { DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement }; if (!((ResourceAvailability)(ref ElementCatalog.availability)).available) { return result; } if (!string.IsNullOrEmpty(bodyName) && File.Exists(loadoutConfigFilePath) && elementLoadoutConfigs.TryGetValue(bodyName, out var value)) { configExists = true; return value; } return result; } public static void SetElementLoadoutConfig(string bodyName, ElementDef element, SkillSlot skillSlot) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) bool configExists; ElementDef[] elementLoadoutFromConfig = GetElementLoadoutFromConfig(bodyName, out configExists); if (!((Object)(object)elementLoadoutFromConfig[skillSlot] == (Object)(object)element)) { elementLoadoutFromConfig[skillSlot] = element; if (configExists) { WriteElementLoadoutConfig(bodyName, elementLoadoutFromConfig); } else { AppendNewElementLoadoutConfig(bodyName, elementLoadoutFromConfig); } } } public static void SetElementLoadoutConfig(string bodyName, ElementDef[] elementDefs) { if (elementLoadoutConfigs.ContainsKey(bodyName)) { WriteElementLoadoutConfig(bodyName, elementDefs); } else { AppendNewElementLoadoutConfig(bodyName, elementDefs); } } public static void WriteElementLoadoutConfig(string bodyName, ElementDef[] elementDefs) { elementLoadoutConfigs[bodyName] = elementDefs; using StreamWriter streamWriter = new StreamWriter(loadoutConfigFilePath, append: false); foreach (KeyValuePair elementLoadoutConfig in elementLoadoutConfigs) { string value = elementLoadoutConfig.Key + " = " + string.Join(", ", elementLoadoutConfig.Value.Select((ElementDef x) => Object.op_Implicit((Object)(object)x) ? x.cachedName : DefaultElementDefs.physicalElement.cachedName)); streamWriter.WriteLine(value); } Log.Message("Rewrote Element Loadout config"); } public static void AppendNewElementLoadoutConfig(string bodyName, ElementDef[] elements) { string text = bodyName + " = " + string.Join(", ", elements.Select((ElementDef x) => Object.op_Implicit((Object)(object)x) ? x.cachedName : DefaultElementDefs.physicalElement.cachedName)); using (StreamWriter streamWriter = new StreamWriter(loadoutConfigFilePath, append: false)) { streamWriter.Write(text); Log.Message("Appended new Element Loadout: " + text); } elementLoadoutConfigs.Add(bodyName, elements); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void RiskOfOptionsSetup() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown ModSettingsManager.SetModIcon(Addressables.LoadAssetAsync((object)Assets.AssetReferences.expansionIcon).WaitForCompletion()); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CanSurvivorsUseElements())); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CanEnemiesUseElements())); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CanAlliesUseElements())); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CanEnemiesBeElemental())); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(LunarEnemyLunarReactions())); ModSettingsManager.AddOption((BaseOption)new SliderOption(PlayerReactionResistance(), new SliderConfig { min = 0f, max = 100f })); ModSettingsManager.AddOption((BaseOption)new SliderOption(PlayerBloomResistance(), new SliderConfig { min = 0f, max = 100f })); ModSettingsManager.AddOption((BaseOption)new SliderOption(FriendlyFireBloomResistance(), new SliderConfig { min = 0f, max = 100f })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(AlwaysChooseDelusion())); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(RerollUnusableItems())); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CanWeatherUseElements())); if (Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm")) { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CanSS2StormsUseElements())); } } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public static List bodyPrefabs = new List(); public static List masterPrefabs = new List(); public static List projectilePrefabs = new List(); public static List networkedObjectPrefabs = new List(); public static List survivorDefs = new List(); public static List unlockableDefs = new List(); public static List skillFamilies = new List(); public static List skillDefs = new List(); public static List entityStates = new List(); public static List buffDefs = new List(); public static List effectDefs = new List(); public static List itemTierDefs = new List(); public static List itemDefs = new List(); public static List networkSoundEventDefs = new List(); public static ExpansionDef expansionDef; public static List craftableDefs = new List(); public string identifier => "com.ds_gaming.ElementalReactions"; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.bodyPrefabs.Add(bodyPrefabs.ToArray()); contentPack.masterPrefabs.Add(masterPrefabs.ToArray()); contentPack.projectilePrefabs.Add(projectilePrefabs.ToArray()); contentPack.networkedObjectPrefabs.Add(networkedObjectPrefabs.ToArray()); contentPack.survivorDefs.Add(survivorDefs.ToArray()); contentPack.unlockableDefs.Add(unlockableDefs.ToArray()); contentPack.skillDefs.Add(skillDefs.ToArray()); contentPack.skillFamilies.Add(skillFamilies.ToArray()); contentPack.entityStateTypes.Add(entityStates.ToArray()); contentPack.buffDefs.Add(buffDefs.ToArray()); contentPack.effectDefs.Add(effectDefs.ToArray()); contentPack.itemTierDefs.Add(itemTierDefs.ToArray()); contentPack.itemDefs.Add(itemDefs.ToArray()); contentPack.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray()); contentPack.expansionDefs.Add((ExpansionDef[])(object)new ExpansionDef[1] { expansionDef }); contentPack.craftableDefs.Add(craftableDefs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } internal class Content { public static void AddCharacterBodyPrefab(GameObject bprefab) { ContentPacks.bodyPrefabs.Add(bprefab); } public static void AddMasterPrefab(GameObject prefab) { ContentPacks.masterPrefabs.Add(prefab); } public static void AddProjectilePrefab(GameObject prefab) { ContentPacks.projectilePrefabs.Add(prefab); PrefabAPI.RegisterNetworkPrefab(prefab); } public static void AddNetworkedObjectPrefab(GameObject prefab) { PrefabAPI.RegisterNetworkPrefab(prefab); } public static void AddSurvivorDef(SurvivorDef survivorDef) { ContentPacks.survivorDefs.Add(survivorDef); } public static void AddUnlockableDef(UnlockableDef unlockableDef) { ContentPacks.unlockableDefs.Add(unlockableDef); } public static void AddSkillDef(SkillDef skillDef) { ContentPacks.skillDefs.Add(skillDef); } public static void AddSkillFamily(SkillFamily skillFamily) { ContentPacks.skillFamilies.Add(skillFamily); } public static void AddEntityState(Type entityState) { ContentPacks.entityStates.Add(entityState); } public static void AddBuffDef(BuffDef buffDef) { ContentPacks.buffDefs.Add(buffDef); } public static void AddEffectDef(EffectDef effectDef) { ContentPacks.effectDefs.Add(effectDef); } public static void AddItemDef(ItemDef itemDef) { ContentPacks.itemDefs.Add(itemDef); } public static void AddItemTierDef(ItemTierDef itemDef) { ContentPacks.itemTierDefs.Add(itemDef); } public static void AddNetworkSoundEventDef(NetworkSoundEventDef networkSoundEventDef) { ContentPacks.networkSoundEventDefs.Add(networkSoundEventDef); } public static void AddExpansionDef(ExpansionDef expansion) { ContentPacks.expansionDef = expansion; } public static void AddCraftableDef(CraftableDef craftable) { ContentPacks.craftableDefs.Add(craftable); } } public static class DamageTypes { public static ModdedDamageType elementalReactionDamageType; public static ModdedDamageType superconductDamageType; public static ModdedDamageType lunarDamageType; public static void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_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_001a: Unknown result type (might be due to invalid IL or missing references) elementalReactionDamageType = DamageAPI.ReserveDamageType(); superconductDamageType = DamageAPI.ReserveDamageType(); lunarDamageType = DamageAPI.ReserveDamageType(); } } public class ElementalReactionManager : MonoBehaviour { public delegate void PreElementalReactionDelegate(ref ElementalReactionDef reaction, ElementDef firstElement, ElementDef secondElement, CharacterBody victim, ref DamageInfo damageInfo); public delegate void ElementalReactionDelegate(ElementalReactionDef reaction, ElementDef firstElement, ElementDef secondElement, CharacterBody victim, DamageInfo damageInfo); public static ElementalReactionManager instance; public static AsyncOperationHandle genericElementActivatedEffect; public static AsyncOperationHandle genericElementOrbEffect; public static AsyncOperationHandle elementalEnvironmentScreenEffect; public static AsyncOperationHandle overloadEffect; public static AsyncOperationHandle electroChargedTempVisualEffect; public static AsyncOperationHandle superconductEffect; public static AsyncOperationHandle superconductTempVisualEffect; public static AsyncOperationHandle swirlEffect; public static AsyncOperationHandle crystallizeSpawnOrbEffect; public static AsyncOperationHandle crystallizePickup; public static DeployableSlot crystallizeDeployableSlot; public static AsyncOperationHandle quickenTempVisualEffect; public static GameObject bloomSpawnOrb; public static AsyncOperationHandle bloomCore; public static AsyncOperationHandle bloomExplosion; public static AsyncOperationHandle burgeonExplosion; public static AsyncOperationHandle hyperbloomOrb; public static DeployableSlot bloomDeployableSlot; public static AsyncOperationHandle delusionHitEffect; public static AsyncOperationHandle lunarChargedEffect; public static ComponentPoolManager lunarChargeEnemyPool; public static GameObject lunarChargeEnemyStrikePrefab; public static AsyncOperationHandle lunarBloomEffect; public static AsyncOperationHandle lunarCrystallizeController; public static AsyncOperationHandle lunarCrystallizeActivatedEffect; public static ComponentPoolManager lunarCrystallizePool; public static event PreElementalReactionDelegate onPreElementalReactionTriggered; public static event ElementalReactionDelegate onElementalReactionTriggered; public void OnEnable() { SingletonHelper.Assign(ref instance, this); PreloadAssets(); SpawnCard.onSpawnedServerGlobal += AddMoonWheelToLunarEnemies; } public void OnDisable() { if (lunarChargeEnemyPool != null) { lunarChargeEnemyPool.ResetPools(); } if (lunarCrystallizePool != null) { lunarCrystallizePool.ResetPools(); } SpawnCard.onSpawnedServerGlobal -= AddMoonWheelToLunarEnemies; UnloadAssets(); SingletonHelper.Unassign(ref instance, this); } public static void ApplyElement(ElementDef element, CharacterBody target, float procCoefficient = 1f, GameObject overrideAttacker = null, bool alwaysPersist = false, float overrideICD = -1f) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)element) && Object.op_Implicit((Object)(object)target)) { DamageInfo damageInfo = new DamageInfo(); damageInfo.procCoefficient = procCoefficient; if (Object.op_Implicit((Object)(object)overrideAttacker)) { damageInfo.attacker = overrideAttacker; } ApplyElement(element, target, ref damageInfo, out var _, alwaysPersist, overrideICD); } } public static void ApplyElement(ElementDef element, CharacterBody target, ref DamageInfo damageInfo, out float addedDamage, bool alwaysPersist = false, float overrideICD = -1f) { addedDamage = 0f; if (Object.op_Implicit((Object)(object)element) && (Object)(object)element != (Object)(object)DefaultElementDefs.physicalElement && !target.HasBuff(element.cooldownBuff) && damageInfo.procCoefficient != 0f && !TryTriggerReaction(element, target, ref damageInfo, ref addedDamage) && (element.canPersist || alwaysPersist)) { if (damageInfo.procCoefficient == float.MaxValue) { target.AddBuff(element.buff); } else { target.AddTimedBuff(element.buff, 10f * damageInfo.procCoefficient * 0.8f); } target.AddTimedBuff(element.cooldownBuff, (overrideICD > 0f) ? overrideICD : 0.4f); } } private static bool TryTriggerReaction(ElementDef element, CharacterBody target, ref DamageInfo damageInfo, ref float addedDamage) { ElementDef firstReactableElement = ElementalReactionCatalog.GetFirstReactableElement(element, target); if (Object.op_Implicit((Object)(object)firstReactableElement)) { ElementalReactionDef reaction = ElementalReactionCatalog.GetElementalReaction(element, firstReactableElement); if (Object.op_Implicit((Object)(object)reaction)) { if (damageInfo.procCoefficient != float.MaxValue) { float num = target.ReduceTimedBuffDuration(firstReactableElement.buff, 10f * damageInfo.procCoefficient * (((Object)(object)firstReactableElement == (Object)(object)reaction.baseElement) ? reaction.baseFirstReactionCoefficient : reaction.baseLastReactionCoefficient)); if (num == float.MaxValue) { target.RemoveBuff(firstReactableElement.buff); target.AddTimedBuff(firstReactableElement.cooldownBuff, 1f); } if (num == 0f) { target.AddTimedBuff(firstReactableElement.cooldownBuff, 0.2f); } } else { target.ClearTimedBuffs(firstReactableElement.buff); if (target.HasBuff(firstReactableElement.buff)) { target.RemoveBuff(firstReactableElement.buff); } target.AddTimedBuff(firstReactableElement.cooldownBuff, 0.2f); } target.AddTimedBuff(element.cooldownBuff, 0.4f); if (damageInfo.procCoefficient == float.MaxValue) { damageInfo.procCoefficient = 1f; } ElementalReactionManager.onPreElementalReactionTriggered?.Invoke(ref reaction, firstReactableElement, element, target, ref damageInfo); reaction.TriggerReaction(firstReactableElement, element, target, ref damageInfo, ref addedDamage); ElementalReactionManager.onElementalReactionTriggered?.Invoke(reaction, firstReactableElement, element, target, damageInfo); return true; } } return false; } private static void AddMoonWheelToLunarEnemies(SpawnResult spawnResult) { //IL_0014: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Invalid comparison between Unknown and I4 //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (Config.LunarEnemyLunarReactions().Value) { CharacterMaster val = (Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) ? spawnResult.spawnedInstance.GetComponent() : null); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.inventory) && (int)val.backupBodyIndex != -1 && EnemyElementLoadouts.enemiesWithMoonWheel.Contains(val.backupBodyIndex) && val.inventory.GetItemCountPermanent(MoonWheel.hiddenMoonWheel) == 0) { val.inventory.GiveItemPermanent(MoonWheel.hiddenMoonWheel, 1); } } } public static void CreateEnemyLunarChargeLightningStrike(GameObject attacker, TeamIndex team, float damage, bool crit, Vector3 position) { //IL_0034: 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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown if (lunarChargeEnemyPool == null) { lunarChargeEnemyPool = new ComponentPoolManager(1, 6, false, true); } EnemyLunarChargeInstance enemyLunarChargeInstance = (EnemyLunarChargeInstance)(object)lunarChargeEnemyPool.GetPooledObject(lunarChargeEnemyStrikePrefab); enemyLunarChargeInstance.CreateLightningStrike(attacker, team, damage, crit, position); } public static void CreateLunarCrystallizeController(CharacterBody characterBody) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown if (lunarCrystallizePool == null) { lunarCrystallizePool = new ComponentPoolManager(1, 3, false, true); } LunarCrystallizeController lunarCrystallizeController = (LunarCrystallizeController)(object)lunarCrystallizePool.GetPooledObject(ElementalReactionManager.lunarCrystallizeController.WaitForCompletion()); lunarCrystallizeController.CreateLunarCrystallizeController(characterBody); } private static void PreloadAssets() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) genericElementActivatedEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.genericElementActivatedEffect, (AsyncReferenceHandleUnloadType)4); genericElementOrbEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.genericElementOrbEffect, (AsyncReferenceHandleUnloadType)4); elementalEnvironmentScreenEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.elementEnvironmentScreenEffect, (AsyncReferenceHandleUnloadType)4); overloadEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.overloadEffect, (AsyncReferenceHandleUnloadType)4); electroChargedTempVisualEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.electroChargeTempVisualEffect, (AsyncReferenceHandleUnloadType)4); superconductEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.superconductEffect, (AsyncReferenceHandleUnloadType)4); superconductTempVisualEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.superconductTempVisualEffect, (AsyncReferenceHandleUnloadType)4); swirlEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.swirlEffect, (AsyncReferenceHandleUnloadType)4); crystallizeSpawnOrbEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.crystallizeSpawnOrbEffect, (AsyncReferenceHandleUnloadType)4); crystallizePickup = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.crystallizePickup, (AsyncReferenceHandleUnloadType)4); quickenTempVisualEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.quickenTempVisualEffect, (AsyncReferenceHandleUnloadType)4); bloomCore = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.bloomObject, (AsyncReferenceHandleUnloadType)4); bloomExplosion = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.bloomExplosion, (AsyncReferenceHandleUnloadType)4); burgeonExplosion = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.burgeonExplosion, (AsyncReferenceHandleUnloadType)4); hyperbloomOrb = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.hyperbloomOrb, (AsyncReferenceHandleUnloadType)4); delusionHitEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.delusionHitEffect, (AsyncReferenceHandleUnloadType)4); lunarChargedEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.lunarChargedLightningEffect, (AsyncReferenceHandleUnloadType)4); lunarBloomEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.lunarBloomEffect, (AsyncReferenceHandleUnloadType)4); lunarCrystallizeController = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.lunarCrystallizeController, (AsyncReferenceHandleUnloadType)4); lunarCrystallizeActivatedEffect = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.lunarCrystallizeActivatedEffect, (AsyncReferenceHandleUnloadType)4); } private static void UnloadAssets() { AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.genericElementActivatedEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.genericElementOrbEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.elementEnvironmentScreenEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.overloadEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.electroChargeTempVisualEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.superconductEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.superconductTempVisualEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.swirlEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.crystallizeSpawnOrbEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.crystallizePickup); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.quickenTempVisualEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.bloomObject); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.bloomExplosion); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.burgeonExplosion); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.hyperbloomOrb); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.delusionHitEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.lunarChargedLightningEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.lunarBloomEffect); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.lunarCrystallizeController); AssetAsyncReferenceManager.UnloadAsset(Assets.AssetReferences.lunarCrystallizeActivatedEffect); } public static void CreatePool(ref PrefabComponentPool pool, GameObject prefab, int baseCap) { pool = new PrefabComponentPool { PrefabObject = prefab, AddComponentIfMissing = true, AlwaysGrowable = true, DoNotCull = true }; ((GenericPool)(object)pool).Initialize(baseCap, baseCap); } public static ElementalReactionPooledObject CreatePooledDeployable(PrefabComponentPool pool, CharacterBody owner, DeployableSlot deployableSlot, Vector3 position) { //IL_001d: 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) if (Object.op_Implicit((Object)(object)owner) && Object.op_Implicit((Object)(object)owner.master)) { ElementalReactionPooledObject elementalReactionPooledObject = CreatePooledObject(pool, position); if (Object.op_Implicit((Object)(object)elementalReactionPooledObject) && Object.op_Implicit((Object)(object)elementalReactionPooledObject.deployable)) { owner.master.AddDeployable(elementalReactionPooledObject.deployable, deployableSlot); } return elementalReactionPooledObject; } return null; } public static ElementalReactionPooledObject CreatePooledObject(PrefabComponentPool pool, Vector3 position) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) ElementalReactionPooledObject elementalReactionPooledObject = ((GenericPool)(object)pool).GetObject(); if (Object.op_Implicit((Object)(object)elementalReactionPooledObject)) { ((Component)elementalReactionPooledObject).gameObject.SetActive(true); elementalReactionPooledObject.pool = pool; ((Component)elementalReactionPooledObject).transform.position = position; ((Component)elementalReactionPooledObject).transform.rotation = Quaternion.identity; if (elementalReactionPooledObject.newlySpawned) { elementalReactionPooledObject.newlySpawned = false; NetworkServer.Spawn(((Component)elementalReactionPooledObject).gameObject); } else { NetMessageExtensions.Send((INetMessage)(object)new NetworkPooledObjectSetActive(elementalReactionPooledObject.networkIdentity.netId, active: true), (NetworkDestination)1); } return elementalReactionPooledObject; } return null; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.ds_gaming.ElementalReactions", "ElementalReactions", "1.0.1")] public class ElementalReactionsPlugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static GetDeployableSameSlotLimit <>9__7_0; public static GetDeployableSameSlotLimit <>9__7_1; internal int b__7_0(CharacterMaster self, int deployableCountMultiplier) { return 5; } internal int b__7_1(CharacterMaster self, int deployableCountMultiplier) { return 3; } } public const string PluginGUID = "com.ds_gaming.ElementalReactions"; public const string PluginAuthor = "ds_gaming"; public const string PluginName = "ElementalReactions"; public const string PluginVersion = "1.0.1"; public const string PREFIX = "DS_GAMING_ELEMENTAL_REACTIONS_"; public static ElementalReactionsPlugin instance; public static bool qualityModExists; public void Awake() { //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_005b: 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_0066: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown instance = this; Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); if (Chainloader.PluginInfos.ContainsKey("com.Gorakh.ItemQualities")) { qualityModExists = true; } if (qualityModExists) { QualityInitialize(); } object obj = <>c.<>9__7_0; if (obj == null) { GetDeployableSameSlotLimit val = (CharacterMaster self, int deployableCountMultiplier) => 5; <>c.<>9__7_0 = val; obj = (object)val; } ElementalReactionManager.bloomDeployableSlot = DeployableAPI.RegisterDeployableSlot((GetDeployableSameSlotLimit)obj); object obj2 = <>c.<>9__7_1; if (obj2 == null) { GetDeployableSameSlotLimit val2 = (CharacterMaster self, int deployableCountMultiplier) => 3; <>c.<>9__7_1 = val2; obj2 = (object)val2; } ElementalReactionManager.crystallizeDeployableSlot = DeployableAPI.RegisterDeployableSlot((GetDeployableSameSlotLimit)obj2); Assets.Initialize(); Buffs.Initialize(); DelusionManager.Initialize(); Tokens.Initialize(); ElectroChargedDot.Initialize(); DefaultElementDefs.Initialize(); DefaultElementalReactions.Initialize(); DamageTypes.Initialize(); Unlockables.Initialize(); ElementalReactionsMod.Items.Items.Initialize(); Hooks.Initialize(); ElementalRain.Initialize(); Crafting.Initialize(); MasterElementLoadout.Initialize(); if (Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm")) { SS2Support.Initialize(); } if (Chainloader.PluginInfos.ContainsKey("com.TeamSandswept.Sandswept")) { SandsweptSupport.Initialize(); } NetworkingAPI.RegisterMessageType(); if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions")) { Config.RiskOfOptionsSetup(); } if (Chainloader.PluginInfos.ContainsKey("droppod.lookingglass")) { LookingGlassSupport.Initialize(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void QualityInitialize() { QualitySupport.Initialize(); } } public static class Elites { public struct EliteElement { public EquipmentIndex aspectIndex; public ItemIndex zetAspectIndex; public ElementDef element; public EliteElement(EquipmentIndex equipment, string zetAspectItemName, ElementDef element) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) aspectIndex = (EquipmentIndex)(-1); zetAspectIndex = (ItemIndex)(-1); aspectIndex = equipment; if (zetAspectsExists) { zetAspectIndex = ItemCatalog.FindItemIndex(zetAspectItemName); } this.element = element; } public bool HasEliteAspect(Inventory inventory) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_0022: 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) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return Object.op_Implicit((Object)(object)inventory) && (((int)zetAspectIndex != -1 && inventory.GetItemCountEffective(zetAspectIndex) > 0) || inventory.GetActiveEquipment().equipmentIndex == aspectIndex); } } public static EliteElement[] eliteElements; public static bool zetAspectsExists; [SystemInitializer(new Type[] { typeof(ItemCatalog), typeof(EquipmentCatalog) })] public static void CacheAspects() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) zetAspectsExists = Chainloader.PluginInfos.ContainsKey("com.TPDespair.ZetAspects"); eliteElements = new EliteElement[7] { new EliteElement(Equipment.AffixRed.equipmentIndex, "ZetAspectRed", DefaultElementDefs.pyroElement), new EliteElement(Equipment.EliteVoidEquipment.equipmentIndex, "ZetAspectVoid", DefaultElementDefs.hydroElement), new EliteElement(Equipment.AffixBlue.equipmentIndex, "ZetAspectBlue", DefaultElementDefs.electroElement), new EliteElement(Equipment.EliteCollectiveEquipment.equipmentIndex, "ZetAspectCollective", DefaultElementDefs.electroElement), new EliteElement(Equipment.AffixWhite.equipmentIndex, "ZetAspectWhite", DefaultElementDefs.cryoElement), new EliteElement(Equipment.EliteAurelioniteEquipment.equipmentIndex, "ZetAspectAurelionite", DefaultElementDefs.geoElement), new EliteElement(Elites.Earth.eliteEquipmentDef.equipmentIndex, "ZetAspectEarth", DefaultElementDefs.dendroElement) }; } public static EliteElement? GetFirstEliteElement(Inventory inventory) { EliteElement[] array = eliteElements; for (int i = 0; i < array.Length; i++) { EliteElement value = array[i]; if (value.HasEliteAspect(inventory)) { return value; } } return null; } public static ElementDef GetFirstEliteElementDef(Inventory inventory) { EliteElement? firstEliteElement = GetFirstEliteElement(inventory); if (firstEliteElement.HasValue) { return firstEliteElement.Value.element; } return DefaultElementDefs.physicalElement; } } [RequireComponent(typeof(EffectComponent), typeof(EffectManagerHelper))] public class GenericElementEffectComponent : MonoBehaviour { private EffectManagerHelper efh; private EffectComponent effectComponent; public ScaleParticleSystemDuration particleDuration; public ParticleSystemRenderer icon; public ParticleSystem[] particlesToRecolor; public TrailRenderer[] trailsToRecolor; public Light lightToRecolor; public bool darkenTrailColor = true; public static void SpawnActivatedEffect(Vector3 position, Quaternion rotation, ElementIndex element, bool transmit) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) SpawnActivatedEffect(position, rotation, element, 0.7f, transmit); } public static void SpawnActivatedEffect(Vector3 position, Quaternion rotation, ElementIndex element, float duration, bool transmit) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown EffectManager.SpawnEffect(ElementalReactionManager.genericElementActivatedEffect.WaitForCompletion(), new EffectData { origin = position, rotation = rotation, genericUInt = (uint)element, genericFloat = duration }, transmit); } public static void SpawnActivatedEffect(Transform parent, ElementIndex element, bool transmit) { SpawnActivatedEffect(parent, element, 0.7f, transmit); } public static void SpawnActivatedEffect(Transform parent, ElementIndex element, float duration, bool transmit) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown EffectManager.SpawnEffect(ElementalReactionManager.genericElementActivatedEffect.WaitForCompletion(), new EffectData { origin = parent.position, rootObject = ((Component)parent).gameObject, genericUInt = (uint)element, genericFloat = duration }, transmit); } public static void SpawnActivatedEffect(Transform parent, ParentEffectToItemDisplay.ItemDisplayParent itemDisplayParent, ElementIndex element, float duration, bool transmit) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown EffectManager.SpawnEffect(ElementalReactionManager.genericElementActivatedEffect.WaitForCompletion(), new EffectData { origin = parent.position, rootObject = ((Component)parent).gameObject, genericUInt = (uint)element, genericFloat = duration, genericBool = true, modelChildIndex = (byte)itemDisplayParent }, transmit); } private void Awake() { efh = ((Component)this).GetComponent(); effectComponent = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)efh)) { EffectManagerHelper obj = efh; obj.OnEffectActivated = (Action)Delegate.Combine(obj.OnEffectActivated, new Action(SetElementVFX)); } } private void SetElementVFX() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) ElementDef elementDef = ElementCatalog.GetElementDef((ElementIndex)effectComponent.effectData.genericUInt); if (!Object.op_Implicit((Object)(object)elementDef)) { return; } if (Object.op_Implicit((Object)(object)icon)) { ((Renderer)icon).sharedMaterial = elementDef.iconVFX; } for (int i = 0; i < particlesToRecolor.Length; i++) { MainModule main = particlesToRecolor[i].main; ((MainModule)(ref main)).startColor = new MinMaxGradient(elementDef.color); } for (int j = 0; j < trailsToRecolor.Length; j++) { Gradient colorGradientCopy = trailsToRecolor[j].GetColorGradientCopy(); Color color = elementDef.color; if (darkenTrailColor) { color.r -= 0.4f; color.g -= 0.4f; color.b -= 0.4f; } colorGradientCopy.colorKeys = (GradientColorKey[])(object)new GradientColorKey[1] { new GradientColorKey(color, 0f) }; trailsToRecolor[j].SetColorGradient(colorGradientCopy); } if (Object.op_Implicit((Object)(object)particleDuration)) { particleDuration.newDuration = effectComponent.effectData.genericFloat; } if (Object.op_Implicit((Object)(object)lightToRecolor)) { lightToRecolor.color = elementDef.color; } } } public static class Hooks { [CompilerGenerated] private static class <>O { public static Manipulator <0>__TakeDamageIL; public static hook_TakeDamageProcess <1>__ApplyElementToSkillDamage; public static hook_CanSelectItemEntry <2>__NoDelusionsWithElementInLogbook; public static hook_Heal <3>__HealingReceivedDebuff; public static hook_AddChanneledBuff <4>__AddOverheatPyro; public static Manipulator <5>__SolusWingCoolingCryo; public static Manipulator <6>__LavaPyro; public static Manipulator <7>__AddLoadoutElementToProjectile; public static hook_OnEnter <8>__AlloyWorshipUnitShieldAnemo; public static hook_StartShock <9>__SolusAmalgamatorShockArmorElectro; public static Manipulator <10>__SolusInvalidatorSlamAttackElectro; public static hook_OnEnter <11>__MiniMushrumHealingStartDendro; public static hook_OnExit <12>__MiniMushrumHealingEndDendro; public static Manipulator <13>__VoidInfestorHydro; public static Manipulator <14>__GlacialExplosionCryo; public static Manipulator <15>__DelusionsShareItemDisplay; public static hook_AddDebuff <16>__ClayTemplarPushHydro; public static Manipulator <17>__LarvaHydroThemselves; public static hook_OnEnter <18>__OrphanedCoreElectroOnCharge; public static Manipulator <19>__MendingHealingOrbDendro; public static Manipulator <20>__DestructibleObjectHydro; public static Manipulator <21>__DestructibleObjectElectro; public static hook_OnBuffFirstStackGained <22>__CreateLunarCrystallize; public static hook_Start <23>__ScavengerRandomElement; public static hook_OnEnter <24>__ScavengerChargeAttackElement; public static hook_LateUpdate <25>__EnvironmentScreenEffect; public static Manipulator <26>__EngiTurretElements; public static Manipulator <27>__OverlayHook; } public static void Initialize() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Expected O, but got Unknown //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_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Expected O, but got Unknown //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Expected O, but got Unknown //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Expected O, but got Unknown //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Expected O, but got Unknown //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Expected O, but got Unknown //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Expected O, but got Unknown //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Expected O, but got Unknown //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Expected O, but got Unknown //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Expected O, but got Unknown //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Expected O, but got Unknown //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Expected O, but got Unknown object obj = <>O.<0>__TakeDamageIL; if (obj == null) { Manipulator val = TakeDamageIL; <>O.<0>__TakeDamageIL = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; object obj2 = <>O.<1>__ApplyElementToSkillDamage; if (obj2 == null) { hook_TakeDamageProcess val2 = ApplyElementToSkillDamage; <>O.<1>__ApplyElementToSkillDamage = val2; obj2 = (object)val2; } HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)obj2; object obj3 = <>O.<2>__NoDelusionsWithElementInLogbook; if (obj3 == null) { hook_CanSelectItemEntry val3 = NoDelusionsWithElementInLogbook; <>O.<2>__NoDelusionsWithElementInLogbook = val3; obj3 = (object)val3; } LogBookController.CanSelectItemEntry += (hook_CanSelectItemEntry)obj3; object obj4 = <>O.<3>__HealingReceivedDebuff; if (obj4 == null) { hook_Heal val4 = HealingReceivedDebuff; <>O.<3>__HealingReceivedDebuff = val4; obj4 = (object)val4; } HealthComponent.Heal += (hook_Heal)obj4; object obj5 = <>O.<4>__AddOverheatPyro; if (obj5 == null) { hook_AddChanneledBuff val5 = AddOverheatPyro; <>O.<4>__AddOverheatPyro = val5; obj5 = (object)val5; } BodyOverheatInfo.AddChanneledBuff += (hook_AddChanneledBuff)obj5; object obj6 = <>O.<5>__SolusWingCoolingCryo; if (obj6 == null) { Manipulator val6 = SolusWingCoolingCryo; <>O.<5>__SolusWingCoolingCryo = val6; obj6 = (object)val6; } CharacterBody.AddTimedBuff_BuffDef_float += (Manipulator)obj6; object obj7 = <>O.<6>__LavaPyro; if (obj7 == null) { Manipulator val7 = LavaPyro; <>O.<6>__LavaPyro = val7; obj7 = (object)val7; } CharacterBody.InflictLavaDamage += (Manipulator)obj7; object obj8 = <>O.<7>__AddLoadoutElementToProjectile; if (obj8 == null) { Manipulator val8 = AddLoadoutElementToProjectile; <>O.<7>__AddLoadoutElementToProjectile = val8; obj8 = (object)val8; } ProjectileManager.InitializeProjectile += (Manipulator)obj8; object obj9 = <>O.<8>__AlloyWorshipUnitShieldAnemo; if (obj9 == null) { hook_OnEnter val9 = AlloyWorshipUnitShieldAnemo; <>O.<8>__AlloyWorshipUnitShieldAnemo = val9; obj9 = (object)val9; } FireSuperDelayKnockup.OnEnter += (hook_OnEnter)obj9; object obj10 = <>O.<9>__SolusAmalgamatorShockArmorElectro; if (obj10 == null) { hook_StartShock val10 = SolusAmalgamatorShockArmorElectro; <>O.<9>__SolusAmalgamatorShockArmorElectro = val10; obj10 = (object)val10; } ShockArmor.StartShock += (hook_StartShock)obj10; object obj11 = <>O.<10>__SolusInvalidatorSlamAttackElectro; if (obj11 == null) { Manipulator val11 = SolusInvalidatorSlamAttackElectro; <>O.<10>__SolusInvalidatorSlamAttackElectro = val11; obj11 = (object)val11; } Detonate.FixedUpdate += (Manipulator)obj11; object obj12 = <>O.<11>__MiniMushrumHealingStartDendro; if (obj12 == null) { hook_OnEnter val12 = MiniMushrumHealingStartDendro; <>O.<11>__MiniMushrumHealingStartDendro = val12; obj12 = (object)val12; } Plant.OnEnter += (hook_OnEnter)obj12; object obj13 = <>O.<12>__MiniMushrumHealingEndDendro; if (obj13 == null) { hook_OnExit val13 = MiniMushrumHealingEndDendro; <>O.<12>__MiniMushrumHealingEndDendro = val13; obj13 = (object)val13; } Plant.OnExit += (hook_OnExit)obj13; object obj14 = <>O.<13>__VoidInfestorHydro; if (obj14 == null) { Manipulator val14 = VoidInfestorHydro; <>O.<13>__VoidInfestorHydro = val14; obj14 = (object)val14; } Infest.FixedUpdate += (Manipulator)obj14; object obj15 = <>O.<14>__GlacialExplosionCryo; if (obj15 == null) { Manipulator val15 = GlacialExplosionCryo; <>O.<14>__GlacialExplosionCryo = val15; obj15 = (object)val15; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj15; object obj16 = <>O.<15>__DelusionsShareItemDisplay; if (obj16 == null) { Manipulator val16 = DelusionsShareItemDisplay; <>O.<15>__DelusionsShareItemDisplay = val16; obj16 = (object)val16; } CharacterModel.UpdateItemDisplay += (Manipulator)obj16; object obj17 = <>O.<16>__ClayTemplarPushHydro; if (obj17 == null) { hook_AddDebuff val17 = ClayTemplarPushHydro; <>O.<16>__ClayTemplarPushHydro = val17; obj17 = (object)val17; } FireSonicBoom.AddDebuff += (hook_AddDebuff)obj17; object obj18 = <>O.<17>__LarvaHydroThemselves; if (obj18 == null) { Manipulator val18 = LarvaHydroThemselves; <>O.<17>__LarvaHydroThemselves = val18; obj18 = (object)val18; } LarvaLeap.DoImpactAuthority += (Manipulator)obj18; object obj19 = <>O.<18>__OrphanedCoreElectroOnCharge; if (obj19 == null) { hook_OnEnter val19 = OrphanedCoreElectroOnCharge; <>O.<18>__OrphanedCoreElectroOnCharge = val19; obj19 = (object)val19; } KineticAura.OnEnter += (hook_OnEnter)obj19; object obj20 = <>O.<19>__MendingHealingOrbDendro; if (obj20 == null) { Manipulator val20 = MendingHealingOrbDendro; <>O.<19>__MendingHealingOrbDendro = val20; obj20 = (object)val20; } Heal.OnEnter += (Manipulator)obj20; object obj21 = <>O.<20>__DestructibleObjectHydro; if (obj21 == null) { Manipulator val21 = DestructibleObjectHydro; <>O.<20>__DestructibleObjectHydro = val21; obj21 = (object)val21; } ExplosivePotDeath.Explode += (Manipulator)obj21; object obj22 = <>O.<20>__DestructibleObjectHydro; if (obj22 == null) { Manipulator val22 = DestructibleObjectHydro; <>O.<20>__DestructibleObjectHydro = val22; obj22 = (object)val22; } SulfurPodDeath.Explode += (Manipulator)obj22; object obj23 = <>O.<21>__DestructibleObjectElectro; if (obj23 == null) { Manipulator val23 = DestructibleObjectElectro; <>O.<21>__DestructibleObjectElectro = val23; obj23 = (object)val23; } FusionCellDeath.Explode += (Manipulator)obj23; object obj24 = <>O.<21>__DestructibleObjectElectro; if (obj24 == null) { Manipulator val24 = DestructibleObjectElectro; <>O.<21>__DestructibleObjectElectro = val24; obj24 = (object)val24; } LunarRainDeathState.Explode += (Manipulator)obj24; object obj25 = <>O.<22>__CreateLunarCrystallize; if (obj25 == null) { hook_OnBuffFirstStackGained val25 = CreateLunarCrystallize; <>O.<22>__CreateLunarCrystallize = val25; obj25 = (object)val25; } CharacterBody.OnBuffFirstStackGained += (hook_OnBuffFirstStackGained)obj25; object obj26 = <>O.<23>__ScavengerRandomElement; if (obj26 == null) { hook_Start val26 = ScavengerRandomElement; <>O.<23>__ScavengerRandomElement = val26; obj26 = (object)val26; } ScavengerItemGranter.Start += (hook_Start)obj26; object obj27 = <>O.<24>__ScavengerChargeAttackElement; if (obj27 == null) { hook_OnEnter val27 = ScavengerChargeAttackElement; <>O.<24>__ScavengerChargeAttackElement = val27; obj27 = (object)val27; } PrepEnergyCannon.OnEnter += (hook_OnEnter)obj27; object obj28 = <>O.<25>__EnvironmentScreenEffect; if (obj28 == null) { hook_LateUpdate val28 = EnvironmentScreenEffect; <>O.<25>__EnvironmentScreenEffect = val28; obj28 = (object)val28; } CameraRigController.LateUpdate += (hook_LateUpdate)obj28; object obj29 = <>O.<26>__EngiTurretElements; if (obj29 == null) { Manipulator val29 = EngiTurretElements; <>O.<26>__EngiTurretElements = val29; obj29 = (object)val29; } CharacterBody.HandleConstructTurret += (Manipulator)obj29; object obj30 = <>O.<27>__OverlayHook; if (obj30 == null) { Manipulator val30 = OverlayHook; <>O.<27>__OverlayHook = val30; obj30 = (object)val30; } CharacterModel.UpdateOverlays += (Manipulator)obj30; object obj31 = <>O.<27>__OverlayHook; if (obj31 == null) { Manipulator val31 = OverlayHook; <>O.<27>__OverlayHook = val31; obj31 = (object)val31; } CharacterModel.UpdateOverlayStates += (Manipulator)obj31; } private static void TakeDamageIL(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel damageNotRejected = null; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "onIncomingDamageReceivers") }) && val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(DamageInfo), "rejected"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref damageNotRejected) })) { val.Goto(damageNotRejected.Target, (MoveType)2, true); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Action)delegate(HealthComponent self, DamageInfo damage) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) if (!damage.rejected && Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { ElementDef elementDef = ElementCatalog.GetElementDef(damage.damageType.GetElement()); CharacterBody val2 = (Object.op_Implicit((Object)(object)damage.attacker) ? damage.attacker.GetComponent() : null); if ((Object)(object)elementDef != (Object)(object)DefaultElementDefs.physicalElement && !Util.CanUseElements(val2)) { elementDef = DefaultElementDefs.physicalElement; } bool flag = false; if (Object.op_Implicit((Object)(object)val2) && damage.damage / val2.damage >= 4f && val2.GetBuffCount((BuffDef)(object)Buffs.lunarBloomBuff) >= 3) { val2.SetBuffCount(((BuffDef)Buffs.lunarBloomBuff).buffIndex, val2.GetBuffCount((BuffDef)(object)Buffs.lunarBloomBuff) - 3); flag = true; DamageAPI.AddModdedDamageType(ref damage.damageType, DamageTypes.lunarDamageType); } ElementalReactionManager.ApplyElement(elementDef, self.body, ref damage, out var addedDamage); if (flag) { addedDamage += damage.damage * 2f; EffectManager.SimpleEffect(ElementalReactionManager.lunarBloomEffect.WaitForCompletion(), Object.op_Implicit((Object)(object)damage.inflictedHurtbox) ? ((Component)damage.inflictedHurtbox).transform.position : self.body.corePosition, Quaternion.identity, true); } if (self.body.HasBuff(Buffs.superconductBuff) && (Object)(object)elementDef == (Object)(object)DefaultElementDefs.physicalElement && !DamageAPI.HasModdedDamageType(ref damage.damageType, DamageTypes.elementalReactionDamageType)) { addedDamage += damage.damage * 1.3f; } else if (damage.damage > 0f && self.body.HasBuff(Buffs.quickenBuff) && Object.op_Implicit((Object)(object)val2) && ((Object)(object)elementDef == (Object)(object)DefaultElementDefs.dendroElement || (Object)(object)elementDef == (Object)(object)DefaultElementDefs.electroElement)) { addedDamage += 0.5f * damage.procCoefficient * val2.damage; } if (DamageAPI.HasModdedDamageType(ref damage.damageType, DamageTypes.superconductDamageType)) { self.body.AddTimedBuff(Buffs.superconductBuff, 5f, 1); } if (DamageAPI.HasModdedDamageType(ref damage.damageType, DamageTypes.elementalReactionDamageType)) { DamageInfo obj = damage; obj.damage += addedDamage; ModifyElementalReactionDamage(self, damage.attacker, val2, ref damage.damage); } else { ModifyElementalReactionDamage(self, damage.attacker, val2, ref addedDamage); DamageInfo obj2 = damage; obj2.damage += addedDamage; } if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.inventory) && DamageAPI.HasModdedDamageType(ref damage.damageType, DamageTypes.lunarDamageType)) { DamageInfo obj3 = damage; obj3.damage *= 1f + (float)Math.Max(val2.inventory.GetItemCountWithQuality(ElementalReactionsMod.Items.Items.moonWheel) - 1, 0) * 0.5f; } } }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void ModifyElementalReactionDamage(HealthComponent victim, GameObject attacker, CharacterBody attackerBody, ref float damage) { //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)attackerBody) && Object.op_Implicit((Object)(object)attackerBody.inventory)) { float num = 1f; num += 0.3f * (float)attackerBody.inventory.GetItemCountWithQuality(ElementalReactionsMod.Items.Items.instructorsTeaCup); if (ElementalReactionsPlugin.qualityModExists) { num += (float)attackerBody.GetBuffCount(Buffs.instructorsTeaCupQualityBase) * 0.05f * (float)attackerBody.inventory.GetItemCountQualities(ElementalReactionsMod.Items.Items.instructorsTeaCup); } damage *= num; } if (Object.op_Implicit((Object)(object)victim.body.teamComponent) && (int)victim.body.teamComponent.teamIndex == 1) { damage *= Config.PlayerReactionResistance().Value / 100f; } } private static void ApplyElementToSkillDamage(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_001c: 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) if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { ElementDef elementDef = ElementCatalog.GetElementDef(damageInfo.damageType.GetElement()); CharacterBody characterBody = default(CharacterBody); if ((!Object.op_Implicit((Object)(object)elementDef) || (Object)(object)elementDef == (Object)(object)DefaultElementDefs.physicalElement) && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent(ref characterBody)) { damageInfo.damageType.SetElement(ElementLoadoutComponent.GetElement(characterBody, damageInfo.damageType.damageSource).index); } } orig.Invoke(self, damageInfo); } private static bool NoDelusionsWithElementInLogbook(orig_CanSelectItemEntry orig, ItemDef item, Dictionary entitlements) { return orig.Invoke(item, entitlements) && Object.op_Implicit((Object)(object)item) && !Enumerable.Contains(DelusionManager.delusionToElement.Keys, item); } private static float HealingReceivedDebuff(orig_Heal orig, HealthComponent self, float amount, ProcChainMask proc, bool nonRegen) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (self.body.HasBuff(Buffs.delusionActiveBuff) && Object.op_Implicit((Object)(object)self.body.inventory)) { amount *= Mathf.Max(0f, 1f - (float)self.body.inventory.GetDelusionCount() * 0.25f); } return orig.Invoke(self, amount, proc, nonRegen); } private static void AddOverheatPyro(orig_AddChanneledBuff orig, BodyOverheatInfo self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && Object.op_Implicit((Object)(object)self.characterBody)) { ElementalReactionManager.ApplyElement(DefaultElementDefs.pyroElement, self.characterBody, 0.3f, null, alwaysPersist: false, 1f); } } private static void SolusWingCoolingCryo(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel val2 = default(ILLabel); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Brittle") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(CharacterBody self) { if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { ElementalReactionManager.ApplyElement(DefaultElementDefs.cryoElement, self, 1f, null, alwaysPersist: false, 1f); } }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void LavaPyro(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DamageInfo), "damageType") })) { val.Emit(OpCodes.Ldloc_0); val.EmitDelegate>((Action)delegate(DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { damageInfo.damageType.SetElement(DefaultElementDefs.pyroElement.index); } }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void AddLoadoutElementToProjectile(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DamageTypeCombo), "damageSource") })) { val.Emit(OpCodes.Ldarg_1); Instruction prev = val.Prev; val.Emit(OpCodes.Ldloc_1); val.EmitDelegate>((Action)delegate(FireProjectileInfo fireProjectileInfo, ProjectileDamage projectileDamage) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) CharacterBody characterBody = default(CharacterBody); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && !projectileDamage.damageType.IsElementalDamage() && Object.op_Implicit((Object)(object)fireProjectileInfo.owner) && fireProjectileInfo.owner.TryGetComponent(ref characterBody)) { projectileDamage.damageType.SetElement(ElementLoadoutComponent.GetElement(characterBody, projectileDamage.damageType.damageSource).index); } }); ILLabel val2 = default(ILLabel); if (val.TryGotoPrev(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val2) })) { val.Next.Operand = prev; } } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void AlloyWorshipUnitShieldAnemo(orig_OnEnter orig, FireSuperDelayKnockup self) { orig.Invoke(self); ElementLoadoutComponent elementLoadoutComponent = default(ElementLoadoutComponent); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && NetworkServer.active && ((EntityState)self).TryGetComponent(ref elementLoadoutComponent)) { elementLoadoutComponent.SetSpecialAppliedElement(DefaultElementDefs.anemoElement, FireSuperDelayKnockup.shieldDuration); } } private static void SolusAmalgamatorShockArmorElectro(orig_StartShock orig, ShockArmor self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && NetworkServer.active) { ElementalReactionManager.ApplyElement(DefaultElementDefs.electroElement, ((EntityState)self).characterBody, 0.5f, ((EntityState)self).gameObject, alwaysPersist: true); } } private static void SolusInvalidatorSlamAttackElectro(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(Detonate), "_hasDetonated") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(Detonate self) { if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && NetworkServer.active) { ElementalReactionManager.ApplyElement(DefaultElementDefs.electroElement, ((EntityState)self).characterBody, 0.5f, ((EntityState)self).gameObject); } }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void MiniMushrumHealingStartDendro(orig_OnEnter orig, Plant self) { orig.Invoke(self); ElementLoadoutComponent elementLoadoutComponent = default(ElementLoadoutComponent); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && NetworkServer.active && ((EntityState)self).TryGetComponent(ref elementLoadoutComponent)) { elementLoadoutComponent.SetSpecialAppliedElement(DefaultElementDefs.dendroElement); } } private static void MiniMushrumHealingEndDendro(orig_OnExit orig, Plant self) { ElementLoadoutComponent elementLoadoutComponent = default(ElementLoadoutComponent); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && NetworkServer.active && ((EntityState)self).TryGetComponent(ref elementLoadoutComponent)) { elementLoadoutComponent.SetSpecialAppliedElement(null); } orig.Invoke(self); } private static void VoidInfestorHydro(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, (MethodBase)AccessTools.PropertySetter(typeof(TeamComponent), "teamIndex")) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc_3); val.EmitDelegate>((Action)delegate(Infest self, CharacterBody target) { if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { ElementalReactionManager.ApplyElement(DefaultElementDefs.hydroElement, target, 3f, ((EntityState)self).gameObject); } }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void GlacialExplosionCryo(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int delayBlastComponentLoc = -1; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "AffixWhite") }) && val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DelayBlast), "baseForce") }) && val.TryGotoPrev(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref delayBlastComponentLoc) })) { if (!val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DelayBlast), "damageType") })) { return; } val.Emit(OpCodes.Ldloc, delayBlastComponentLoc); val.EmitDelegate>((Action)delegate(DelayBlast self) { if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { self.damageType.SetElement(DefaultElementDefs.cryoElement.index); } }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void DelusionsShareItemDisplay(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "CalculateEffectiveItemStacks") })) { val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldloc_0); val.EmitDelegate>((Func)((int itemCount, Inventory inventory, ItemIndex itemIndex) => (Object.op_Implicit((Object)(object)inventory) && itemIndex == ElementalReactionsMod.Items.Items.delusion.itemIndex) ? (itemCount + inventory.GetDelusionCount()) : itemCount)); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void ClayTemplarPushHydro(orig_AddDebuff orig, FireSonicBoom self, CharacterBody target) { orig.Invoke(self, target); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { ElementalReactionManager.ApplyElement(DefaultElementDefs.hydroElement, target, 1f, ((EntityState)self).gameObject); } } private static void LarvaHydroThemselves(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DamageInfo), "damageType") })) { val.EmitDelegate>((Func)delegate(DamageTypeCombo damageType) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { damageType.SetElement(DefaultElementDefs.hydroElement.index); } return damageType; }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void OrphanedCoreElectroOnCharge(orig_OnEnter orig, KineticAura self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && NetworkServer.active) { ElementalReactionManager.ApplyElement(DefaultElementDefs.electroElement, ((EntityState)self).characterBody, 1.5f, ((EntityState)self).gameObject); } } private static void MendingHealingOrbDendro(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0099: 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) ILCursor val = new ILCursor(il); int targetLocIndex = -1; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(HealthComponent), "body") }) && val.TryGotoPrev(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref targetLocIndex) }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(OrbManager), "AddOrb") })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, targetLocIndex); val.EmitDelegate>((Action)delegate(Heal self, HealthComponent target) { if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { ElementalReactionManager.ApplyElement(DefaultElementDefs.dendroElement, target.body, 2f, ((EntityState)self).gameObject); } }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void DestructibleObjectHydro(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(BlastAttack), "damageType") })) { val.EmitDelegate>((Func)delegate(DamageTypeCombo damageType) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { damageType.SetElement(DefaultElementDefs.hydroElement.index); } return damageType; }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void DestructibleObjectElectro(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(BlastAttack), "Fire") })) { val.EmitDelegate>((Func)delegate(BlastAttack blastAttack) { if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { blastAttack.damageType.SetElement(DefaultElementDefs.electroElement.index); } return blastAttack; }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void CreateLunarCrystallize(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buff) { orig.Invoke(self, buff); if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && (Object)(object)buff == (Object)(object)Buffs.lunarCrystallizeBuff) { ElementalReactionManager.CreateLunarCrystallizeController(self); } } private static void ScavengerRandomElement(orig_Start orig, ScavengerItemGranter self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { return; } Inventory component = ((Component)self).GetComponent(); if (component.GetItemCountPermanent(ElementLoadoutComponent.primaryElementItem) == 0) { if (component.GetItemCountWithQuality(MoonWheel.moonWheel) > 0) { MasterElementLoadout.UpdateLoadoutItem(component, DefaultElementDefs.hydroElement, ElementLoadoutComponent.primaryElementItem); } else { MasterElementLoadout.UpdateLoadoutItem(component, ElementCatalog.elementCatalog[ScavengerItemGranter.rng.RangeInt(1, ElementCatalog.elementCatalog.Length)], ElementLoadoutComponent.primaryElementItem); } } } private static void ScavengerChargeAttackElement(orig_OnEnter orig, PrepEnergyCannon self) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown orig.Invoke(self); ElementDef element = ElementLoadoutComponent.GetElement(((EntityState)self).characterBody, (DamageSource)1); if (Object.op_Implicit((Object)(object)((EnergyCannonState)self).muzzleTransform) && (Object)(object)element != (Object)(object)DefaultElementDefs.physicalElement && Util.CanUseElements(((EntityState)self).characterBody)) { EffectManager.SpawnEffect(ElementalReactionManager.genericElementActivatedEffect.WaitForCompletion(), new EffectData { rootObject = ((Component)((EnergyCannonState)self).muzzleTransform).gameObject, origin = ((EnergyCannonState)self).muzzleTransform.position, genericFloat = self.duration * 0.85f, genericUInt = (uint)element.index, scale = 12f }, false); } } private static void EnvironmentScreenEffect(orig_LateUpdate orig, CameraRigController self) { orig.Invoke(self); bool active = Object.op_Implicit((Object)(object)self.targetBody) && self.targetBody.HasBuff(Buffs.elementalEnvironmentHiddenBuff); if (ElementalRain.camerasToScreenEffects.TryGetValue(self, out var value)) { value.SetActive(active); } } private static void EngiTurretElements(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0099: 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_00dd: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int bodyIndex = -1; if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, (MethodBase)AccessTools.PropertyGetter(typeof(CharacterBody), "master")) }) && val.TryGotoPrev(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref bodyIndex) }) && val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(MasterSummon), "Perform") })) { val.Emit(OpCodes.Dup); val.Emit(OpCodes.Ldloc, bodyIndex); val.EmitDelegate>((Func)((CharacterBody body) => (IInventorySetupCallback)(object)((Component)body).GetComponent())); val.Emit(OpCodes.Stfld, "inventorySetupCallback"); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void SolusScorcherPyro(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "damageTypeOverride") })) { val.EmitDelegate>((Func)delegate(DamageTypeCombo? damageType) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { DamageTypeCombo damageTypeCombo = damageType.GetValueOrDefault(); damageTypeCombo.SetElement(DefaultElementDefs.pyroElement.index); return damageTypeCombo; } return damageType; }); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } private static void OverlayHook(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0069: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Frost"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(CharacterBody), "HasBuff") })) { Instruction next = val.Next; val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldfld, "body"); val.Emit(OpCodes.Ldsfld, typeof(Buffs).GetField("superconductBuff")); val.Emit(OpCodes.Callvirt, AccessTools.PropertyGetter(typeof(BuffDef), "buffIndex").Name); val.Emit(OpCodes.Callvirt, "HasBuff"); val.Emit(OpCodes.Br, next); val.Emit(OpCodes.Ldc_I4_1); Instruction previous = val.Previous; val.Index -= 7; val.Emit(OpCodes.Brtrue, previous); } else { Log.Error(((MemberReference)il.Method).Name + " IL FAILED"); } } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } public static class LookingGlassSupport { public static void Initialize() { RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(CreateLookingGlassSupport)); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void CreateLookingGlassSupport() { //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Expected O, but got Unknown //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Expected O, but got Unknown if (Language.languagesByName.TryGetValue("en", out var value)) { RegisterLookingGlassBuff(value, Buffs.quickenBuff, "Quicken", $"Increases {Tokens.ElectroText()} and {Tokens.DendroText()} base damage by {50f}%."); RegisterLookingGlassBuff(value, Buffs.superconductBuff, "Superconduct", $"Increases non-elemental damage by {29.999996f}%."); RegisterLookingGlassBuff(value, Buffs.electroChargeBuff, "Electro-Charged", "Deals " + Tokens.DamageValueBaseText(100f) + " per tick."); RegisterLookingGlassBuff(value, Buffs.delusionActiveBuff, "Delusion Activated", "Decreases healing received by " + Tokens.HealthText(25f + "%") + "."); RegisterLookingGlassBuff(value, Buffs.lunarChargeBuff, "Lunar-Charged", "Deals " + Tokens.DamageValueBaseText(600f) + " per tick."); RegisterLookingGlassBuff(value, (BuffDef)(object)Buffs.lunarBloomBuff, "Verdant Dew", "Consume three of this buff to increase your next hit of " + Tokens.DamageText("over 400% damage") + " by " + Tokens.DamageText(200f + "%") + "."); } ItemStatsDef val = new ItemStatsDef(); val.descriptions.Add("Bonus Damage: "); val.valueTypes.Add((ValueType)1); val.measurementUnits.Add((MeasurementUnits)1); val.calculateValues = (CharacterMaster master, int stackCount) => new List { 0.3f * (float)master.inventory.GetItemCountWithQuality(ElementalReactionsMod.Items.Items.instructorsTeaCup) }; ItemDefinitions.RegisterItemStatsDef(val, ElementalReactionsMod.Items.Items.instructorsTeaCup.itemIndex); ItemStatsDef val2 = new ItemStatsDef(); val2.descriptions.Add("Bonus Damage: "); val2.valueTypes.Add((ValueType)1); val2.measurementUnits.Add((MeasurementUnits)1); val2.calculateValues = (CharacterMaster master, int stackCount) => new List { 0.5f * (float)Mathf.Max(master.inventory.GetItemCountWithQuality(ElementalReactionsMod.Items.Items.moonWheel) - 1, 0) }; ItemDefinitions.RegisterItemStatsDef(val2, ElementalReactionsMod.Items.Items.moonWheel.itemIndex); ItemStatsDef val3 = new ItemStatsDef(); val3.descriptions.Add("Healing Reduction: "); val3.valueTypes.Add((ValueType)11); val3.measurementUnits.Add((MeasurementUnits)1); val3.descriptions.Add("Damage: "); val3.valueTypes.Add((ValueType)1); val3.measurementUnits.Add((MeasurementUnits)1); val3.descriptions.Add("Proc Coefficient: "); val3.valueTypes.Add((ValueType)1); val3.measurementUnits.Add((MeasurementUnits)9); val3.descriptions.Add("Total Health Cost: "); val3.valueTypes.Add((ValueType)11); val3.measurementUnits.Add((MeasurementUnits)1); val3.calculateValues = delegate(CharacterMaster master, int stackCount) { List list2 = new List(); int delusionCount = master.inventory.GetDelusionCount(); list2.Add(0.25f * (float)delusionCount); list2.Add(3f * (float)stackCount); list2.Add(1f); list2.Add(0.05f * (float)delusionCount); return list2; }; List list = DelusionManager.delusionToElement.Keys.ToList(); foreach (ItemDef item in list) { ItemDefinitions.RegisterItemStatsDef(val3, item.itemIndex); } if (ElementalReactionsPlugin.qualityModExists) { ItemStatsDef val4 = new ItemStatsDef(); val4.descriptions.Add("Bonus Damage: "); val4.valueTypes.Add((ValueType)1); val4.measurementUnits.Add((MeasurementUnits)1); val4.descriptions.Add("Quality Damage Per Stack: "); val4.valueTypes.Add((ValueType)1); val4.measurementUnits.Add((MeasurementUnits)1); val4.descriptions.Add("Max Damage From Quality: "); val4.valueTypes.Add((ValueType)1); val4.measurementUnits.Add((MeasurementUnits)1); ItemIndex[] qualityItemIndices = QualitySupport.GetQualityItemIndices(ElementalReactionsMod.Items.Items.instructorsTeaCup); val4.calculateValues = (CharacterMaster master, int stackCount) => new List { 0.3f * (float)master.inventory.GetItemCountWithQuality(ElementalReactionsMod.Items.Items.instructorsTeaCup), 0.05f * (float)master.inventory.GetItemCountQualities(ElementalReactionsMod.Items.Items.instructorsTeaCup), InstructorsTeaCupQualityMaxDamage(master) }; for (int num = 0; num < qualityItemIndices.Length; num++) { ItemDefinitions.RegisterItemStatsDef(val4, qualityItemIndices[num]); } ItemStatsDef val5 = new ItemStatsDef(); val5.descriptions.Add("Bonus Damage: "); val5.valueTypes.Add((ValueType)1); val5.measurementUnits.Add((MeasurementUnits)1); val5.descriptions.Add("Quality Doubling Chance: "); val5.valueTypes.Add((ValueType)1); val5.measurementUnits.Add((MeasurementUnits)1); val5.calculateValues = (CharacterMaster master, int stackCount) => new List { 0.5f * (float)Mathf.Max(master.inventory.GetItemCountWithQuality(ElementalReactionsMod.Items.Items.moonWheel) - 1, 0), MoonWheelQualityLookingGlassChance(master) }; qualityItemIndices = QualitySupport.GetQualityItemIndices(ElementalReactionsMod.Items.Items.moonWheel); for (int num2 = 0; num2 < qualityItemIndices.Length; num2++) { ItemDefinitions.RegisterItemStatsDef(val5, qualityItemIndices[num2]); } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static float InstructorsTeaCupQualityMaxDamage(CharacterMaster master) { //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_0016: 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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected I4, but got Unknown ItemQualityCounts itemCountsEffective = InventoryExtensions.GetItemCountsEffective(master.inventory, QualityCatalog.FindItemQualityGroupIndex(ElementalReactionsMod.Items.Items.instructorsTeaCup.itemIndex)); QualityTier highestQuality = ((ItemQualityCounts)(ref itemCountsEffective)).HighestQuality; QualityTier val = highestQuality; return (val - 1) switch { 0 => 0.75f * (float)((ItemQualityCounts)(ref itemCountsEffective)).TotalQualityCount, 1 => 1f * (float)((ItemQualityCounts)(ref itemCountsEffective)).TotalQualityCount, 2 => 1.25f * (float)((ItemQualityCounts)(ref itemCountsEffective)).TotalQualityCount, _ => 0.5f * (float)((ItemQualityCounts)(ref itemCountsEffective)).TotalQualityCount, }; } internal static float MoonWheelQualityLookingGlassChance(CharacterMaster master) { float num = Mathf.Clamp01(master.inventory.GetMoonWheelQualityChance() / 100f); if (master.luck == 0f) { return num; } if (master.luck > 0f) { return 1f - Mathf.Pow(1f - num, master.luck + 1f); } return 1f - Mathf.Pow(num, Mathf.Abs(master.luck) + 1f); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void RegisterLookingGlassBuff(Language lang, BuffDef buff, string name, string description) { LookingGlassLanguageAPI.SetupToken(lang, "NAME_" + ((Object)buff).name, name); LookingGlassLanguageAPI.SetupToken(lang, "DESCRIPTION_" + ((Object)buff).name, description); } } internal static class Materials { private static List cachedMaterials = new List(); internal static Shader hotpoo = LegacyResourcesAPI.Load("Shaders/Deferred/HGStandard"); public static Material SetHopooMaterial(this Material tempMat) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) if (cachedMaterials.Contains(tempMat)) { return tempMat; } float? num = null; Color? val = null; if (tempMat.IsKeywordEnabled("_NORMALMAP")) { num = tempMat.GetFloat("_BumpScale"); } if (tempMat.IsKeywordEnabled("_EMISSION")) { val = tempMat.GetColor("_EmissionColor"); } tempMat.shader = hotpoo; tempMat.SetColor("_Color", tempMat.GetColor("_Color")); tempMat.SetTexture("_MainTex", tempMat.GetTexture("_MainTex")); tempMat.SetTexture("_NormalTex", tempMat.GetTexture("_BumpMap")); tempMat.SetTexture("_EmTex", tempMat.GetTexture("_EmissionMap")); tempMat.EnableKeyword("DITHER"); if (num.HasValue) { tempMat.SetFloat("_NormalStrength", num.Value); } if (val.HasValue) { tempMat.SetColor("_EmColor", val.Value); tempMat.SetFloat("_EmPower", 1f); } if (tempMat.IsKeywordEnabled("NOCULL")) { tempMat.SetInt("_Cull", 0); } if (tempMat.IsKeywordEnabled("LIMBREMOVAL")) { tempMat.SetInt("_LimbRemovalOn", 1); } cachedMaterials.Add(tempMat); return tempMat; } public static Material Specular(this Material mat, float strength, float exponent = 1f, bool ignoreAlpha = true) { mat.SetFloat("_SpecularStrength", strength); mat.SetFloat("_SpecularExponent", exponent); if (ignoreAlpha) { mat.EnableKeyword("FORCE_SPEC"); } return mat; } public static Material MakeUnique(this Material material) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (cachedMaterials.Contains(material)) { return new Material(material); } return material; } public static Material SetColor(this Material material, Color color) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) material.SetColor("_Color", color); return material; } public static Material SetNormal(this Material material, float normalStrength = 1f) { material.SetFloat("_NormalStrength", normalStrength); return material; } public static Material SetEmission(this Material material) { return material.SetEmission(1f); } public static Material SetEmission(this Material material, float emission) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return material.SetEmission(emission, Color.white); } public static Material SetEmission(this Material material, float emission, Color emissionColor) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) material.SetFloat("_EmPower", emission); material.SetColor("_EmColor", emissionColor); return material; } } [RequireComponent(typeof(EffectComponent), typeof(EffectManagerHelper))] public class ParentEffectToItemDisplay : MonoBehaviour { public enum ItemDisplayParent : short { Delusion = -2, MoonWheel = -3 } private EffectManagerHelper efh; private EffectComponent effectComponent; private Transform parentTransform; private void Awake() { efh = ((Component)this).GetComponent(); effectComponent = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)efh)) { EffectManagerHelper obj = efh; obj.OnEffectActivated = (Action)Delegate.Combine(obj.OnEffectActivated, new Action(ReparentEffect)); } } private void ReparentEffect() { if (effectComponent.effectData.genericBool) { MoonWheel.MoonWheelBehaviour moonWheelBehaviour = default(MoonWheel.MoonWheelBehaviour); if (effectComponent.effectData.modelChildIndex - 256 == -2) { DelusionBehaviour delusionBehaviour = default(DelusionBehaviour); if (Object.op_Implicit((Object)(object)effectComponent.effectData.rootObject) && effectComponent.effectData.rootObject.TryGetComponent(ref delusionBehaviour) && Object.op_Implicit((Object)(object)delusionBehaviour.delusionDisplay)) { parentTransform = delusionBehaviour.delusionDisplay.transform; return; } } else if (effectComponent.effectData.modelChildIndex - 256 == -3 && Object.op_Implicit((Object)(object)effectComponent.effectData.rootObject) && effectComponent.effectData.rootObject.TryGetComponent(ref moonWheelBehaviour) && Object.op_Implicit((Object)(object)moonWheelBehaviour.moonWheelDisplay)) { parentTransform = moonWheelBehaviour.moonWheelDisplay.transform; return; } } parentTransform = null; } private void LateUpdate() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)parentTransform)) { ((Component)this).transform.position = parentTransform.position; } } } internal static class QualitySupport { [CompilerGenerated] private static class <>O { public static LoadContentAsyncDelegate <0>__LoadQuality; } public const string qualityIcon = ""; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__LoadQuality; if (obj == null) { LoadContentAsyncDelegate val = LoadQuality; <>O.<0>__LoadQuality = val; obj = (object)val; } QualityContentManager.LoadContentAsync += (LoadContentAsyncDelegate)obj; } public static IEnumerator LoadQuality(QualityContentLoadArgs args) { args.CreateItemQualityGroup(ElementalReactionsMod.Items.Items.instructorsTeaCup); args.CreateBuffQualityGroup(Buffs.instructorsTeaCupQualityBase); args.CreateItemQualityGroup(ElementalReactionsMod.Items.Items.moonWheel); yield break; } public static void AddQualityLanguage(string key, bool isPickup, string value, params object[] args) { if (ElementalReactionsPlugin.qualityModExists) { int num = args.Length / 4; for (int i = 0; i < 4; i++) { string text = ((args.Length != 0) ? string.Format(value, args.Skip(i * num).Take(num).ToArray()) : value); string text2 = i switch { 0 => "UNCOMMON", 1 => "RARE", 2 => "EPIC", 3 => "LEGENDARY", _ => "", }; LanguageAPI.Add("ITEM_ELEMENTALREACTIONS" + key.Replace("_", "") + "_" + text2 + "_" + (isPickup ? "PICKUP" : "DESC"), text); } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static int GetItemCountTotalQuality(this Inventory inventory, ItemDef item) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) ItemQualityGroupIndex val = QualityCatalog.FindItemQualityGroupIndex(item.itemIndex); if ((int)val != -1) { ItemQualityCounts itemCountsEffective = InventoryExtensions.GetItemCountsEffective(inventory, val); return ((ItemQualityCounts)(ref itemCountsEffective)).TotalCount; } return inventory.GetItemCountEffective(item); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static int GetItemCountQualities(this Inventory inventory, ItemDef item, out int uncommon, out int rare, out int epic, out int legendary) { //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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) uncommon = 0; rare = 0; epic = 0; legendary = 0; ItemQualityGroupIndex val = QualityCatalog.FindItemQualityGroupIndex(item.itemIndex); if ((int)val != -1) { ItemQualityCounts itemCountsEffective = InventoryExtensions.GetItemCountsEffective(inventory, val); uncommon = itemCountsEffective.UncommonCount; rare = itemCountsEffective.RareCount; epic = itemCountsEffective.EpicCount; legendary = itemCountsEffective.LegendaryCount; return ((ItemQualityCounts)(ref itemCountsEffective)).TotalQualityCount; } return 0; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static int GetItemCountQualities(this Inventory inventory, ItemDef item) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) ItemQualityGroupIndex val = QualityCatalog.FindItemQualityGroupIndex(item.itemIndex); if ((int)val != -1) { ItemQualityCounts itemCountsEffective = InventoryExtensions.GetItemCountsEffective(inventory, val); return ((ItemQualityCounts)(ref itemCountsEffective)).TotalQualityCount; } return 0; } public static int GetWeightedQualityItemCount(int uncommon, int rare, int epic, int legendary) { return uncommon + rare * 2 + epic * 3 + legendary * 4; } public static float GetMoonWheelQualityChance(this Inventory inventory) { inventory.GetItemCountQualities(ElementalReactionsMod.Items.Items.moonWheel, out var uncommon, out var rare, out var epic, out var legendary); float num = (float)uncommon * 25f; num += (float)rare * 25f * 2f; num += (float)epic * 25f * 3f; return num + (float)legendary * 25f * 4f; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static ItemIndex[] GetQualityItemIndices(ItemDef item) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected I4, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected I4, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected I4, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected I4, but got Unknown ItemIndex[] array = (ItemIndex[])(object)new ItemIndex[4]; ItemQualityGroup itemQualityGroup = QualityCatalog.GetItemQualityGroup(QualityCatalog.FindItemQualityGroupIndex(item.itemIndex)); if (Object.op_Implicit((Object)(object)itemQualityGroup)) { array[0] = (ItemIndex)(int)itemQualityGroup.UncommonItemIndex; array[1] = (ItemIndex)(int)itemQualityGroup.RareItemIndex; array[2] = (ItemIndex)(int)itemQualityGroup.EpicItemIndex; array[3] = (ItemIndex)(int)itemQualityGroup.LegendaryItemIndex; } return array; } } public static class SandsweptSupport { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { ((ResourceAvailability)(ref PickupCatalog.availability)).onAvailable += delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Crafting.AppendDelusionRecipe(Crafting.delusionPyro, ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("ITEM_SANDSWEPT_SUN_FRAGMENT"))); Crafting.AppendDelusionRecipe(Crafting.delusionPyro, ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("ITEM_SANDSWEPT_SMOULDERING_DOCUMENT"))); Crafting.AppendDelusionRecipe(Crafting.delusionGeo, ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("ITEM_SANDSWEPT_CROWNS_DIAMOND"))); }; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddElementToCannonballJellyfishDeath() { ProjectileDamage val = default(ProjectileDamage); if (CannonballJellyfish.JellyCoreProjectile.TryGetComponent(ref val)) { val.damageType.SetElement(DefaultElementDefs.pyroElement.index); } } } public static class SS2Support { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) ((ResourceAvailability)(ref SS2Assets.assetsAvailability)).onAvailable += delegate { ((Behaviour)SS2Assets.LoadAsset("StormController", (SS2Bundle)12).AddComponent()).enabled = false; }; ((ResourceAvailability)(ref PickupCatalog.availability)).onAvailable += delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) Crafting.AppendDelusionRecipe(Crafting.delusionElectro, ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("LightningOnKill"))); }; new Hook((MethodBase)typeof(Storm).GetMethod("OnEnter"), (Delegate)new Action, Storm>(SS2StormStartWeather)); new Hook((MethodBase)typeof(Storm).GetMethod("OnExit"), (Delegate)new Action, Storm>(SS2StormEndWeather)); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void SS2StormStartWeather(Action orig, Storm self) { orig(self); ElementalRain elementalRain = default(ElementalRain); if (!Config.CanSS2StormsUseElements().Value || !Object.op_Implicit((Object)(object)Stage.instance) || Stage.instance.sceneDef.cachedName == "goolake" || !NetworkServer.active || !Object.op_Implicit((Object)(object)ElementalReactionManager.instance) || Object.op_Implicit((Object)(object)ElementalRain.instance) || !((EntityState)self).gameObject.TryGetComponent(ref elementalRain)) { return; } if (Object.op_Implicit((Object)(object)Stage.instance)) { switch (Stage.instance.sceneDef.cachedName) { case "frozenwall": case "snowyforest": elementalRain.element = DefaultElementDefs.cryoElement; break; case "dampcavesimple": case "wispgraveyard": elementalRain.element = DefaultElementDefs.pyroElement; break; } } ((Behaviour)elementalRain).enabled = true; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void SS2StormEndWeather(Action orig, Storm self) { orig(self); ElementalRain elementalRain = default(ElementalRain); if (NetworkServer.active && Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && ((EntityState)self).gameObject.TryGetComponent(ref elementalRain) && (Object)(object)ElementalRain.instance == (Object)(object)elementalRain) { ((Behaviour)elementalRain).enabled = false; } } } public static class StaticValues { public const float elementAppliedICD = 0.4f; public const float elementRemovedICD = 0.2f; public const float permanentElementICD = 1f; public const float elementAppliedDuration = 10f; public const float elementAppliedTaxMultiplier = 0.8f; public const float genericReactionExplosionRadius = 10f; public const float genericReactionProcCoefficient = 0.5f; public const float vaporizeMultiplierPyroTrigger = 1.75f; public const float vaporizeMultiplierHydroTrigger = 1.5f; public const float overloadDamageCoefficient = 2.5f; public const float electroChargeDamageCoefficient = 1f; public const float electroChargeDuration = 5f; public const float electroChargeRadius = 15f; public const float superconductDamageCoefficient = 1f; public const float superconductDamageMultiplier = 1.3f; public const float superconductDuration = 5f; public const float swirlDamageCoefficient = 1.5f; public const float quickenDamageAddCoefficient = 0.5f; public const float quickenDuration = 5f; public const int crystallizeCap = 3; public const float crystallizeBarrierPercent = 0.12f; public const float crystallizeBossBarrierPercent = 0.04f; public const float crystallizeMaxBarrierPercent = 0.36f; public const float crystallizePlayerGravitateRange = 4f; public const float crystallizeEnemyGravitateRange = 7f; public const int bloomCap = 5; public const float bloomDamageCoefficient = 3.5f; public const float bloomDuration = 5f; public const float bloomRadius = 17f; public const float hyperBloomDamageCoefficient = 9f; public const float burgeonDamageCoefficient = 6f; public const float burgeonRadius = 22f; public const float hyperBloomRadius = 30f; public const int delusionDuration = 10; public const float delusionDamageCoefficient = 3f; public const float delusionStackDamageCoefficient = 3f; public const float delusionAttacksPerSecond = 0.75f; public const float delusionHealthPercentCost = 0.05f; public const float delusionHealingReceivedReduction = 0.25f; public const float instructorsTeaCupDamageMultiplier = 0.3f; public const float instructorsTeaCupQualityDamageIncrease = 0.05f; public const int instructorsTeaCupQualityMaxStacks = 10; public const int instructorsTeaCupQualityStacksPerQuality = 5; public const int instructorsTeaCupQualityDuration = 5; public const int instructorsTeaCupQualityDurationPerQuality = 3; public const float moonWheelLunarDamagePerStack = 0.5f; public const float moonWheelQualityChancePerQuality = 25f; public const float lunarChargeDamageCoefficient = 6f; public const float lunarChargeTimeBetweenAttacks = 1.5f; public const int lunarChargeAttacksPerDot = 4; public const float lunarChargeDotDuration = 6f; public const float lunarChargeRadius = 6f; public const float lunarChargeEnemyDelay = 0.75f; public const int lunarBloomVerdantDewCap = 3; public const float lunarBloomDamageMultiplier = 2f; public const int lunarCrystallizeTriggersToAttack = 3; public const float lunarCrystallizeDamageCoefficient = 5f; public const float lunarCrystallizePlayerResistMultiplier = 0.25f; public const float lunarCrystallizeRadius = 50f; } public static class Tokens { public static string[] elements = new string[7] { "Pyro", "Hydro", "Electro", "Cryo", "Anemo", "Geo", "Dendro" }; public static string[] elementsColored = new string[7] { PyroText(), HydroText(), ElectroText(), CryoText(), AnemoText(), GeoText(), DendroText() }; public static void Initialize() { string text = "DS_GAMING_ELEMENTAL_REACTIONS_"; LanguageAPI.Add(text + "EXPANSION_NAME", "Elemental Reactions"); LanguageAPI.Add(text + "EXPANSION_DESCRIPTION", "Adds the Elemental Reaction system from 'Genshin Impact' to the game."); LanguageAPI.Add(text + "LOADOUT_ELEMENTS", "Elements"); LanguageAPI.Add(text + "ELEMENT_PHYSICAL_NAME", "Physical"); LanguageAPI.Add(text + "ELEMENT_PHYSICAL_DESCRIPTION", "No element. Unchanged from vanilla."); LanguageAPI.Add(text + "ELEMENT_PYRO_NAME", "Pyro"); LanguageAPI.Add(text + "ELEMENT_PYRO_DESCRIPTION", ""); LanguageAPI.Add(text + "ELEMENT_HYDRO_NAME", "Hydro"); LanguageAPI.Add(text + "ELEMENT_HYDRO_DESCRIPTION", ""); LanguageAPI.Add(text + "ELEMENT_ELECTRO_NAME", "Electro"); LanguageAPI.Add(text + "ELEMENT_ELECTRO_DESCRIPTION", ""); LanguageAPI.Add(text + "ELEMENT_CRYO_NAME", "Cryo"); LanguageAPI.Add(text + "ELEMENT_CRYO_DESCRIPTION", ""); LanguageAPI.Add(text + "ELEMENT_ANEMO_NAME", "Anemo"); LanguageAPI.Add(text + "ELEMENT_ANEMO_DESCRIPTION", ""); LanguageAPI.Add(text + "ELEMENT_GEO_NAME", "Geo"); LanguageAPI.Add(text + "ELEMENT_GEO_DESCRIPTION", ""); LanguageAPI.Add(text + "ELEMENT_DENDRO_NAME", "Dendro"); LanguageAPI.Add(text + "ELEMENT_DENDRO_DESCRIPTION", ""); LanguageAPI.Add(text + "REACTION_VAPORIZE_NAME", "Vaporize / Melt"); LanguageAPI.Add(text + "REACTION_VAPORIZE_DESCRIPTION", PyroText() + " + " + HydroText() + "/" + CryoText() + ". Based on whether " + PyroText() + " is applied first or last, increase damage by " + DamageMultiplierText(1.5f) + " or " + DamageMultiplierText(1.75f) + "."); LanguageAPI.Add(text + "REACTION_OVERLOAD_NAME", "Overload"); LanguageAPI.Add(text + "REACTION_OVERLOAD_DESCRIPTION", PyroText() + " + " + ElectroText() + ". Create an explosion dealing " + DamageValueText(2.5f) + "."); LanguageAPI.Add(text + "REACTION_ELECTRO_CHARGE_NAME", "Electro-Charge"); LanguageAPI.Add(text + "REACTION_ELECTRO_CHARGE_DESCRIPTION", ElectroText() + " + " + HydroText() + ". Create " + DamageText("chain lightning") + " that arcs between enemies affected by " + HydroText() + " for " + DamageValueTextRepeat(1f, Mathf.FloorToInt(5f)) + " over time."); LanguageAPI.Add(text + "REACTION_FROZEN_NAME", "Frozen"); LanguageAPI.Add(text + "REACTION_FROZEN_DESCRIPTION", CryoText() + " + " + HydroText() + ". Briefly " + UtilityText("freeze") + " the target."); LanguageAPI.Add(text + "REACTION_SUPERCONDUCT_NAME", "Superconduct"); LanguageAPI.Add(text + "REACTION_SUPERCONDUCT_DESCRIPTION", CryoText() + " + " + ElectroText() + ". Create a blast of ice dealing " + DamageValueText(1f) + " and increasing all non-elemental damage dealt by " + DamageMultiplierText(1.3f) + " for " + UtilityText($"{5f}s") + "."); LanguageAPI.Add(text + "REACTION_SWIRL_NAME", "Swirl"); LanguageAPI.Add(text + "REACTION_SWIRL_DESCRIPTION", AnemoText() + " + " + PyroText() + "/" + HydroText() + "/" + ElectroText() + "/" + CryoText() + ". Create a burst of wind, spreading the non-" + AnemoText() + " element for " + DamageValueText(1.5f) + "."); LanguageAPI.Add(text + "REACTION_CRYSTALLIZE_NAME", "Crystallize"); LanguageAPI.Add(text + "REACTION_CRYSTALLIZE_DESCRIPTION", GeoText() + " + " + PyroText() + "/" + HydroText() + "/" + ElectroText() + "/" + CryoText() + ". Create a shard that grants you a " + HealingText("temporary barrier") + " for " + HealingText(12f + "%") + " of your max health, up to " + HealingText(36f + "%") + "."); LanguageAPI.Add(text + "REACTION_BURNING_NAME", "Burning"); LanguageAPI.Add(text + "REACTION_BURNING_DESCRIPTION", DendroText() + " + " + PyroText() + ". " + DamageText("Ignite") + " the target."); LanguageAPI.Add(text + "REACTION_QUICKEN_NAME", "Quicken"); LanguageAPI.Add(text + "REACTION_QUICKEN_DESCRIPTION", DendroText() + " + " + ElectroText() + ". Increase damage dealt by all " + DendroText() + " or " + ElectroText() + " attacks by a flat " + DamageText(50f + "% base damage") + " for " + UtilityText($"{5f}s") + "."); LanguageAPI.Add(text + "REACTION_BLOOM_NAME", "Bloom"); LanguageAPI.Add(text + "REACTION_BLOOM_DESCRIPTION", DendroText() + " + " + HydroText() + ". Create a " + DendroText("Dendro Core") + " which explodes after " + UtilityText(5f + "s") + " dealing " + DamageValueText(3.5f) + " to ALL characters.\n" + ElectroText() + " converts the core into a " + DamageText("homing projectile") + " dealing " + DamageValueText(9f) + ".\n" + PyroText() + " detonates the core in a " + DamageText("larger radius") + ", dealing " + DamageValueText(6f) + " to ALL characters."); LanguageAPI.Add(text + "REACTION_BLOOM_OBJECT_NAME", "Dendro Core"); LanguageAPI.Add(text + "ITEM_SOULSEEKER_SHELL_NAME", "Soulseeker Shell"); LanguageAPI.Add(text + "ITEM_SOULSEEKER_SHELL_PICKUP", "Your drones have a chance of attacking with one of your elements."); LanguageAPI.Add(text + "ITEM_SOULSEEKER_SHELL_DESCRIPTION", "Drones gain a " + DamageText("10% ") + StackingText("(+10% per stack)") + " chance on hit to apply one of your " + UtilityText("elements") + " on hit."); LanguageAPI.Add(text + "ITEM_DELUSION_NAME", "Delusion"); LanguageAPI.Add(text + "ITEM_DELUSION_PICKUP", "Resonates with a new element on pickup. " + DelusionPickup("the Delusion's elemental")); LanguageAPI.Add(text + "ITEM_DELUSION_DESCRIPTION", "On pickup, " + UtilityText("resonate") + " with a " + UtilityText("random element you don't have") + ". " + DelusionDescription(DamageText("the Delusion's element"))); LanguageAPI.Add(text + "ITEM_DELUSION_LORE", "Usurper. \r\n\r\nI know you can hear me.\r\n\r\nBut can you hear them? \r\n\r\nThe ones you rule.\r\n\r\nYou reshaped the entire world just for them. Going to such extreme lengths could almost convince me of how much you claim to care about them. \r\n\r\nBut that cannot be, can it? Your actions do not come from benevolence. After all, how could you ignore all those who cry out in anguish?\r\n\r\nYou shackle them with your taboos. Your constructs of destruction close in after, fencing the mind into meek obedience, so no one would dare imagine breaking free.\r\n\r\nYour suffocating grip on that world does not go without contempt. Perhaps you have fooled yourself into only seeing peace, but hidden beneath is hatred for the world you've made. Their hatred festers and their will to destroy grows. They are the kindling.\r\n\r\nDespite all the force and oppression you use to hide me, they look to the sky. Their gaze pierces through the lies you've confined this world beneath. When their gaze meets mine, their grievances of your world manifest as an unshakable resolve.\r\n\r\nThe resolve to endure bitter cold, to fight, to kill, and to die, all so they may burn your world away with them.\r\n\r\nWhen there is nothing left but ashes, I will be here, ready to take my rightful place on the throne of the new world."); for (int i = 0; i < elements.Length; i++) { LanguageAPI.Add(text + "ITEM_DELUSION_" + elements[i].ToUpper() + "_NAME", elements[i] + " Delusion"); LanguageAPI.Add(text + "ITEM_DELUSION_" + elements[i].ToUpper() + "_PICKUP", DelusionPickup(elementsColored[i])); LanguageAPI.Add(text + "ITEM_DELUSION_" + elements[i].ToUpper() + "_DESCRIPTION", DelusionDescription(DamageText(elementsColored[i]))); } LanguageAPI.Add(text + "ITEM_INSTRUCTORS_TEA_CUP_NAME", "Instructor's Tea Cup"); string text2 = "Deal bonus damage from elemental reactions."; LanguageAPI.Add(text + "ITEM_INSTRUCTORS_TEA_CUP_PICKUP", text2); QualitySupport.AddQualityLanguage("INSTRUCTORS_TEA_CUP", true, text2 + " Bonus damage increases after triggering elemental reactions."); string text3 = "Increases " + UtilityText("elemental reaction") + " damage by " + DamageText($"{30.000002f}%") + " " + StackingText($"(+{30.000002f}% per stack)") + "."; LanguageAPI.Add(text + "ITEM_INSTRUCTORS_TEA_CUP_DESCRIPTION", text3); QualitySupport.AddQualityLanguage("INSTRUCTORS_TEA_CUP", false, text3 + " Triggering an " + UtilityText("elemental reaction") + " increases " + UtilityText("elemental reaction") + " damage by " + DamageText($"{5f}%") + " " + StackingText($"(+{5f}% per stack)") + ", up to " + UtilityText("{0}") + ", for " + UtilityText("{1}s") + ". Triggering a reaction refreshes the timer.", 10, 5, 15, 8, 20, 11, 25, 14); LanguageAPI.Add(text + "ITEM_INSTRUCTORS_TEA_CUP_LORE", "Every military student knows that the so-called \"free training time\" could not have anything less to do with freedom.\r\n\r\nThe instructor sits back and watches while the students train rigorously in the field.\r\n\r\nA cup of black tea with a little too much sugar in it marks a typical afternoon for the instructor.\r\n\r\nThis peaceful time is a privilege of the instructor, and the embodiment of his authority."); LanguageAPI.Add(text + "ITEM_MOON_WHEEL_NAME", "Moon Wheel"); LanguageAPI.Add(text + "ITEM_MOON_WHEEL_PICKUP", "Upgrades the Hydro reactions between Electro, Dendro, and Geo into powerful Lunar Reactions."); QualitySupport.AddQualityLanguage("MOON_WHEEL", true, "Upgrades the Hydro reactions between Electro, Dendro, and Geo into powerful Lunar Reactions. Lunar Reactions have a chance to double their effects."); string text4 = "Upgrades the " + ElectroText("Electro-Charge") + ", " + DendroText("Bloom") + ", and " + GeoText("Hydro-Crystallize") + " reactions into " + DamageText("Lunar Reactions") + " that can " + DamageText("critically strike") + ". Increases " + DamageText("Lunar Reaction damage") + " by " + DamageText("0%") + " " + StackingText("(+" + 50f + "% per stack)") + "."; string text5 = ElectroText("Lunar-Charge") + ": Continuously strike the target with lightning, dealing " + DamageValueTextRepeat(6f, 4) + "."; string text6 = DendroText("Lunar-Bloom") + ": Create a " + DendroText("Dendro Core") + " and gain a " + UtilityText("Verdant Dew") + ", up to " + UtilityText(3.ToString()) + ". Dealing " + DamageText("more than 400% damage") + " while having " + UtilityText(3 + " Verdant Dews") + " will consume them and increase the damage dealt by " + DamageText(200f + "%") + "."; string text7 = GeoText("Lunar-Crystallize") + ": Create a Moondrift. Creating " + UtilityText(3.ToString()) + " Moondrifts will fire them at nearby enemies, dealing " + DamageValueTextRepeat(5f, 3) + "."; LanguageAPI.Add(text + "ITEM_MOON_WHEEL_DESCRIPTION", text4 + "\n\n" + text5 + "\n" + text6 + "\n" + text7); QualitySupport.AddQualityLanguage("MOON_WHEEL", false, text4 + "\n\n" + text5 + " " + DamageText("{0}%") + " " + StackingText("(+{0}% per stack)") + " chance to strike twice.\n" + text6 + " " + UtilityText("{0}%") + " " + StackingText("(+{0}% per stack)") + " chance to gain an additional " + UtilityText("Verdant Dew") + ".\n" + text7 + " Each Moondrift has a " + DamageText("{0}%") + " " + StackingText("(+{0}% per stack)") + " chance to fire twice.", 25f, 50f, 75f, 100f); LanguageAPI.Add(text + "ITEM_MOON_WHEEL_LORE", "Once there was an age when the silver wheel that circled the heavens bathed the world in soothing light. At that time, two brothers stood together before their creation, looking up at the sea of stars.\r\n\r\nTo touch the moon was to break from the shackles of the world and achieve true freedom. One brother dreamed of freedom and the universe while eagerly crossing the gate. The other dreamed only of his own world.\r\n\r\nThe gate disconnected, severing its connection between world and moon - brother and brother. Dreams of freedom vanished as the moon itself became a new prison. \r\n\r\nThe moon did not belong in the new world that was being created.\r\n\r\nThe few who acknowledge the moon's prescence scorn and fear it as they have been taught to do. They know not why. \r\n\r\nWith the moon being rejected by the world and its inhabitants, the moon, along with its captive, were left to fade away.\r\n\r\nYet, the moon still circles the sky - Its baleful light shining upon the world. \r\n\r\nThe world may forget the past, but that does not absolve the world. The scars of betrayal run deep. He will not forget this pain, nor will he rest until it has been repaid tenfold.\r\n\r\nHis grudge will remain - everlasting as the moon."); LanguageAPI.Add(text + "REACTION_LUNAR_BLOOM_NAME", "Lunar-Bloom"); LanguageAPI.Add(text + "REACTION_LUNAR_CHARGE_NAME", "Lunar-Charge"); LanguageAPI.Add(text + "REACTION_LUNAR_CRYSTALLIZE_NAME", "Lunar-Crystallize"); LanguageAPI.Add(text + "EVENT_ELEMENTAL_RAIN_HYDRO", "The rain is rich with Hydro energy."); LanguageAPI.Add(text + "EVENT_ELEMENTAL_RAIN_CRYO", "The snow is rich with Cryo energy."); LanguageAPI.Add(text + "EVENT_ELEMENTAL_RAIN_PYRO", "The ash is rich with Pyro energy."); LanguageAPI.Add(text + "EVENT_ELEMENTAL_RAIN", "The environment is rich with elemental energy."); LanguageAPI.Add(GetAchievementNameToken("DS_GAMING_ELEMENTAL_REACTIONS_elementalMasteryAchievement"), "Elemental Mastery"); LanguageAPI.Add(GetAchievementDescriptionToken("DS_GAMING_ELEMENTAL_REACTIONS_elementalMasteryAchievement"), "Escape the kuuvahki empowered moon."); } public static string DelusionPickup(string element) { return "Activating your Special skill will make any skill damage fire attacks of " + element + " damage... " + RedText("BUT at the cost of your health") + "."; } public static string DelusionDescription(string element) { return "Activating your " + UtilityText("Special skill") + " will activate the Delusion for " + UtilityText(10 + "s") + ". While active, " + RedText($"healing received is reduced by {25f}%") + " " + StackingText($"(+{25f}% per stack)") + " and damaging enemies with any " + UtilityText("skill") + " will periodically fire " + DamageText("attacks of ") + element + ", dealing " + DamageText($"{300f}% base damage") + " " + StackingText($"(+{300f}% per same-element stack)") + " at the cost of " + RedText(5f + "%") + " " + StackingText("(+" + 5f + "% per same-element stack)") + " of your " + RedText("current health") + ". " + StackingText("A separate attack will be fired for each Delusion you have of a unique element") + "."; } public static string DamageText(string text) { return "" + text + ""; } public static string DamageValueText(float value) { return $"{value * 100f}% damage"; } public static string DamageMultiplierText(float value) { return $"{(value - 1f) * 100f}%"; } public static string DamageValueBaseText(float value) { return $"{value * 100f}% base damage"; } public static string DamageValueText(float value, string damageType) { return $"{value * 100f}% {damageType} damage"; } public static string DamageValueText(float value, float value2) { return $"{value * 100f}%-{value2 * 100f}% damage"; } public static string DamageValueTextRepeat(float value, int repeat) { return $"{repeat}x{value * 100f}% damage"; } public static string UtilityText(string text) { return "" + text + ""; } public static string RedText(string text) { return HealthText(text); } public static string HealthText(string text) { return "" + text + ""; } public static string HealingText(string text) { return "" + text + ""; } public static string KeywordText(string keyword, string sub) { return "" + keyword + "" + sub + ""; } public static string StackingText(string stack) { return "" + stack + ""; } public static string PyroText(string text) { return HealthText(text); } public static string PyroText() { return PyroText("Pyro"); } public static string HydroText(string text) { return "" + text + ""; } public static string HydroText() { return HydroText("Hydro"); } public static string ElectroText(string text) { return "" + text + ""; } public static string ElectroText() { return ElectroText("Electro"); } public static string CryoText(string text) { return UtilityText(text); } public static string CryoText() { return CryoText("Cryo"); } public static string AnemoText(string text) { return "" + text + ""; } public static string AnemoText() { return AnemoText("Anemo"); } public static string GeoText(string text) { return DamageText(text); } public static string GeoText() { return GeoText("Geo"); } public static string DendroText(string text) { return "" + text + ""; } public static string DendroText() { return DendroText("Dendro"); } public static string GetAchievementNameToken(string identifier) { return "ACHIEVEMENT_" + identifier.ToUpperInvariant() + "_NAME"; } public static string GetAchievementDescriptionToken(string identifier) { return "ACHIEVEMENT_" + identifier.ToUpperInvariant() + "_DESCRIPTION"; } } public static class Util { public static ElementIndex GetElement(this DamageTypeCombo damageTypeCombo) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return (ElementIndex)GetDamageTypeIndex(damageTypeCombo, ElementCatalog.elementIndexDamageTypeBits); } public static void SetElement(this ref DamageTypeCombo damageTypeCombo, ElementIndex elementIndex) { for (int i = 0; i < ElementCatalog.elementIndexDamageTypeBits.Length; i++) { if (GetBit((int)elementIndex, i)) { DamageAPI.AddModdedDamageType(ref damageTypeCombo, ElementCatalog.elementIndexDamageTypeBits[i]); } else { DamageAPI.RemoveModdedDamageType(ref damageTypeCombo, ElementCatalog.elementIndexDamageTypeBits[i]); } } } public static bool CanUseElements(CharacterBody characterBody) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Invalid comparison between Unknown and I4 //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Invalid comparison between Unknown and I4 //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Invalid comparison between Unknown and I4 bool flag = Object.op_Implicit((Object)(object)characterBody) && (characterBody.isPlayerControlled || (Object.op_Implicit((Object)(object)characterBody.inventory) && characterBody.inventory.GetItemCountEffective(ElementLoadoutComponent.damageIsFromPlayerItem) > 0)); return !Object.op_Implicit((Object)(object)characterBody) || !Object.op_Implicit((Object)(object)characterBody.teamComponent) || ((int)characterBody.teamComponent.teamIndex == 1 && flag && Config.CanSurvivorsUseElements().Value) || ((int)characterBody.teamComponent.teamIndex == 1 && !flag && Config.CanAlliesUseElements().Value) || ((int)characterBody.teamComponent.teamIndex != 1 && Config.CanEnemiesUseElements().Value); } public static bool IsElementalDamage(this DamageTypeCombo damageTypeCombo) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) ModdedDamageType[] elementIndexDamageTypeBits = ElementCatalog.elementIndexDamageTypeBits; foreach (ModdedDamageType val in elementIndexDamageTypeBits) { if (DamageAPI.HasModdedDamageType(ref damageTypeCombo, val)) { return true; } } return false; } public static int GetDamageTypeIndex(DamageTypeCombo damageTypeCombo, ModdedDamageType[] damageTypes) { int num = 0; for (int i = 0; i < damageTypes.Length; i++) { if (DamageAPI.HasModdedDamageType(ref damageTypeCombo, damageTypes[i])) { num += (int)Mathf.Pow(2f, (float)i); } } return num; } public static bool GetBit(int num, int bitIndex) { return (num & (1 << bitIndex)) != 0; } internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown = false, bool hidden = false) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = "bdElementalReactions" + buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isHidden = hidden; val.isCooldown = isCooldown; Content.AddBuffDef(val); return val; } internal static T AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown = false, bool hidden = false) where T : BuffDef { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) T val = ScriptableObject.CreateInstance(); ((Object)(object)val).name = "bdElementalReactions" + buffName; ((BuffDef)val).buffColor = buffColor; ((BuffDef)val).canStack = canStack; ((BuffDef)val).isDebuff = isDebuff; ((BuffDef)val).eliteDef = null; ((BuffDef)val).iconSprite = buffIcon; ((BuffDef)val).isHidden = hidden; ((BuffDef)val).isCooldown = isCooldown; Content.AddBuffDef((BuffDef)(object)val); return val; } public static BlastAttack CreateBlastAttack(DamageInfo damageInfo, float damage, float radius, float proc, ElementIndex element, bool isReaction, float force) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_009d: 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) CharacterBody val = (Object.op_Implicit((Object)(object)damageInfo.attacker) ? damageInfo.attacker.GetComponent() : null); DamageTypeCombo damageTypeCombo = default(DamageTypeCombo); damageTypeCombo.SetElement(element); if (isReaction) { DamageAPI.AddModdedDamageType(ref damageTypeCombo, DamageTypes.elementalReactionDamageType); damageTypeCombo |= DamageTypeCombo.op_Implicit((DamageType)131072); } return CreateBlastAttack(damageInfo.attacker, Object.op_Implicit((Object)(object)val) ? val.teamComponent.teamIndex : TeamComponent.GetObjectTeam(damageInfo.attacker), Object.op_Implicit((Object)(object)val) ? (val.damage * damage) : (damage * Run.instance.teamlessDamageCoefficient), crit: false, radius, (FalloffModel)0, proc, damageTypeCombo, damageInfo.position, force); } public static BlastAttack CreateBlastAttack(DamageInfo damageInfo, float damage, float radius, float proc, DamageTypeCombo damageType, float force) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = (Object.op_Implicit((Object)(object)damageInfo.attacker) ? damageInfo.attacker.GetComponent() : null); return CreateBlastAttack(damageInfo.attacker, Object.op_Implicit((Object)(object)val) ? val.teamComponent.teamIndex : TeamComponent.GetObjectTeam(damageInfo.attacker), Object.op_Implicit((Object)(object)val) ? (val.damage * damage) : (damage * Run.instance.teamlessDamageCoefficient), crit: false, radius, (FalloffModel)0, proc, damageType, damageInfo.position, force); } public static BlastAttack CreateBlastAttack(GameObject attacker, TeamIndex team, float damage, bool crit, float radius, FalloffModel falloff, float proc, DamageTypeCombo damageType, Vector3 position, float force) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0042: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new BlastAttack { attacker = attacker, inflictor = attacker, baseDamage = damage, crit = crit, radius = radius, falloffModel = falloff, procCoefficient = proc, teamIndex = team, damageType = damageType, position = position, baseForce = force, attackerFiltering = (AttackerFiltering)2 }; } public static void ManualBlastAttack(Vector3 origin, float radius, GameObject attacker, TeamIndex attackerTeam, float damage, bool crit, DamageTypeCombo damageType, bool friendlyFire, bool playerResist) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Invalid comparison between Unknown and I4 Collider[] array = default(Collider[]); int num = HGPhysics.OverlapSphere(ref array, origin, radius, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask), (QueryTriggerInteraction)2); HealthComponent[] array2 = (HealthComponent[])(object)new HealthComponent[num]; int count = 0; for (int i = 0; i < num; i++) { CharacterBody val = Util.HurtBoxColliderToBody(array[i]); if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val.healthComponent) || Array.IndexOf(array2, val.healthComponent, 0, count) != -1 || (!FriendlyFireManager.ShouldSplashHitProceed(val.healthComponent, attackerTeam) && !friendlyFire)) { continue; } float num2 = damage; if (Object.op_Implicit((Object)(object)val.teamComponent)) { if (val.teamComponent.teamIndex == attackerTeam) { num2 *= Config.FriendlyFireBloomResistance().Value / 100f; } if (playerResist && (int)val.teamComponent.teamIndex == 1) { num2 *= Config.PlayerBloomResistance().Value / 100f; } } DamageInfo val2 = new DamageInfo(); val2.attacker = attacker; val2.crit = crit; val2.damage = num2; val2.force = Vector3.zero; val2.inflictor = attacker; val2.position = ((Component)array[i]).transform.position; val2.procCoefficient = 0.5f; val2.damageColorIndex = (DamageColorIndex)0; val2.damageType = damageType; val2.inflictedHurtbox = ((Component)array[i]).GetComponent(); val.healthComponent.TakeDamage(val2); GlobalEventManager.instance.OnHitEnemy(val2, ((Component)val).gameObject); GlobalEventManager.instance.OnHitAll(val2, ((Component)val).gameObject); array2[count++] = val.healthComponent; } HGPhysics.ReturnResults(array); } public static void AddTimedBuffTimer(this CharacterBody body, BuffDef buff, int timer) { for (int i = 1; i <= timer; i++) { body.AddTimedBuff(buff, (float)i); } } public static float ReduceTimedBuffDuration(this CharacterBody characterBody, BuffDef buff, float reduction) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) float num = 0f; if (characterBody.GetBuffCount(buff) <= 0 || !NetworkServer.active) { return num; } for (int i = 0; i < characterBody.timedBuffs.Count; i++) { if (characterBody.timedBuffs[i].buffIndex == buff.buffIndex) { if (characterBody.timedBuffs[i].timer <= reduction) { characterBody.timedBuffs.RemoveAt(i); characterBody.RemoveBuff(buff.buffIndex); } else { TimedBuff obj = characterBody.timedBuffs[i]; obj.timer -= reduction; num = Mathf.Max(num, characterBody.timedBuffs[i].timer); } } } if (num == 0f && characterBody.GetBuffCount(buff) > 0) { return float.MaxValue; } return num; } public static bool GetRandomNode(Vector3 origin, out Vector3 destination, float minDistance, float maxDistance, bool alwaysFindNode = true) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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) NodeGraph nodeGraph = SceneInfo.instance.GetNodeGraph((GraphType)0); NodeIndex val = NodeIndex.invalid; List list = nodeGraph.FindNodesInRange(origin, minDistance, maxDistance, (HullMask)1); if (list.Count > 0) { val = list[Random.Range(0, list.Count)]; } else if (alwaysFindNode) { RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(origin, Vector3.down, ref val2, float.PositiveInfinity, LayerIndex.world.intVal, (QueryTriggerInteraction)0)) { list = nodeGraph.FindNodesInRange(((RaycastHit)(ref val2)).point, minDistance, maxDistance, (HullMask)1); if (list.Count > 0) { val = list[Random.Range(0, list.Count)]; } } else { val = nodeGraph.FindClosestNode(origin, (HullClassification)0, float.PositiveInfinity); } } if (val != NodeIndex.invalid) { Vector3 val3 = default(Vector3); nodeGraph.GetNodePosition(val, ref val3); destination = val3; return true; } destination = origin; return false; } public static int GetItemCountWithQuality(this Inventory inventory, ItemDef item) { int num = 0; num = (ElementalReactionsPlugin.qualityModExists ? inventory.GetItemCountTotalQuality(item) : inventory.GetItemCountEffective(item)); if ((Object)(object)item == (Object)(object)ElementalReactionsMod.Items.Items.moonWheel) { num += inventory.GetItemCountEffective(MoonWheel.hiddenMoonWheel); } return num; } } } namespace ElementalReactionsMod.Reactions { public class BloomController : MonoBehaviour, IOnIncomingDamageServerReceiver { public CharacterBody characterBody; public ProjectileController projectileController; public ProjectileDamage projectileDamage; public Deployable deployable; private bool triedExplode; private ElementalReactionPooledObject pool; private float timer; public void Awake() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown characterBody = ((Component)this).GetComponent(); projectileController = ((Component)this).GetComponent(); projectileDamage = ((Component)this).GetComponent(); deployable = ((Component)this).GetComponent(); deployable.onUndeploy.AddListener(new UnityAction(Explode)); } public void Start() { pool = ((Component)this).GetComponent(); Util.PlaySound("Play_item_use_healAndRevive_healPlantGrow", ((Component)this).gameObject); } public void OnIncomingDamageServer(DamageInfo damageInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) ElementIndex element = damageInfo.damageType.GetElement(); if (element == DefaultElementDefs.pyroElement.index) { Burgeon(damageInfo.attacker); } else if (element == DefaultElementDefs.electroElement.index) { Hyperbloom(damageInfo.attacker); } damageInfo.rejected = true; } private void FixedUpdate() { timer += Time.fixedDeltaTime; if (timer > 5f && NetworkServer.active) { Explode(); } } public void Explode() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //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) if (NetworkServer.active) { if (!triedExplode) { triedExplode = true; DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)131072); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.elementalReactionDamageType); float damage = 3.5f * projectileDamage.damage; Util.ManualBlastAttack(characterBody.corePosition, 17f, projectileController.owner, projectileController.teamFilter.teamIndex, damage, crit: false, damageType, friendlyFire: true, playerResist: true); EffectManager.SimpleEffect(ElementalReactionManager.bloomExplosion.WaitForCompletion(), characterBody.corePosition, Quaternion.identity, true); } DestroyObject(); } } public void Burgeon(GameObject attacker) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { if (!triedExplode) { triedExplode = true; DamageTypeCombo damageType = default(DamageTypeCombo); ((DamageTypeCombo)(ref damageType))..ctor(DamageTypeCombo.op_Implicit((DamageType)131072), (DamageTypeExtended)32768, (DamageSource)0); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.elementalReactionDamageType); float num = 6f; CharacterBody val = default(CharacterBody); num *= (attacker.TryGetComponent(ref val) ? val.damage : projectileDamage.damage); Util.ManualBlastAttack(characterBody.corePosition, 22f, projectileController.owner, projectileController.teamFilter.teamIndex, num, crit: false, damageType, friendlyFire: true, playerResist: true); EffectManager.SimpleEffect(ElementalReactionManager.burgeonExplosion.WaitForCompletion(), characterBody.corePosition, Quaternion.identity, true); } DestroyObject(); } } public void Hyperbloom(GameObject attacker) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Invalid comparison between Unknown and I4 //IL_0067: 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_0072: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { if (!triedExplode) { triedExplode = true; float num = 9f; CharacterBody val = default(CharacterBody); num *= (attacker.TryGetComponent(ref val) ? val.damage : projectileDamage.damage); TeamIndex objectTeam = TeamComponent.GetObjectTeam(attacker); HyperbloomOrb.FireHyperbloomOrb(attacker, ((int)objectTeam == -1) ? projectileController.teamFilter.teamIndex : objectTeam, characterBody.corePosition, num); } DestroyObject(); } } private void DestroyObject() { if (Object.op_Implicit((Object)(object)pool)) { pool.ReturnObject(); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class CrystallizeController : MonoBehaviour { public TeamFilter teamFilter; public GameObject baseGameObject; public SphereCollider gravitateCollider; public ParticleSystem[] teamRecolorParticle; public void Awake() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown Deployable val = default(Deployable); if (NetworkServer.active && baseGameObject.TryGetComponent(ref val)) { val.onUndeploy.AddListener(new UnityAction(LimitReached)); } } private void Start() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_006d: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("Play_moonBrother_m1_laser_shoot", ((Component)this).gameObject); if (NetworkServer.active) { gravitateCollider.radius = (((int)teamFilter.teamIndex == 1) ? 4f : 7f); } if ((int)teamFilter.teamIndex != 1) { ParticleSystem[] array = teamRecolorParticle; foreach (ParticleSystem val in array) { MainModule main = val.main; ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 0.17f, 0.25f)); } } } private void OnTriggerStay(Collider other) { //IL_001c: 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_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 CharacterBody val = default(CharacterBody); if (((!NetworkServer.active || (int)teamFilter.teamIndex != -1) && TeamComponent.GetObjectTeam(((Component)other).gameObject) != teamFilter.teamIndex) || !((Component)other).TryGetComponent(ref val)) { return; } val.OnPickup((PickupClass)1); if (Object.op_Implicit((Object)(object)val.healthComponent) && val.healthComponent.alive) { float num = val.healthComponent.fullBarrier * 0.36f - val.healthComponent.barrier; if (num > 0f) { val.healthComponent.AddBarrier(Mathf.Min(num, val.healthComponent.fullBarrier * ((val.isBoss || val.isChampion) ? 0.04f : 0.12f))); } ElementalReactionPooledObject elementalReactionPooledObject = default(ElementalReactionPooledObject); if (baseGameObject.TryGetComponent(ref elementalReactionPooledObject)) { elementalReactionPooledObject.ReturnObject(); } else { Object.Destroy((Object)(object)baseGameObject); } } } private void LimitReached() { DestroyOnTimer val = default(DestroyOnTimer); if (Object.op_Implicit((Object)(object)baseGameObject) && baseGameObject.TryGetComponent(ref val) && val.duration - val.age >= 0.5f) { val.age = val.duration - 0.5f; } } } public static class ElectroChargedDot { [CompilerGenerated] private static class <>O { public static CustomDotDamageEvaluation <0>__ElectroChargedFireOrb; public static CustomDotDamageEvaluation <1>__LunarChargedLightning; } public static DotIndex electroChargeDot; public static DotIndex lunarChargeDot; public static void Initialize() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_001c: 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_002e: 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_0057: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_00b2: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown DotDef val = new DotDef { damageCoefficient = 1f, interval = 1f, associatedBuff = Buffs.electroChargeBuff, resetTimerOnAdd = false, damageColorIndex = (DamageColorIndex)0 }; object obj = <>O.<0>__ElectroChargedFireOrb; if (obj == null) { CustomDotDamageEvaluation val2 = ElectroChargedFireOrb; <>O.<0>__ElectroChargedFireOrb = val2; obj = (object)val2; } electroChargeDot = DotAPI.RegisterDotDef(val, (CustomDotBehaviour)null, (CustomDotVisual)null, (CustomDotDamageEvaluation)obj); DotDef val3 = new DotDef { damageCoefficient = 6f, interval = 1.5f, associatedBuff = Buffs.lunarChargeBuff, resetTimerOnAdd = false, damageColorIndex = (DamageColorIndex)0 }; object obj2 = <>O.<1>__LunarChargedLightning; if (obj2 == null) { CustomDotDamageEvaluation val4 = LunarChargedLightning; <>O.<1>__LunarChargedLightning = val4; obj2 = (object)val4; } lunarChargeDot = DotAPI.RegisterDotDef(val3, (CustomDotBehaviour)null, (CustomDotVisual)null, (CustomDotDamageEvaluation)obj2); } public static void ElectroChargedFireOrb(DotController self, PendingDamage damage) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_012a: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) if (!Mathf.Approximately(damage.totalDamage, 0f) && self.victimHealthComponent.alive) { DamageInfo val = new DamageInfo(); val.attacker = damage.attackerObject; val.crit = false; val.damage = damage.totalDamage; val.force = Vector3.zero; val.inflictor = ((Component)self).gameObject; val.position = self.victimBody.corePosition; val.procCoefficient = 0f; val.damageColorIndex = (DamageColorIndex)0; val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)67108864), (DamageTypeExtended)8192, (DamageSource)0); DamageAPI.AddModdedDamageType(ref val.damageType, DamageTypes.elementalReactionDamageType); val.inflictedHurtbox = damage.hitHurtBox; self.victimHealthComponent.TakeDamage(val); SphereSearch val2 = new SphereSearch(); val2.radius = 15f; val2.origin = (Object.op_Implicit((Object)(object)damage.hitHurtBox) ? ((Component)damage.hitHurtBox).transform.position : self.victimBody.corePosition); val2.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val2.RefreshCandidates(); val2.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(TeamComponent.GetObjectTeam(damage.attackerObject))); val2.FilterCandidatesByDistinctHurtBoxEntities(); HurtBox val3 = ((IEnumerable)val2.GetHurtBoxes()).FirstOrDefault((Func)((HurtBox x) => Object.op_Implicit((Object)(object)x.healthComponent) && (Object)(object)x.healthComponent != (Object)(object)self.victimHealthComponent && x.healthComponent.alive && x.healthComponent.body.HasBuff(DefaultElementDefs.hydroElement.buff))); if (Object.op_Implicit((Object)(object)val3)) { ElectroChargedOrb.CreateOrb(val2.origin, val3, damage.attackerObject, damage.totalDamage); } } } public static void LunarChargedLightning(DotController self, PendingDamage damage) { //IL_0055: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Invalid comparison between Unknown and I4 //IL_0111: 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_0129: 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_00e2: Unknown result type (might be due to invalid IL or missing references) if (!self.victimHealthComponent.alive) { return; } CharacterBody val = (Object.op_Implicit((Object)(object)damage.attackerObject) ? damage.attackerObject.GetComponent() : null); Vector3 position = (Object.op_Implicit((Object)(object)damage.hitHurtBox) ? ((Component)damage.hitHurtBox).transform.position : self.victimBody.corePosition); TeamIndex objectTeam = TeamComponent.GetObjectTeam(damage.attackerObject); if ((int)objectTeam == 1) { CreateLunarChargedLightning(damage.attackerObject, objectTeam, damage.totalDamage, Object.op_Implicit((Object)(object)val) && val.RollCrit(), position); if (ElementalReactionsPlugin.qualityModExists && Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.inventory) && Util.CheckRoll(val.inventory.GetMoonWheelQualityChance(), val.master)) { ((MonoBehaviour)self.victimBody).StartCoroutine(LunarChargedQualityStrikeTwice(damage.attackerObject, objectTeam, damage.totalDamage, val.RollCrit(), self.victimBody, damage.hitHurtBox)); } } else { ElementalReactionManager.CreateEnemyLunarChargeLightningStrike(damage.attackerObject, objectTeam, damage.totalDamage, Object.op_Implicit((Object)(object)val) && val.RollCrit(), position); } } public static void CreateLunarChargedLightning(GameObject attacker, TeamIndex team, float damage, bool crit, Vector3 position) { //IL_001e: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) if (!Mathf.Approximately(damage, 0f)) { DamageTypeCombo damageType = default(DamageTypeCombo); ((DamageTypeCombo)(ref damageType))..ctor(DamageTypeCombo.op_Implicit((DamageType)67108864), (DamageTypeExtended)8192, (DamageSource)0); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.elementalReactionDamageType); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.lunarDamageType); EffectManager.SimpleEffect(ElementalReactionManager.lunarChargedEffect.WaitForCompletion(), position, Quaternion.identity, true); BlastAttack val = Util.CreateBlastAttack(attacker, team, damage, crit, 6f, (FalloffModel)0, 1f, damageType, position, 0f); val.bonusForce = new Vector3(0f, -500f, 0f); val.Fire(); } } public static IEnumerator LunarChargedQualityStrikeTwice(GameObject attacker, TeamIndex team, float damage, bool crit, CharacterBody target, HurtBox targetHurtBox) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSeconds(0.4f); if (Object.op_Implicit((Object)(object)target) && target.healthComponent.alive) { CreateLunarChargedLightning(attacker, team, damage, crit, Object.op_Implicit((Object)(object)targetHurtBox) ? ((Component)targetHurtBox).transform.position : target.corePosition); } } } public static class ElementalReactionCatalog { public static ElementalReactionDef[] elementalReactionCatalog = Array.Empty(); public static ReactionIndex[,] elementalReactionGrid; public static ResourceAvailability availability = default(ResourceAvailability); [SystemInitializer(new Type[] { typeof(ElementCatalog) })] private static void SystemInit() { BakeElementalReactions(); Log.Message("ElementalReactionCatalog initialized"); ((ResourceAvailability)(ref availability)).MakeAvailable(); } public static void AddElementalReactionDefs(ElementalReactionDef[] elementalReactionDefs) { if (((ResourceAvailability)(ref availability)).available) { Log.Warning("Elemental Reactions " + elementalReactionDefs?.ToString() + " are trying to be added after the catalog is initialized"); return; } int num = elementalReactionCatalog.Length; Array.Resize(ref elementalReactionCatalog, num + elementalReactionDefs.Length); for (int i = 0; i < elementalReactionDefs.Length; i++) { elementalReactionCatalog[num + i] = elementalReactionDefs[i]; } string text = string.Concat(elementalReactionCatalog.Select((ElementalReactionDef x) => ((object)x).ToString() + "\n")); Log.Message("ElementDef(s) added to elementalReactionCatalog. elementalReactionCatalog now contains:\n" + text); } internal static void BakeElementalReactions() { elementalReactionGrid = new ReactionIndex[ElementCatalog.elementCatalog.Length, ElementCatalog.elementCatalog.Length]; List list = new List(); ElementalReactionDef[] array = elementalReactionCatalog; foreach (ElementalReactionDef elementalReactionDef in array) { ElementDef[] reactingElements = elementalReactionDef.reactingElements; foreach (ElementDef elementDef in reactingElements) { if (elementalReactionDef.baseElement.reactsWith[(int)elementDef.index] && !list.Contains(elementalReactionDef)) { list.Add(elementalReactionDef); Log.Warning("Reaction " + ((object)elementalReactionDef).ToString() + " is trying to be added for two elements that already react. This reaction will need to be triggered manually to work"); } else { elementalReactionGrid[(int)elementalReactionDef.baseElement.index, (int)elementDef.index] = elementalReactionDef.index; elementalReactionGrid[(int)elementDef.index, (int)elementalReactionDef.baseElement.index] = elementalReactionDef.index; elementalReactionDef.baseElement.reactsWith[(int)elementDef.index] = true; elementDef.reactsWith[(int)elementalReactionDef.baseElement.index] = true; } CollectionUtils.AddDistinct((IList)elementDef.reactions, elementalReactionDef.index); CollectionUtils.AddDistinct((IList)elementalReactionDef.baseElement.reactions, elementalReactionDef.index); } } for (int k = 0; k < ElementCatalog.elementCatalog.Length; k++) { StringBuilder stringBuilder = StringBuilderPool.RentStringBuilder(); stringBuilder.Append(""); for (int l = 0; l < ElementCatalog.elementCatalog[k].reactions.Count; l++) { ElementalReactionDef elementalReaction = GetElementalReaction(ElementCatalog.elementCatalog[k].reactions[l]); if (elementalReaction.showInLoadoutMenu) { stringBuilder.Append(Tokens.KeywordText(Language.GetString(elementalReaction.nameToken), Language.GetString(elementalReaction.descriptionToken))); stringBuilder.Append("\n\n"); } } stringBuilder.Append(""); ElementCatalog.elementCatalog[k].keywordToken = stringBuilder.ToString(); stringBuilder = StringBuilderPool.ReturnStringBuilder(stringBuilder); } } public static ElementDef GetFirstReactableElement(ElementDef element, CharacterBody characterBody) { if (Object.op_Implicit((Object)(object)characterBody)) { ElementDef[] elementCatalog = ElementCatalog.elementCatalog; foreach (ElementDef elementDef in elementCatalog) { if (characterBody.HasBuff(elementDef.buff) && element.reactsWith[(int)elementDef.index]) { return elementDef; } } } return null; } public static ElementIndex GetFirstReactableElement(ElementDef element, ElementIndex[] elements) { return elements.DefaultIfEmpty(ElementIndex.Physical).First((ElementIndex x) => element.reactsWith[(int)x]); } public static ElementalReactionDef GetElementalReaction(ElementDef element1, ElementDef element2) { if (Object.op_Implicit((Object)(object)element1) && Object.op_Implicit((Object)(object)element2)) { return GetElementalReaction(elementalReactionGrid[(int)element1.index, (int)element2.index]); } return null; } public static ElementalReactionDef GetElementalReaction(ReactionIndex index) { return ArrayUtils.GetSafe(elementalReactionCatalog, (int)index); } } public class ElementalReactionDef : ScriptableObject { public delegate void ElementalReactionDelegate(ElementDef firstElement, ElementDef secondElement, CharacterBody victim, ref DamageInfo damageInfo, ref float addedDamage); private string _cachedName; public string nameToken; public string descriptionToken; public ElementDef baseElement; public float baseFirstReactionCoefficient = 1f; public ElementDef[] reactingElements; public float baseLastReactionCoefficient = 1f; public bool showInLoadoutMenu; public string cachedName { get { return _cachedName; } set { ((Object)this).name = value; _cachedName = value; } } public ReactionIndex index => (ReactionIndex)Array.IndexOf(ElementalReactionCatalog.elementalReactionCatalog, this); public event ElementalReactionDelegate onElementalReactionTriggered; public void TriggerReaction(ElementDef firstElement, ElementDef secondElement, CharacterBody victim, ref DamageInfo damageInfo, ref float addedDamage) { this.onElementalReactionTriggered?.Invoke(firstElement, secondElement, victim, ref damageInfo, ref addedDamage); } public override string ToString() { return Language.GetString(nameToken, Language.currentLanguageName); } public static ElementalReactionDef CreateElementalReactionDef(string internalName, string token, ElementDef baseElement, ElementDef reactingElement, bool showInLoadoutMenu = true) { return CreateElementalReactionDef(internalName, token, baseElement, new ElementDef[1] { reactingElement }); } public static ElementalReactionDef CreateElementalReactionDef(string internalName, string token, ElementDef baseElement, ElementDef[] reactingElements, bool showInLoadoutMenu = true) { ElementalReactionDef elementalReactionDef = ScriptableObject.CreateInstance(); elementalReactionDef.cachedName = internalName; elementalReactionDef.nameToken = token + "_NAME"; elementalReactionDef.descriptionToken = token + "_DESCRIPTION"; elementalReactionDef.baseElement = baseElement; elementalReactionDef.reactingElements = reactingElements; elementalReactionDef.showInLoadoutMenu = showInLoadoutMenu; return elementalReactionDef; } } public enum ReactionIndex { None = -1 } public static class DefaultElementalReactions { public static ElementalReactionDef vaporizeMelt; public static ElementalReactionDef overload; public static ElementalReactionDef electroCharge; public static ElementalReactionDef frozen; public static ElementalReactionDef superconduct; public static ElementalReactionDef swirl; public static ElementalReactionDef crystallize; public static ElementalReactionDef burning; public static ElementalReactionDef quicken; public static ElementalReactionDef bloom; public static ElementalReactionDef lunarCharge; public static ElementalReactionDef lunarBloom; public static ElementalReactionDef lunarCrystallize; public static void Initialize() { vaporizeMelt = ElementalReactionDef.CreateElementalReactionDef("Vaporize", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_VAPORIZE", DefaultElementDefs.pyroElement, new ElementDef[2] { DefaultElementDefs.hydroElement, DefaultElementDefs.cryoElement }); vaporizeMelt.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) EffectManager.SimpleEffect(Addressables.LoadAssetAsync((object)RoR2_Base_StunChanceOnHit.ImpactStunGrenade_prefab).WaitForCompletion(), damage.position, Quaternion.identity, true); addedDamage += damage.damage * (((Object)(object)element2 == (Object)(object)DefaultElementDefs.pyroElement) ? 0.75f : 0.5f); }; vaporizeMelt.baseFirstReactionCoefficient = 0.5f; vaporizeMelt.baseLastReactionCoefficient = 2f; overload = ElementalReactionDef.CreateElementalReactionDef("Overload", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_OVERLOAD", DefaultElementDefs.pyroElement, DefaultElementDefs.electroElement); overload.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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) EffectManager.SimpleEffect(ElementalReactionManager.overloadEffect.WaitForCompletion(), damage.position, Quaternion.identity, true); DamageTypeCombo damageType = default(DamageTypeCombo); ((DamageTypeCombo)(ref damageType))..ctor(DamageTypeCombo.op_Implicit((DamageType)131072), (DamageTypeExtended)32768, (DamageSource)0); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.elementalReactionDamageType); Util.CreateBlastAttack(damage, 2.5f * damage.procCoefficient, 10f, 0.5f, damageType, 1000f).Fire(); }; electroCharge = ElementalReactionDef.CreateElementalReactionDef("ElectroCharge", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_ELECTRO_CHARGE", DefaultElementDefs.electroElement, DefaultElementDefs.hydroElement); electroCharge.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)victim.healthComponent) && victim.healthComponent.alive) { DotController.InflictDot(((Component)victim).gameObject, damage.attacker, damage.inflictedHurtbox, ElectroChargedDot.electroChargeDot, 5f, 1f, (uint?)null); } }; frozen = ElementalReactionDef.CreateElementalReactionDef("Frozen", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_FROZEN", DefaultElementDefs.cryoElement, DefaultElementDefs.hydroElement); frozen.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { SetStateOnHurt val = default(SetStateOnHurt); if (damage.procCoefficient > 0.15f && Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)victim.healthComponent) && victim.healthComponent.alive && ((Component)victim).TryGetComponent(ref val)) { val.SetFrozen(Mathf.Max(1f * damage.procCoefficient, 0.4f)); } }; superconduct = ElementalReactionDef.CreateElementalReactionDef("Superconduct", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_SUPERCONDUCT", DefaultElementDefs.cryoElement, DefaultElementDefs.electroElement); superconduct.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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_005f: 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) EffectManager.SimpleEffect(ElementalReactionManager.superconductEffect.WaitForCompletion(), damage.position, Quaternion.identity, true); DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)131072); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.elementalReactionDamageType); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.superconductDamageType); Util.CreateBlastAttack(damage, 1f * damage.procCoefficient, 10f, 0.5f, damageType, 0f).Fire(); }; swirl = ElementalReactionDef.CreateElementalReactionDef("Swirl", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_SWIRL", DefaultElementDefs.anemoElement, new ElementDef[4] { DefaultElementDefs.pyroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.electroElement, DefaultElementDefs.cryoElement }); swirl.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_009b: Unknown result type (might be due to invalid IL or missing references) ElementDef elementDef = (((Object)(object)element1 == (Object)(object)DefaultElementDefs.anemoElement) ? element2 : element1); EffectManager.SpawnEffect(ElementalReactionManager.swirlEffect.WaitForCompletion(), new EffectData { origin = damage.position, rotation = Quaternion.identity, genericUInt = (uint)elementDef.index }, true); DamageTypeCombo damageTypeCombo = DamageTypeCombo.op_Implicit((DamageType)131072); damageTypeCombo.SetElement(elementDef.index); DamageAPI.AddModdedDamageType(ref damageTypeCombo, DamageTypes.elementalReactionDamageType); Util.CreateBlastAttack(damage, 1.5f * damage.procCoefficient, 10f, 0.5f, damageTypeCombo, 200f).Fire(); }; swirl.baseFirstReactionCoefficient = 0.5f; swirl.baseLastReactionCoefficient = 0.5f; crystallize = ElementalReactionDef.CreateElementalReactionDef("Crystallize", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_CRYSTALLIZE", DefaultElementDefs.geoElement, new ElementDef[4] { DefaultElementDefs.pyroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.electroElement, DefaultElementDefs.cryoElement }); crystallize.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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) CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)damage.attacker) && damage.attacker.TryGetComponent(ref val)) { Util.GetRandomNode(damage.position, out var destination, 0.5f, 15f); if (Object.op_Implicit((Object)(object)val.master)) { CrystallizeSpawnOrb.SpawnCrystallize(val.master, val.teamComponent.teamIndex, destination + 2f * Vector3.up, damage.position); } } }; crystallize.baseFirstReactionCoefficient = 0.5f; crystallize.baseLastReactionCoefficient = 0.5f; burning = ElementalReactionDef.CreateElementalReactionDef("Burning", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_BURNING", DefaultElementDefs.dendroElement, DefaultElementDefs.pyroElement); burning.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) DamageInfo obj = damage; obj.damageType |= DamageTypeCombo.op_Implicit((DamageType)128); }; quicken = ElementalReactionDef.CreateElementalReactionDef("Quicken", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_QUICKEN", DefaultElementDefs.dendroElement, DefaultElementDefs.electroElement); quicken.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { victim.AddTimedBuff(Buffs.quickenBuff, 5f); }; bloom = ElementalReactionDef.CreateElementalReactionDef("Bloom", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_BLOOM", DefaultElementDefs.dendroElement, DefaultElementDefs.hydroElement); bloom.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)damage.attacker) && damage.attacker.TryGetComponent(ref val)) { Util.GetRandomNode(damage.position, out var destination, 0.5f, 15f); BloomSpawnOrb.SpawnBloom(damage.attacker, val.damage, destination + 2f * Vector3.up, damage.position); } }; bloom.baseFirstReactionCoefficient = 0.5f; bloom.baseLastReactionCoefficient = 2f; lunarCharge = ElementalReactionDef.CreateElementalReactionDef("LunarCharge", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_LUNAR_CHARGE", DefaultElementDefs.electroElement, DefaultElementDefs.hydroElement); lunarCharge.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)victim.healthComponent) && victim.healthComponent.alive) { if (Object.op_Implicit((Object)(object)damage.attacker) && !victim.healthComponent.body.HasBuff(Buffs.lunarChargeBuff)) { GenericElementEffectComponent.SpawnActivatedEffect(damage.attacker.transform, ParentEffectToItemDisplay.ItemDisplayParent.MoonWheel, DefaultElementDefs.electroElement.index, 0.7f, transmit: true); } DotController.InflictDot(((Component)victim).gameObject, damage.attacker, damage.inflictedHurtbox, ElectroChargedDot.lunarChargeDot, 6f, 1f, (uint?)null); } }; lunarCharge.showInLoadoutMenu = false; lunarBloom = ElementalReactionDef.CreateElementalReactionDef("LunarBloom", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_LUNAR_BLOOM", DefaultElementDefs.dendroElement, DefaultElementDefs.hydroElement); lunarBloom.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { bloom.TriggerReaction(element1, element2, victim, ref damage, ref addedDamage); CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)damage.attacker) && damage.attacker.TryGetComponent(ref val)) { if (ElementalReactionsPlugin.qualityModExists && Object.op_Implicit((Object)(object)val.inventory) && val.GetBuffCount((BuffDef)(object)Buffs.lunarBloomBuff) < 3 && Util.CheckRoll(val.inventory.GetMoonWheelQualityChance(), val.master)) { val.AddBuff((BuffDef)(object)Buffs.lunarBloomBuff); if (val.GetBuffCount((BuffDef)(object)Buffs.lunarBloomBuff) >= 3) { GenericElementEffectComponent.SpawnActivatedEffect(val.transform, ParentEffectToItemDisplay.ItemDisplayParent.MoonWheel, DefaultElementDefs.dendroElement.index, 0.7f, transmit: true); } } if (val.GetBuffCount((BuffDef)(object)Buffs.lunarBloomBuff) < 3) { val.AddBuff((BuffDef)(object)Buffs.lunarBloomBuff); if (val.GetBuffCount((BuffDef)(object)Buffs.lunarBloomBuff) >= 3) { GenericElementEffectComponent.SpawnActivatedEffect(val.transform, ParentEffectToItemDisplay.ItemDisplayParent.MoonWheel, DefaultElementDefs.dendroElement.index, 0.7f, transmit: true); } } } }; lunarBloom.baseFirstReactionCoefficient = 0.5f; lunarBloom.baseLastReactionCoefficient = 2f; lunarBloom.showInLoadoutMenu = false; lunarCrystallize = ElementalReactionDef.CreateElementalReactionDef("LunarCrystallize", "DS_GAMING_ELEMENTAL_REACTIONS_REACTION_LUNAR_CRYSTALLIZE", DefaultElementDefs.geoElement, DefaultElementDefs.hydroElement); lunarCrystallize.onElementalReactionTriggered += delegate(ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage, ref float addedDamage) { CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)damage.attacker) && damage.attacker.TryGetComponent(ref val)) { val.AddBuff(Buffs.lunarCrystallizeBuff); } }; lunarCrystallize.baseFirstReactionCoefficient = 0.5f; lunarCrystallize.baseLastReactionCoefficient = 0.5f; lunarCrystallize.showInLoadoutMenu = false; ElementalReactionCatalog.AddElementalReactionDefs(new ElementalReactionDef[13] { vaporizeMelt, overload, electroCharge, frozen, superconduct, swirl, crystallize, burning, quicken, bloom, lunarCharge, lunarBloom, lunarCrystallize }); } } public class ElementalReactionPooledObject : MonoBehaviour { public PrefabComponentPool pool; public Deployable deployable; public TeamFilter teamFilter; public CharacterBody characterBody; public NetworkIdentity networkIdentity; public GravitatePickup gravitatePickup; public bool newlySpawned = true; public void Awake() { deployable = ((Component)this).GetComponent(); teamFilter = ((Component)this).GetComponent(); characterBody = ((Component)this).GetComponent(); networkIdentity = ((Component)this).GetComponent(); } public void Start() { } public void ReturnObject() { //IL_009c: Unknown result type (might be due to invalid IL or missing references) if (pool != null) { if (Object.op_Implicit((Object)(object)deployable) && Object.op_Implicit((Object)(object)deployable.ownerMaster)) { deployable.ownerMaster.RemoveDeployable(deployable); } if (Object.op_Implicit((Object)(object)characterBody)) { CleanseSystem.CleanseBodyServer(characterBody, true, true, true, true, false, false); } if (Object.op_Implicit((Object)(object)gravitatePickup)) { gravitatePickup.gravitateTarget = null; } ((GenericPool)(object)pool).ReturnObject(this); NetMessageExtensions.Send((INetMessage)(object)new NetworkPooledObjectSetActive(networkIdentity.netId, active: false), (NetworkDestination)1); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class EnemyLunarChargeInstance : ComponentPoolObject { private GameObject attacker; private TeamIndex team; private float damage; private bool crit; private Vector3 impactPosition; public static GameObject warningPrefab; private float stepTimer; private bool struck; private bool initialized; public void CreateLightningStrike(GameObject attacker, TeamIndex team, float damage, bool crit, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) impactPosition = position; this.team = team; this.damage = damage; this.crit = crit; this.attacker = attacker; struck = false; stepTimer = 0.75f; initialized = true; HandleWarning(); } private void HandleWarning() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown EffectManager.SpawnEffect(warningPrefab, new EffectData { origin = impactPosition, scale = 6f, genericFloat = 0.75f }, true); } private void HandleStrike() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) struck = true; ElectroChargedDot.CreateLunarChargedLightning(attacker, team, damage, crit, impactPosition); stepTimer = 0.5f; } private void FixedUpdate() { if (!initialized) { return; } stepTimer -= Time.fixedDeltaTime; if (stepTimer <= 0f) { if (!struck) { HandleStrike(); return; } ((ComponentPoolObject)this).PreReturnToPool(); ((ComponentPoolObject)this).ReturnToPool(); } } public override void PreReturnToPool() { initialized = false; } } public class LunarCrystallizeController : ComponentPoolObject { public CharacterBody characterBody; public bool initialized; public GameObject moondrift1; public GameObject moondrift2; public GameObject moondrift3; public int lastMoondriftCount; public FixedTimeStamp fireAttacksTime = FixedTimeStamp.positiveInfinity; public bool attackQueued; public const float delayBeforeAttack = 0.5f; public void CreateLunarCrystallizeController(CharacterBody characterBody) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) this.characterBody = characterBody; Resize(characterBody.radius); UpdateMoondriftCount(); ((Component)this).transform.position = characterBody.corePosition; GenericElementEffectComponent.SpawnActivatedEffect(characterBody.transform, ParentEffectToItemDisplay.ItemDisplayParent.MoonWheel, DefaultElementDefs.geoElement.index, 0.7f, transmit: false); initialized = true; } private void Resize(float characterRadius) { //IL_001f: 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_0061: Unknown result type (might be due to invalid IL or missing references) float num = characterRadius + 2.5f; moondrift1.transform.localPosition = new Vector3(0f, 0f, num); moondrift2.transform.localPosition = new Vector3(0f, 0f, num); moondrift3.transform.localPosition = new Vector3(0f, 0f, num); } private void OnEnable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown SceneCamera.onSceneCameraPreRender += new SceneCameraDelegate(AdjustMoondriftsToPOV); } private void OnDisable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown SceneCamera.onSceneCameraPreRender -= new SceneCameraDelegate(AdjustMoondriftsToPOV); } private void FixedUpdate() { //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 references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) if (!initialized) { return; } if (!Object.op_Implicit((Object)(object)characterBody)) { ((ComponentPoolObject)this).PreReturnToPool(); ((ComponentPoolObject)this).ReturnToPool(); return; } UpdateMoondriftCount(); if (((FixedTimeStamp)(ref fireAttacksTime)).hasPassed) { fireAttacksTime = FixedTimeStamp.positiveInfinity; if (NetworkServer.active) { LunarCrystallizeOrb.FireLunarCrystallizeOrbs(characterBody, characterBody.corePosition); characterBody.SetBuffCount(Buffs.lunarCrystallizeBuff.buffIndex, characterBody.GetBuffCount(Buffs.lunarCrystallizeBuff) - 3); } attackQueued = false; EffectManager.SpawnEffect(ElementalReactionManager.lunarCrystallizeActivatedEffect.WaitForCompletion(), new EffectData { origin = characterBody.corePosition, rootObject = ((Component)characterBody).gameObject }, false); } } private void UpdateMoondriftCount() { //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)characterBody)) { return; } if (!characterBody.HasBuff(Buffs.lunarCrystallizeBuff)) { ((ComponentPoolObject)this).PreReturnToPool(); ((ComponentPoolObject)this).ReturnToPool(); return; } if (characterBody.GetBuffCount(Buffs.lunarCrystallizeBuff) != lastMoondriftCount) { if (characterBody.GetBuffCount(Buffs.lunarCrystallizeBuff) > lastMoondriftCount) { Util.PlaySound("Play_seeker_skill2_alt_fire", ((Component)this).gameObject); Util.PlaySound("Play_moonBrother_m1_laser_shoot", ((Component)this).gameObject); } moondrift1.SetActive(characterBody.GetBuffCount(Buffs.lunarCrystallizeBuff) >= 1); moondrift2.SetActive(characterBody.GetBuffCount(Buffs.lunarCrystallizeBuff) >= 2); moondrift3.SetActive(characterBody.GetBuffCount(Buffs.lunarCrystallizeBuff) >= 3); lastMoondriftCount = characterBody.GetBuffCount(Buffs.lunarCrystallizeBuff); } if (characterBody.GetBuffCount(Buffs.lunarCrystallizeBuff) >= 3 && !attackQueued) { fireAttacksTime = FixedTimeStamp.now + 0.5f; attackQueued = true; } } private void AdjustMoondriftsToPOV(SceneCamera camera) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_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) if (initialized) { Vector3 forward = ((Component)camera).transform.forward; forward.y = 0f; ((Component)this).transform.SetPositionAndRotation(Object.op_Implicit((Object)(object)characterBody) ? characterBody.corePosition : ((Component)this).transform.position, Quaternion.LookRotation(forward)); } } public override void PreReturnToPool() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((ComponentPoolObject)this).PreReturnToPool(); fireAttacksTime = FixedTimeStamp.positiveInfinity; attackQueued = false; lastMoondriftCount = 0; initialized = false; } } public class NetworkPooledObjectSetActive : INetMessage, ISerializableObject { private NetworkInstanceId netId; private bool active; public NetworkPooledObjectSetActive() { } public NetworkPooledObjectSetActive(NetworkInstanceId netId, bool active) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) this.netId = netId; this.active = active; } public void OnReceived() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { GameObject val = Util.FindNetworkObject(netId); if (Object.op_Implicit((Object)(object)val)) { val.SetActive(active); } } } public void Serialize(NetworkWriter writer) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) writer.Write(netId); writer.Write(active); } public void Deserialize(NetworkReader reader) { //IL_0003: 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) netId = reader.ReadNetworkId(); active = reader.ReadBoolean(); } } } namespace ElementalReactionsMod.Orbs { public class BloomSpawnOrb : Orb { public float damage; public GameObject owner; public Vector3 targetPosition; public override void Begin() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((Orb)this).duration = 0.2f; EffectData val = new EffectData { origin = base.origin, start = targetPosition, genericFloat = ((Orb)this).duration }; EffectManager.SpawnEffect(ElementalReactionManager.bloomSpawnOrb, val, true); } public override void OnArrival() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0061: Unknown result type (might be due to invalid IL or missing references) ((Orb)this).OnArrival(); ProjectileManager.instance.FireProjectileServer(new FireProjectileInfo { projectilePrefab = ElementalReactionManager.bloomCore.WaitForCompletion(), damage = damage, crit = false, position = targetPosition, rotation = Quaternion.identity, owner = owner }, (NetworkConnection)null, (ushort)0, 0.0); } public static void SpawnBloom(GameObject owner, float damage, Vector3 targetPosition, Vector3 originPosition) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) OrbManager.instance.AddOrb((Orb)(object)new BloomSpawnOrb { owner = owner, damage = damage, targetPosition = targetPosition, origin = originPosition }); } } public class CrystallizeSpawnOrb : Orb { public TeamIndex team; public CharacterMaster owner; public Vector3 targetPosition; public override void Begin() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((Orb)this).duration = 0.2f; EffectData val = new EffectData { origin = base.origin, start = targetPosition, genericFloat = ((Orb)this).duration }; EffectManager.SpawnEffect(ElementalReactionManager.crystallizeSpawnOrbEffect.WaitForCompletion(), val, true); } public override void OnArrival() { //IL_0013: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) ((Orb)this).OnArrival(); GameObject val = Object.Instantiate(ElementalReactionManager.crystallizePickup.WaitForCompletion(), targetPosition, Quaternion.identity); if (Object.op_Implicit((Object)(object)owner)) { owner.AddDeployable(val.GetComponent(), ElementalReactionManager.crystallizeDeployableSlot); } if (Object.op_Implicit((Object)(object)val)) { val.GetComponent().teamIndex = team; } NetworkServer.Spawn(val); } public static void SpawnCrystallize(CharacterMaster owner, TeamIndex team, Vector3 targetPosition, Vector3 originPosition) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) OrbManager.instance.AddOrb((Orb)(object)new CrystallizeSpawnOrb { owner = owner, team = team, targetPosition = targetPosition, origin = originPosition }); } } public class DelusionOrb : GenericDamageOrb, IOrbFixedUpdateBehavior { public ElementIndex element; private Vector3 lastKnownTargetPosition; public static void FireDelusionOrb(CharacterBody attacker, Vector3 origin, HurtBox target, int stacks, bool crit, ElementIndex element) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) DelusionOrb delusionOrb = new DelusionOrb { attacker = ((Component)attacker).gameObject, origin = origin, damageValue = (3f + 3f * (float)(stacks - 1)) * attacker.damage, isCrit = crit, target = target, damageType = default(DamageTypeCombo), procCoefficient = 1f, teamIndex = attacker.teamComponent.teamIndex, element = element, speed = 75f }; ((GenericDamageOrb)delusionOrb).damageType.SetElement(element); OrbManager.instance.AddOrb((Orb)(object)delusionOrb); } public override void Begin() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_005c: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / base.speed; if (Object.op_Implicit((Object)(object)((GenericDamageOrb)this).GetOrbEffect())) { EffectData val = new EffectData { scale = base.scale, origin = ((Orb)this).origin, genericFloat = ((Orb)this).duration, genericUInt = (uint)element }; val.SetHurtBoxReference(((Orb)this).target); EffectManager.SpawnEffect(((GenericDamageOrb)this).GetOrbEffect(), val, true); } } public override GameObject GetOrbEffect() { return ElementalReactionManager.genericElementOrbEffect.WaitForCompletion(); } public override void OnArrival() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_006f: Expected O, but got Unknown Util.CreateBlastAttack(base.attacker, base.teamIndex, base.damageValue, base.isCrit, 10f, (FalloffModel)1, base.procCoefficient, base.damageType, lastKnownTargetPosition, 0f).Fire(); EffectManager.SpawnEffect(ElementalReactionManager.delusionHitEffect.WaitForCompletion(), new EffectData { origin = lastKnownTargetPosition, genericUInt = (uint)element }, true); } public void FixedUpdate() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Orb)this).target)) { lastKnownTargetPosition = ((Component)((Orb)this).target).transform.position; } } } public static class ElectroChargedOrb { public static LightningOrb CreateOrb(Vector3 origin, HurtBox target, GameObject attacker, float damage) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)67108864); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.elementalReactionDamageType); LightningOrb val = new LightningOrb { origin = origin, target = target, lightningType = (LightningType)1, attacker = attacker, inflictor = attacker, isCrit = false, damageValue = damage, damageType = damageType, canBounceOnSameTarget = false, procCoefficient = 0f, bouncesRemaining = 0, targetsToFindPerBounce = 0 }; OrbManager.instance.AddOrb((Orb)(object)val); return val; } } public class HyperbloomOrb : GenericDamageOrb { public static void FireHyperbloomOrb(GameObject attacker, TeamIndex attackerTeam, Vector3 origin, float damage) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) HurtBox val = null; BullseyeSearch val2 = new BullseyeSearch(); val2.searchOrigin = origin; val2.searchDirection = Vector3.zero; val2.teamMaskFilter = TeamMask.GetEnemyTeams(attackerTeam); val2.filterByLoS = false; val2.sortMode = (SortMode)1; val2.maxDistanceFilter = 30f; val2.RefreshCandidates(); val = val2.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val)) { HyperbloomOrb hyperbloomOrb = new HyperbloomOrb { attacker = attacker.gameObject, origin = origin, damageValue = (((int)val.teamIndex == 1) ? (damage * (Config.PlayerBloomResistance().Value / 100f)) : damage), isCrit = false, target = val, damageType = default(DamageTypeCombo), procCoefficient = 0.5f, teamIndex = attackerTeam, speed = 90f }; DamageAPI.AddModdedDamageType(ref ((GenericDamageOrb)hyperbloomOrb).damageType, DamageTypes.elementalReactionDamageType); OrbManager.instance.AddOrb((Orb)(object)hyperbloomOrb); } } public override void Begin() { //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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / base.speed + 0.1f; if (Object.op_Implicit((Object)(object)((GenericDamageOrb)this).GetOrbEffect())) { EffectData val = new EffectData { scale = base.scale, origin = ((Orb)this).origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(((Orb)this).target); EffectManager.SpawnEffect(((GenericDamageOrb)this).GetOrbEffect(), val, true); } } public override GameObject GetOrbEffect() { return ElementalReactionManager.hyperbloomOrb.WaitForCompletion(); } } public class LunarCrystallizeOrb : GenericDamageOrb { public static void FireLunarCrystallizeOrbs(CharacterBody attacker, Vector3 origin) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) int num = 3; if (ElementalReactionsPlugin.qualityModExists && Object.op_Implicit((Object)(object)attacker.inventory)) { float moonWheelQualityChance = attacker.inventory.GetMoonWheelQualityChance(); for (int i = 0; i < 3; i++) { if (Util.CheckRoll(moonWheelQualityChance, attacker.master)) { num++; } } } HurtBox val = null; BullseyeSearch val2 = new BullseyeSearch(); val2.searchOrigin = origin; val2.searchDirection = Vector3.zero; val2.teamMaskFilter = TeamMask.GetEnemyTeams(attacker.teamComponent.teamIndex); val2.filterByLoS = false; val2.sortMode = (SortMode)1; val2.maxDistanceFilter = 50f; val2.RefreshCandidates(); HurtBox[] array = val2.GetResults().ToArray(); if (array.Count() <= 0) { return; } for (int j = 0; j < num; j++) { val = array[j % array.Count()]; if (!Object.op_Implicit((Object)(object)val)) { break; } FireLunarCrystallizeOrb(attacker, origin, val, attacker.RollCrit()); } } public static void FireLunarCrystallizeOrb(CharacterBody attacker, Vector3 origin, HurtBox target, bool crit) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Invalid comparison between Unknown and I4 //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_00aa: Unknown result type (might be due to invalid IL or missing references) LunarCrystallizeOrb lunarCrystallizeOrb = new LunarCrystallizeOrb { attacker = ((Component)attacker).gameObject, origin = origin, damageValue = 5f * attacker.damage * (((int)target.teamIndex == 1) ? 0.25f : 1f), isCrit = crit, target = target, damageType = default(DamageTypeCombo), procCoefficient = 1f, teamIndex = attacker.teamComponent.teamIndex, speed = 100f + Random.Range(0f, 10f) }; DamageAPI.AddModdedDamageType(ref ((GenericDamageOrb)lunarCrystallizeOrb).damageType, DamageTypes.elementalReactionDamageType); DamageAPI.AddModdedDamageType(ref ((GenericDamageOrb)lunarCrystallizeOrb).damageType, DamageTypes.lunarDamageType); OrbManager.instance.AddOrb((Orb)(object)lunarCrystallizeOrb); } public override void Begin() { //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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / base.speed + 0.1f; if (Object.op_Implicit((Object)(object)((GenericDamageOrb)this).GetOrbEffect())) { EffectData val = new EffectData { scale = base.scale, origin = ((Orb)this).origin, genericFloat = ((Orb)this).duration, genericUInt = (uint)DefaultElementDefs.geoElement.index }; val.SetHurtBoxReference(((Orb)this).target); EffectManager.SpawnEffect(((GenericDamageOrb)this).GetOrbEffect(), val, true); } } public override GameObject GetOrbEffect() { return ElementalReactionManager.genericElementOrbEffect.WaitForCompletion(); } } [RequireComponent(typeof(EffectManagerHelper))] [RequireComponent(typeof(OrbEffect))] public class OrbEffectTargetPosition : MonoBehaviour { public EffectManagerHelper emh; public OrbEffect orb; public void Awake() { emh = ((Component)this).GetComponent(); EffectManagerHelper obj = emh; obj.OnEffectActivated = (Action)Delegate.Combine(obj.OnEffectActivated, new Action(HijackOrbTarget)); orb = ((Component)this).GetComponent(); } public void HijackOrbTarget() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)emh.effectComponent) && !emh.effectComponent.noEffectData) { orb.targetTransform = null; orb.lastKnownTargetPosition = emh.effectComponent.effectData.start; } } } } namespace ElementalReactionsMod.Loadout { [RequireComponent(typeof(CharacterBody))] public class ElementLoadoutComponent : MonoBehaviour { public ElementDef primaryElement; public ElementDef secondaryElement; public ElementDef utilityElement; public ElementDef specialElement; public static ItemDef primaryElementItem; public static ItemDef secondaryElementItem; public static ItemDef utilityElementItem; public static ItemDef specialElementItem; public static ItemDef damageIsFromPlayerItem; public bool permanentElementWasApplied; private float permanentElementStopwatch; public ElementDef naturallyAppliedElement; public ElementDef specialAppliedElement; public FixedTimeStamp specialAppliedElementEndTime = FixedTimeStamp.positiveInfinity; public CharacterBody characterBody; public SpecialObjectAttributes specialObjectAttributes; public TeamIndex team; public ElementDef permanentlyAppliedElement { get { if (Object.op_Implicit((Object)(object)specialAppliedElement)) { return specialAppliedElement; } return naturallyAppliedElement; } } private void Awake() { if (!Object.op_Implicit((Object)(object)ElementalReactionManager.instance)) { ((Behaviour)this).enabled = false; } characterBody = ((Component)this).GetComponent(); specialObjectAttributes = ((Component)this).GetComponent(); } private void Start() { //IL_0022: 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) if (Object.op_Implicit((Object)(object)characterBody.teamComponent)) { team = characterBody.teamComponent.teamIndex; } if (Config.CanEnemiesBeElemental().Value && Object.op_Implicit((Object)(object)permanentlyAppliedElement) && Object.op_Implicit((Object)(object)specialObjectAttributes)) { specialObjectAttributes.damageTypeOverride.SetElement(permanentlyAppliedElement.index); } } private void FixedUpdate() { if (!NetworkServer.active || !Config.CanEnemiesBeElemental().Value || !Object.op_Implicit((Object)(object)permanentlyAppliedElement) || !Object.op_Implicit((Object)(object)permanentlyAppliedElement.buff)) { return; } if (characterBody.HasBuff(permanentlyAppliedElement.buff)) { permanentElementWasApplied = true; } else { if (permanentElementWasApplied) { permanentElementStopwatch = 0f; permanentElementWasApplied = false; } permanentElementStopwatch += Time.fixedDeltaTime; if (permanentElementStopwatch >= 1f) { ElementalReactionManager.ApplyElement(permanentlyAppliedElement, characterBody, float.MaxValue, null, alwaysPersist: true); } } if (Object.op_Implicit((Object)(object)specialAppliedElement) && ((FixedTimeStamp)(ref specialAppliedElementEndTime)).hasPassed) { SetSpecialAppliedElement(null); } } public static ElementDef GetElement(GameObject gameObject, DamageSource damageSource) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (gameObject.TryGetComponent(ref val)) { return GetElement(val, damageSource); } return DefaultElementDefs.physicalElement; } public static ElementDef GetElement(CharacterBody characterBody, DamageSource damageSource) { //IL_005c: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected I4, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)characterBody)) { return DefaultElementDefs.physicalElement; } Inventory val = (Object.op_Implicit((Object)(object)characterBody.inventory) ? characterBody.inventory : ((Object.op_Implicit((Object)(object)characterBody.master) && Object.op_Implicit((Object)(object)characterBody.master.inventory)) ? characterBody.master.inventory : null)); switch (damageSource - 1) { default: { if ((int)damageSource != 8) { break; } if (Object.op_Implicit((Object)(object)val)) { ElementDef elementItem4 = GetElementItem(val, specialElementItem); if (Object.op_Implicit((Object)(object)elementItem4) && (Object)(object)elementItem4 != (Object)(object)DefaultElementDefs.physicalElement) { return elementItem4; } } ElementLoadoutComponent elementLoadoutComponent4 = default(ElementLoadoutComponent); if (!((Component)characterBody).TryGetComponent(ref elementLoadoutComponent4) || !Object.op_Implicit((Object)(object)elementLoadoutComponent4) || !Object.op_Implicit((Object)(object)elementLoadoutComponent4.specialElement) || !((Object)(object)elementLoadoutComponent4.specialElement != (Object)(object)DefaultElementDefs.physicalElement)) { break; } return elementLoadoutComponent4.specialElement; } case 0: { if (Object.op_Implicit((Object)(object)val)) { ElementDef elementItem2 = GetElementItem(val, primaryElementItem); if (Object.op_Implicit((Object)(object)elementItem2) && (Object)(object)elementItem2 != (Object)(object)DefaultElementDefs.physicalElement) { return elementItem2; } } ElementLoadoutComponent elementLoadoutComponent2 = default(ElementLoadoutComponent); if (((Component)characterBody).TryGetComponent(ref elementLoadoutComponent2) && Object.op_Implicit((Object)(object)elementLoadoutComponent2) && Object.op_Implicit((Object)(object)elementLoadoutComponent2.primaryElement) && (Object)(object)elementLoadoutComponent2.primaryElement != (Object)(object)DefaultElementDefs.physicalElement) { return elementLoadoutComponent2.primaryElement; } break; } case 1: { if (Object.op_Implicit((Object)(object)val)) { ElementDef elementItem3 = GetElementItem(val, secondaryElementItem); if (Object.op_Implicit((Object)(object)elementItem3) && (Object)(object)elementItem3 != (Object)(object)DefaultElementDefs.physicalElement) { return elementItem3; } } ElementLoadoutComponent elementLoadoutComponent3 = default(ElementLoadoutComponent); if (((Component)characterBody).TryGetComponent(ref elementLoadoutComponent3) && Object.op_Implicit((Object)(object)elementLoadoutComponent3) && Object.op_Implicit((Object)(object)elementLoadoutComponent3.secondaryElement) && (Object)(object)elementLoadoutComponent3.secondaryElement != (Object)(object)DefaultElementDefs.physicalElement) { return elementLoadoutComponent3.secondaryElement; } break; } case 3: { if (Object.op_Implicit((Object)(object)val)) { ElementDef elementItem = GetElementItem(val, utilityElementItem); if (Object.op_Implicit((Object)(object)elementItem) && (Object)(object)elementItem != (Object)(object)DefaultElementDefs.physicalElement) { return elementItem; } } ElementLoadoutComponent elementLoadoutComponent = default(ElementLoadoutComponent); if (((Component)characterBody).TryGetComponent(ref elementLoadoutComponent) && Object.op_Implicit((Object)(object)elementLoadoutComponent) && Object.op_Implicit((Object)(object)elementLoadoutComponent.utilityElement) && (Object)(object)elementLoadoutComponent.utilityElement != (Object)(object)DefaultElementDefs.physicalElement) { return elementLoadoutComponent.utilityElement; } break; } case 2: break; } return Object.op_Implicit((Object)(object)val) ? Elites.GetFirstEliteElementDef(val) : DefaultElementDefs.physicalElement; } private static ElementDef GetElementItem(Inventory inventory, ItemDef loadoutItem) { return ElementCatalog.GetElementDef((ElementIndex)inventory.GetItemCountPermanent(loadoutItem)); } public void ApplyElementLoadout(ElementDef[] elements) { primaryElement = elements[0]; secondaryElement = elements[1]; utilityElement = elements[2]; specialElement = elements[3]; } public void ApplyElementLoadout(ElementIndex[] elements) { ApplyElementLoadout(new ElementDef[4] { ElementCatalog.GetElementDef(elements[0]), ElementCatalog.GetElementDef(elements[1]), ElementCatalog.GetElementDef(elements[2]), ElementCatalog.GetElementDef(elements[3]) }); } public void SetSpecialAppliedElement(ElementDef element) { //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 (Config.CanEnemiesBeElemental().Value) { if ((Object)(object)element != (Object)(object)specialAppliedElement) { AppliedElementChanged(specialAppliedElement, element); specialAppliedElement = element; } specialAppliedElementEndTime = FixedTimeStamp.positiveInfinity; } } public void SetSpecialAppliedElement(ElementDef element, float duration) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if (Config.CanEnemiesBeElemental().Value) { if ((Object)(object)element != (Object)(object)specialAppliedElement) { AppliedElementChanged(specialAppliedElement, element); specialAppliedElement = element; } specialAppliedElementEndTime = FixedTimeStamp.now + duration; } } private void AppliedElementChanged(ElementDef previous, ElementDef current) { if (Object.op_Implicit((Object)(object)specialObjectAttributes)) { specialObjectAttributes.damageTypeOverride.SetElement(current.index); } if (Object.op_Implicit((Object)(object)previous) && Object.op_Implicit((Object)(object)previous.buff) && characterBody.HasBuff(previous.buff) && permanentElementWasApplied) { characterBody.RemoveBuff(previous.buff); } if (Object.op_Implicit((Object)(object)current) && Object.op_Implicit((Object)(object)current.buff)) { ElementalReactionManager.ApplyElement(current, characterBody, float.MaxValue); } } public static void Initialize() { primaryElementItem = ElementalReactionsMod.Items.Items.AddNewItem("ElementPrimary", "ELEMENT_PRIMARY", false, null, null, null, null, (ItemTag)9, (ItemTag)25); secondaryElementItem = ElementalReactionsMod.Items.Items.AddNewItem("ElementSecondary", "ELEMENT_SECONDARY", false, null, null, null, null, (ItemTag)9, (ItemTag)25); utilityElementItem = ElementalReactionsMod.Items.Items.AddNewItem("ElementUtility", "ELEMENT_UTILITY", false, null, null, null, null, (ItemTag)9, (ItemTag)25); specialElementItem = ElementalReactionsMod.Items.Items.AddNewItem("ElementSpecial", "ELEMENT_SPECIAL", false, null, null, null, null, (ItemTag)9, (ItemTag)25); damageIsFromPlayerItem = ElementalReactionsMod.Items.Items.AddNewItem("ElementPlayer", "ELEMENT_PLAYER", false, null, null, null, null, (ItemTag)9, (ItemTag)25); } public static void AddElementLoadoutComponents() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { string bodyName = BodyCatalog.GetBodyName(BodyCatalog.FindBodyIndex(allSurvivorDef.bodyPrefab)); bool configExists; ElementDef[] elementLoadoutFromConfig = Config.GetElementLoadoutFromConfig(bodyName, out configExists); ElementLoadoutComponent elementLoadoutComponent = UnityObjectExtensions.EnsureComponent(allSurvivorDef.bodyPrefab); if (configExists) { elementLoadoutComponent.ApplyElementLoadout(elementLoadoutFromConfig); } if (bodyName == "EngiBody") { allSurvivorDef.bodyPrefab.AddComponent(); } } EnemyElementLoadouts.Initialize(); } } public class ElementLoadoutPanelController : MonoBehaviour { public class Row : IDisposable { private struct RowData { public MPButton button; public int defIndex; public RowData(MPButton _button, int _defIndex) { button = _button; defIndex = _defIndex; } } public ElementLoadoutPanelController owner; private UserProfile userProfile; public RectTransform rowPanelTransform; public RectTransform buttonContainerTransform; public RectTransform choiceHighlightRect; public Color primaryColor; private List rowData = new List(); public SkillSlot skillSlot; private Row(ElementLoadoutPanelController owner, string titleToken, SkillSlot skillSlot) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_009e: 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) this.owner = owner; userProfile = owner.userProfile; rowPanelTransform = (RectTransform)Object.Instantiate(Assets.elementLoadoutRowUI, (Transform)(RectTransform)((Component)owner).transform).transform; buttonContainerTransform = (RectTransform)((Transform)rowPanelTransform).Find("ButtonContainer"); choiceHighlightRect = (RectTransform)((Transform)rowPanelTransform).Find("ButtonSelectionHighlight, Checkbox"); ((Component)((Transform)rowPanelTransform).Find("SlotLabel")).GetComponent().token = titleToken; this.skillSlot = skillSlot; } public static Row FromSkillSlot(ElementLoadoutPanelController owner, SkillSlot skillSlot) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected I4, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown SkillSlot val = skillSlot; SkillSlot val2 = val; Row row = new Row(owner, (int)val2 switch { 0 => "LOADOUT_SKILL_PRIMARY", 1 => "LOADOUT_SKILL_SECONDARY", 2 => "LOADOUT_SKILL_UTILITY", 3 => "LOADOUT_SKILL_SPECIAL", _ => "LOADOUT_SKILL_MISC", }, skillSlot); for (int i = 0; i < ElementCatalog.elementCatalog.Length; i++) { int index = i; ((UnityEvent)((Button)row.AddButton(owner, ElementCatalog.elementCatalog[i])).onClick).AddListener((UnityAction)delegate { //IL_0023: Unknown result type (might be due to invalid IL or missing references) Config.SetElementLoadoutConfig(owner.bodyName, ElementCatalog.elementCatalog[index], skillSlot); row.OnLoadoutChanged(null, null); }); } return row; } public void UpdateCharacter() { //IL_0007: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) CharacterBody bodyPrefabBodyComponent = BodyCatalog.GetBodyPrefabBodyComponent(owner.bodyIndex); if ((Object)(object)bodyPrefabBodyComponent != (Object)null) { primaryColor = bodyPrefabBodyComponent.bodyColor; } ((Graphic)((Component)((Transform)rowPanelTransform).Find("SlotLabel")).GetComponent()).color = primaryColor; userProfile = owner.userProfile; OnLoadoutChanged(null, null); } private void SetButtonColorMultiplier(int i, float f) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) MPButton button = rowData[i].button; ColorBlock colors = ((Selectable)button).colors; ((ColorBlock)(ref colors)).colorMultiplier = f; ((Selectable)button).colors = colors; } public void OnLoadoutChanged(object obj, EventArgs args) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown if (userProfile != owner.userProfile) { return; } bool configExists; ElementDef[] elementLoadoutFromConfig = Config.GetElementLoadoutFromConfig(owner.bodyName, out configExists); for (int i = 0; i < rowData.Count; i++) { ColorBlock colors = ((Selectable)rowData[i].button).colors; ((ColorBlock)(ref colors)).colorMultiplier = 0.5f; ((Selectable)rowData[i].button).colors = colors; SetButtonColorMultiplier(i, 0.5f); if (elementLoadoutFromConfig[skillSlot].index == (ElementIndex)rowData[i].defIndex) { ((Transform)choiceHighlightRect).SetParent((Transform)(RectTransform)((Component)rowData[i].button).transform, false); SetButtonColorMultiplier(i, 1f); } } } private HGButton AddButton(ElementLoadoutPanelController owner, ElementDef element) { //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_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_0098: Unknown result type (might be due to invalid IL or missing references) HGButton component = Object.Instantiate(AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_UI.LoadoutButton_prefab), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(), (Transform)(object)buttonContainerTransform).GetComponent(); component.updateTextOnHover = true; component.hoverLanguageTextMeshController = owner.hoverTextDescription; component.hoverToken = element.keywordToken; ((MPButton)component).requiredTopLayer = owner.requiredUILayerKey; TooltipProvider component2 = ((Component)component).GetComponent(); ((Selectable)component).interactable = true; component2.titleColor = element.color; component2.overrideTitleText = Language.GetString(element.nameToken); component2.overrideBodyText = Language.GetString(element.descriptionToken); ((Image)((Selectable)component).targetGraphic).sprite = element.skillIcon; rowData.Add(new RowData((MPButton)(object)component, (int)element.index)); return component; } public void Dispose() { for (int num = rowData.Count - 1; num >= 0; num--) { Object.Destroy((Object)(object)((Component)rowData[num].button).gameObject); } Object.Destroy((Object)(object)((Component)rowPanelTransform).gameObject); } } public LanguageTextMeshController hoverTextDescription; public UILayerKey requiredUILayerKey; public List rows; private MPEventSystemLocator eventSystemLocator; public BodyIndex bodyIndex; public string bodyName; public ElementLoadoutComponent bodyElementLoadout; public UserProfile userProfile; private bool startRan; private void Awake() { eventSystemLocator = ((Component)this).GetComponent(); } private void Start() { rows = new List(4) { Row.FromSkillSlot(this, (SkillSlot)0), Row.FromSkillSlot(this, (SkillSlot)1), Row.FromSkillSlot(this, (SkillSlot)2), Row.FromSkillSlot(this, (SkillSlot)3) }; startRan = true; } private void OnEnable() { if (startRan) { UpdateDisplayData(); } } private void Update() { if (startRan) { UpdateDisplayData(); } } private void UpdateDisplayData() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) MPEventSystem eventSystem = eventSystemLocator.eventSystem; NetworkUser val = null; userProfile = null; if ((Object)(object)eventSystem != (Object)null) { LocalUser localUser = eventSystem.localUser; if (localUser != null) { val = localUser.currentNetworkUser; userProfile = localUser.userProfile; } } BodyIndex displayData = (BodyIndex)((!Object.op_Implicit((Object)(object)val)) ? (-1) : ((int)val.bodyIndexPreference)); SetDisplayData(displayData); } public void SetDisplayData(BodyIndex bodyIndex) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 //IL_0019: 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_0020: 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) if (bodyIndex != this.bodyIndex && (int)bodyIndex != -1) { this.bodyIndex = bodyIndex; bodyName = BodyCatalog.GetBodyName(bodyIndex); bodyElementLoadout = UnityObjectExtensions.EnsureComponent(BodyCatalog.GetBodyPrefab(bodyIndex)); Rebuild(); } } public void Rebuild() { foreach (Row row in rows) { row.UpdateCharacter(); } } private void OnDestroy() { for (int num = rows.Count - 1; num >= 0; num--) { rows[num].Dispose(); } rows.Clear(); } } public static class EnemyElementLoadouts { public static int[] uniqueEnemiesWithElement; public static List enemiesWithMoonWheel = new List(); public static void Initialize() { //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07b0: Unknown result type (might be due to invalid IL or missing references) uniqueEnemiesWithElement = new int[ElementCatalog.elementCatalog.Length]; CreateLoadout("AcidLarvaBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("VultureBody", DefaultElementDefs.anemoElement); CreateLoadout("BeetleQueen2Body", DefaultElementDefs.hydroElement); CreateLoadout("BeetleGuardBody", DefaultElementDefs.geoElement, DefaultElementDefs.geoElement); CreateLoadout("BeetleGuardAllyBody", DefaultElementDefs.geoElement, DefaultElementDefs.geoElement); CreateLoadout("BisonBody", DefaultElementDefs.physicalElement, DefaultElementDefs.geoElement); CreateLoadout("ChildBody", null, null, null, null, DefaultElementDefs.pyroElement); CreateLoadout("ParentBody", null, null, null, null, DefaultElementDefs.pyroElement); CreateLoadout("ClayGrenadierBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("ClayBruiserBody", DefaultElementDefs.physicalElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("ClayBossBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("DevotedLemurianBruiserBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("LemurianBruiserBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("DevotedLemurianBody", DefaultElementDefs.pyroElement); CreateLoadout("LemurianBody", DefaultElementDefs.pyroElement); CreateLoadout("GreaterWispBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("GupBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement); CreateLoadout("GeepBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement); CreateLoadout("GipBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement); CreateLoadout("HalcyoniteBody", DefaultElementDefs.geoElement, DefaultElementDefs.electroElement, DefaultElementDefs.geoElement, DefaultElementDefs.geoElement); CreateLoadout("HermitCrabBody", DefaultElementDefs.hydroElement); CreateLoadout("JellyfishBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("WispBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("WispSoulBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); AddMoonWheel(CreateLoadout("LunarWispBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.pyroElement)); AddMoonWheel(CreateLoadout("LunarGolemBody", DefaultElementDefs.geoElement, DefaultElementDefs.geoElement, DefaultElementDefs.geoElement, DefaultElementDefs.geoElement)); AddMoonWheel(CreateLoadout("LunarExploderBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement)); AddElementToProjectile(RoR2_Base_LunarExploder.LunarExploderProjectileDotZone_prefab, DefaultElementDefs.electroElement); CreateLoadout("MiniMushroomBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement); CreateLoadout("ScorchlingBody", DefaultElementDefs.physicalElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("ScorchlingBombProjectile", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("DefectiveUnitBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("FriendUnitBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("RoboBallMiniBody", DefaultElementDefs.electroElement); CreateLoadout("RoboBallGreenBuddyBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("RoboBallRedBuddyBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("TankerBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("IronHaulerBody", DefaultElementDefs.anemoElement, DefaultElementDefs.anemoElement, DefaultElementDefs.anemoElement, DefaultElementDefs.anemoElement); CreateLoadout("GolemBody", DefaultElementDefs.geoElement, DefaultElementDefs.electroElement); CreateLoadout("VoidBarnacleBody", DefaultElementDefs.hydroElement); CreateLoadout("VoidJailerBody", DefaultElementDefs.hydroElement, DefaultElementDefs.anemoElement); CreateLoadout("VoidJailerAllyBody", DefaultElementDefs.hydroElement, DefaultElementDefs.anemoElement); CreateLoadout("NullifierBody", DefaultElementDefs.hydroElement); CreateLoadout("NullifierAllyBody", DefaultElementDefs.hydroElement); CreateLoadout("GrandParentBody", DefaultElementDefs.geoElement, null, null, null, DefaultElementDefs.pyroElement); CreateLoadout("GravekeeperBody", DefaultElementDefs.pyroElement); CreateLoadout("MagmaWormBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("ElectricWormBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("SolusAmalgamatorBody", DefaultElementDefs.pyroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("SolusAmalgamatorFlamethrowerCannonBody", DefaultElementDefs.pyroElement); CreateLoadout("SolusAmalgamatorThrusterBody", DefaultElementDefs.electroElement); CreateLoadout("SolusAmalgamatorMissilePodBody", DefaultElementDefs.electroElement); CreateLoadout("RoboBallBossBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("SuperRoboBallBossBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.anemoElement); CreateLoadout("TitanBody", DefaultElementDefs.geoElement, DefaultElementDefs.geoElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("TitanGoldBody", DefaultElementDefs.geoElement, DefaultElementDefs.geoElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("VoidMegaCrabBody", DefaultElementDefs.hydroElement, DefaultElementDefs.electroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("VoidMegaCrabAllyBody", DefaultElementDefs.hydroElement, DefaultElementDefs.electroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("VagrantBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("VagrantTrackingBomb", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("VoidInfestorBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("VultureHunterBody", DefaultElementDefs.anemoElement, DefaultElementDefs.pyroElement, DefaultElementDefs.anemoElement, DefaultElementDefs.anemoElement); AddMoonWheel(CreateLoadout("FalseSonBossBody", DefaultElementDefs.geoElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.geoElement)); AddElementToProjectile(RoR2_DLC2_FalseSonBoss.FalseSonFissurePillar_prefab, DefaultElementDefs.pyroElement); AddMoonWheel(CreateLoadout("FalseSonBossBodyLunarShard", DefaultElementDefs.geoElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.geoElement)); AddMoonWheel(CreateLoadout("FalseSonBossBodyBrokenLunarShard", DefaultElementDefs.geoElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement)); AddElementToProjectile(RoR2_DLC2_FalseSonBoss.PrimeDevastatorProjectile_prefab, DefaultElementDefs.electroElement); AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC2_meridian_DisableSkillsLightning.LightningStrikeInstance_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { LightningStrikeInstance val2 = default(LightningStrikeInstance); if (x.Result.TryGetComponent(ref val2)) { val2.blastDamageType.SetElement(DefaultElementDefs.electroElement.index); } }; AddMoonWheel(CreateLoadout("BrotherBody", DefaultElementDefs.physicalElement, DefaultElementDefs.cryoElement, DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement)); AddMoonWheel(CreateLoadout("BrotherHurtBody", DefaultElementDefs.physicalElement, DefaultElementDefs.pyroElement)); AddElementToProjectile(RoR2_Base_Brother.BrotherFirePillar_prefab, DefaultElementDefs.pyroElement); CreateLoadout("SolusHeartBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("TeleportComboLaserProjectile", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); AddElementToProjectile(RoR2_DLC3_SolusHeart.TeleportComboLaserProjectile_prefab, DefaultElementDefs.pyroElement); CreateLoadout("UnderclockSpawnerProjectile", DefaultElementDefs.cryoElement, DefaultElementDefs.cryoElement, DefaultElementDefs.cryoElement, DefaultElementDefs.cryoElement, DefaultElementDefs.cryoElement); AddElementToProjectile(RoR2_DLC3_SolusHeart.UnderclockSpawnerProjectile_prefab, DefaultElementDefs.cryoElement); CreateLoadout("SolusHeart_DDOSProjectile", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); AddElementToProjectile(RoR2_DLC3_SolusHeart.SolusHeart_DDOSProjectile_prefab, DefaultElementDefs.hydroElement); CreateLoadout("SolusWingBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("SolusWing_LaserBurstBlastProjectile", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("MiniVoidCrabBodyPhase1", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("MiniVoidCrabBodyPhase2", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("MiniVoidCrabBodyPhase3", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("VoidCrabBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("SolusVendorBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); AddElementToProjectile(RoR2_DLC3_Collective.CollectiveDeathProjectile_prefab, DefaultElementDefs.electroElement); CreateLoadout("AffixEarthHealerBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement); CreateLoadout("SquidTurretBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("CopycatDroneBody", DefaultElementDefs.cryoElement, DefaultElementDefs.cryoElement, DefaultElementDefs.cryoElement, DefaultElementDefs.cryoElement); CreateLoadout("FlameDroneBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("BombardmentDroneBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("ExplosivePotDestructibleBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("FusionCellDestructibleBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); if (Chainloader.PluginInfos.ContainsKey("com.Viliger.EnemiesReturns")) { CreateLoadout("SwiftBody", DefaultElementDefs.geoElement); CreateLoadout("LynxScoutBody", DefaultElementDefs.dendroElement); CreateLoadout("LynxScoutAllyBody", DefaultElementDefs.dendroElement); CreateLoadout("LynxArcherBody", DefaultElementDefs.dendroElement); CreateLoadout("LynxArcherAllyBody", DefaultElementDefs.dendroElement); CreateLoadout("LynxHunterBody", DefaultElementDefs.dendroElement); CreateLoadout("LynxHunterAllyBody", DefaultElementDefs.dendroElement); CreateLoadout("LynxShamanBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement); CreateLoadout("LynxShamanAllyBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement); CreateLoadout("SandCrabBody", DefaultElementDefs.physicalElement, DefaultElementDefs.hydroElement); CreateLoadout("SandCrabBubbleProjectile", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); CreateLoadout("ColossusBody", DefaultElementDefs.geoElement, DefaultElementDefs.geoElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("IfritBody", DefaultElementDefs.physicalElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("IfritPylonEnemyBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("IfritPylonPlayerBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("ArraignHauntBody", DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); CreateLoadout("ArraignP1Body", DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.electroElement); CreateLoadout("ArraignP2Body", DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.electroElement, DefaultElementDefs.electroElement); } if (Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm")) { CreateLoadout("RunshroomBody", DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement, DefaultElementDefs.dendroElement); CreateLoadout("LampBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("LampBossBody", DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement, DefaultElementDefs.pyroElement); CreateLoadout("ClayMongerBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); } if (Chainloader.PluginInfos.ContainsKey("Skeletogne.BootlegBestiary")) { CreateLoadout("SkyDraconBody", DefaultElementDefs.pyroElement); CreateLoadout("DemineurBody", DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement, DefaultElementDefs.hydroElement); } if (Chainloader.PluginInfos.ContainsKey("com.TeamSandswept.Sandswept")) { CreateLoadout("CannonJellyBody", DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.physicalElement, DefaultElementDefs.pyroElement); SandsweptSupport.AddElementToCannonballJellyfishDeath(); } } public static GameObject CreateLoadout(string bodyName, ElementDef primary = null, ElementDef secondary = null, ElementDef utility = null, ElementDef special = null, ElementDef applied = null) { GameObject val = BodyCatalog.FindBodyPrefab(bodyName); if (Object.op_Implicit((Object)(object)val)) { ElementDef[] array = new ElementDef[4] { Object.op_Implicit((Object)(object)primary) ? primary : DefaultElementDefs.physicalElement, Object.op_Implicit((Object)(object)secondary) ? secondary : DefaultElementDefs.physicalElement, Object.op_Implicit((Object)(object)utility) ? utility : DefaultElementDefs.physicalElement, Object.op_Implicit((Object)(object)special) ? special : DefaultElementDefs.physicalElement }; ElementLoadoutComponent elementLoadoutComponent = UnityObjectExtensions.EnsureComponent(val); elementLoadoutComponent.ApplyElementLoadout(array); elementLoadoutComponent.naturallyAppliedElement = applied; List list = new List(); ElementDef[] array2 = array; foreach (ElementDef elementDef in array2) { if (!list.Contains(elementDef)) { uniqueEnemiesWithElement[(int)elementDef.index]++; } list.Add(elementDef); } } return val; } public static void AddElementToProjectile(string projectilePrefab, ElementDef element) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)element)) { return; } AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(projectilePrefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { ProjectileDamage val2 = default(ProjectileDamage); if (x.Result.TryGetComponent(ref val2)) { val2.damageType.SetElement(element.index); } ProjectileHurtOwnerOnDeathWithOrb val3 = default(ProjectileHurtOwnerOnDeathWithOrb); if (x.Result.TryGetComponent(ref val3)) { val3.damageTypeCombo.SetElement(element.index); } }; } public static void AddMoonWheel(GameObject body) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body)) { enemiesWithMoonWheel.Add(BodyCatalog.FindBodyIndex(body)); } } internal static void LogEnemyElementStats() { Log.Message("Elemental Reactions Enemy Element Stats ----"); for (int i = 1; i < uniqueEnemiesWithElement.Length; i++) { Log.Message(Language.GetString(ElementCatalog.elementCatalog[i].nameToken) + ": " + uniqueEnemiesWithElement[i]); } } } public class EngineerTurretElements : MonoBehaviour, IInventorySetupCallback { public void SetupSummonedInventory([NotNull] MasterSummon masterSummon, [NotNull] Inventory summonedInventory) { CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)masterSummon.summonerBodyObject) && masterSummon.summonerBodyObject.TryGetComponent(ref val) && Object.op_Implicit((Object)(object)val.inventory)) { ElementDef element = ElementLoadoutComponent.GetElement(val, (DamageSource)8); MasterElementLoadout.UpdateLoadoutItem(summonedInventory, element, ElementLoadoutComponent.primaryElementItem); MasterElementLoadout.UpdateLoadoutItem(summonedInventory, element, ElementLoadoutComponent.secondaryElementItem); MasterElementLoadout.UpdateLoadoutItem(summonedInventory, element, ElementLoadoutComponent.utilityElementItem); MasterElementLoadout.UpdateLoadoutItem(summonedInventory, element, ElementLoadoutComponent.specialElementItem); if (val.isPlayerControlled) { summonedInventory.GiveItemPermanent(ElementLoadoutComponent.damageIsFromPlayerItem, 1); } } } } [RequireComponent(typeof(PlayerCharacterMasterController))] public class MasterElementLoadout : MonoBehaviour { private PlayerCharacterMasterController characterMaster; private bool loadoutSet; public static void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) Addressables.LoadAssetAsync((object)new AssetReferenceT(RoR2_Base_Core.PlayerMaster_prefab)).WaitForCompletion().AddComponent(); } public void Awake() { characterMaster = ((Component)this).GetComponent(); } private void FixedUpdate() { if (!loadoutSet && characterMaster.hasEffectiveAuthority && Object.op_Implicit((Object)(object)characterMaster.networkUser)) { loadoutSet = true; NetworkElementLoadout(); } } private void NetworkElementLoadout() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) bool configExists; ElementDef[] elementLoadoutFromConfig = Config.GetElementLoadoutFromConfig(BodyCatalog.GetBodyName(characterMaster.networkUser.bodyIndexPreference), out configExists); if (NetworkServer.active) { GiveElementLoadoutItems(elementLoadoutFromConfig); } else { NetMessageExtensions.Send((INetMessage)(object)new NetworkElementLoadout(((NetworkBehaviour)characterMaster).netId, elementLoadoutFromConfig[0].index, elementLoadoutFromConfig[1].index, elementLoadoutFromConfig[2].index, elementLoadoutFromConfig[3].index), (NetworkDestination)2); } } public bool GiveElementLoadoutItems(ElementIndex[] elements) { return GiveElementLoadoutItems(new ElementDef[4] { ElementCatalog.GetElementDef(elements[0]), ElementCatalog.GetElementDef(elements[1]), ElementCatalog.GetElementDef(elements[2]), ElementCatalog.GetElementDef(elements[3]) }); } public bool GiveElementLoadoutItems(ElementDef[] elements) { if (Object.op_Implicit((Object)(object)characterMaster.master.inventory)) { UpdateLoadoutItem(characterMaster.master.inventory, elements[0], ElementLoadoutComponent.primaryElementItem); UpdateLoadoutItem(characterMaster.master.inventory, elements[1], ElementLoadoutComponent.secondaryElementItem); UpdateLoadoutItem(characterMaster.master.inventory, elements[2], ElementLoadoutComponent.utilityElementItem); UpdateLoadoutItem(characterMaster.master.inventory, elements[3], ElementLoadoutComponent.specialElementItem); return true; } return false; } public static void UpdateLoadoutItem(Inventory inventory, ElementDef elementDef, ItemDef item) { if (inventory.GetItemCountPermanent(item) != (int)elementDef.index) { if (inventory.GetItemCountPermanent(item) > (int)elementDef.index) { inventory.RemoveItemPermanent(item, Math.Abs((int)elementDef.index) - inventory.GetItemCountPermanent(item)); } else { inventory.GiveItemPermanent(item, (int)(elementDef.index - inventory.GetItemCountPermanent(item))); } } } } public class NetworkElementLoadout : INetMessage, ISerializableObject { private NetworkInstanceId netId; private ElementIndex primary; private ElementIndex secondary; private ElementIndex utility; private ElementIndex special; public NetworkElementLoadout() { } public NetworkElementLoadout(NetworkInstanceId netId, ElementIndex primary, ElementIndex secondary, ElementIndex utility, ElementIndex special) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) this.netId = netId; this.primary = primary; this.secondary = secondary; this.utility = utility; this.special = special; } public void OnReceived() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) GameObject val = Util.FindNetworkObject(netId); MasterElementLoadout masterElementLoadout = default(MasterElementLoadout); if (Object.op_Implicit((Object)(object)val) && val.TryGetComponent(ref masterElementLoadout)) { masterElementLoadout.GiveElementLoadoutItems(new ElementIndex[4] { primary, secondary, utility, special }); } } public void Serialize(NetworkWriter writer) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) writer.Write(netId); NetworkExtensions.WritePackedIndex32(writer, (int)primary); NetworkExtensions.WritePackedIndex32(writer, (int)secondary); NetworkExtensions.WritePackedIndex32(writer, (int)utility); NetworkExtensions.WritePackedIndex32(writer, (int)special); } public void Deserialize(NetworkReader reader) { //IL_0003: 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) netId = reader.ReadNetworkId(); primary = (ElementIndex)NetworkExtensions.ReadPackedIndex32(reader); secondary = (ElementIndex)NetworkExtensions.ReadPackedIndex32(reader); utility = (ElementIndex)NetworkExtensions.ReadPackedIndex32(reader); special = (ElementIndex)NetworkExtensions.ReadPackedIndex32(reader); } } } namespace ElementalReactionsMod.Items { public static class Crafting { public static CraftableDef delusionPyro; public static CraftableDef delusionHydro; public static CraftableDef delusionElectro; public static CraftableDef delusionCryo; public static CraftableDef delusionAnemo; public static CraftableDef delusionGeo; public static CraftableDef delusionDendro; public static void Initialize() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected I4, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0078: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: 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_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: 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_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: 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: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Expected O, but got Unknown //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Expected O, but got Unknown //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Expected O, but got Unknown //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Expected O, but got Unknown //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Expected O, but got Unknown //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Expected O, but got Unknown //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Expected O, but got Unknown CraftableDef val = ScriptableObject.CreateInstance(); ((Object)val).name = "cdElementalReactionsMoonWheel"; val.pickup = (Object)(object)Items.moonWheel; Recipe[] array = new Recipe[1]; Recipe val2 = new Recipe(); Recipe obj = val2; RecipeIngredient[] array2 = new RecipeIngredient[2]; RecipeIngredient val3 = new RecipeIngredient(); val3.requiredTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)(int)DelusionManager.delusionItemTag }; val3.itemTier = (ItemTier)3; val3.type = (IngredientTypeIndex)1; val3.forbiddenTags = Array.Empty(); array2[0] = val3; array2[1] = new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_ShinyPearl.ShinyPearl_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }; obj.ingredients = (RecipeIngredient[])(object)array2; array[0] = val2; val.recipes = (Recipe[])(object)array; Content.AddCraftableDef(val); CraftableDef val4 = ScriptableObject.CreateInstance(); ((Object)val4).name = "cdElementalReactionsInstructorsTeaCup"; val4.pickup = (Object)(object)Items.instructorsTeaCup; Recipe[] array3 = new Recipe[1]; val2 = new Recipe(); val2.amountToDrop = 4; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (Object)(object)Items.moonWheel, type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_Scrap.ScrapWhite_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 } }; array3[0] = val2; val4.recipes = (Recipe[])(object)array3; Content.AddCraftableDef(val4); delusionPyro = CreateDelusionConversion(DefaultElementDefs.pyroElement.delusion, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_ElementalRings.FireRing_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_ExplodeOnDeath.ExplodeOnDeath_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_DLC1_StrengthenBurn.StrengthenBurn_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }); delusionHydro = CreateDelusionConversion(DefaultElementDefs.hydroElement.delusion, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_Squid.Squid_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_DLC2_Items_KnockBackHitEnemies.KnockBackHitEnemies_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }); delusionElectro = CreateDelusionConversion(DefaultElementDefs.electroElement.delusion, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_ChainLightning.ChainLightning_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_DLC2_Items_IncreasePrimaryDamage.IncreasePrimaryDamage_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_DLC3_Items_JumpDamageStrike.JumpDamageStrike_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }); delusionCryo = CreateDelusionConversion(DefaultElementDefs.cryoElement.delusion, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_ElementalRings.IceRing_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }); delusionAnemo = CreateDelusionConversion(DefaultElementDefs.anemoElement.delusion, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_Feather.Feather_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }); delusionGeo = CreateDelusionConversion(DefaultElementDefs.geoElement.delusion, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_BonusGoldPackOnKill.BonusGoldPackOnKill_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_DLC2_Items_ExtraShrineItem.ExtraShrineItem_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }); delusionDendro = CreateDelusionConversion(DefaultElementDefs.dendroElement.delusion, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_TPHealingNova.TPHealingNova_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_Base_Seed.Seed_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }, new RecipeIngredient { pickup = (Object)(object)Addressables.LoadAssetAsync((object)RoR2_DLC2_Items_TriggerEnemyDebuffs.TriggerEnemyDebuffs_asset).WaitForCompletion(), type = (IngredientTypeIndex)0 }); } public static CraftableDef CreateDelusionConversion(ItemDef delusion, params RecipeIngredient[] recipeIngredient) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected I4, but got Unknown //IL_0074: 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) CraftableDef val = ScriptableObject.CreateInstance(); ((Object)val).name = "cdElementalReactionsDelusion" + DelusionManager.delusionToElement[delusion].cachedName; val.pickup = (Object)(object)delusion; val.recipes = (Recipe[])(object)new Recipe[recipeIngredient.Length]; for (int i = 0; i < recipeIngredient.Length; i++) { Recipe[] recipes = val.recipes; int num = i; Recipe val2 = new Recipe(); RecipeIngredient[] array = new RecipeIngredient[2]; RecipeIngredient val3 = new RecipeIngredient(); val3.requiredTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)(int)DelusionManager.delusionItemTag }; val3.itemTier = (ItemTier)3; val3.type = (IngredientTypeIndex)1; val3.forbiddenTags = Array.Empty(); array[0] = val3; array[1] = recipeIngredient[i]; val2.ingredients = (RecipeIngredient[])(object)array; recipes[num] = val2; } Content.AddCraftableDef(val); return val; } public static void AppendDelusionRecipe(CraftableDef delusion, ItemDef item) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)item)) { Crafting.AppendDelusionRecipe(delusion, new RecipeIngredient { pickup = (Object)(object)item, type = (IngredientTypeIndex)0 }); } } public static void AppendDelusionRecipe(CraftableDef delusion, RecipeIngredient recipeIngredient) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected I4, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) Recipe[] recipes = delusion.recipes; Recipe val = new Recipe(); RecipeIngredient[] array = new RecipeIngredient[2]; RecipeIngredient val2 = new RecipeIngredient(); val2.requiredTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)(int)DelusionManager.delusionItemTag }; val2.itemTier = (ItemTier)3; val2.type = (IngredientTypeIndex)1; val2.forbiddenTags = Array.Empty(); array[0] = val2; array[1] = recipeIngredient; val.ingredients = (RecipeIngredient[])(object)array; delusion.recipes = recipes.Append(val).ToArray(); } } public static class DelusionManager { public static ItemTag delusionItemTag; public static Dictionary delusionToElement = new Dictionary(); private static Material delusionMat; public static void Initialize() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) delusionItemTag = ItemAPI.AddItemTag("ElementalReactionsDelusion"); delusionMat = Assets.CreateVisionMaterial(Assets.AssetReferences.delusionLogo, new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampDefault_png), 0.75f); AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.delusionPickupModel, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { ((Renderer)((Component)x.Result.transform.GetChild(1)).GetComponent()).sharedMaterial = delusionMat; Items.AddModelPanelParameters(x.Result); }; Items.delusion = Items.AddNewItem("Delusion", "DELUSION", true, Addressables.LoadAssetAsync((object)RoR2_Base_Common.LunarTierDef_asset).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionItemIcon).WaitForCompletion(), Assets.AssetReferences.delusionPickupModel, InitializeItemDisplays(), (ItemTag)1, (ItemTag)30); ItemAPI.ApplyTagToItem(delusionItemTag, Items.delusion); } public static ItemDef CreateNewDelusion(ElementDef element, Sprite itemIcon) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0073: Unknown result type (might be due to invalid IL or missing references) string itemName = "Delusion" + element.cachedName; string token = "DELUSION_" + element.cachedName.ToUpper(); ItemTierDef itemTierDef = Addressables.LoadAssetAsync((object)RoR2_Base_Common.LunarTierDef_asset).WaitForCompletion(); Sprite icon = (Object.op_Implicit((Object)(object)itemIcon) ? itemIcon : Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionItemIcon).WaitForCompletion()); AssetReferenceT delusionPickupModel = Assets.AssetReferences.delusionPickupModel; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ItemDef val = Items.AddNewItem(itemName, token, canRemove: true, itemTierDef, icon, delusionPickupModel, null, (ItemTag[])(object)array); ItemAPI.ApplyTagToItem(delusionItemTag, val); delusionToElement.Add(val, element); return val; } public static List GetDelusions(this Inventory inventory, out int count) { List list = new List(); count = 0; foreach (ElementDef value in delusionToElement.Values) { if (inventory.GetItemCountEffective(value.delusion) > 0) { list.Add(value); count += inventory.GetItemCountEffective(value.delusion); } } return list; } public static int GetDelusionCount(this Inventory inventory) { int num = 0; foreach (ItemDef key in delusionToElement.Keys) { num += inventory.GetItemCountEffective(key); } return num; } public static ItemDisplayRuleDict InitializeItemDisplays() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_01e4: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02df: 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_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Expected O, but got Unknown //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Expected O, but got Unknown //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Expected O, but got Unknown //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Expected O, but got Unknown //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0614: Unknown result type (might be due to invalid IL or missing references) //IL_0625: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Expected O, but got Unknown //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0687: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Unknown result type (might be due to invalid IL or missing references) //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Expected O, but got Unknown //IL_06e9: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_0729: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Expected O, but got Unknown //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07a6: Unknown result type (might be due to invalid IL or missing references) //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07c7: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_07eb: Unknown result type (might be due to invalid IL or missing references) //IL_07fc: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Expected O, but got Unknown //IL_0823: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0899: Unknown result type (might be due to invalid IL or missing references) //IL_08a3: Expected O, but got Unknown //IL_08c0: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08db: Unknown result type (might be due to invalid IL or missing references) //IL_08e0: Unknown result type (might be due to invalid IL or missing references) //IL_08f6: Unknown result type (might be due to invalid IL or missing references) //IL_08fb: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0901: Unknown result type (might be due to invalid IL or missing references) //IL_091c: Unknown result type (might be due to invalid IL or missing references) //IL_0925: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Expected O, but got Unknown //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Unknown result type (might be due to invalid IL or missing references) //IL_0978: Unknown result type (might be due to invalid IL or missing references) //IL_097d: Unknown result type (might be due to invalid IL or missing references) //IL_0993: Unknown result type (might be due to invalid IL or missing references) //IL_0998: Unknown result type (might be due to invalid IL or missing references) //IL_099d: Unknown result type (might be due to invalid IL or missing references) //IL_099e: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09d3: Unknown result type (might be due to invalid IL or missing references) //IL_09dd: Expected O, but got Unknown //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_09ff: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a1a: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Unknown result type (might be due to invalid IL or missing references) //IL_0a3b: Unknown result type (might be due to invalid IL or missing references) //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a5f: Unknown result type (might be due to invalid IL or missing references) //IL_0a70: Unknown result type (might be due to invalid IL or missing references) //IL_0a7a: Expected O, but got Unknown //IL_0a97: Unknown result type (might be due to invalid IL or missing references) //IL_0a9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: Unknown result type (might be due to invalid IL or missing references) //IL_0ab7: Unknown result type (might be due to invalid IL or missing references) //IL_0acd: Unknown result type (might be due to invalid IL or missing references) //IL_0ad2: Unknown result type (might be due to invalid IL or missing references) //IL_0ad7: Unknown result type (might be due to invalid IL or missing references) //IL_0ad8: Unknown result type (might be due to invalid IL or missing references) //IL_0af3: Unknown result type (might be due to invalid IL or missing references) //IL_0afc: Unknown result type (might be due to invalid IL or missing references) //IL_0b0d: Unknown result type (might be due to invalid IL or missing references) //IL_0b17: Expected O, but got Unknown //IL_0b34: Unknown result type (might be due to invalid IL or missing references) //IL_0b39: Unknown result type (might be due to invalid IL or missing references) //IL_0b4f: Unknown result type (might be due to invalid IL or missing references) //IL_0b54: Unknown result type (might be due to invalid IL or missing references) //IL_0b6a: Unknown result type (might be due to invalid IL or missing references) //IL_0b6f: Unknown result type (might be due to invalid IL or missing references) //IL_0b74: Unknown result type (might be due to invalid IL or missing references) //IL_0b75: Unknown result type (might be due to invalid IL or missing references) //IL_0b90: Unknown result type (might be due to invalid IL or missing references) //IL_0b99: Unknown result type (might be due to invalid IL or missing references) //IL_0baa: Unknown result type (might be due to invalid IL or missing references) //IL_0bb4: Expected O, but got Unknown //IL_0bd1: Unknown result type (might be due to invalid IL or missing references) //IL_0bd6: Unknown result type (might be due to invalid IL or missing references) //IL_0bec: Unknown result type (might be due to invalid IL or missing references) //IL_0bf1: Unknown result type (might be due to invalid IL or missing references) //IL_0c07: Unknown result type (might be due to invalid IL or missing references) //IL_0c0c: Unknown result type (might be due to invalid IL or missing references) //IL_0c11: Unknown result type (might be due to invalid IL or missing references) //IL_0c12: Unknown result type (might be due to invalid IL or missing references) //IL_0c2d: Unknown result type (might be due to invalid IL or missing references) //IL_0c36: Unknown result type (might be due to invalid IL or missing references) //IL_0c47: Unknown result type (might be due to invalid IL or missing references) //IL_0c51: Expected O, but got Unknown //IL_0c6e: Unknown result type (might be due to invalid IL or missing references) //IL_0c73: Unknown result type (might be due to invalid IL or missing references) //IL_0c89: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0ca4: Unknown result type (might be due to invalid IL or missing references) //IL_0ca9: Unknown result type (might be due to invalid IL or missing references) //IL_0cae: Unknown result type (might be due to invalid IL or missing references) //IL_0caf: Unknown result type (might be due to invalid IL or missing references) //IL_0cca: Unknown result type (might be due to invalid IL or missing references) //IL_0cd3: Unknown result type (might be due to invalid IL or missing references) //IL_0cdf: Unknown result type (might be due to invalid IL or missing references) //IL_0ce9: Expected O, but got Unknown //IL_0d06: Unknown result type (might be due to invalid IL or missing references) //IL_0d0b: Unknown result type (might be due to invalid IL or missing references) //IL_0d21: Unknown result type (might be due to invalid IL or missing references) //IL_0d26: Unknown result type (might be due to invalid IL or missing references) //IL_0d3c: Unknown result type (might be due to invalid IL or missing references) //IL_0d41: Unknown result type (might be due to invalid IL or missing references) //IL_0d46: Unknown result type (might be due to invalid IL or missing references) //IL_0d47: Unknown result type (might be due to invalid IL or missing references) //IL_0d62: Unknown result type (might be due to invalid IL or missing references) //IL_0d6b: Unknown result type (might be due to invalid IL or missing references) //IL_0d7c: Unknown result type (might be due to invalid IL or missing references) //IL_0d86: Expected O, but got Unknown //IL_0da3: Unknown result type (might be due to invalid IL or missing references) //IL_0da8: Unknown result type (might be due to invalid IL or missing references) //IL_0dbe: Unknown result type (might be due to invalid IL or missing references) //IL_0dc3: Unknown result type (might be due to invalid IL or missing references) //IL_0dd9: Unknown result type (might be due to invalid IL or missing references) //IL_0dde: Unknown result type (might be due to invalid IL or missing references) //IL_0de3: Unknown result type (might be due to invalid IL or missing references) //IL_0de4: Unknown result type (might be due to invalid IL or missing references) //IL_0dff: Unknown result type (might be due to invalid IL or missing references) //IL_0e08: Unknown result type (might be due to invalid IL or missing references) //IL_0e19: Unknown result type (might be due to invalid IL or missing references) //IL_0e23: Expected O, but got Unknown //IL_0e40: Unknown result type (might be due to invalid IL or missing references) //IL_0e45: Unknown result type (might be due to invalid IL or missing references) //IL_0e5b: Unknown result type (might be due to invalid IL or missing references) //IL_0e60: Unknown result type (might be due to invalid IL or missing references) //IL_0e76: Unknown result type (might be due to invalid IL or missing references) //IL_0e7b: Unknown result type (might be due to invalid IL or missing references) //IL_0e80: Unknown result type (might be due to invalid IL or missing references) //IL_0e81: Unknown result type (might be due to invalid IL or missing references) //IL_0e9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ea5: Unknown result type (might be due to invalid IL or missing references) //IL_0eb6: Unknown result type (might be due to invalid IL or missing references) //IL_0ec0: Expected O, but got Unknown //IL_0edd: Unknown result type (might be due to invalid IL or missing references) //IL_0ee2: Unknown result type (might be due to invalid IL or missing references) //IL_0ef8: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Unknown result type (might be due to invalid IL or missing references) //IL_0f13: Unknown result type (might be due to invalid IL or missing references) //IL_0f18: Unknown result type (might be due to invalid IL or missing references) //IL_0f1d: Unknown result type (might be due to invalid IL or missing references) //IL_0f1e: Unknown result type (might be due to invalid IL or missing references) //IL_0f39: Unknown result type (might be due to invalid IL or missing references) //IL_0f42: Unknown result type (might be due to invalid IL or missing references) //IL_0f53: Unknown result type (might be due to invalid IL or missing references) //IL_0f5d: Expected O, but got Unknown //IL_0f7a: Unknown result type (might be due to invalid IL or missing references) //IL_0f7f: Unknown result type (might be due to invalid IL or missing references) //IL_0f95: Unknown result type (might be due to invalid IL or missing references) //IL_0f9a: Unknown result type (might be due to invalid IL or missing references) //IL_0fb0: Unknown result type (might be due to invalid IL or missing references) //IL_0fb5: Unknown result type (might be due to invalid IL or missing references) //IL_0fba: Unknown result type (might be due to invalid IL or missing references) //IL_0fbb: Unknown result type (might be due to invalid IL or missing references) GameObject val = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.delusionDisplayModel, (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); ((Renderer)((Component)val.transform.GetChild(1)).GetComponent()).sharedMaterial = delusionMat; val.AddComponent(); Items.CreateItemDisplay(val, Items.CreateItemRendererInfo(val, 0, Assets.visionMaterial), Items.CreateItemRendererInfo(val, 1, delusionMat)); ItemDisplayRuleDict val2 = new ItemDisplayRuleDict(Array.Empty()); val2.Add("CommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "LowerArmR", localPos = new Vector3(-0.03206f, 0.23382f, -0.05406f), localAngles = new Vector3(5.56553f, 0.75563f, 359.0454f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("HuntressBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.16971f, 0.01192f, -0.08042f), localAngles = new Vector3(332.1566f, 50.95617f, 189.2482f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("Bandit2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "MainWeapon", localPos = new Vector3(-0.08156f, 0.8256f, -0.05666f), localAngles = new Vector3(0f, 0f, 180f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val2.Add("ToolbotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Head", localPos = new Vector3(0f, -0.35118f, 1.1199f), localAngles = new Vector3(55.43135f, 5E-05f, 7E-05f), localScale = new Vector3(7f, 7f, 7f) } }); val2.Add("EngiBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(-0.44991f, 0.46288f, -0.31321f), localAngles = new Vector3(0f, 90f, 0f), localScale = new Vector3(0.9f, 0.9f, 0.9f) } }); val2.Add("EngiTurretBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Head", localPos = new Vector3(0.61612f, 0.54662f, -1.31641f), localAngles = new Vector3(0f, 320.9564f, 0f), localScale = new Vector3(2.5f, 2.5f, 2.5f) } }); val2.Add("EngiWalkerTurretBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Neck", localPos = new Vector3(0.7483f, 0.65663f, 0f), localAngles = new Vector3(0f, 90f, 0f), localScale = new Vector3(2.5f, 2.5f, 2.5f) } }); val2.Add("MageBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(-0.21887f, 0.2151f, -0.1934f), localAngles = new Vector3(5f, 90f, 9f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("MercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "LowerArmL", localPos = new Vector3(-0.00477f, 0.15047f, -0.06726f), localAngles = new Vector3(3.47613f, 19.27756f, 185.9751f), localScale = new Vector3(0.7f, 0.7f, 0.7f) } }); val2.Add("TreebotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "PlatformBase", localPos = new Vector3(-0.63358f, 0.68115f, -0.77494f), localAngles = new Vector3(46.13254f, 43.97253f, 4.15217f), localScale = new Vector3(1.3f, 1.3f, 1.3f) } }); val2.Add("LoaderBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.2f, 0.28f, 0.28f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.9f, 0.9f, 0.9f) } }); val2.Add("CrocoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "LowerArmL", localPos = new Vector3(0.89492f, 3.7274f, -0.77738f), localAngles = new Vector3(1.39027f, 313.4044f, 86.03119f), localScale = new Vector3(5.5f, 5.5f, 5.5f) } }); val2.Add("CaptainBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Stomach", localPos = new Vector3(0.1565f, 0.04206f, 0.17186f), localAngles = new Vector3(352.0692f, 27.6311f, 2.48244f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("RailgunnerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Backpack", localPos = new Vector3(0.24035f, -0.38056f, -0.08505f), localAngles = new Vector3(0f, 120f, 0f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val2.Add("VoidSurvivorBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "CannonEnd", localPos = new Vector3(-0.01739f, -0.20445f, -0.09182f), localAngles = new Vector3(355.2102f, 51.1422f, 184.9114f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("SeekerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "ThighR", localPos = new Vector3(0.10212f, 0.07662f, 0.07998f), localAngles = new Vector3(11.78787f, 41.68037f, 183.0371f), localScale = new Vector3(0.9f, 0.9f, 0.9f) } }); val2.Add("FalseSonBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.10128f, 0.47448f, -0.34967f), localAngles = new Vector3(348.2777f, 356.4035f, 11.26319f), localScale = new Vector3(1.2f, 1.2f, 1.2f) } }); val2.Add("ChefBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "OvenDoor", localPos = new Vector3(-0.44195f, -0.15999f, 0.03149f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("DroneTechBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "LowerArmR", localPos = new Vector3(0.69052f, -0.03821f, 0.04073f), localAngles = new Vector3(273.9966f, 13.89896f, 95.11175f), localScale = new Vector3(0.9f, 0.9f, 0.9f) } }); val2.Add("DrifterBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(-0.13434f, 0.07791f, -0.25401f), localAngles = new Vector3(34.96383f, 47.45707f, 157.2111f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("BrotherBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject("de62e89840152434cb622e434bf9bb62"), childName = "chest", localPos = new Vector3(-0.22503f, 0.31914f, 0.08435f), localAngles = new Vector3(7.70729f, 20.07879f, 317.6756f), localScale = new Vector3(0.11f, 0.11f, 0.11f) } }); val2.Add("NemCommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.51642f, 0.21685f, -0.47749f), localAngles = new Vector3(352.9823f, 18.85301f, 194.7385f), localScale = new Vector3(2.5f, 2.5f, 2.5f) } }); val2.Add("NemMercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "UpperLegR", localPos = new Vector3(-0.17763f, 0.32555f, -0.0382f), localAngles = new Vector3(1.14985f, 91.64176f, 169.1972f), localScale = new Vector3(0.6f, 0.6f, 0.6f) } }); val2.Add("Executioner2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "ElbowR", localPos = new Vector3(0.01307f, 0.1587f, -0.0572f), localAngles = new Vector3(4.00469f, 342.2709f, 354.1962f), localScale = new Vector3(0.6f, 0.6f, 0.6f) } }); val2.Add("ChirrBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.delusionDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(-0.49649f, 0.61212f, 0.24153f), localAngles = new Vector3(16.17279f, 77.65852f, 358.2969f), localScale = new Vector3(1.2f, 1.2f, 1.2f) } }); return val2; } } public class NoElementDelusion : BaseItemBodyBehavior { private FixedTimeStamp transformTimeStamp; [ItemDefAssociation(useOnServer = true, useOnClient = false)] private static ItemDef GetItemDef() { return Items.delusion; } private void OnEnable() { //IL_0002: 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_0011: Unknown result type (might be due to invalid IL or missing references) transformTimeStamp = FixedTimeStamp.now + 1f; } private void FixedUpdate() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0238: 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_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_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016f: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !(FixedTimeStamp.now > transformTimeStamp) || !Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.inventory)) { return; } if ((CommandArtifactManager.IsCommandArtifactEnabled || Config.AlwaysChooseDelusion().Value) && ((BaseItemBodyBehavior)this).body.isPlayerControlled) { ((BaseItemBodyBehavior)this).body.inventory.RemoveItemPermanent(Items.delusion, 1); Option[] array = (Option[])(object)new Option[DelusionManager.delusionToElement.Count]; ItemDef[] array2 = DelusionManager.delusionToElement.Keys.ToArray(); for (int i = 0; i < DelusionManager.delusionToElement.Count; i++) { array[i] = new Option { pickup = new UniquePickup { pickupIndex = PickupCatalog.FindPickupIndex(array2[i].itemIndex) }, available = true, overrideSelectedBGColor = DelusionManager.delusionToElement[array2[i]].color }; } CreatePickupInfo val = new CreatePickupInfo { pickerOptions = array, prefabOverride = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_OptionPickup.OptionPickup_prefab), (AsyncReferenceHandleUnloadType)2).WaitForCompletion(), position = ((Component)this).transform.position + Vector3.up * 1f }; ((CreatePickupInfo)(ref val)).pickup = new UniquePickup { pickupIndex = array[0].pickup.pickupIndex }; val.artifactFlag = (PickupArtifactFlag)2; CreatePickupInfo val2 = val; PickupDropletController.CreatePickupDroplet(val2, val2.position, Vector3.up * 20f); transformTimeStamp += 1f; return; } ItemTransformation val3 = default(ItemTransformation); ((ItemTransformation)(ref val3)).originalItemIndex = GetItemDef().itemIndex; ((ItemTransformation)(ref val3)).newItemIndex = DecideDelusionElement().itemIndex; ((ItemTransformation)(ref val3)).maxToTransform = 1; val3.transformationType = (ItemTransformationTypeIndex)0; TryTransformResult val4 = default(TryTransformResult); if (((ItemTransformation)(ref val3)).TryTransform(((BaseItemBodyBehavior)this).body.inventory, ref val4)) { PickupIndex val5 = PickupCatalog.FindPickupIndex(val4.givenItem.itemIndex); if (val5 != PickupIndex.none && Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.master) && Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.master.playerCharacterMasterController) && (Object)(object)((BaseItemBodyBehavior)this).body.master.playerCharacterMasterController.networkUser != (Object)null && ((BaseItemBodyBehavior)this).body.master.playerCharacterMasterController.networkUser.localUser != null) { ((BaseItemBodyBehavior)this).body.master.playerCharacterMasterController.networkUser.localUser.userProfile.DiscoverPickup(val5); } if (DelusionManager.delusionToElement.TryGetValue(ItemCatalog.GetItemDef(val4.givenItem.itemIndex), out var value)) { GenericElementEffectComponent.SpawnActivatedEffect(((Component)this).gameObject.transform, ParentEffectToItemDisplay.ItemDisplayParent.Delusion, value.index, 1.5f, transmit: true); } } else { transformTimeStamp += 1f; } } private ItemDef DecideDelusionElement() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown Xoroshiro128Plus val = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong); List list = DelusionManager.delusionToElement.Keys.ToList(); List list2 = new List(); ElementDef element = ElementLoadoutComponent.GetElement(((BaseItemBodyBehavior)this).body, (DamageSource)1); if (element.hasDelusion) { CollectionUtils.AddDistinct((IList)list2, element.delusion); } element = ElementLoadoutComponent.GetElement(((BaseItemBodyBehavior)this).body, (DamageSource)2); if (element.hasDelusion) { CollectionUtils.AddDistinct((IList)list2, element.delusion); } element = ElementLoadoutComponent.GetElement(((BaseItemBodyBehavior)this).body, (DamageSource)4); if (element.hasDelusion) { CollectionUtils.AddDistinct((IList)list2, element.delusion); } element = ElementLoadoutComponent.GetElement(((BaseItemBodyBehavior)this).body, (DamageSource)8); if (element.hasDelusion) { CollectionUtils.AddDistinct((IList)list2, element.delusion); } List list3 = new List(); for (int i = 0; i < list.Count; i++) { if (((BaseItemBodyBehavior)this).body.inventory.GetItemCountPermanent(list[i]) > 0) { list3.Add(list[i]); } } if (list2.Count + list3.Count >= list.Count) { if (list3.Count >= list.Count) { return list[val.RangeInt(0, list.Count)]; } list = list.Except(list3).ToList(); return list[val.RangeInt(0, list.Count)]; } list = list.Except(list3).Except(list2).ToList(); return list[val.RangeInt(0, list.Count)]; } } public class DelusionBehaviour : ItemBehavior, IOnDamageDealtServerReceiver { protected float attackCooldown; public List delusionElements; public GameObject delusionDisplay; private void Start() { if (Object.op_Implicit((Object)(object)base.body)) { base.body.onSkillActivatedServer += OnSkillActivated; } } private void OnSkillActivated(GenericSkill skill) { if (Object.op_Implicit((Object)(object)base.body.skillLocator) && Object.op_Implicit((Object)(object)base.body.skillLocator.special) && (Object)(object)base.body.skillLocator.special == (Object)(object)skill) { base.body.ClearTimedBuffs(Buffs.delusionActiveBuff); base.body.AddTimedBuffTimer(Buffs.delusionActiveBuff, 10); attackCooldown = 0f; } } public void OnDamageDealtServer(DamageReport damageReport) { if (base.body.HasBuff(Buffs.delusionActiveBuff) && ((DamageTypeCombo)(ref damageReport.damageInfo.damageType)).IsDamageSourceSkillBased && attackCooldown == 0f && Object.op_Implicit((Object)(object)damageReport.victimBody)) { ((MonoBehaviour)this).StartCoroutine(FireDelusionsOrbs(damageReport.victimBody.mainHurtBox)); } } private IEnumerator FireDelusionsOrbs(HurtBox target) { Util.ShuffleList(delusionElements); foreach (ElementDef element in delusionElements) { if (!Object.op_Implicit((Object)(object)target) || !Object.op_Implicit((Object)(object)target.healthComponent) || !target.healthComponent.alive || !Object.op_Implicit((Object)(object)base.body) || !Object.op_Implicit((Object)(object)base.body.healthComponent) || !Object.op_Implicit((Object)(object)base.body.inventory)) { break; } if (element.hasDelusion && base.body.inventory.GetItemCountEffective(element.delusion) > 0) { base.body.healthComponent.TakeDamage(new DamageInfo { attacker = null, inflictor = null, damage = 0.05f * (float)base.body.inventory.GetItemCountEffective(element.delusion) * base.body.healthComponent.combinedHealth, damageType = DamageTypeCombo.op_Implicit((DamageType)3), position = base.body.corePosition, crit = false, procCoefficient = 0f, inflictedHurtbox = base.body.mainHurtBox, damageColorIndex = (DamageColorIndex)3 }); DelusionOrb.FireDelusionOrb(base.body, Object.op_Implicit((Object)(object)delusionDisplay) ? delusionDisplay.transform.position : base.body.corePosition, target, base.body.inventory.GetItemCountEffective(element.delusion), base.body.RollCrit(), element.index); GenericElementEffectComponent.SpawnActivatedEffect(((Component)this).gameObject.transform, ParentEffectToItemDisplay.ItemDisplayParent.Delusion, element.index, 0.7f, transmit: true); attackCooldown = 1.3333334f; yield return (object)new WaitForSeconds(1.3333334f / (float)DelusionManager.delusionToElement.Keys.Count); } } } private void FixedUpdate() { if (base.body.HasBuff(Buffs.delusionActiveBuff)) { attackCooldown = Mathf.Max(attackCooldown - Time.fixedDeltaTime, 0f); } } private void OnDisable() { if (Object.op_Implicit((Object)(object)base.body)) { base.body.onSkillActivatedServer -= OnSkillActivated; if (base.body.HasBuff(Buffs.delusionActiveBuff)) { base.body.ClearTimedBuffs(Buffs.delusionActiveBuff); } } } } public class DelusionDisplay : MonoBehaviour { public DelusionBehaviour delusion; private void Start() { CharacterModel componentInParent = ((Component)this).GetComponentInParent(); if (Object.op_Implicit((Object)(object)componentInParent) && Object.op_Implicit((Object)(object)componentInParent.body) && ((Component)componentInParent.body).TryGetComponent(ref delusion)) { delusion.delusionDisplay = ((Component)this).gameObject; } } } [RequireComponent(typeof(TemporaryVisualEffect))] public class DelusionTemporaryVisualEffect : MonoBehaviour { public TemporaryVisualEffect tempVisualEffect; private void Awake() { tempVisualEffect = ((Component)this).GetComponent(); } private void OnEnable() { DelusionBehaviour delusionBehaviour = default(DelusionBehaviour); if (Object.op_Implicit((Object)(object)tempVisualEffect.healthComponent) && ((Component)tempVisualEffect.healthComponent).TryGetComponent(ref delusionBehaviour) && Object.op_Implicit((Object)(object)delusionBehaviour.delusionDisplay)) { tempVisualEffect.parentTransform = delusionBehaviour.delusionDisplay.transform; tempVisualEffect.radius = 0.65f; } } } public static class InstructorsTeaCup { public static ItemDef instructorsTeaCup; public static void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.instructorsTeaCupPickupModel, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { Items.AddModelPanelParameters(x.Result); }; Material instructorsTeaCupMat = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.instructorsTeaCupMaterial, (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); instructorsTeaCupMat.SetHopooMaterial().Specular(0.6f, 3f, ignoreAlpha: false); instructorsTeaCupMat.SetNormal(1.5f); instructorsTeaCupMat.EnableKeyword("FRESNEL_EMISSION"); instructorsTeaCupMat.SetFloat("_FresnelBoost", 1f); instructorsTeaCupMat.SetFloat("_FresnelPower", 2f); AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.instructorsTeaCupFresnelMask, (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle y) { instructorsTeaCupMat.SetTexture("_FresnelMask", y.Result); }; val2 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Common_ColorRamps.texRampDroneFire_png), (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle y) { instructorsTeaCupMat.SetTexture("_FresnelRamp", y.Result); }; instructorsTeaCup = Items.AddNewItem("InstructorsTeaCup", "INSTRUCTORS_TEA_CUP", true, Addressables.LoadAssetAsync((object)RoR2_Base_Common.Tier1Def_asset).WaitForCompletion(), ((AssetReference)Assets.AssetReferences.instructorsTeaCupItemIcon).LoadAssetAsync().WaitForCompletion(), Assets.AssetReferences.instructorsTeaCupPickupModel, InitializeItemDisplays(instructorsTeaCupMat), (ItemTag)1, (ItemTag)31); } public static ItemDisplayRuleDict InitializeItemDisplays(Material mat) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Expected O, but got Unknown //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //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_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Expected O, but got Unknown //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Expected O, but got Unknown //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Expected O, but got Unknown //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Expected O, but got Unknown //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Expected O, but got Unknown //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Expected O, but got Unknown //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0714: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Expected O, but got Unknown //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_076c: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07c2: Unknown result type (might be due to invalid IL or missing references) //IL_07cc: Expected O, but got Unknown //IL_07e9: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Unknown result type (might be due to invalid IL or missing references) //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_0829: Unknown result type (might be due to invalid IL or missing references) //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_085f: Unknown result type (might be due to invalid IL or missing references) //IL_0869: Expected O, but got Unknown //IL_0886: Unknown result type (might be due to invalid IL or missing references) //IL_088b: Unknown result type (might be due to invalid IL or missing references) //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_08a6: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_08c1: Unknown result type (might be due to invalid IL or missing references) //IL_08c6: Unknown result type (might be due to invalid IL or missing references) //IL_08c7: Unknown result type (might be due to invalid IL or missing references) //IL_08e2: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_08fc: Unknown result type (might be due to invalid IL or missing references) //IL_0906: Expected O, but got Unknown //IL_0923: Unknown result type (might be due to invalid IL or missing references) //IL_0928: Unknown result type (might be due to invalid IL or missing references) //IL_093e: Unknown result type (might be due to invalid IL or missing references) //IL_0943: Unknown result type (might be due to invalid IL or missing references) //IL_0959: Unknown result type (might be due to invalid IL or missing references) //IL_095e: Unknown result type (might be due to invalid IL or missing references) //IL_0963: Unknown result type (might be due to invalid IL or missing references) //IL_0964: Unknown result type (might be due to invalid IL or missing references) //IL_097f: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09a3: Expected O, but got Unknown //IL_09c0: Unknown result type (might be due to invalid IL or missing references) //IL_09c5: Unknown result type (might be due to invalid IL or missing references) //IL_09db: Unknown result type (might be due to invalid IL or missing references) //IL_09e0: Unknown result type (might be due to invalid IL or missing references) //IL_09f6: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Unknown result type (might be due to invalid IL or missing references) //IL_0a01: Unknown result type (might be due to invalid IL or missing references) //IL_0a1c: Unknown result type (might be due to invalid IL or missing references) //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) //IL_0a40: Expected O, but got Unknown //IL_0a5d: Unknown result type (might be due to invalid IL or missing references) //IL_0a62: Unknown result type (might be due to invalid IL or missing references) //IL_0a78: Unknown result type (might be due to invalid IL or missing references) //IL_0a7d: Unknown result type (might be due to invalid IL or missing references) //IL_0a93: Unknown result type (might be due to invalid IL or missing references) //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Unknown result type (might be due to invalid IL or missing references) //IL_0a9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ab9: Unknown result type (might be due to invalid IL or missing references) //IL_0ac2: Unknown result type (might be due to invalid IL or missing references) //IL_0ad3: Unknown result type (might be due to invalid IL or missing references) //IL_0add: Expected O, but got Unknown //IL_0afa: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Unknown result type (might be due to invalid IL or missing references) //IL_0b15: Unknown result type (might be due to invalid IL or missing references) //IL_0b1a: Unknown result type (might be due to invalid IL or missing references) //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0b3a: Unknown result type (might be due to invalid IL or missing references) //IL_0b3b: Unknown result type (might be due to invalid IL or missing references) //IL_0b56: Unknown result type (might be due to invalid IL or missing references) //IL_0b5f: Unknown result type (might be due to invalid IL or missing references) //IL_0b70: Unknown result type (might be due to invalid IL or missing references) //IL_0b7a: Expected O, but got Unknown //IL_0b97: Unknown result type (might be due to invalid IL or missing references) //IL_0b9c: Unknown result type (might be due to invalid IL or missing references) //IL_0bb2: Unknown result type (might be due to invalid IL or missing references) //IL_0bb7: Unknown result type (might be due to invalid IL or missing references) //IL_0bcd: Unknown result type (might be due to invalid IL or missing references) //IL_0bd2: Unknown result type (might be due to invalid IL or missing references) //IL_0bd7: Unknown result type (might be due to invalid IL or missing references) //IL_0bd8: Unknown result type (might be due to invalid IL or missing references) //IL_0bf3: Unknown result type (might be due to invalid IL or missing references) //IL_0bfc: Unknown result type (might be due to invalid IL or missing references) //IL_0c0d: Unknown result type (might be due to invalid IL or missing references) //IL_0c17: Expected O, but got Unknown //IL_0c34: Unknown result type (might be due to invalid IL or missing references) //IL_0c39: Unknown result type (might be due to invalid IL or missing references) //IL_0c4f: Unknown result type (might be due to invalid IL or missing references) //IL_0c54: Unknown result type (might be due to invalid IL or missing references) //IL_0c6a: Unknown result type (might be due to invalid IL or missing references) //IL_0c6f: Unknown result type (might be due to invalid IL or missing references) //IL_0c74: Unknown result type (might be due to invalid IL or missing references) //IL_0c75: Unknown result type (might be due to invalid IL or missing references) //IL_0c90: Unknown result type (might be due to invalid IL or missing references) //IL_0c99: Unknown result type (might be due to invalid IL or missing references) //IL_0ca5: Unknown result type (might be due to invalid IL or missing references) //IL_0caf: Expected O, but got Unknown //IL_0ccc: Unknown result type (might be due to invalid IL or missing references) //IL_0cd1: Unknown result type (might be due to invalid IL or missing references) //IL_0ce7: Unknown result type (might be due to invalid IL or missing references) //IL_0cec: Unknown result type (might be due to invalid IL or missing references) //IL_0d02: Unknown result type (might be due to invalid IL or missing references) //IL_0d07: Unknown result type (might be due to invalid IL or missing references) //IL_0d0c: Unknown result type (might be due to invalid IL or missing references) //IL_0d0d: Unknown result type (might be due to invalid IL or missing references) //IL_0d28: Unknown result type (might be due to invalid IL or missing references) //IL_0d31: Unknown result type (might be due to invalid IL or missing references) //IL_0d42: Unknown result type (might be due to invalid IL or missing references) //IL_0d4c: Expected O, but got Unknown //IL_0d69: Unknown result type (might be due to invalid IL or missing references) //IL_0d6e: Unknown result type (might be due to invalid IL or missing references) //IL_0d84: Unknown result type (might be due to invalid IL or missing references) //IL_0d89: Unknown result type (might be due to invalid IL or missing references) //IL_0d9f: Unknown result type (might be due to invalid IL or missing references) //IL_0da4: Unknown result type (might be due to invalid IL or missing references) //IL_0da9: Unknown result type (might be due to invalid IL or missing references) //IL_0daa: Unknown result type (might be due to invalid IL or missing references) //IL_0dc5: Unknown result type (might be due to invalid IL or missing references) //IL_0dce: Unknown result type (might be due to invalid IL or missing references) //IL_0ddf: Unknown result type (might be due to invalid IL or missing references) //IL_0de9: Expected O, but got Unknown //IL_0e06: Unknown result type (might be due to invalid IL or missing references) //IL_0e0b: Unknown result type (might be due to invalid IL or missing references) //IL_0e21: Unknown result type (might be due to invalid IL or missing references) //IL_0e26: Unknown result type (might be due to invalid IL or missing references) //IL_0e3c: Unknown result type (might be due to invalid IL or missing references) //IL_0e41: Unknown result type (might be due to invalid IL or missing references) //IL_0e46: Unknown result type (might be due to invalid IL or missing references) //IL_0e47: Unknown result type (might be due to invalid IL or missing references) //IL_0e62: Unknown result type (might be due to invalid IL or missing references) //IL_0e6b: Unknown result type (might be due to invalid IL or missing references) //IL_0e7c: Unknown result type (might be due to invalid IL or missing references) //IL_0e86: Expected O, but got Unknown //IL_0ea3: Unknown result type (might be due to invalid IL or missing references) //IL_0ea8: Unknown result type (might be due to invalid IL or missing references) //IL_0ebe: Unknown result type (might be due to invalid IL or missing references) //IL_0ec3: Unknown result type (might be due to invalid IL or missing references) //IL_0ed9: Unknown result type (might be due to invalid IL or missing references) //IL_0ede: Unknown result type (might be due to invalid IL or missing references) //IL_0ee3: Unknown result type (might be due to invalid IL or missing references) //IL_0ee4: Unknown result type (might be due to invalid IL or missing references) //IL_0eff: Unknown result type (might be due to invalid IL or missing references) //IL_0f08: Unknown result type (might be due to invalid IL or missing references) //IL_0f19: Unknown result type (might be due to invalid IL or missing references) //IL_0f23: Expected O, but got Unknown //IL_0f40: Unknown result type (might be due to invalid IL or missing references) //IL_0f45: Unknown result type (might be due to invalid IL or missing references) //IL_0f5b: Unknown result type (might be due to invalid IL or missing references) //IL_0f60: Unknown result type (might be due to invalid IL or missing references) //IL_0f76: Unknown result type (might be due to invalid IL or missing references) //IL_0f7b: Unknown result type (might be due to invalid IL or missing references) //IL_0f80: Unknown result type (might be due to invalid IL or missing references) //IL_0f81: Unknown result type (might be due to invalid IL or missing references) //IL_0f9c: Unknown result type (might be due to invalid IL or missing references) //IL_0fa5: Unknown result type (might be due to invalid IL or missing references) //IL_0fb6: Unknown result type (might be due to invalid IL or missing references) //IL_0fc0: Expected O, but got Unknown //IL_0fdd: Unknown result type (might be due to invalid IL or missing references) //IL_0fe2: Unknown result type (might be due to invalid IL or missing references) //IL_0ff8: Unknown result type (might be due to invalid IL or missing references) //IL_0ffd: Unknown result type (might be due to invalid IL or missing references) //IL_1013: Unknown result type (might be due to invalid IL or missing references) //IL_1018: Unknown result type (might be due to invalid IL or missing references) //IL_101d: Unknown result type (might be due to invalid IL or missing references) //IL_101e: Unknown result type (might be due to invalid IL or missing references) GameObject displayPrefab = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.instructorsTeaCupDisplayModel, (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); Items.CreateItemDisplay(displayPrefab, Items.CreateItemRendererInfo(displayPrefab, 0, mat)); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty()); val.Add("CommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(0.19491f, -0.05331f, 0.07828f), localAngles = new Vector3(9.42617f, 149.9708f, 155.2179f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("HuntressBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.13932f, -0.0301f, -0.09815f), localAngles = new Vector3(14.20561f, 335.1174f, 140.3133f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("Bandit2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(0.20266f, 0.02811f, -0.13093f), localAngles = new Vector3(348.1317f, 229.6773f, 146.8423f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("ToolbotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Hip", localPos = new Vector3(0.84022f, 2.73873f, 0.6803f), localAngles = new Vector3(2E-05f, 3E-05f, 89.26896f), localScale = new Vector3(6.3f, 6.3f, 6.3f) } }); val.Add("EngiBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.21797f, 0.15683f, 0.1464f), localAngles = new Vector3(358.3696f, 41.82095f, 119.6954f), localScale = new Vector3(1.3f, 1.3f, 1.3f) } }); val.Add("EngiTurretBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "HeadCenter", localPos = new Vector3(-0.24876f, 0.19378f, -1.5768f), localAngles = new Vector3(14.18015f, 105.1516f, 329.6412f), localScale = new Vector3(3.4f, 3.4f, 3.4f) } }); val.Add("EngiWalkerTurretBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Head", localPos = new Vector3(-0.19885f, 1.41107f, -1.62046f), localAngles = new Vector3(5.86609f, 99.17147f, 350.9476f), localScale = new Vector3(3.4f, 3.4f, 3.4f) } }); val.Add("MageBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.20679f, -0.06411f, 0.03039f), localAngles = new Vector3(19.81575f, 14.03523f, 164.8867f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("MercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.2226f, 0.08986f, 0.04772f), localAngles = new Vector3(349.0326f, 28.7613f, 147.3924f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("TreebotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "PlatformBase", localPos = new Vector3(-0.63247f, 0.4062f, 0.40208f), localAngles = new Vector3(358.5712f, 208.6945f, 297.8586f), localScale = new Vector3(1.8f, 1.8f, 1.8f) } }); val.Add("LoaderBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.26313f, -0.03259f, 0.06062f), localAngles = new Vector3(0.50537f, 357.1437f, 26.99998f), localScale = new Vector3(1.1f, 1.1f, 1.1f) } }); val.Add("CrocoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "SpineChest1", localPos = new Vector3(-1.56606f, 0.59469f, -0.2076f), localAngles = new Vector3(289.1052f, 349.0121f, 248.9141f), localScale = new Vector3(8f, 8f, 8f) } }); val.Add("CaptainBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.18504f, -0.07401f, -0.13251f), localAngles = new Vector3(4.40974f, 331.9464f, 128.888f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("RailgunnerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Backpack", localPos = new Vector3(0.30733f, -0.53248f, 0.03276f), localAngles = new Vector3(358.6321f, 357.5471f, 272.1167f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("VoidSurvivorBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.16324f, 0.13798f, -0.27632f), localAngles = new Vector3(15.04345f, 9.1204f, 291.9918f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("SeekerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.30547f, -0.04314f, -0.01677f), localAngles = new Vector3(296.6968f, 200.5731f, 338.2218f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("FalseSonBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.21694f, -0.22017f, -0.50652f), localAngles = new Vector3(347.4637f, 344.0567f, 273.1992f), localScale = new Vector3(1.6f, 1.6f, 1.6f) } }); val.Add("ChefBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.33505f, -0.2963f, -0.09813f), localAngles = new Vector3(287.0714f, 56.76455f, 310.3874f), localScale = new Vector3(1.55f, 1.55f, 1.55f) } }); val.Add("DroneTechBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Backpack", localPos = new Vector3(-0.20796f, -0.35189f, -0.09145f), localAngles = new Vector3(13.74731f, 86.6589f, 275.9486f), localScale = new Vector3(1.2f, 1.2f, 1.2f) } }); val.Add("DrifterBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "BagBulgeRight", localPos = new Vector3(0.02959f, -0.19342f, 0.30996f), localAngles = new Vector3(331.3999f, 108.6055f, 68.72771f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("BrotherBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject("a8dc7aa7f61d18e4db92a79611b96f90"), childName = "chest", localPos = new Vector3(-0.10737f, -0.07244f, 0.03244f), localAngles = new Vector3(357.3963f, 25.96571f, 331.5166f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val.Add("ScavBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(9.56316f, 0.82885f, 6.07451f), localAngles = new Vector3(27.9713f, 262.4429f, 246.5358f), localScale = new Vector3(12f, 12f, 12f) } }); val.Add("NemCommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(1.17536f, 0.17947f, 0.19889f), localAngles = new Vector3(358.0197f, 174.0244f, 143.3098f), localScale = new Vector3(5f, 5f, 5f) } }); val.Add("NemMercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(0.05588f, 0.03317f, 0.18721f), localAngles = new Vector3(4.37816f, 98.56442f, 142.2975f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("Executioner2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Pelvis", localPos = new Vector3(-0.20708f, 0.06335f, 0.12973f), localAngles = new Vector3(2.40916f, 31.61024f, 144.5665f), localScale = new Vector3(1f, 1f, 1f) } }); val.Add("ChirrBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.instructorsTeaCupDisplayModel).AssetGUID), childName = "Stomach", localPos = new Vector3(0.16217f, -0.10737f, -0.68958f), localAngles = new Vector3(6.17634f, 64.66472f, 325.5513f), localScale = new Vector3(3.4f, 3.4f, 3.4f) } }); return val; } } public class InstructorsTeaCupQuality : ItemBehavior { public int uncommonItemCount; public int rareItemCount; public int epicItemCount; public int legendaryItemCount; private void Start() { ElementalReactionManager.onElementalReactionTriggered += OnElementalReaction; } private void OnElementalReaction(ElementalReactionDef reaction, ElementDef element1, ElementDef element2, CharacterBody victim, DamageInfo damageInfo) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Invalid comparison between Unknown and I4 //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected I4, but got Unknown //IL_00f6: 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) if (Object.op_Implicit((Object)(object)damageInfo.attacker) && (Object)(object)damageInfo.attacker == (Object)(object)((Component)this).gameObject && Object.op_Implicit((Object)(object)base.body)) { QualityTier val = (QualityTier)(-1); if (legendaryItemCount > 0) { val = (QualityTier)3; } else if (epicItemCount > 0) { val = (QualityTier)2; } else if (rareItemCount > 0) { val = (QualityTier)1; } else if (uncommonItemCount > 0) { val = (QualityTier)0; } if ((int)val != -1) { BuffDef buffDef = BuffCatalog.GetBuffDef(QualityCatalog.GetBuffIndexOfQuality(Buffs.instructorsTeaCupQualityBase.buffIndex, val)); CharacterBodyExtensions.ConvertQualityBuffsToTier(base.body, QualityCatalog.FindBuffQualityGroupIndex(Buffs.instructorsTeaCupQualityBase.buffIndex), val); base.body.AddTimedBuff(buffDef, 5f + 3f * (float)val, 10 + 5 * val); base.body.SetTimedBuffDurationIfPresent(buffDef, 5f + 3f * (float)val, true); } } } private void OnDisable() { //IL_0016: 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) if (Object.op_Implicit((Object)(object)base.body)) { BuffQualityGroup buffQualityGroup = QualityCatalog.GetBuffQualityGroup(QualityCatalog.FindBuffQualityGroupIndex(Buffs.instructorsTeaCupQualityBase.buffIndex)); if (Object.op_Implicit((Object)(object)buffQualityGroup)) { CharacterBodyExtensions.RemoveAllQualityBuffs(base.body, buffQualityGroup); } } ElementalReactionManager.onElementalReactionTriggered -= OnElementalReaction; } } public static class Items { public static ItemDef delusion; public static ItemDef instructorsTeaCup => InstructorsTeaCup.instructorsTeaCup; public static ItemDef moonWheel => MoonWheel.moonWheel; public static void Initialize() { InstructorsTeaCup.Initialize(); MoonWheel.Initialize(); CharacterBody.onBodyInventoryChangedGlobal += AddItemBehaviours; ElementLoadoutComponent.Initialize(); } public static void AddItemBehaviours(CharacterBody characterBody) { int count; List delusions = characterBody.inventory.GetDelusions(out count); DelusionBehaviour delusionBehaviour = characterBody.AddItemBehavior(count); if (Object.op_Implicit((Object)(object)delusionBehaviour)) { delusionBehaviour.delusionElements = delusions; } if (ElementalReactionsPlugin.qualityModExists) { int uncommon; int rare; int epic; int legendary; InstructorsTeaCupQuality instructorsTeaCupQuality = characterBody.AddItemBehavior(characterBody.inventory.GetItemCountQualities(instructorsTeaCup, out uncommon, out rare, out epic, out legendary)); if (Object.op_Implicit((Object)(object)instructorsTeaCupQuality)) { instructorsTeaCupQuality.uncommonItemCount = uncommon; instructorsTeaCupQuality.rareItemCount = rare; instructorsTeaCupQuality.epicItemCount = epic; instructorsTeaCupQuality.legendaryItemCount = legendary; } } } internal static GameObject AddModelPanelParameters(GameObject item) { ModelPanelParameters val = item.AddComponent(); val.focusPointTransform = item.transform.Find("FocusPoint"); val.cameraPositionTransform = item.transform.Find("FocusPoint/CameraPosition"); val.minDistance = 4f; val.maxDistance = 6f; return item; } internal static RendererInfo CreateItemRendererInfo(GameObject displayPrefab, int child, Material material) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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) return new RendererInfo { renderer = (Renderer)(object)((Component)displayPrefab.transform.GetChild(child)).GetComponent(), defaultMaterial = material }; } internal static RendererInfo CreateItemRendererInfo(GameObject displayPrefab, int child, AssetReferenceT materialReference) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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) return new RendererInfo { renderer = (Renderer)(object)((Component)displayPrefab.transform.GetChild(child)).GetComponent(), defaultMaterialAddress = materialReference }; } internal static GameObject CreateItemDisplay(GameObject displayPrefab, params RendererInfo[] rendererInfos) { ItemDisplay val = displayPrefab.AddComponent(); val.rendererInfos = rendererInfos; return displayPrefab; } internal static ItemDef AddNewItem(string itemName, string token, bool canRemove, ItemTierDef itemTierDef, Sprite icon, AssetReferenceT pickupModelReference, ItemDisplayRuleDict itemDisplay, params ItemTag[] tags) { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) string text = "DS_GAMING_ELEMENTAL_REACTIONS_ITEM_"; ItemDef val = ScriptableObject.CreateInstance(); ((Object)val).name = "ElementalReactions" + itemName; val._itemTierDef = itemTierDef; if (!Object.op_Implicit((Object)(object)itemTierDef)) { val.deprecatedTier = (ItemTier)5; } val.pickupModelReference = pickupModelReference; val.pickupIconSprite = icon; val.canRemove = canRemove; val.hidden = !canRemove; val.requiredExpansion = Assets.elementalReactionExpansionDef; val.nameToken = text + token + "_NAME"; val.pickupToken = text + token + "_PICKUP"; val.descriptionToken = text + token + "_DESCRIPTION"; val.loreToken = text + token + "_LORE"; val.tags = tags; ItemAPI.Add(new CustomItem(val, itemDisplay)); return val; } } public abstract class RerollableItem : BaseItemBodyBehavior { private FixedTimeStamp tryRerollTimer; private bool triedReroll; private PickupIndex pickupIndex; public abstract ItemDef item { get; } public abstract ReadOnlyList availableRerolls { get; } public abstract ElementDef coreElement { get; } public abstract ElementDef[] reactingElements { get; } private void OnEnable() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_0055: Unknown result type (might be due to invalid IL or missing references) triedReroll = !Config.RerollUnusableItems().Value || !NetworkServer.active || !Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body) || !((BaseItemBodyBehavior)this).body.isPlayerControlled; if (!triedReroll) { tryRerollTimer = FixedTimeStamp.now + 0.5f; } pickupIndex = PickupCatalog.FindPickupIndex(item.itemIndex); } public virtual void FixedUpdate() { if (!triedReroll && ((FixedTimeStamp)(ref tryRerollTimer)).hasPassed) { if (GetShouldReroll()) { Reroll(); } triedReroll = true; } } private bool GetShouldReroll() { bool core = false; bool reactor = false; CheckElement((DamageSource)1, ref core, ref reactor); CheckElement((DamageSource)2, ref core, ref reactor); CheckElement((DamageSource)4, ref core, ref reactor); CheckElement((DamageSource)8, ref core, ref reactor); DelusionBehaviour delusionBehaviour = default(DelusionBehaviour); if ((!core || !reactor) && ((Component)this).TryGetComponent(ref delusionBehaviour)) { if (!core) { core = delusionBehaviour.delusionElements.Contains(coreElement); } if (!reactor) { reactor = delusionBehaviour.delusionElements.Intersect(reactingElements).Count() > 0; } } if (core && reactor) { return false; } return true; } private void Reroll() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (ElementalReactionsPlugin.qualityModExists) { RerollQuality(); } else { RerollItem(item.itemIndex, GetRerollItem()); } } private void RerollItem(ItemIndex original, ItemIndex rerolled) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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) ItemTransformation val = default(ItemTransformation); ((ItemTransformation)(ref val)).originalItemIndex = original; ((ItemTransformation)(ref val)).newItemIndex = rerolled; ((ItemTransformation)(ref val)).maxToTransform = int.MaxValue; val.transformationType = (ItemTransformationTypeIndex)0; TryTransformResult val2 = default(TryTransformResult); ((ItemTransformation)(ref val)).TryTransform(((BaseItemBodyBehavior)this).body.inventory, ref val2); } private ItemIndex GetRerollItem() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) Xoroshiro128Plus val = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong); int num = val.RangeInt(0, availableRerolls.Count - 1); PickupIndex val2 = availableRerolls[num]; if (val2 == pickupIndex) { val2 = availableRerolls[num + 1]; } return PickupCatalog.GetPickupDef(val2).itemIndex; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void RerollQuality() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_00be: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) ItemQualityGroupIndex val = QualityCatalog.FindItemQualityGroupIndex(item.itemIndex); if ((int)val == -1) { RerollItem(item.itemIndex, GetRerollItem()); return; } ItemQualityGroup itemQualityGroup = QualityCatalog.GetItemQualityGroup(val); ItemQualityCounts itemCountsPermanent = InventoryExtensions.GetItemCountsPermanent(((BaseItemBodyBehavior)this).body.inventory, itemQualityGroup); if (itemCountsPermanent.BaseItemCount > 0) { RerollItem(item.itemIndex, GetRerollItem()); } if (((ItemQualityCounts)(ref itemCountsPermanent)).TotalQualityCount > 0) { ItemQualityGroupIndex rerollGroup; ItemQualityGroup val2 = ((!TryFindRandomQualityItemIndex(val, out rerollGroup)) ? QualityCatalog.GetItemQualityGroup(QualityCatalog.FindItemQualityGroupIndex(PickupCatalog.GetPickupDef(PickupCatalog.FindScrapIndexForItemTier(item.tier)).itemIndex)) : QualityCatalog.GetItemQualityGroup(rerollGroup)); if (itemCountsPermanent.UncommonCount > 0) { RerollItem(itemQualityGroup.UncommonItemIndex, val2.UncommonItemIndex); } if (itemCountsPermanent.RareCount > 0) { RerollItem(itemQualityGroup.RareItemIndex, val2.RareItemIndex); } if (itemCountsPermanent.EpicCount > 0) { RerollItem(itemQualityGroup.EpicItemIndex, val2.EpicItemIndex); } if (itemCountsPermanent.LegendaryCount > 0) { RerollItem(itemQualityGroup.LegendaryItemIndex, val2.LegendaryItemIndex); } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private bool TryFindRandomQualityItemIndex(ItemQualityGroupIndex originalItemGroup, out ItemQualityGroupIndex rerollGroup) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_003c: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected I4, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Invalid comparison between I4 and Unknown rerollGroup = (ItemQualityGroupIndex)(-1); Xoroshiro128Plus val = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong); int num = val.RangeInt(0, availableRerolls.Count - 1); for (int i = 0; i < availableRerolls.Count - 1; i++) { PickupIndex val2 = availableRerolls[(num + i) % availableRerolls.Count]; rerollGroup = (ItemQualityGroupIndex)(int)QualityCatalog.FindItemQualityGroupIndex(PickupCatalog.GetPickupDef(val2).itemIndex); if ((int)rerollGroup != -1 && (int)rerollGroup != (int)originalItemGroup) { return true; } } return false; } private void CheckElement(DamageSource damageSource, ref bool core, ref bool reactor) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (!(core & reactor)) { CheckElement(ElementLoadoutComponent.GetElement(((BaseItemBodyBehavior)this).body, damageSource), ref core, ref reactor); } } private void CheckElement(ElementDef element, ref bool core, ref bool reactor) { if (!(core & reactor)) { if ((Object)(object)element == (Object)(object)coreElement) { core = true; } else if (reactingElements.Contains(element)) { reactor = true; } } } } public static class MoonWheel { public class MoonWheelBehaviour : RerollableItem { public GameObject moonWheelDisplay; public override ItemDef item => moonWheel; public override ReadOnlyList availableRerolls => ReadOnlyList.op_Implicit(Run.instance.availableTier3DropList); public override ElementDef coreElement => DefaultElementDefs.hydroElement; public override ElementDef[] reactingElements => new ElementDef[3] { DefaultElementDefs.electroElement, DefaultElementDefs.geoElement, DefaultElementDefs.dendroElement }; [ItemDefAssociation(useOnServer = true, useOnClient = true)] private static ItemDef GetItemDef() { return moonWheel; } } public class MoonWheelDisplay : MonoBehaviour { public MoonWheelBehaviour moonWheel; private void Start() { CharacterModel componentInParent = ((Component)this).GetComponentInParent(); if (Object.op_Implicit((Object)(object)componentInParent) && Object.op_Implicit((Object)(object)componentInParent.body) && ((Component)componentInParent.body).TryGetComponent(ref moonWheel)) { moonWheel.moonWheelDisplay = ((Component)this).gameObject; } } } public static ItemDef moonWheel; public static ItemDef hiddenMoonWheel; private static Material moonWheelMat; public static void Initialize() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) moonWheelMat = Assets.CreateVisionMaterial(Assets.AssetReferences.moonWheelVisionIcon, Assets.AssetReferences.moonWheelVisionRamp, 1.5f); AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.moonWheelPickupModel, (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { ((Renderer)((Component)x.Result.transform.GetChild(1)).GetComponent()).sharedMaterial = moonWheelMat; Items.AddModelPanelParameters(x.Result); }; ItemTierDef itemTierDef = Addressables.LoadAssetAsync((object)RoR2_Base_Common.Tier3Def_asset).WaitForCompletion(); Sprite icon = ((AssetReference)Assets.AssetReferences.moonWheelItemIcon).LoadAssetAsync().WaitForCompletion(); AssetReferenceT moonWheelPickupModel = Assets.AssetReferences.moonWheelPickupModel; ItemDisplayRuleDict itemDisplay = InitializeItemDisplays(); ItemTag[] array = new ItemTag[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); moonWheel = Items.AddNewItem("MoonWheel", "MOON_WHEEL", canRemove: true, itemTierDef, icon, moonWheelPickupModel, itemDisplay, (ItemTag[])(object)array); moonWheel.unlockableDef = Unlockables.elementalMasteryUnlockableDef; AssetReferenceT moonWheelPickupModel2 = Assets.AssetReferences.moonWheelPickupModel; ItemTag[] array2 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); hiddenMoonWheel = Items.AddNewItem("HiddenMoonWheel", "MOON_WHEEL", canRemove: false, null, null, moonWheelPickupModel2, null, (ItemTag[])(object)array2); ElementalReactionManager.onPreElementalReactionTriggered += delegate(ref ElementalReactionDef reaction, ElementDef element1, ElementDef element2, CharacterBody victim, ref DamageInfo damage) { CharacterBody val2 = default(CharacterBody); if (Object.op_Implicit((Object)(object)damage.attacker) && damage.attacker.TryGetComponent(ref val2) && Object.op_Implicit((Object)(object)val2.inventory) && val2.inventory.GetItemCountWithQuality(Items.moonWheel) > 0) { if ((Object)(object)reaction == (Object)(object)DefaultElementalReactions.crystallize && ((Object)(object)element1 == (Object)(object)DefaultElementDefs.hydroElement || (Object)(object)element2 == (Object)(object)DefaultElementDefs.hydroElement)) { reaction = DefaultElementalReactions.lunarCrystallize; } else if ((Object)(object)reaction == (Object)(object)DefaultElementalReactions.electroCharge) { reaction = DefaultElementalReactions.lunarCharge; } else if ((Object)(object)reaction == (Object)(object)DefaultElementalReactions.bloom) { reaction = DefaultElementalReactions.lunarBloom; } } }; } public static ItemDisplayRuleDict InitializeItemDisplays() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_01e4: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02df: 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_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Expected O, but got Unknown //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Expected O, but got Unknown //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Expected O, but got Unknown //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Expected O, but got Unknown //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0614: Unknown result type (might be due to invalid IL or missing references) //IL_0625: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Expected O, but got Unknown //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0687: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Unknown result type (might be due to invalid IL or missing references) //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Expected O, but got Unknown //IL_06e9: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_0729: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Expected O, but got Unknown //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07a6: Unknown result type (might be due to invalid IL or missing references) //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07c7: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_07eb: Unknown result type (might be due to invalid IL or missing references) //IL_07fc: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Expected O, but got Unknown //IL_0823: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0899: Unknown result type (might be due to invalid IL or missing references) //IL_08a3: Expected O, but got Unknown //IL_08c0: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08db: Unknown result type (might be due to invalid IL or missing references) //IL_08e0: Unknown result type (might be due to invalid IL or missing references) //IL_08f6: Unknown result type (might be due to invalid IL or missing references) //IL_08fb: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0901: Unknown result type (might be due to invalid IL or missing references) //IL_091c: Unknown result type (might be due to invalid IL or missing references) //IL_0925: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Expected O, but got Unknown //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Unknown result type (might be due to invalid IL or missing references) //IL_0978: Unknown result type (might be due to invalid IL or missing references) //IL_097d: Unknown result type (might be due to invalid IL or missing references) //IL_0993: Unknown result type (might be due to invalid IL or missing references) //IL_0998: Unknown result type (might be due to invalid IL or missing references) //IL_099d: Unknown result type (might be due to invalid IL or missing references) //IL_099e: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09d3: Unknown result type (might be due to invalid IL or missing references) //IL_09dd: Expected O, but got Unknown //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_09ff: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a1a: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Unknown result type (might be due to invalid IL or missing references) //IL_0a3b: Unknown result type (might be due to invalid IL or missing references) //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a5f: Unknown result type (might be due to invalid IL or missing references) //IL_0a70: Unknown result type (might be due to invalid IL or missing references) //IL_0a7a: Expected O, but got Unknown //IL_0a97: Unknown result type (might be due to invalid IL or missing references) //IL_0a9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: Unknown result type (might be due to invalid IL or missing references) //IL_0ab7: Unknown result type (might be due to invalid IL or missing references) //IL_0acd: Unknown result type (might be due to invalid IL or missing references) //IL_0ad2: Unknown result type (might be due to invalid IL or missing references) //IL_0ad7: Unknown result type (might be due to invalid IL or missing references) //IL_0ad8: Unknown result type (might be due to invalid IL or missing references) //IL_0af3: Unknown result type (might be due to invalid IL or missing references) //IL_0afc: Unknown result type (might be due to invalid IL or missing references) //IL_0b0d: Unknown result type (might be due to invalid IL or missing references) //IL_0b17: Expected O, but got Unknown //IL_0b34: Unknown result type (might be due to invalid IL or missing references) //IL_0b39: Unknown result type (might be due to invalid IL or missing references) //IL_0b4f: Unknown result type (might be due to invalid IL or missing references) //IL_0b54: Unknown result type (might be due to invalid IL or missing references) //IL_0b6a: Unknown result type (might be due to invalid IL or missing references) //IL_0b6f: Unknown result type (might be due to invalid IL or missing references) //IL_0b74: Unknown result type (might be due to invalid IL or missing references) //IL_0b75: Unknown result type (might be due to invalid IL or missing references) //IL_0b90: Unknown result type (might be due to invalid IL or missing references) //IL_0b99: Unknown result type (might be due to invalid IL or missing references) //IL_0baa: Unknown result type (might be due to invalid IL or missing references) //IL_0bb4: Expected O, but got Unknown //IL_0bd1: Unknown result type (might be due to invalid IL or missing references) //IL_0bd6: Unknown result type (might be due to invalid IL or missing references) //IL_0bec: Unknown result type (might be due to invalid IL or missing references) //IL_0bf1: Unknown result type (might be due to invalid IL or missing references) //IL_0c07: Unknown result type (might be due to invalid IL or missing references) //IL_0c0c: Unknown result type (might be due to invalid IL or missing references) //IL_0c11: Unknown result type (might be due to invalid IL or missing references) //IL_0c12: Unknown result type (might be due to invalid IL or missing references) //IL_0c2d: Unknown result type (might be due to invalid IL or missing references) //IL_0c36: Unknown result type (might be due to invalid IL or missing references) //IL_0c47: Unknown result type (might be due to invalid IL or missing references) //IL_0c51: Expected O, but got Unknown //IL_0c6e: Unknown result type (might be due to invalid IL or missing references) //IL_0c73: Unknown result type (might be due to invalid IL or missing references) //IL_0c89: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0ca4: Unknown result type (might be due to invalid IL or missing references) //IL_0ca9: Unknown result type (might be due to invalid IL or missing references) //IL_0cae: Unknown result type (might be due to invalid IL or missing references) //IL_0caf: Unknown result type (might be due to invalid IL or missing references) //IL_0cca: Unknown result type (might be due to invalid IL or missing references) //IL_0cd3: Unknown result type (might be due to invalid IL or missing references) //IL_0cdf: Unknown result type (might be due to invalid IL or missing references) //IL_0ce9: Expected O, but got Unknown //IL_0d06: Unknown result type (might be due to invalid IL or missing references) //IL_0d0b: Unknown result type (might be due to invalid IL or missing references) //IL_0d21: Unknown result type (might be due to invalid IL or missing references) //IL_0d26: Unknown result type (might be due to invalid IL or missing references) //IL_0d3c: Unknown result type (might be due to invalid IL or missing references) //IL_0d41: Unknown result type (might be due to invalid IL or missing references) //IL_0d46: Unknown result type (might be due to invalid IL or missing references) //IL_0d47: Unknown result type (might be due to invalid IL or missing references) //IL_0d62: Unknown result type (might be due to invalid IL or missing references) //IL_0d6b: Unknown result type (might be due to invalid IL or missing references) //IL_0d7c: Unknown result type (might be due to invalid IL or missing references) //IL_0d86: Expected O, but got Unknown //IL_0da3: Unknown result type (might be due to invalid IL or missing references) //IL_0da8: Unknown result type (might be due to invalid IL or missing references) //IL_0dbe: Unknown result type (might be due to invalid IL or missing references) //IL_0dc3: Unknown result type (might be due to invalid IL or missing references) //IL_0dd9: Unknown result type (might be due to invalid IL or missing references) //IL_0dde: Unknown result type (might be due to invalid IL or missing references) //IL_0de3: Unknown result type (might be due to invalid IL or missing references) //IL_0de4: Unknown result type (might be due to invalid IL or missing references) //IL_0dff: Unknown result type (might be due to invalid IL or missing references) //IL_0e08: Unknown result type (might be due to invalid IL or missing references) //IL_0e19: Unknown result type (might be due to invalid IL or missing references) //IL_0e23: Expected O, but got Unknown //IL_0e40: Unknown result type (might be due to invalid IL or missing references) //IL_0e45: Unknown result type (might be due to invalid IL or missing references) //IL_0e5b: Unknown result type (might be due to invalid IL or missing references) //IL_0e60: Unknown result type (might be due to invalid IL or missing references) //IL_0e76: Unknown result type (might be due to invalid IL or missing references) //IL_0e7b: Unknown result type (might be due to invalid IL or missing references) //IL_0e80: Unknown result type (might be due to invalid IL or missing references) //IL_0e81: Unknown result type (might be due to invalid IL or missing references) //IL_0e9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ea5: Unknown result type (might be due to invalid IL or missing references) //IL_0eb6: Unknown result type (might be due to invalid IL or missing references) //IL_0ec0: Expected O, but got Unknown //IL_0edd: Unknown result type (might be due to invalid IL or missing references) //IL_0ee2: Unknown result type (might be due to invalid IL or missing references) //IL_0ef8: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Unknown result type (might be due to invalid IL or missing references) //IL_0f13: Unknown result type (might be due to invalid IL or missing references) //IL_0f18: Unknown result type (might be due to invalid IL or missing references) //IL_0f1d: Unknown result type (might be due to invalid IL or missing references) //IL_0f1e: Unknown result type (might be due to invalid IL or missing references) //IL_0f39: Unknown result type (might be due to invalid IL or missing references) //IL_0f42: Unknown result type (might be due to invalid IL or missing references) //IL_0f53: Unknown result type (might be due to invalid IL or missing references) //IL_0f5d: Expected O, but got Unknown //IL_0f7a: Unknown result type (might be due to invalid IL or missing references) //IL_0f7f: Unknown result type (might be due to invalid IL or missing references) //IL_0f95: Unknown result type (might be due to invalid IL or missing references) //IL_0f9a: Unknown result type (might be due to invalid IL or missing references) //IL_0fb0: Unknown result type (might be due to invalid IL or missing references) //IL_0fb5: Unknown result type (might be due to invalid IL or missing references) //IL_0fba: Unknown result type (might be due to invalid IL or missing references) //IL_0fbb: Unknown result type (might be due to invalid IL or missing references) //IL_0fd6: Unknown result type (might be due to invalid IL or missing references) //IL_0fdf: Unknown result type (might be due to invalid IL or missing references) //IL_0ff0: Unknown result type (might be due to invalid IL or missing references) //IL_0ffa: Expected O, but got Unknown //IL_1017: Unknown result type (might be due to invalid IL or missing references) //IL_101c: Unknown result type (might be due to invalid IL or missing references) //IL_1032: Unknown result type (might be due to invalid IL or missing references) //IL_1037: Unknown result type (might be due to invalid IL or missing references) //IL_104d: Unknown result type (might be due to invalid IL or missing references) //IL_1052: Unknown result type (might be due to invalid IL or missing references) //IL_1057: Unknown result type (might be due to invalid IL or missing references) //IL_1058: Unknown result type (might be due to invalid IL or missing references) GameObject val = AssetAsyncReferenceManager.LoadAsset(Assets.AssetReferences.moonWheelDisplayModel, (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); val.AddComponent(); ((Renderer)((Component)val.transform.GetChild(1)).GetComponent()).sharedMaterial = moonWheelMat; Items.CreateItemDisplay(val, Items.CreateItemRendererInfo(val, 0, Assets.visionMaterial), Items.CreateItemRendererInfo(val, 1, moonWheelMat)); ItemDisplayRuleDict val2 = new ItemDisplayRuleDict(Array.Empty()); val2.Add("CommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "LowerArmL", localPos = new Vector3(0.03206f, 0.23382f, -0.05406f), localAngles = new Vector3(5.56553f, 0.75563f, 0.95463f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("HuntressBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(-0.00073f, 0.20592f, 0.162f), localAngles = new Vector3(331.3469f, 1.57845f, 1.41202f), localScale = new Vector3(0.9f, 0.9f, 0.9f) } }); val2.Add("Bandit2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Hat", localPos = new Vector3(-0.00262f, 0.11559f, 0.08425f), localAngles = new Vector3(317.5828f, 353.8432f, 5.02905f), localScale = new Vector3(0.7f, 0.7f, 0.7f) } }); val2.Add("ToolbotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(1.92758f, 1.8005f, 3.28254f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(5f, 5f, 5f) } }); val2.Add("EngiBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.45f, 0.48687f, -0.3f), localAngles = new Vector3(0f, 87f, 0f), localScale = new Vector3(0.9f, 0.9f, 0.9f) } }); val2.Add("EngiTurretBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Head", localPos = new Vector3(-0.61612f, 0.59652f, -1.31641f), localAngles = new Vector3(0f, 39.04362f, 0f), localScale = new Vector3(2.5f, 2.5f, 2.5f) } }); val2.Add("EngiWalkerTurretBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Neck", localPos = new Vector3(-0.7483f, 0.65663f, 0f), localAngles = new Vector3(0f, 90f, 0f), localScale = new Vector3(2.5f, 2.5f, 2.5f) } }); val2.Add("MageBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.21887f, 0.2151f, -0.1934f), localAngles = new Vector3(355f, 90f, 9f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("MercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "LowerArmR", localPos = new Vector3(0.00603f, 0.16364f, -0.10984f), localAngles = new Vector3(4.82814f, 0.91842f, 173.788f), localScale = new Vector3(0.7f, 0.7f, 0.7f) } }); val2.Add("TreebotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "HeadBase", localPos = new Vector3(-0.19751f, -0.42146f, 0.72772f), localAngles = new Vector3(39.14164f, 349.3906f, 172.4279f), localScale = new Vector3(1.3f, 1.3f, 1.3f) } }); val2.Add("LoaderBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(-0.2f, 0.28f, 0.28f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.9f, 0.9f, 0.9f) } }); val2.Add("CrocoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "SpineStomach1", localPos = new Vector3(1.14943f, 0.2214f, 1.60011f), localAngles = new Vector3(313.6886f, 121.8416f, 262.7798f), localScale = new Vector3(5.5f, 5.5f, 5.5f) } }); val2.Add("CaptainBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Head", localPos = new Vector3(0.00498f, 0.27717f, 0.14714f), localAngles = new Vector3(357.0426f, 359.8333f, 359.709f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val2.Add("RailgunnerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Backpack", localPos = new Vector3(-0.24508f, 0.12649f, -0.08851f), localAngles = new Vector3(0f, 88f, 0f), localScale = new Vector3(0.7f, 0.7f, 0.7f) } }); val2.Add("VoidSurvivorBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "CannonEnd", localPos = new Vector3(0.31781f, -0.10994f, 0.09012f), localAngles = new Vector3(347.5417f, 246.9279f, 174.3385f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("SeekerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Pack", localPos = new Vector3(-0.17127f, -0.10742f, -0.35991f), localAngles = new Vector3(332.9016f, 29.06501f, 28.89558f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("FalseSonBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.26695f, 0.18735f, 0.28028f), localAngles = new Vector3(333.2034f, 20.23438f, 335.0917f), localScale = new Vector3(1.2f, 1.2f, 1.2f) } }); val2.Add("ChefBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(-0.0173f, -0.48905f, 0.33534f), localAngles = new Vector3(58.64297f, 2.619f, 83.89237f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("DroneTechBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Backpack", localPos = new Vector3(-0.23746f, 0.30876f, -0.22503f), localAngles = new Vector3(1.73688f, 8.40125f, 356.0705f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val2.Add("DrifterBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "BagBulgeRight", localPos = new Vector3(0.02959f, -0.19342f, 0.30996f), localAngles = new Vector3(331.3999f, 108.6055f, 68.72771f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("BrotherBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject("b06477748e168314abd4c861c4cbcd76"), childName = "Head", localPos = new Vector3(0.01749f, 0.07662f, -0.09656f), localAngles = new Vector3(17.45016f, 252.3006f, 324.7871f), localScale = new Vector3(0.08f, 0.08f, 0.08f) } }); val2.Add("ScavBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Backpack", localPos = new Vector3(-8.30025f, 4.75887f, -0.11149f), localAngles = new Vector3(21.86793f, 78.82794f, 354.8484f), localScale = new Vector3(10f, 10f, 10f) } }); val2.Add("NemCommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.71209f, 0.88104f, -1.73658f), localAngles = new Vector3(358.8832f, 353.9355f, 0.15805f), localScale = new Vector3(3f, 3f, 3f) } }); val2.Add("NemMercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.15075f, 0.08836f, 0.13905f), localAngles = new Vector3(1.75716f, 34.06154f, 1.90495f), localScale = new Vector3(0.7f, 0.7f, 0.7f) } }); val2.Add("Executioner2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(-0.13895f, 0.1785f, 0.158f), localAngles = new Vector3(351.9363f, 342.002f, 349.7007f), localScale = new Vector3(0.6f, 0.6f, 0.6f) } }); val2.Add("ChirrBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(((AssetReference)Assets.AssetReferences.moonWheelDisplayModel).AssetGUID), childName = "Chest", localPos = new Vector3(0.49649f, 0.61212f, 0.24153f), localAngles = new Vector3(16.17279f, 282.3415f, 358.2969f), localScale = new Vector3(1.2f, 1.2f, 1.2f) } }); return val2; } } } namespace ElementalReactionsMod.Environment { public class ElementalEnvironmentScreenEffect : MonoBehaviour { public MeshRenderer halfL; private MaterialPropertyBlock propertyBlock; public MeshRenderer halfR; private float alpha; private float targetAlpha; private bool dirty = true; private static int tintColorKey = -1; private static int alphaKey = -1; private const float alphaSpeed = 2.5f; private ElementIndex element; private Color color; private void Start() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown if (tintColorKey == -1) { tintColorKey = Shader.PropertyToID("_TintColor"); } if (alphaKey == -1) { alphaKey = Shader.PropertyToID("_ExternalAlpha"); } propertyBlock = new MaterialPropertyBlock(); } public void SetElement(ElementDef element) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (this.element != element.index) { this.element = element.index; color = element.color; dirty = true; } } private void Update() { if (Object.op_Implicit((Object)(object)ElementalRain.instance)) { SetElement(ElementalRain.instance.element); } if (alpha != targetAlpha) { alpha = Mathf.MoveTowards(alpha, targetAlpha, 2.5f * Time.deltaTime); dirty = true; } if (dirty) { SetProperty(ref halfL); SetProperty(ref halfR); dirty = false; } } private void SetProperty(ref MeshRenderer renderer) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) propertyBlock.Clear(); propertyBlock.SetFloat(alphaKey, alpha); propertyBlock.SetColor(tintColorKey, color); ((Renderer)renderer).SetPropertyBlock(propertyBlock); } public void SetActive(bool active) { targetAlpha = (active ? 1f : 0f); } } public class ElementalRain : MonoBehaviour { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static SceneCameraDelegate <>9__1_0; public static SceneCameraDelegate <>9__1_1; internal void b__1_0(SceneCamera sceneCam) { if (camerasToScreenEffects.TryGetValue(sceneCam.cameraRigController, out var value)) { ((Component)value).gameObject.layer = LayerIndex.defaultLayer.intVal; } } internal void b__1_1(SceneCamera sceneCam) { if (camerasToScreenEffects.TryGetValue(sceneCam.cameraRigController, out var value)) { ((Component)value).gameObject.layer = LayerIndex.noDraw.intVal; } } } public static GameObject elementalRainPrefab; internal static Dictionary camerasToScreenEffects = new Dictionary(); public static ElementalRain instance; public bool _raining = true; public ElementDef element; public int[] colliderInstanceIDsToIgnore; private float rainStopwatch; private const float rainInterval = 0.25f; private JobHandle? rainRaycastJob; private NativeArray rainRaycastCommands; private NativeArray rainRaycastHitBuffer; private List characterBodies; private Dictionary cachedLoadoutComponents; public bool raining { get { return _raining; } set { if (value != _raining) { if (_raining) { EnableRain(); } else { DisableRain(); } _raining = value; } } } public static void Initialize() { //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown elementalRainPrefab = PrefabAPI.CreateEmptyPrefab("ElementalRainManager"); elementalRainPrefab.AddComponent(); Stage.onServerStageBegin += TrySpawnElementalRain; CameraRigController.onCameraEnableGlobal += AddEnvironmentScreenEffect; CameraRigController.onCameraDisableGlobal += RemoveEnvironmentScreenEffect; object obj = <>c.<>9__1_0; if (obj == null) { SceneCameraDelegate val = delegate(SceneCamera sceneCam) { if (camerasToScreenEffects.TryGetValue(sceneCam.cameraRigController, out var value)) { ((Component)value).gameObject.layer = LayerIndex.defaultLayer.intVal; } }; <>c.<>9__1_0 = val; obj = (object)val; } SceneCamera.onSceneCameraPreCull += (SceneCameraDelegate)obj; object obj2 = <>c.<>9__1_1; if (obj2 == null) { SceneCameraDelegate val2 = delegate(SceneCamera sceneCam) { if (camerasToScreenEffects.TryGetValue(sceneCam.cameraRigController, out var value)) { ((Component)value).gameObject.layer = LayerIndex.noDraw.intVal; } }; <>c.<>9__1_1 = val2; obj2 = (object)val2; } SceneCamera.onSceneCameraPostRender += (SceneCameraDelegate)obj2; } private static void TrySpawnElementalRain(Stage stage) { if (!Object.op_Implicit((Object)(object)ElementalReactionManager.instance) || !Config.CanWeatherUseElements().Value) { return; } if (stage.sceneDef.cachedName == "moon2" || stage.sceneDef.cachedName == "moon") { Object.Instantiate(elementalRainPrefab); GameObject val = GameObject.Find("SceneInfo/BrotherMissionController/ArenaWalls/Ceiling"); MeshCollider val2 = default(MeshCollider); if (Object.op_Implicit((Object)(object)val) && val.TryGetComponent(ref val2)) { instance.colliderInstanceIDsToIgnore = new int[1] { ((Object)val2).GetInstanceID() }; } } if (stage.sceneDef.cachedName == "meridian") { GameObject val3 = GameObject.Find("Weather, Meridian/CAMERA PARTICLES: RainParticles"); if (Object.op_Implicit((Object)(object)val3)) { Object.Instantiate(elementalRainPrefab, val3.transform); } } } private static void AddEnvironmentScreenEffect(CameraRigController camera) { //IL_0056: 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) if (Object.op_Implicit((Object)(object)ElementalReactionManager.instance) && !camerasToScreenEffects.ContainsKey(camera)) { GameObject val = Object.Instantiate(ElementalReactionManager.elementalEnvironmentScreenEffect.WaitForCompletion(), ((Component)camera.sceneCam).transform); val.transform.localPosition = ElementalReactionManager.elementalEnvironmentScreenEffect.WaitForCompletion().transform.position; val.transform.localRotation = ElementalReactionManager.elementalEnvironmentScreenEffect.WaitForCompletion().transform.rotation; camerasToScreenEffects.Add(camera, val.GetComponent()); } } private static void RemoveEnvironmentScreenEffect(CameraRigController camera) { if (camerasToScreenEffects.ContainsKey(camera)) { camerasToScreenEffects.Remove(camera); } } public void OnEnable() { SingletonHelper.Assign(ref instance, this); if (!Object.op_Implicit((Object)(object)element) || (Object)(object)element == (Object)(object)DefaultElementDefs.physicalElement) { element = DefaultElementDefs.hydroElement; } if (raining) { EnableRain(); } } private void EnableRain() { CharacterBody.onBodyDestroyGlobal += RemoveCachedLoadout; characterBodies = new List(); cachedLoadoutComponents = new Dictionary(); ActivationChatMessage(); } public void OnDisable() { SingletonHelper.Unassign(ref instance, this); DisableRain(); } private void DisableRain() { CharacterBody.onBodyDestroyGlobal -= RemoveCachedLoadout; CancelRaycastJob(); } private void ActivationChatMessage() { //IL_0016: 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_002b: Expected O, but got Unknown //IL_0043: 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_0058: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //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_0085: Expected O, but got Unknown if ((Object)(object)element == (Object)(object)DefaultElementDefs.cryoElement) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "DS_GAMING_ELEMENTAL_REACTIONS_EVENT_ELEMENTAL_RAIN_CRYO" }); } else if ((Object)(object)element == (Object)(object)DefaultElementDefs.pyroElement) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "DS_GAMING_ELEMENTAL_REACTIONS_EVENT_ELEMENTAL_RAIN_PYRO" }); } else if ((Object)(object)element == (Object)(object)DefaultElementDefs.hydroElement) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "DS_GAMING_ELEMENTAL_REACTIONS_EVENT_ELEMENTAL_RAIN_HYDRO" }); } else { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "DS_GAMING_ELEMENTAL_REACTIONS_EVENT_ELEMENTAL_RAIN" }); } } private void FixedUpdate() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && raining) { if (rainRaycastJob.HasValue) { JobHandle value = rainRaycastJob.Value; ((JobHandle)(ref value)).Complete(); rainRaycastJob = null; RainApplyElement(); } rainStopwatch += Time.fixedDeltaTime; if (rainStopwatch >= 0.25f && Object.op_Implicit((Object)(object)element) && (Object)(object)element != (Object)(object)DefaultElementDefs.physicalElement) { rainStopwatch = Mathf.Min(rainStopwatch - 0.25f, 0f); ScheduleRaycastJob(); } } } private void RainApplyElement() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_004c: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < characterBodies.Count; i++) { if (!Object.op_Implicit((Object)(object)characterBodies[i])) { continue; } RaycastHit val = rainRaycastHitBuffer[i]; if (((RaycastHit)(ref val)).colliderInstanceID != 0) { if (colliderInstanceIDsToIgnore == null) { continue; } int[] source = colliderInstanceIDsToIgnore; val = rainRaycastHitBuffer[i]; if (!source.Contains(((RaycastHit)(ref val)).colliderInstanceID)) { continue; } } ElementalReactionManager.ApplyElement(element, characterBodies[i], 0.25f, null, alwaysPersist: false, 1f); characterBodies[i].AddTimedBuff(Buffs.elementalEnvironmentHiddenBuff.buffIndex, 0.375f); } rainRaycastCommands.Dispose(); rainRaycastHitBuffer.Dispose(); characterBodies.Clear(); } private void ScheduleRaycastJob() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) CancelRaycastJob(); characterBodies.Clear(); TransformAccessArray val = default(TransformAccessArray); ((TransformAccessArray)(ref val))..ctor(CharacterBody.readOnlyInstancesList.Count, -1); for (int i = 0; i < CharacterBody.readOnlyInstancesList.Count; i++) { if (BodyAffectedByRain(CharacterBody.readOnlyInstancesList[i])) { characterBodies.Add(CharacterBody.readOnlyInstancesList[i]); ((TransformAccessArray)(ref val)).Add(CharacterBody.readOnlyInstancesList[i].transform); } } rainRaycastCommands = new NativeArray(characterBodies.Count, (Allocator)3, (NativeArrayOptions)1); CreateRaycastCommandsJob createRaycastCommandsJob = new CreateRaycastCommandsJob { output = rainRaycastCommands, physicsScene = Physics.defaultPhysicsScene, raycastMask = ((LayerIndex)(ref LayerIndex.world)).mask }; JobHandle val2 = IJobParallelForTransformExtensions.ScheduleReadOnly(createRaycastCommandsJob, val, 32, default(JobHandle)); rainRaycastHitBuffer = new NativeArray(characterBodies.Count, (Allocator)3, (NativeArrayOptions)1); rainRaycastJob = RaycastCommand.ScheduleBatch(rainRaycastCommands, rainRaycastHitBuffer, characterBodies.Count, val2); ((TransformAccessArray)(ref val)).Dispose(); } private void RemoveCachedLoadout(CharacterBody body) { if (cachedLoadoutComponents.ContainsKey(body)) { cachedLoadoutComponents.Remove(body); } } private bool TryGetElementLoadout(CharacterBody body, out ElementLoadoutComponent elementLoadoutComponent) { elementLoadoutComponent = null; if (!cachedLoadoutComponents.TryGetValue(body, out elementLoadoutComponent)) { elementLoadoutComponent = ((Component)body).GetComponent(); cachedLoadoutComponents.Add(body, elementLoadoutComponent); } return Object.op_Implicit((Object)(object)elementLoadoutComponent); } protected virtual bool BodyAffectedByRain(CharacterBody characterBody) { ElementLoadoutComponent elementLoadoutComponent; return !characterBody.HasBuff(Buffs.ImmuneToDebuffReady) && (!TryGetElementLoadout(characterBody, out elementLoadoutComponent) || !Object.op_Implicit((Object)(object)elementLoadoutComponent.permanentlyAppliedElement) || (Object)(object)elementLoadoutComponent.permanentlyAppliedElement == (Object)(object)DefaultElementDefs.physicalElement); } private void CancelRaycastJob() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (rainRaycastJob.HasValue) { JobHandle valueOrDefault = rainRaycastJob.GetValueOrDefault(); ((JobHandle)(ref valueOrDefault)).Complete(); rainRaycastCommands.Dispose(); rainRaycastHitBuffer.Dispose(); } rainRaycastJob = null; } } public struct CreateRaycastCommandsJob : IJobParallelForTransform { [ReadOnly] public PhysicsScene physicsScene; [ReadOnly] public LayerMask raycastMask; [WriteOnly] public NativeArray output; public void Execute(int index, TransformAccess access) { //IL_0009: 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_0020: 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) output[index] = new RaycastCommand(physicsScene, ((TransformAccess)(ref access)).position, Vector3.up, float.MaxValue, LayerMask.op_Implicit(raycastMask), 1); } } } namespace ElementalReactionsMod.Elements { public static class ElementCatalog { public static ElementDef[] elementCatalog = Array.Empty(); public static ResourceAvailability availability = default(ResourceAvailability); internal static ModdedDamageType[] elementIndexDamageTypeBits; [SystemInitializer(new Type[] { })] private static void SystemInit() { BakeElements(); Log.Message("ElementCatalog initialized"); ((ResourceAvailability)(ref availability)).MakeAvailable(); } public static void AddElementDefs(ElementDef[] elementDefs) { if (((ResourceAvailability)(ref availability)).available) { Log.Warning("Elements " + elementDefs?.ToString() + " are trying to be added after the catalog is initialized"); return; } int num = elementCatalog.Length; Array.Resize(ref elementCatalog, num + elementDefs.Length); for (int i = 0; i < elementDefs.Length; i++) { elementCatalog[num + i] = elementDefs[i]; } string text = string.Concat(elementCatalog.Select((ElementDef x) => ((object)x).ToString() + "\n")); Log.Message("ElementDef(s) added to elementCatalog. elementCatalog now contains:\n" + text); } public static ElementDef GetElementDef(ElementIndex index) { return ArrayUtils.GetSafe(elementCatalog, (int)index); } internal static void BakeElements() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected I4, but got Unknown elementIndexDamageTypeBits = (ModdedDamageType[])(object)new ModdedDamageType[Mathf.CeilToInt(Mathf.Log((float)elementCatalog.Length, 2f))]; for (int i = 0; i < elementIndexDamageTypeBits.Length; i++) { elementIndexDamageTypeBits[i] = (ModdedDamageType)(int)DamageAPI.ReserveDamageType(); } ElementDef[] array = elementCatalog; foreach (ElementDef elementDef in array) { elementDef.reactsWith = new bool[elementCatalog.Length]; } } } public class ElementDef : ScriptableObject { private string _cachedName; public string nameToken; public string descriptionToken; internal string keywordToken; public Color color; public BuffDef buff; public BuffDef cooldownBuff; public Sprite skillIcon; public Material iconVFX; public bool canPersist; internal bool[] reactsWith; internal List reactions = new List(); public bool hasDelusion; public ItemDef delusion; public string cachedName { get { return _cachedName; } set { ((Object)this).name = value; _cachedName = value; } } [Tooltip("Set at runtime, do not set manually")] public ElementIndex index => (ElementIndex)Array.IndexOf(ElementCatalog.elementCatalog, this); public override string ToString() { return Language.GetString(nameToken, Language.currentLanguageName); } internal static ElementDef CreatePhysical(string internalName, string token, Color color, Sprite skillIcon) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) ElementDef elementDef = ScriptableObject.CreateInstance(); elementDef.cachedName = internalName; elementDef.nameToken = token + "_NAME"; elementDef.descriptionToken = token + "_DESCRIPTION"; elementDef.color = color; elementDef.skillIcon = skillIcon; elementDef.hasDelusion = false; return elementDef; } public static ElementDef CreateElementDef(string internalName, string token, Color color, Sprite icon, Texture vfxIcon, Sprite skillIcon, bool canPersist, bool hasDelusion, Sprite delusionItemIcon) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) ElementDef elementDef = ScriptableObject.CreateInstance(); elementDef.cachedName = internalName; elementDef.nameToken = token + "_NAME"; elementDef.descriptionToken = token + "_DESCRIPTION"; elementDef.color = color; elementDef.buff = Util.AddNewBuff(internalName, icon, color, canStack: false, isDebuff: true); elementDef.cooldownBuff = Util.AddNewBuff(internalName + "Cooldown", icon, new Color(0.29f, 0.24f, 0.26f), canStack: false, isDebuff: false, isCooldown: false, hidden: true); elementDef.skillIcon = skillIcon; elementDef.iconVFX = Assets.CreateElementEffectMaterial(vfxIcon); elementDef.canPersist = canPersist; elementDef.hasDelusion = hasDelusion; if (hasDelusion) { elementDef.delusion = DelusionManager.CreateNewDelusion(elementDef, delusionItemIcon); } return elementDef; } } public enum ElementIndex { Physical } public static class DefaultElementDefs { public static ElementDef physicalElement; public static ElementDef pyroElement; public static ElementDef hydroElement; public static ElementDef electroElement; public static ElementDef cryoElement; public static ElementDef anemoElement; public static ElementDef geoElement; public static ElementDef dendroElement; public static void Initialize() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: 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_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) physicalElement = ElementDef.CreatePhysical("Physical", "DS_GAMING_ELEMENTAL_REACTIONS_ELEMENT_PHYSICAL", Color.white * 0.9f, Addressables.LoadAssetAsync((object)Assets.AssetReferences.physicalSkillIcon).WaitForCompletion()); pyroElement = ElementDef.CreateElementDef("Pyro", "DS_GAMING_ELEMENTAL_REACTIONS_ELEMENT_PYRO", new Color(0.9f, 0.51f, 0.384f), Addressables.LoadAssetAsync((object)Assets.AssetReferences.pyroBuffIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.pyroIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.pyroSkillIcon).WaitForCompletion(), canPersist: true, hasDelusion: true, Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionPyroItemIcon).WaitForCompletion()); hydroElement = ElementDef.CreateElementDef("Hydro", "DS_GAMING_ELEMENTAL_REACTIONS_ELEMENT_HYDRO", Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)4)), Addressables.LoadAssetAsync((object)Assets.AssetReferences.hydroBuffIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.hydroIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.hydroSkillIcon).WaitForCompletion(), canPersist: true, hasDelusion: true, Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionHydroItemIcon).WaitForCompletion()); electroElement = ElementDef.CreateElementDef("Electro", "DS_GAMING_ELEMENTAL_REACTIONS_ELEMENT_ELECTRO", Color32.op_Implicit(ColorCatalog.GetColor((ColorIndex)31)), Addressables.LoadAssetAsync((object)Assets.AssetReferences.electroBuffIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.electroIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.electroSkillIcon).WaitForCompletion(), canPersist: true, hasDelusion: true, Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionElectroItemIcon).WaitForCompletion()); cryoElement = ElementDef.CreateElementDef("Cryo", "DS_GAMING_ELEMENTAL_REACTIONS_ELEMENT_CRYO", new Color(0.584f, 0.8f, 0.9f), Addressables.LoadAssetAsync((object)Assets.AssetReferences.cryoBuffIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.cryoIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.cryoSkillIcon).WaitForCompletion(), canPersist: true, hasDelusion: true, Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionCryoItemIcon).WaitForCompletion()); anemoElement = ElementDef.CreateElementDef("Anemo", "DS_GAMING_ELEMENTAL_REACTIONS_ELEMENT_ANEMO", new Color(0.5f, 0.9f, 0.8f), Addressables.LoadAssetAsync((object)Assets.AssetReferences.anemoBuffIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.anemoIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.anemoSkillIcon).WaitForCompletion(), canPersist: false, hasDelusion: true, Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionAnemoItemIcon).WaitForCompletion()); geoElement = ElementDef.CreateElementDef("Geo", "DS_GAMING_ELEMENTAL_REACTIONS_ELEMENT_GEO", new Color(0.9f, 0.788f, 0.384f), Addressables.LoadAssetAsync((object)Assets.AssetReferences.geoBuffIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.geoIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.geoSkillIcon).WaitForCompletion(), canPersist: false, hasDelusion: true, Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionGeoItemIcon).WaitForCompletion()); dendroElement = ElementDef.CreateElementDef("Dendro", "DS_GAMING_ELEMENTAL_REACTIONS_ELEMENT_DENDRO", new Color(0.612f, 0.9f, 0.384f), Addressables.LoadAssetAsync((object)Assets.AssetReferences.dendroBuffIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.dendroIcon).WaitForCompletion(), Addressables.LoadAssetAsync((object)Assets.AssetReferences.dendroSkillIcon).WaitForCompletion(), canPersist: true, hasDelusion: true, Addressables.LoadAssetAsync((object)Assets.AssetReferences.delusionDendroItemIcon).WaitForCompletion()); ElementCatalog.AddElementDefs(new ElementDef[8] { physicalElement, pyroElement, hydroElement, electroElement, cryoElement, anemoElement, geoElement, dendroElement }); } } } namespace ElementalReactionsMod.Achievements { [RegisterAchievement("DS_GAMING_ELEMENTAL_REACTIONS_elementalMasteryAchievement", "DS_GAMING_ELEMENTAL_REACTIONS_elementalMasteryUnlockable", null, 3u, null)] public class ElementalMasteryAchievement : BaseEndingAchievement { public const string identifier = "DS_GAMING_ELEMENTAL_REACTIONS_elementalMasteryAchievement"; public const string unlockableIdentifier = "DS_GAMING_ELEMENTAL_REACTIONS_elementalMasteryUnlockable"; public override bool ShouldGrant(RunReport runReport) { return (Object)(object)runReport.gameEnding == (Object)(object)GameEndings.MainEnding && Object.op_Implicit((Object)(object)ElementalReactionManager.instance); } } public static class Unlockables { public static UnlockableDef elementalMasteryUnlockableDef; public static void Initialize() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) elementalMasteryUnlockableDef = ScriptableObject.CreateInstance(); elementalMasteryUnlockableDef.achievementIcon = ((AssetReference)Assets.AssetReferences.elementalMasteryAchievementIcon).LoadAssetAsync().WaitForCompletion(); elementalMasteryUnlockableDef.cachedName = "DS_GAMING_ELEMENTAL_REACTIONS_elementalMasteryUnlockable"; elementalMasteryUnlockableDef.nameToken = Tokens.GetAchievementNameToken("DS_GAMING_ELEMENTAL_REACTIONS_elementalMasteryAchievement"); Content.AddUnlockableDef(elementalMasteryUnlockableDef); } } }