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.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using HG; using HG.Reflection; using IL.RoR2; using JetBrains.Annotations; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using R2API; using R2API.ScriptableObjects; using RegigigasMod.Modules.Components; using RegigigasMod.SkillStates.Regigigas; using RoR2; using RoR2.Achievements.Artifacts; using RoR2.AddressableAssets; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Skills; using RoR2BepInExPack.GameAssetPathsBetter; using SM64BBF.Content; using SM64BBF.Items; using SM64BBF.PickUpDefs; using SM64BBF.States; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SM64BBF")] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyProduct("SM64BBF")] [assembly: AssemblyTitle("SM64BBF")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace SM64BBF { public static class Config { [StructLayout(LayoutKind.Sequential, Size = 1)] public struct BobombSpawning { public static ConfigEntry SelectionWeight; public static ConfigEntry MinimumStageCount; public static ConfigEntry BobombSpawnStages; } [StructLayout(LayoutKind.Sequential, Size = 1)] public struct TreeInteractable { public static ConfigEntry CoinWeight; public static ConfigEntry OneUpWeight; public static ConfigEntry StarmanWeight; public static ConfigEntry NothingWeight; } public static ConfigEntry StarmanKillsAllies; public static void PopulateConfig(ConfigFile config) { BobombSpawning.SelectionWeight = config.Bind("Bobomb Spawn", "Bobomb Card Selection Weight", 6, "Selection weight for Bobomb Director Card. Does not affect spawning on Bobomb Battlefield, only for other stages."); BobombSpawning.MinimumStageCount = config.Bind("Bobomb Spawn", "Bobomb Card Minimal Stage Count", 0, "How many stages players must clear before Bobombs start spawning. Does not affect spawning on Bobomb Battlefield, only for other stages."); BobombSpawning.BobombSpawnStages = config.Bind("Bobomb Spawn", "Stages to Spawn In", "", "Additional stages (beyond bobomb battlefield) that Bobombs can spawn in. Stages should be separated by coma, internal names can be found in game via \"list_scenes\" command."); StarmanKillsAllies = config.Bind("Starman", "Starman Kills Allies", true, "Mario Royale Flashbacks."); TreeInteractable.CoinWeight = config.Bind("Tree Interactable", "Coin Weight", 40f, "Weight to spawn Coin when shaking the tree. Higher the value - higher the chance."); TreeInteractable.OneUpWeight = config.Bind("Tree Interactable", "One Up Weight", 5f, "Weight to spawn 1UP when shaking the tree. Higher the value - higher the chance."); TreeInteractable.StarmanWeight = config.Bind("Tree Interactable", "Starman Weight", 5f, "Weight to spawn Starman when shaking the tree. Higher the value - higher the chance."); TreeInteractable.NothingWeight = config.Bind("Tree Interactable", "Nothing Weight", 50f, "Weight to get nothing when shaking the tree. Higher the value - higher the chance."); } } 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 RegigigasCompat { private static bool? _enabled; public static bool enabled { get { if (!_enabled.HasValue) { _enabled = Chainloader.PluginInfos.ContainsKey("com.rob.RegigigasMod"); } return _enabled.Value; } } public static void AddKingBobombSkin() { } private static SkinDef CreateSkinDef(GameObject modelTransform, SkinDef baseSkin) { return ScriptableObject.CreateInstance(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetupKingBobombBody(GameObject characterBody, ContentPack contentPack) { //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_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_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_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_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) characterBody.GetComponent().preferredInitialStateType = new SerializableEntityStateType(typeof(SpawnState)); EntityStateMachine[] components = characterBody.GetComponents(); foreach (EntityStateMachine val in components) { if (val.customName == "Body") { val.mainStateType = new SerializableEntityStateType(typeof(MainState)); val.initialStateType = new SerializableEntityStateType(typeof(SpawnState)); } } characterBody.GetComponent().deathState = new SerializableEntityStateType(typeof(DeathState)); characterBody.AddComponent(); characterBody.AddComponent(); characterBody.AddComponent(); FootstepHandler componentInChildren = characterBody.GetComponentInChildren(); componentInChildren.footstepDustPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/GenericHugeFootstepDust.prefab").WaitForCompletion(); componentInChildren.enableFootstepDust = true; } public static void SetupPrimarySkill(SkillDef primary) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) SetupSkillActivationState(primary, new SerializableEntityStateType(typeof(GrabAttempt))); } public static void SetupSecondarySkill(SkillDef secondary) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) SetupSkillActivationState(secondary, new SerializableEntityStateType(typeof(Stomp))); } public static void SetupUtilitySkill(SkillDef utility) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) SetupSkillActivationState(utility, new SerializableEntityStateType(typeof(BounceStart))); } public static void SetupSpecialSkill(SkillDef special) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) SetupSkillActivationState(special, new SerializableEntityStateType(typeof(Revenge))); } private static void SetupSkillActivationState(SkillDef skill, SerializableEntityStateType activationState) { //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) if (Object.op_Implicit((Object)(object)skill)) { skill.activationState = activationState; } else { Log.Warning("KingBobomb: Skill for activation state " + ((object)(SerializableEntityStateType)(ref activationState)).ToString() + "doesn't exist."); } } } public static class SM64BBFContent { [StructLayout(LayoutKind.Sequential, Size = 1)] public struct MiscPickups { public static StarmanPickupDef Starman; public static CoinPickupDef Coin; } [StructLayout(LayoutKind.Sequential, Size = 1)] public struct Items { public static ItemDef MarioOneUp; public static ItemDef RoyalCrown; } [StructLayout(LayoutKind.Sequential, Size = 1)] public struct Buffs { public static BuffDef BobombArmor; } [StructLayout(LayoutKind.Sequential, Size = 1)] public struct CharacterSpawnCards { public static CharacterSpawnCard cscBobomb; public static CharacterSpawnCard cscKingBobomb; } internal const string ScenesAssetBundleFileName = "sm64bbfstage"; internal const string AssetsAssetBundleFileName = "sm64bbfassets"; internal const string SoundsSoundBankFileName = "SM64BBFSounds.bnk"; internal const string MusicSoundBankFileName = "SM64BBFMusic.bnk"; internal const string InitSoundBankFileName = "SM64BBFInit.bnk"; private static AssetBundle _scenesAssetBundle; private static AssetBundle _assetsAssetBundle; internal static SceneDef SM64BBFScene; internal static Sprite SM64BBFPreviewSprite; public static List SwappedMaterials = new List(); public static GameObject BobombMaster; public static ArtifactDef BobombOnDeath; public static Dictionary ShaderLookup = new Dictionary { { "stubbedror2/base/shaders/hgstandard", "RoR2/Base/Shaders/HGStandard.shader" }, { "stubbedror2/base/shaders/hgsnowtopped", "RoR2/Base/Shaders/HGSnowTopped.shader" }, { "stubbedror2/base/shaders/hgtriplanarterrainblend", "RoR2/Base/Shaders/HGTriplanarTerrainBlend.shader" }, { "stubbedror2/base/shaders/hgintersectioncloudremap", "RoR2/Base/Shaders/HGIntersectionCloudRemap.shader" }, { "stubbedror2/base/shaders/hgcloudremap", "RoR2/Base/Shaders/HGCloudRemap.shader" }, { "stubbedror2/base/shaders/hgdistortion", "RoR2/Base/Shaders/HGDistortion.shader" }, { "stubbedcalm water/calmwater - dx11 - doublesided", "Calm Water/CalmWater - DX11 - DoubleSided.shader" }, { "stubbedcalm water/calmwater - dx11", "Calm Water/CalmWater - DX11.shader" }, { "stubbednature/speedtree", "RoR2/Base/Shaders/SpeedTreeCustom.shader" }, { "stubbeddecalicious/decaliciousdeferreddecal", "Decalicious/DecaliciousDeferredDecal.shader" } }; internal static IEnumerator LoadAssetBundlesAsync(AssetBundle scenesAssetBundle, AssetBundle assetsAssetBundle, IProgress progress, ContentPack contentPack) { _scenesAssetBundle = scenesAssetBundle; _assetsAssetBundle = assetsAssetBundle; yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(Material[] assets) { //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) if (assets != null) { Material[] array = assets; foreach (Material val8 in array) { if (((Object)val8.shader).name.StartsWith("Stubbed")) { Shader val9 = Addressables.LoadAssetAsync((object)ShaderLookup[((Object)val8.shader).name.ToLower()]).WaitForCompletion(); ((Object)val8.shader).name.ToLower(); if (Object.op_Implicit((Object)(object)val9)) { val8.shader = val9; SwappedMaterials.Add(val8); } else { Log.Warning("Couldn't find replacement shader for " + ((Object)val8.shader).name.ToLower()); } } } } }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(UnlockableDef[] assets) { contentPack.unlockableDefs.Add(assets); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(CharacterSpawnCard[] assets) { CharacterSpawnCards.cscBobomb = assets.First((CharacterSpawnCard csc) => ((Object)csc).name == "cscBobomb"); RegisterBobombToStages(); if (RegigigasCompat.enabled) { CharacterSpawnCards.cscKingBobomb = assets.First((CharacterSpawnCard csc) => ((Object)csc).name == "cscKingBobomb2"); } }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(Sprite[] assets) { SM64BBFPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSM64BBFPreview"); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(SceneDef[] assets) { SM64BBFScene = assets.First((SceneDef sd) => sd.cachedName == "sm64_bbf_SM64_BBF"); contentPack.sceneDefs.Add(assets); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(MusicTrackDef[] assets) { contentPack.musicTrackDefs.Add(assets); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(CoinPickupDef[] assets) { MiscPickups.Coin = assets.First((CoinPickupDef spd) => ((Object)spd).name == "CoinPickUpDef"); contentPack.miscPickupDefs.Add((MiscPickupDef[])(object)assets); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(StarmanPickupDef[] assets) { MiscPickups.Starman = assets.First((StarmanPickupDef spd) => ((Object)spd).name == "CustomStarmanPickupDef"); contentPack.miscPickupDefs.Add((MiscPickupDef[])(object)assets); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate { }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(ItemDef[] assets) { Items.MarioOneUp = assets.First((ItemDef id) => ((Object)id).name == "OneUp"); Items.RoyalCrown = assets.First((ItemDef item) => ((Object)item).name == "RoyalCrown"); contentPack.itemDefs.Add(assets); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(GameObject[] assets) { //IL_0031: 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_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_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_00dc: 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_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_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Expected O, but got Unknown GameObject val3 = assets.First((GameObject bp) => ((Object)bp).name == "BobombBody"); val3.GetComponent()._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/StandardCrosshair.prefab").WaitForCompletion(); val3.GetComponent().cameraParams = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/ccpStandard.asset").WaitForCompletion(); FootstepHandler componentInChildren = val3.GetComponentInChildren(); componentInChildren.footstepDustPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); componentInChildren.enableFootstepDust = true; contentPack.bodyPrefabs.Add((GameObject[])(object)new GameObject[1] { val3 }); if (RegigigasCompat.enabled) { GameObject val4 = assets.First((GameObject bp) => ((Object)bp).name == "KingBobomb2Body"); val4.GetComponent()._defaultCrosshairPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/StandardCrosshair.prefab").WaitForCompletion(); val4.GetComponent().cameraParams = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/ccpStandardHuge.asset").WaitForCompletion(); RegigigasCompat.SetupKingBobombBody(val4, contentPack); contentPack.bodyPrefabs.Add((GameObject[])(object)new GameObject[1] { val4 }); } GameObject val5 = assets.First((GameObject interactable) => ((Object)interactable).name == "TreeInteractable"); GameObject val6 = assets.First((GameObject gameObject) => ((Object)gameObject).name == "RollingRock"); contentPack.networkedObjectPrefabs.Add((GameObject[])(object)new GameObject[2] { val5, val6 }); BobombMaster = assets.First((GameObject bp) => ((Object)bp).name == "BobombMaster"); contentPack.masterPrefabs.Add((GameObject[])(object)new GameObject[1] { BobombMaster }); if (RegigigasCompat.enabled) { GameObject val7 = assets.First((GameObject bp) => ((Object)bp).name == "KingBobomb2Master"); contentPack.masterPrefabs.Add((GameObject[])(object)new GameObject[1] { val7 }); } StarManState.starmanKillsEffect = assets.First((GameObject asset) => ((Object)asset).name == "KIlledByStarmanEffect"); contentPack.effectDefs.Add((EffectDef[])(object)new EffectDef[1] { new EffectDef(StarManState.starmanKillsEffect) }); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(SkillDef[] assets) { contentPack.skillDefs.Add(assets); if (RegigigasCompat.enabled) { RegigigasCompat.SetupPrimarySkill(assets.First((SkillDef sd) => ((Object)sd).name == "KingBobombGrab")); RegigigasCompat.SetupSecondarySkill(assets.First((SkillDef sd) => ((Object)sd).name == "KingBobombEarthquake")); RegigigasCompat.SetupUtilitySkill(assets.First((SkillDef sd) => ((Object)sd).name == "KingBobombSlam")); RegigigasCompat.SetupSpecialSkill(assets.First((SkillDef sd) => ((Object)sd).name == "KingBobombRevenge")); } }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(SkillFamily[] assets) { contentPack.skillFamilies.Add(assets); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(ItemDisplayRuleSet[] assets) { ItemDisplayRuleSet itemDisplayRuleSet = assets.First((ItemDisplayRuleSet idrs) => ((Object)idrs).name == "idrsBobomb"); SetupBobombItemDisplays(ref itemDisplayRuleSet); if (RegigigasCompat.enabled) { ItemDisplayRuleSet itemDisplayRuleSet2 = assets.First((ItemDisplayRuleSet idrs) => ((Object)idrs).name == "idrsKingBobomb2"); SetupKingBobombItemDisplays(ref itemDisplayRuleSet2); } }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(BuffDef[] assets) { //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) Buffs.BobombArmor = assets.First((BuffDef bd) => ((Object)bd).name == "bdBobombArmorBuff"); Buffs.BobombArmor.iconSprite = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/texBuffGenericShield.tif").WaitForCompletion(); contentPack.buffDefs.Add((BuffDef[])(object)new BuffDef[1] { Buffs.BobombArmor }); }); ArtifactCode bobombArtifactCode = null; yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(ArtifactCode[] assets) { bobombArtifactCode = assets.First((ArtifactCode code) => ((Object)code).name == "BobombOnDeathCode"); }); yield return LoadAllAssetsAsync(_assetsAssetBundle, progress, (Action)delegate(ArtifactDef[] assets) { BobombOnDeath = assets.First((ArtifactDef ad) => ad.cachedName == "BBF_BobombsOnDeath"); ArtifactCodeAPI.AddCode(BobombOnDeath, bobombArtifactCode); contentPack.artifactDefs.Add(assets); }); RegisterSounds(contentPack); contentPack.entityStateTypes.Add(new Type[6] { typeof(StarManState), typeof(BobombAcquireTargetState), typeof(BobombDeathState), typeof(BobombExplodeState), typeof(BobombSpawnState), typeof(BobombSuicideDeathState) }); AsyncOperationHandle bossDroplet = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/BossOrb.prefab"); while (!bossDroplet.IsDone) { yield return null; } ((MiscPickupDef)MiscPickups.Starman).dropletDisplayPrefab = bossDroplet.Result; ((MiscPickupDef)MiscPickups.Coin).dropletDisplayPrefab = bossDroplet.Result; Material val = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/Base/bazaar/matBazaarSeerWispgraveyard.mat").WaitForCompletion()); val.mainTexture = (Texture)(object)SM64BBFPreviewSprite.texture; SM64BBFScene.previewTexture = (Texture)(object)SM64BBFPreviewSprite.texture; SM64BBFScene.portalMaterial = val; SetupMusic(); ref SceneEntry[] sceneEntries = ref Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/sgStage5.asset").WaitForCompletion()._sceneEntries; SceneEntry val2 = new SceneEntry { sceneDef = SM64BBFScene }; ((SceneEntry)(ref val2)).weight = 1f; ArrayUtils.ArrayAppend(ref sceneEntries, ref val2); SM64BBFScene.destinationsGroup = Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/sgStage1.asset").WaitForCompletion(); ref SceneEntry[] sceneEntries2 = ref Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/loopSgStage5.asset").WaitForCompletion()._sceneEntries; val2 = new SceneEntry { sceneDef = SM64BBFScene }; ((SceneEntry)(ref val2)).weight = 1f; ArrayUtils.ArrayAppend(ref sceneEntries2, ref val2); SM64BBFScene.loopedDestinationsGroup = Addressables.LoadAssetAsync((object)"RoR2/Base/SceneGroups/loopSgStage1.asset").WaitForCompletion(); } private static void SetupBobombItemDisplays(ref ItemDisplayRuleSet itemDisplayRuleSet) { //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_0015: 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_002b: Expected O, but got Unknown //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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_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_010d: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012f: 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_0146: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_016a: 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_0180: 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_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: 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_01f5: 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_01fe: 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_0214: Expected O, but got Unknown //IL_021d: 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_0230: 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_0246: 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_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0299: 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_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_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030c: 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_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_035f: 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_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) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0385: 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_039b: Expected O, but got Unknown //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: 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_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: 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_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0410: 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_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Expected O, but got Unknown //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Expected O, but got Unknown //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Expected O, but got Unknown //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0528: 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_0543: 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_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Expected O, but got Unknown //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Expected O, but got Unknown //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: 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_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_060f: 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_061c: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_0636: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Expected O, but got Unknown //IL_0655: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Expected O, but got Unknown //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: 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_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06de: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: 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_0713: Expected O, but got Unknown //IL_071c: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Expected O, but got Unknown //IL_0762: 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_077d: 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_0798: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07ca: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Expected O, but got Unknown //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_07f6: Unknown result type (might be due to invalid IL or missing references) //IL_080c: Unknown result type (might be due to invalid IL or missing references) //IL_0811: Unknown result type (might be due to invalid IL or missing references) //IL_0827: Unknown result type (might be due to invalid IL or missing references) //IL_082c: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_0851: 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_085f: Unknown result type (might be due to invalid IL or missing references) //IL_0869: Expected O, but got Unknown //IL_0872: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Unknown result type (might be due to invalid IL or missing references) //IL_0885: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_089b: Expected O, but got Unknown //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08bd: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_08d8: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_08f3: 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_0910: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_091a: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_0930: Expected O, but got Unknown //IL_0939: 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_094c: Unknown result type (might be due to invalid IL or missing references) //IL_0958: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Expected O, but got Unknown //IL_097f: Unknown result type (might be due to invalid IL or missing references) //IL_0984: Unknown result type (might be due to invalid IL or missing references) //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_099f: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Unknown result type (might be due to invalid IL or missing references) //IL_09ba: 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_09c7: Unknown result type (might be due to invalid IL or missing references) //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09df: 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_09ed: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Expected O, but got Unknown DisplayRuleGroup displayRuleGroup = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteFire.DisplayEliteHorn_prefab), childName = "Head", localPos = new Vector3(-0.15365f, 0.21462f, -0.27426f), localAngles = new Vector3(354.7525f, 302.5303f, 7.12234f), localScale = new Vector3(0.44488f, 0.44488f, 0.44488f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteFire.DisplayEliteHorn_prefab), childName = "Head", localPos = new Vector3(-0.12521f, 0.3066f, 0.3031f), localAngles = new Vector3(354.7525f, 231.6184f, 351.6044f), localScale = new Vector3(-0.44f, 0.44f, 0.44f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups = ref itemDisplayRuleSet.keyAssetRuleGroups; KeyAssetRuleGroup val = new KeyAssetRuleGroup { keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteFire.EliteFireEquipment_asset), displayRuleGroup = displayRuleGroup }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups, ref val); DisplayRuleGroup displayRuleGroup2 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup2)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteHaunted.DisplayEliteStealthCrown_prefab), childName = "Head", localPos = new Vector3(-0.02002f, 0.36085f, 0.01142f), localAngles = new Vector3(84.62356f, 329.7962f, 243.3615f), localScale = new Vector3(0.20258f, 0.20258f, 0.20258f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups2 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup2, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteHaunted.EliteHauntedEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups2, ref val); DisplayRuleGroup displayRuleGroup3 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup3)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteIce.DisplayEliteIceCrown_prefab), childName = "Head", localPos = new Vector3(0.05636f, 0.20679f, 0.06288f), localAngles = new Vector3(283.3743f, 102.7717f, 166.9378f), localScale = new Vector3(0.13275f, 0.13275f, 0.13275f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups3 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup3, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteIce.EliteIceEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups3, ref val); DisplayRuleGroup displayRuleGroup4 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup4)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLightning.DisplayEliteRhinoHorn_prefab), childName = "Head", localPos = new Vector3(-0.47095f, 0.3003f, -0.02387f), localAngles = new Vector3(355.5493f, 269.5843f, 12.25919f), localScale = new Vector3(0.65886f, 0.65886f, 0.65886f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup4)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLightning.DisplayEliteRhinoHorn_prefab), childName = "Head", localPos = new Vector3(-0.41474f, 0.41538f, -0.02514f), localAngles = new Vector3(323.8193f, 261.7038f, 7.48606f), localScale = new Vector3(0.44488f, 0.44488f, 0.44488f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups4 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup4, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteLightning.EliteLightningEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups4, ref val); DisplayRuleGroup displayRuleGroup5 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup5)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLunar.DisplayEliteLunar__Fire_prefab), childName = "Head", localPos = new Vector3(0.64709f, -0.88823f, 0.02083f), localAngles = new Vector3(11.76858f, 84.12247f, 3.64591f), localScale = new Vector3(0.44488f, 0.44488f, 0.44488f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup5)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLunar.DisplayEliteLunar_Eye_prefab), childName = "Head", localPos = new Vector3(-0.05048f, -0.05632f, -0.00397f), localAngles = new Vector3(81.85596f, 299.8571f, 309.0397f), localScale = new Vector3(1.02235f, 1.02235f, 1.02235f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups5 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup5, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteLunar.EliteLunarEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups5, ref val); DisplayRuleGroup displayRuleGroup6 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup6)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_ElitePoison.DisplayEliteUrchinCrown_prefab), childName = "Head", localPos = new Vector3(0.05243f, 0.2016f, -0.02218f), localAngles = new Vector3(280.5813f, 114.8507f, 252.4087f), localScale = new Vector3(0.25238f, 0.25238f, 0.25238f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups6 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup6, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_ElitePoison.ElitePoisonEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups6, ref val); DisplayRuleGroup displayRuleGroup7 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup7)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC1_EliteEarth.DisplayEliteMendingAntlers_prefab), childName = "Head", localPos = new Vector3(-0.12323f, 0.22929f, 0.00569f), localAngles = new Vector3(13.38845f, 89.25855f, 356.7623f), localScale = new Vector3(2.60453f, 2.60453f, 2.60453f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups7 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup7, keyAssetAddress = new IDRSKeyAssetReference(RoR2_DLC1_EliteEarth.EliteEarthEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups7, ref val); DisplayRuleGroup displayRuleGroup8 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup8)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC1_EliteVoid.DisplayAffixVoid_prefab), childName = "Eyes", localPos = new Vector3(-0.01601f, 0.35024f, -0.22315f), localAngles = new Vector3(20.17711f, 258.0909f, 2.55114f), localScale = new Vector3(0.36462f, 0.36462f, 0.36462f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup8)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC1_EliteVoid.DisplayAffixVoid_prefab), childName = "Eyes", localPos = new Vector3(-0.1112f, 0.35393f, 0.20253f), localAngles = new Vector3(20.17711f, 258.0909f, 2.55114f), localScale = new Vector3(0.36462f, 0.36462f, 0.36462f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups8 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup8, keyAssetAddress = new IDRSKeyAssetReference(RoR2_DLC1_EliteVoid.EliteVoidEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups8, ref val); DisplayRuleGroup displayRuleGroup9 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup9)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC2_Elites_EliteBead.DisplayEliteBeadSpike_prefab), childName = "Head", localPos = new Vector3(0f, 0f, 0f), localAngles = new Vector3(351.8527f, 1.20328f, 359.7321f), localScale = new Vector3(0.10228f, 0.10228f, 0.10228f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups9 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup9, keyAssetAddress = new IDRSKeyAssetReference(RoR2_DLC2_Elites_EliteBead.DisplayEliteBeadEquipment_prefab) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups9, ref val); DisplayRuleGroup displayRuleGroup10 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup10)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC2_Elites_EliteAurelionite.DisplayEliteAurelioniteEquipment_prefab), childName = "Head", localPos = new Vector3(-0.70343f, 0.297f, -0.0293f), localAngles = new Vector3(0f, 265.192f, 4f), localScale = new Vector3(1f, 1f, 1f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups10 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup10, keyAssetAddress = new IDRSKeyAssetReference(RoR2_DLC2_Elites_EliteAurelionite.EliteAurelioniteEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups10, ref val); } private static void SetupKingBobombItemDisplays(ref ItemDisplayRuleSet itemDisplayRuleSet) { //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_0015: 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_002b: Expected O, but got Unknown //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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_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_010d: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012f: 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_0146: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_016a: 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_0180: 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_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: 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_01f5: 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_01fe: 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_0214: Expected O, but got Unknown //IL_021d: 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_0230: 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_0246: 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_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0299: 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_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_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030c: 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_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_035f: 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_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) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0385: 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_039b: Expected O, but got Unknown //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: 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_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: 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_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_040b: 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_0420: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Expected O, but got Unknown //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Expected O, but got Unknown //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0511: 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_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0529: 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_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Expected O, but got Unknown //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_059b: 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_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Expected O, but got Unknown //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_060f: 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_062a: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_0654: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Expected O, but got Unknown //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_067e: 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_0693: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Expected O, but got Unknown //IL_06ba: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06d5: Unknown result type (might be due to invalid IL or missing references) //IL_06da: 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_06f5: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_070d: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Expected O, but got Unknown //IL_0749: 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_0764: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: 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_0791: 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_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07b7: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Expected O, but got Unknown //IL_07ca: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07e9: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Expected O, but got Unknown //IL_0810: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_082b: Unknown result type (might be due to invalid IL or missing references) //IL_0830: Unknown result type (might be due to invalid IL or missing references) //IL_0846: Unknown result type (might be due to invalid IL or missing references) //IL_084b: 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_0858: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_0870: 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_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Expected O, but got Unknown //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_089b: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08b0: Unknown result type (might be due to invalid IL or missing references) //IL_08ba: Expected O, but got Unknown //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_091a: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_092f: Unknown result type (might be due to invalid IL or missing references) //IL_0937: Unknown result type (might be due to invalid IL or missing references) //IL_0939: Unknown result type (might be due to invalid IL or missing references) //IL_0945: Unknown result type (might be due to invalid IL or missing references) //IL_094f: Expected O, but got Unknown //IL_0958: 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_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0977: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Expected O, but got Unknown //IL_099e: Unknown result type (might be due to invalid IL or missing references) //IL_09a3: 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_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d9: 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_09e6: 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_09fe: 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_0a0c: Unknown result type (might be due to invalid IL or missing references) //IL_0a16: Expected O, but got Unknown //IL_0a1f: Unknown result type (might be due to invalid IL or missing references) //IL_0a29: Unknown result type (might be due to invalid IL or missing references) //IL_0a32: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Unknown result type (might be due to invalid IL or missing references) //IL_0a48: Expected O, but got Unknown //IL_0a65: Unknown result type (might be due to invalid IL or missing references) //IL_0a6a: Unknown result type (might be due to invalid IL or missing references) //IL_0a80: Unknown result type (might be due to invalid IL or missing references) //IL_0a85: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: 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) //IL_0abd: Unknown result type (might be due to invalid IL or missing references) //IL_0ac5: Unknown result type (might be due to invalid IL or missing references) //IL_0ac7: 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_0ae6: Unknown result type (might be due to invalid IL or missing references) //IL_0af0: Unknown result type (might be due to invalid IL or missing references) //IL_0af9: Unknown result type (might be due to invalid IL or missing references) //IL_0b05: Unknown result type (might be due to invalid IL or missing references) //IL_0b0f: Expected O, but got Unknown //IL_0b2c: Unknown result type (might be due to invalid IL or missing references) //IL_0b31: Unknown result type (might be due to invalid IL or missing references) //IL_0b47: Unknown result type (might be due to invalid IL or missing references) //IL_0b4c: Unknown result type (might be due to invalid IL or missing references) //IL_0b62: Unknown result type (might be due to invalid IL or missing references) //IL_0b67: 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_0b84: Unknown result type (might be due to invalid IL or missing references) //IL_0b8c: Unknown result type (might be due to invalid IL or missing references) //IL_0b8e: Unknown result type (might be due to invalid IL or missing references) //IL_0b9a: Unknown result type (might be due to invalid IL or missing references) //IL_0ba4: Expected O, but got Unknown DisplayRuleGroup displayRuleGroup = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteFire.DisplayEliteHorn_prefab), childName = "Chest", localPos = new Vector3(0.59218f, 1.54394f, -0.05067f), localAngles = new Vector3(0f, 339.9597f, 0f), localScale = new Vector3(0.44488f, 0.44488f, 0.44488f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteFire.DisplayEliteHorn_prefab), childName = "Chest", localPos = new Vector3(-0.71898f, 1.56142f, -0.13889f), localAngles = new Vector3(0f, 21.92726f, 0f), localScale = new Vector3(-0.44f, 0.44f, 0.44f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups = ref itemDisplayRuleSet.keyAssetRuleGroups; KeyAssetRuleGroup val = new KeyAssetRuleGroup { keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteFire.EliteFireEquipment_asset), displayRuleGroup = displayRuleGroup }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups, ref val); DisplayRuleGroup displayRuleGroup2 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup2)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteHaunted.DisplayEliteStealthCrown_prefab), childName = "Chest", localPos = new Vector3(-1E-05f, 1.59462f, -0.12945f), localAngles = new Vector3(280.6838f, 180f, 180f), localScale = new Vector3(0.3943f, 0.3943f, 0.3943f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups2 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup2, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteHaunted.EliteHauntedEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups2, ref val); DisplayRuleGroup displayRuleGroup3 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup3)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteIce.DisplayEliteIceCrown_prefab), childName = "Chest", localPos = new Vector3(0f, 1.62464f, -0.2518f), localAngles = new Vector3(278.8098f, 180f, 180f), localScale = new Vector3(0.20986f, 0.20986f, 0.20986f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups3 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup3, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteIce.EliteIceEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups3, ref val); DisplayRuleGroup displayRuleGroup4 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup4)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLightning.DisplayEliteRhinoHorn_prefab), childName = "Chest", localPos = new Vector3(-1E-05f, 1.92614f, 0.98929f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.65886f, 0.65886f, 0.65886f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup4)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLightning.DisplayEliteRhinoHorn_prefab), childName = "Chest", localPos = new Vector3(0.8654f, 1.92616f, 0.56131f), localAngles = new Vector3(0f, 55.35863f, 0f), localScale = new Vector3(0.65886f, 0.65886f, 0.65886f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup4)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLightning.DisplayEliteRhinoHorn_prefab), childName = "Chest", localPos = new Vector3(0.93271f, 1.92613f, -0.572f), localAngles = new Vector3(0f, 120.2551f, 0f), localScale = new Vector3(0.65886f, 0.65886f, 0.65886f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup4)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLightning.DisplayEliteRhinoHorn_prefab), childName = "Chest", localPos = new Vector3(-0.02104f, 1.9261f, -1.07331f), localAngles = new Vector3(0f, 173.6604f, 0f), localScale = new Vector3(0.65886f, 0.65886f, 0.65886f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup4)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLightning.DisplayEliteRhinoHorn_prefab), childName = "Chest", localPos = new Vector3(-0.91867f, 1.92607f, -0.55149f), localAngles = new Vector3(0f, 239.4073f, 0f), localScale = new Vector3(0.65886f, 0.65886f, 0.65886f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup4)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLightning.DisplayEliteRhinoHorn_prefab), childName = "Chest", localPos = new Vector3(-0.94588f, 1.92609f, 0.53167f), localAngles = new Vector3(0f, 295.5718f, 0f), localScale = new Vector3(0.65886f, 0.65886f, 0.65886f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups4 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup4, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteLightning.EliteLightningEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups4, ref val); DisplayRuleGroup displayRuleGroup5 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup5)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLunar.DisplayEliteLunar__Fire_prefab), childName = "Chest", localPos = new Vector3(0f, -1E-05f, -1.46488f), localAngles = new Vector3(-1E-05f, 180f, 180f), localScale = new Vector3(0.44488f, 0.44488f, 0.7475f), limbMask = (LimbFlags)0 }); ((DisplayRuleGroup)(ref displayRuleGroup5)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_EliteLunar.DisplayEliteLunar_Eye_prefab), childName = "Chest", localPos = new Vector3(-0.06016f, 1.72845f, 1E-05f), localAngles = new Vector3(270f, 0f, 0f), localScale = new Vector3(1.77583f, 1.77583f, 1.77583f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups5 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup5, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_EliteLunar.EliteLunarEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups5, ref val); DisplayRuleGroup displayRuleGroup6 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup6)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_Base_ElitePoison.DisplayEliteUrchinCrown_prefab), childName = "Chest", localPos = new Vector3(0f, 1.82306f, 0f), localAngles = new Vector3(270f, 0f, 0f), localScale = new Vector3(0.34402f, 0.34402f, 0.34402f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups6 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup6, keyAssetAddress = new IDRSKeyAssetReference(RoR2_Base_ElitePoison.ElitePoisonEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups6, ref val); DisplayRuleGroup displayRuleGroup7 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup7)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC1_EliteEarth.DisplayEliteMendingAntlers_prefab), childName = "Chest", localPos = new Vector3(-0.00012f, 1.66408f, -0.25776f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(4.68954f, 4.68954f, 4.68954f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups7 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup7, keyAssetAddress = new IDRSKeyAssetReference(RoR2_DLC1_EliteEarth.EliteEarthEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups7, ref val); DisplayRuleGroup displayRuleGroup8 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup8)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC1_EliteVoid.DisplayAffixVoid_prefab), childName = "Chest", localPos = new Vector3(0f, -0.83569f, 1.7186f), localAngles = new Vector3(90f, 0f, 0f), localScale = new Vector3(0.36462f, 0.36462f, 0.36462f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups8 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup8, keyAssetAddress = new IDRSKeyAssetReference(RoR2_DLC1_EliteVoid.EliteVoidEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups8, ref val); DisplayRuleGroup displayRuleGroup9 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup9)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC2_Elites_EliteBead.DisplayEliteBeadSpike_prefab), childName = "Chest", localPos = new Vector3(-0.00333f, 1.08781f, -0.20362f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.20273f, 0.13253f, 0.20273f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups9 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup9, keyAssetAddress = new IDRSKeyAssetReference(RoR2_DLC2_Elites_EliteBead.DisplayEliteBeadEquipment_prefab) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups9, ref val); DisplayRuleGroup displayRuleGroup10 = default(DisplayRuleGroup); ((DisplayRuleGroup)(ref displayRuleGroup10)).AddDisplayRule(new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefabAddress = new AssetReferenceGameObject(RoR2_DLC2_Elites_EliteAurelionite.DisplayEliteAurelioniteEquipment_prefab), childName = "Chest", localPos = new Vector3(0.04781f, 1.64264f, 1.12044f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(1.65698f, 1.65698f, 1.65698f), limbMask = (LimbFlags)0 }); ref KeyAssetRuleGroup[] keyAssetRuleGroups10 = ref itemDisplayRuleSet.keyAssetRuleGroups; val = new KeyAssetRuleGroup { displayRuleGroup = displayRuleGroup10, keyAssetAddress = new IDRSKeyAssetReference(RoR2_DLC2_Elites_EliteAurelionite.EliteAurelioniteEquipment_asset) }; ArrayUtils.ArrayAppend(ref keyAssetRuleGroups10, ref val); } private static IEnumerator LoadAllAssetsAsync(AssetBundle assetBundle, IProgress progress, Action onAssetsLoaded) where T : Object { AssetBundleRequest sceneDefsRequest = assetBundle.LoadAllAssetsAsync(); while (!((AsyncOperation)sceneDefsRequest).isDone) { progress.Report(((AsyncOperation)sceneDefsRequest).progress); yield return null; } onAssetsLoaded(sceneDefsRequest.allAssets.Cast().ToArray()); } private static void SetupMusic() { //IL_001e: 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_004a: 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_009d: 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_00ca: 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) CustomMusicTrackDef val = ScriptableObject.CreateInstance(); ((MusicTrackDef)val).cachedName = "SM64BBFCustomMainMusic"; val.CustomStates = new List(); CustomState item = default(CustomState); item.GroupId = 3906687288u; item.StateId = 693170834u; val.CustomStates.Add(item); CustomState item2 = default(CustomState); item2.GroupId = 792781730u; item2.StateId = 89505537u; val.CustomStates.Add(item2); SM64BBFScene.mainTrack = (MusicTrackDef)(object)val; CustomMusicTrackDef val2 = ScriptableObject.CreateInstance(); ((MusicTrackDef)val2).cachedName = "SM64BBFCustomBossMusic"; val2.CustomStates = new List(); CustomState item3 = default(CustomState); item3.GroupId = 3906687288u; item3.StateId = 1312500510u; val2.CustomStates.Add(item3); CustomState item4 = default(CustomState); item4.GroupId = 792781730u; item4.StateId = 580146960u; val2.CustomStates.Add(item4); SM64BBFScene.bossTrack = (MusicTrackDef)(object)val2; } private static void RegisterSounds(ContentPack contentPack) { contentPack.networkSoundEventDefs.Add((NetworkSoundEventDef[])(object)new NetworkSoundEventDef[6] { RegisterNetworkSound("SM64_BBF_Play_Coin"), RegisterNetworkSound("SM64_BBF_Play_Star"), RegisterNetworkSound("SM64_BBF_solonggaybowser"), RegisterNetworkSound("SM64_BBF_Play_OneUp"), RegisterNetworkSound("SM64_BBF_Play_Shake_Tree"), RegisterNetworkSound("SM64_BBF_ThankYou") }); } private static void RegisterBobombToStages() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_0049: Expected O, but got Unknown //IL_0049: 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_0051: Expected O, but got Unknown DirectorCardHolder directorCard = new DirectorCardHolder { Card = new DirectorCard { spawnCard = (SpawnCard)(object)CharacterSpawnCards.cscBobomb, selectionWeight = Config.BobombSpawning.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Config.BobombSpawning.MinimumStageCount.Value }, MonsterCategory = (MonsterCategory)2 }; AddMonsterToStages(Config.BobombSpawning.BobombSpawnStages.Value, directorCard); } public static void AddMonsterToStages(string stageList, DirectorCardHolder directorCard) { //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_002f: Unknown result type (might be due to invalid IL or missing references) string[] array = stageList.Split(","); foreach (string text in array) { Stage val = DirectorAPI.ParseInternalStageName(string.Join("", text.Split((string[]?)null, StringSplitOptions.RemoveEmptyEntries))); Helpers.AddNewMonsterToStage(directorCard, false, val, text); } } public static NetworkSoundEventDef RegisterNetworkSound(string eventName) { NetworkSoundEventDef obj = ScriptableObject.CreateInstance(); obj.eventName = eventName; return obj; } internal static void LoadSoundBanks(string soundbanksFolderPath) { //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_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Invalid comparison between Unknown and I4 //IL_002d: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Invalid comparison between Unknown and I4 //IL_0069: 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) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Invalid comparison between Unknown and I4 //IL_00a5: 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_00c6: 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_00c9: Invalid comparison between Unknown and I4 //IL_00e0: Unknown result type (might be due to invalid IL or missing references) AKRESULT val = AkSoundEngine.AddBasePath(soundbanksFolderPath); if ((int)val == 1) { Log.Info("Added bank base path : " + soundbanksFolderPath); } else { Log.Error("Error adding base path : " + soundbanksFolderPath + " " + $"Error code : {val}"); } uint num = default(uint); val = AkSoundEngine.LoadBank("SM64BBFInit.bnk", ref num); if ((int)val == 1) { Log.Info("Added bank : SM64BBFInit.bnk"); } else { Log.Error("Error loading bank : SM64BBFInit.bnk " + $"Error code : {val}"); } val = AkSoundEngine.LoadBank("SM64BBFMusic.bnk", ref num); if ((int)val == 1) { Log.Info("Added bank : SM64BBFMusic.bnk"); } else { Log.Error("Error loading bank : SM64BBFMusic.bnk " + $"Error code : {val}"); } val = AkSoundEngine.LoadBank("SM64BBFSounds.bnk", ref num); if ((int)val == 1) { Log.Info("Added bank : SM64BBFSounds.bnk"); } else { Log.Error("Error loading bank : SM64BBFSounds.bnk " + $"Error code : {val}"); } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Viliger.SM64BBF", "SM64BBF", "1.2.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class SM64BBFPlugin : BaseUnityPlugin { public const string Version = "1.2.1"; public const string GUID = "com.Viliger.SM64BBF"; public static SM64BBFPlugin instance; public static bool isLoaded; private void Awake() { instance = this; Log.Init(((BaseUnityPlugin)this).Logger); Config.PopulateConfig(((BaseUnityPlugin)this).Config); RegisterHooks(); if (!RegigigasCompat.enabled) { Helpers.RemoveExistingMonster("cscKingBobomb2"); } isLoaded = true; } private void RegisterHooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown MusicController.StartIntroMusic += new hook_StartIntroMusic(MusicController_StartIntroMusic); GenericPickupController.HandlePickupMessage += new Manipulator(StarmanPickupDef.GenericPickupController_HandlePickupMessage); ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(GiveToRoR2OurContentPackProviders); Language.collectLanguageRootFolders += CollectLanguageRootFolders; CharacterBody.onBodyInventoryChangedGlobal += CharacterBody_onBodyInventoryChangedGlobal; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CharacterMaster.TryReviveOnBodyDeath += new hook_TryReviveOnBodyDeath(MarioOneUpItemBehavior.CharacterMaster_TryReviveOnBodyDeath); } private void CharacterBody_onBodyInventoryChangedGlobal(CharacterBody body) { MarioOneUpItemBehavior.CharacterBody_onBodyInventoryChangedGlobal(body); if (NetworkServer.active && Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { body.AddItemBehavior(body.inventory.GetItemCountEffective(SM64BBFContent.Items.RoyalCrown)); } } private void MusicController_StartIntroMusic(orig_StartIntroMusic orig, MusicController self) { orig.Invoke(self); AkSoundEngine.PostEvent("SM64_BBF_Play_Music_System", ((Component)self).gameObject); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(SM64BBFContent.Buffs.BobombArmor)) { args.armorAdd += 100f; } } private void Destroy() { Language.collectLanguageRootFolders -= CollectLanguageRootFolders; } private void GiveToRoR2OurContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new ContentProvider()); } public void CollectLanguageRootFolders(List folders) { folders.Add(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Language")); } public static bool RegisterNetworkSound(string eventName) { NetworkSoundEventDef obj = ScriptableObject.CreateInstance(); obj.eventName = eventName; return ContentAddition.AddNetworkSoundEventDef(obj); } } } namespace SM64BBF.Stuff { public class ClonedBillboard : MonoBehaviour { private static List instanceTransformsList; static ClonedBillboard() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown instanceTransformsList = new List(); SceneCamera.onSceneCameraPreCull += new SceneCameraDelegate(OnSceneCameraPreCull); } private static void OnSceneCameraPreCull(SceneCamera sceneCamera) { //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_0025: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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) Quaternion rotation = ((Component)sceneCamera).transform.rotation; for (int i = 0; i < instanceTransformsList.Count; i++) { float num = ((rotation.w < 0f) ? (0f - rotation.y) : rotation.y); instanceTransformsList[i].rotation = new Quaternion(instanceTransformsList[i].rotation.x, num, instanceTransformsList[i].rotation.z, instanceTransformsList[i].rotation.w); } } private void OnEnable() { instanceTransformsList.Add(((Component)this).transform); } private void OnDisable() { instanceTransformsList.Remove(((Component)this).transform); } } public class DrawLinesBetweenChildren : MonoBehaviour { private void OnDrawGizmos() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) Transform val = null; foreach (Transform item in ((Component)this).transform) { Transform val2 = item; if (!((Object)(object)((Component)this).transform == (Object)(object)val2)) { if ((Object)(object)val != (Object)null) { Gizmos.color = Color.blue; Gizmos.DrawLine(val.position, val2.position); } val = val2; } } } } public class ShadowCaster : MonoBehaviour { public GameObject shadow; public LayerMask mask; public float floorMargin; public bool alignWithNormal; private Renderer shadowRenderer; private void Start() { shadowRenderer = shadow.GetComponent(); RenderShadow(); } private void RenderShadow() { //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_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_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_0073: 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_00a3: 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_00e2: 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_00cc: 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) RaycastHit val = default(RaycastHit); if (Physics.Raycast(((Component)this).transform.position, -Vector3.up, ref val, 100f, ((LayerMask)(ref mask)).value)) { shadow.transform.position = ((RaycastHit)(ref val)).point + Vector3.up * floorMargin; shadow.transform.position = new Vector3(shadow.transform.position.x, shadow.transform.position.y + 0.2f, shadow.transform.position.z); if (alignWithNormal) { ((Component)this).transform.rotation = Quaternion.FromToRotation(Vector3.up, ((RaycastHit)(ref val)).normal); } else { ((Component)this).transform.rotation = Quaternion.identity; } } } } } namespace SM64BBF.States { public class BobombAcquireTargetState : BaseState { public static float baseDuration = 1f; private static float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "EmoteSurprise", "Surprise.playbackRate", duration, 0f); Util.PlayAttackSpeedSound("SM64_BBF_Play_Bobomb_Aggro", ((EntityState)this).gameObject, base.attackSpeedStat); SetStateOnHurt component = ((EntityState)this).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.canBeStunned = false; component.canBeHitStunned = false; component.canBeFrozen = false; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new BobombExplodeState()); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(SM64BBFContent.Buffs.BobombArmor); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class BobombDeathState : GenericCharacterDeath { public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); Util.PlaySound("SM64_BBF_Stop_Bobomb_Fuse", ((EntityState)this).gameObject); } } public class BobombExplodeState : GenericCharacterMain { public int duration = 5; public static AnimationCurve animCurve = null; public static AnimationCurve sizeCurve = null; private static GameObject smokeEmitter = ((Component)Addressables.LoadAssetAsync((object)"RoR2/DLC1/snowyforest/SF_Firepit.prefab").WaitForCompletion().transform.Find("SFFire/HeatGas")).gameObject; private static GameObject explosionEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/OmniExplosionVFXCommandoGrenade.prefab").WaitForCompletion(); private static Material overlayMaterial = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/matFlashWhite.mat").WaitForCompletion(); public GameObject smoke; public TemporaryOverlayInstance temporaryOverlay; public ObjectScaleCurve scale; public override void OnEnter() { //IL_013c: 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_0155: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnEnter(); if (animCurve == null) { animCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); animCurve.postWrapMode = (WrapMode)4; animCurve.preWrapMode = (WrapMode)4; } if (sizeCurve == null) { sizeCurve = AnimationCurve.Linear(0f, 1f, 1f, 1.25f); sizeCurve.postWrapMode = (WrapMode)8; sizeCurve.preWrapMode = (WrapMode)8; } Transform modelTransform = ((EntityState)this).GetModelTransform(); CharacterModel val = ((modelTransform != null) ? ((Component)modelTransform).GetComponent() : null); if (Object.op_Implicit((Object)(object)val)) { temporaryOverlay = TemporaryOverlayManager.AddOverlay(((EntityState)this).gameObject); temporaryOverlay.duration = 0.2f; temporaryOverlay.alphaCurve = animCurve; temporaryOverlay.animateShaderAlpha = true; temporaryOverlay.originalMaterial = overlayMaterial; temporaryOverlay.AddToCharacterModel(val); } ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val2 = ((modelChildLocator != null) ? modelChildLocator.FindChild("Head") : null); smoke = Object.Instantiate(smokeEmitter, val2 ?? ((EntityState)this).characterBody.coreTransform); MainModule main = smoke.GetComponent().main; ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; smoke.transform.localPosition = Vector3.zero; } Util.PlaySound("SM64_BBF_Play_Bobomb_Fuse", ((EntityState)this).gameObject); } public override void FixedUpdate() { //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_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_00d2: 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: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0130: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0162: Expected O, but got Unknown ((GenericCharacterMain)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterBody.inputBank.moveVector = ((EntityState)this).characterDirection.forward; if ((float)duration - ((EntityState)this).fixedAge <= 1f && !Object.op_Implicit((Object)(object)scale)) { Transform modelTransform = ((EntityState)this).GetModelTransform(); scale = ((modelTransform != null) ? ((Component)modelTransform).gameObject.AddComponent() : null); if (Object.op_Implicit((Object)(object)scale)) { scale.overallCurve = sizeCurve; scale.useOverallCurveOnly = true; scale.timeMax = 1f; } } if (((EntityState)this).fixedAge >= (float)duration && ((EntityState)this).isAuthority) { new BlastAttack { radius = 15f, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = ((BaseState)this).RollCrit(), baseDamage = ((BaseState)this).damageStat * 5f, falloffModel = (FalloffModel)0, procCoefficient = 1f, position = ((EntityState)this).characterBody.corePosition }.Fire(); EffectManager.SpawnEffect(explosionEffect, new EffectData { origin = ((EntityState)this).characterBody.corePosition, scale = 5f }, true); ((EntityState)this).outer.SetNextState((EntityState)(object)new BobombSuicideDeathState()); } } public override void OnExit() { if (temporaryOverlay != null) { temporaryOverlay.destroyComponentOnEnd = true; temporaryOverlay.Destroy(); temporaryOverlay = null; } if (Object.op_Implicit((Object)(object)scale)) { scale.Reset(); Object.Destroy((Object)(object)scale); } Object.Destroy((Object)(object)smoke); ((GenericCharacterMain)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class BobombSpawnState : GenericCharacterSpawnState { public static GameObject spawnEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2SmokeBomb.prefab").WaitForCompletion(); public override void OnEnter() { ((GenericCharacterSpawnState)this).OnEnter(); if (Object.op_Implicit((Object)(object)spawnEffect)) { EffectManager.SimpleMuzzleFlash(spawnEffect, ((EntityState)this).gameObject, "Chest", true); } } } public class BobombSuicideDeathState : GenericCharacterDeath { public override void OnEnter() { //IL_0028: 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) ((GenericCharacterDeath)this).OnEnter(); Util.PlaySound("SM64_BBF_Stop_Bobomb_Fuse", ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } ((GenericCharacterDeath)this).DestroyModel(); if (NetworkServer.active) { ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } } public class StarManState : GenericCharacterMain { public int duration = 20; public static AnimationCurve animCurve; public static GameObject starmanKillsEffect; private TemporaryOverlayInstance temporaryOverlay; private BlastAttack blastAttack; private bool stopped; private AsyncOperationHandle operationHandle; public override void OnEnter() { //IL_0082: 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) ((GenericCharacterMain)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.Immune, (float)duration); } Util.PlaySound("SM64_BBF_Play_StarmanComes", ((EntityState)this).gameObject); if (animCurve == null) { animCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); animCurve.postWrapMode = (WrapMode)4; animCurve.preWrapMode = (WrapMode)4; } blastAttack = CreateBlastAttack(); operationHandle = Addressables.LoadAssetAsync((object)RoR2_Base_Common.matFlashWhite_mat); if (!operationHandle.IsValid()) { return; } operationHandle.Completed += delegate(AsyncOperationHandle operationResult) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_007b: Unknown result type (might be due to invalid IL or missing references) if ((int)operationResult.Status == 1) { Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { temporaryOverlay = TemporaryOverlayManager.AddOverlay(((EntityState)this).gameObject); temporaryOverlay.duration = 0.2f; temporaryOverlay.alphaCurve = animCurve; temporaryOverlay.animateShaderAlpha = true; temporaryOverlay.originalMaterial = operationResult.Result; temporaryOverlay.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } else { Addressables.Release(operationHandle); } }; } public override void FixedUpdate() { //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_0032: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).isAuthority && blastAttack != null) { blastAttack.position = ((EntityState)this).transform.position; blastAttack.Fire(); } if (((EntityState)this).fixedAge > (float)duration * 0.75f && !stopped && temporaryOverlay != null) { temporaryOverlay.duration = 0.6f; Util.PlaySound("SM64_BBF_Stop_StarmanComes", ((EntityState)this).gameObject); stopped = true; } if (((EntityState)this).fixedAge > (float)duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private BlastAttack CreateBlastAttack() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //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_0075: 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_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_0090: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) BlastAttack val = new BlastAttack(); val.radius = ((EntityState)this).characterBody.bestFitActualRadius * 2f; val.procCoefficient = 0f; val.attacker = ((EntityState)this).gameObject; val.inflictor = ((EntityState)this).gameObject; val.baseForce = 0f; val.bonusForce = Vector3.zero; val.baseDamage = 999999f; val.canRejectForce = false; val.crit = false; val.procChainMask = default(ProcChainMask); val.damageColorIndex = (DamageColorIndex)5; val.damageType = DamageTypeCombo.op_Implicit((DamageType)0); val.attackerFiltering = (AttackerFiltering)2; if (Config.StarmanKillsAllies.Value) { val.teamIndex = (TeamIndex)0; } else { val.teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; } val.impactEffect = EffectCatalog.FindEffectIndexFromPrefab(starmanKillsEffect); return val; } public override void OnExit() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnExit(); Util.PlaySound("SM64_BBF_Stop_StarmanComes", ((EntityState)this).gameObject); if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.Immune)) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Immune); } if (temporaryOverlay != null) { temporaryOverlay.destroyComponentOnEnd = true; temporaryOverlay.Destroy(); temporaryOverlay = null; } if (operationHandle.IsValid()) { Addressables.Release(operationHandle); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } } namespace SM64BBF.PickUpDefs { [CreateAssetMenu(menuName = "SM64BBF/MiscPickupDefs/CoinPickupDef")] public class CoinPickupDef : MiscPickupDef { private static float healValue = 0.125f; private static int moneyReward = 25; public override void GrantPickup(ref GrantContext context) { //IL_0012: 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) context.body.healthComponent.HealFraction(healValue, default(ProcChainMask)); context.body.master.GiveMoney((uint)Run.instance.GetDifficultyScaledCost(moneyReward)); context.shouldDestroy = true; context.shouldNotify = false; } public override string GetInternalName() { return "MiscPickupIndex.Coin"; } } [CreateAssetMenu(menuName = "SM64BBF/MiscPickupDefs/StarmanPickupDef")] public class StarmanPickupDef : MiscPickupDef { public override void GrantPickup(ref GrantContext context) { context.shouldDestroy = true; context.shouldNotify = true; } public override string GetInternalName() { return "MistPickupIndex.Starman"; } public static void GenericPickupController_HandlePickupMessage(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_00c1: 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) ILCursor val = new ILCursor(il); string text = default(string); int num = default(int); MethodReference val3 = default(MethodReference); MethodReference val2 = default(MethodReference); if (val.TryGotoNext((MoveType)2, new Func[5] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, ref text), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, ref val3), (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val2), (Instruction x) => ILPatternMatchingExt.MatchPop(x) })) { val.Emit(OpCodes.Ldloc, 2); val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate>((Action)DoTheThingWithTheThing); } else { Log.Error("GenericPickupController_HandlePickupMessage ILHook failed"); } } private static void DoTheThingWithTheThing(PickupIndex pickupIndex, GameObject masterGameObject) { //IL_0000: 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) if (pickupIndex != PickupCatalog.FindPickupIndex(((MiscPickupDef)SM64BBFContent.MiscPickups.Starman).miscPickupIndex) || !Util.HasEffectiveAuthority(masterGameObject)) { return; } CharacterMaster component = masterGameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } GameObject bodyObject = component.GetBodyObject(); if (Object.op_Implicit((Object)(object)bodyObject)) { EntityStateMachine obj = EntityStateMachine.FindByCustomName(bodyObject, "Body"); if (obj != null) { obj.SetState(EntityStateCatalog.InstantiateState(typeof(StarManState))); } } } } } namespace SM64BBF.Items { public class MarioOneUpItemBehavior : MonoBehaviour { public CharacterMaster master; private void Awake() { if (NetworkServer.active) { Stage.onServerStageBegin += Stage_onServerStageBegin; } } public void OnDestroy() { if (NetworkServer.active) { Stage.onServerStageBegin -= Stage_onServerStageBegin; } } private void Stage_onServerStageBegin(Stage obj) { if (Object.op_Implicit((Object)(object)master)) { while (master.inventory.GetItemCountPermanent(SM64BBFContent.Items.MarioOneUp) > 0) { master.inventory.RemoveItemPermanent(SM64BBFContent.Items.MarioOneUp, 1); } } } public static bool CharacterMaster_TryReviveOnBodyDeath(orig_TryReviveOnBodyDeath orig, CharacterMaster self, CharacterBody body) { //IL_0002: 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_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_0047: 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_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_0063: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) ItemTransformation val = default(ItemTransformation); ((ItemTransformation)(ref val)).originalItemIndex = SM64BBFContent.Items.MarioOneUp.itemIndex; ((ItemTransformation)(ref val)).newItemIndex = (ItemIndex)(-1); val.transformationType = (ItemTransformationTypeIndex)0; TakeResult pendingTransformation = default(TakeResult); if (((ItemTransformation)(ref val)).TryTake(self.inventory, ref pendingTransformation)) { ExtraLifeServerBehavior obj = ((Component)self).gameObject.AddComponent(); obj.pendingTransformation = pendingTransformation; obj.completionTime = FixedTimeStamp.now + 2f; obj.consumedItemIndex = (ItemIndex)(-1); obj.completionCallback = self.RespawnExtraLife; obj.soundTime = obj.completionTime - 1f; obj.soundCallback = self.PlayExtraLifeSFX; return true; } return orig.Invoke(self, body); } public static void CharacterBody_onBodyInventoryChangedGlobal(CharacterBody body) { if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory) && Object.op_Implicit((Object)(object)body.master)) { int itemCountPermanent = body.inventory.GetItemCountPermanent(SM64BBFContent.Items.MarioOneUp); MarioOneUpItemBehavior component = ((Component)body.master).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)component) && itemCountPermanent > 0) { ((Component)body.master).gameObject.AddComponent().master = body.master; } else if (itemCountPermanent == 0 && Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } } } public class RoyalCrownItemBehavior : ItemBehavior, IOnKilledOtherServerReceiver { public void OnKilledOtherServer(DamageReport damageReport) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_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_0080: 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_0094: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)damageReport.victimBody) || !Object.op_Implicit((Object)(object)damageReport.victimMaster) || !Object.op_Implicit((Object)(object)damageReport.victimMaster.inventory) || !damageReport.victimIsElite) { return; } DirectorSpawnRequest val = new DirectorSpawnRequest((SpawnCard)(object)SM64BBFContent.CharacterSpawnCards.cscBobomb, new DirectorPlacementRule { placementMode = (PlacementMode)3, position = damageReport.victimBody.transform.position }, RoR2Application.rng); val.summonerBodyObject = ((Component)this).gameObject; val.ignoreTeamMemberLimit = true; val.onSpawnedServer = delegate(SpawnResult spawnResult) { //IL_0000: 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_001b: 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_019e: 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_00a8: 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_00c9: 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) if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance)) { CharacterMaster component = spawnResult.spawnedInstance.GetComponent(); AIOwnership component2 = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.ownerMaster = base.body.master; } EliteDef val2 = null; component.inventory.CopyEquipmentFrom(damageReport.victimMaster.inventory, false); float num = 0f; float num2 = 0f; Inventory inventory = damageReport.victimMaster.inventory; for (uint num3 = 0u; num3 < inventory.GetEquipmentSlotCount(); num3++) { for (uint num4 = 0u; num4 < inventory.GetEquipmentSetCount(num3); num4++) { EquipmentState equipment = inventory.GetEquipment(num3, num4); if (Object.op_Implicit((Object)(object)equipment.equipmentDef) && Object.op_Implicit((Object)(object)equipment.equipmentDef.passiveBuffDef) && equipment.equipmentDef.passiveBuffDef.isElite) { val2 = equipment.equipmentDef.passiveBuffDef.eliteDef; num += val2.healthBoostCoefficient; num2 += val2.damageBoostCoefficient; } } } float num5 = num; float num6 = num2 + (float)(base.body.inventory.GetItemCountEffective(SM64BBFContent.Items.RoyalCrown) - 1); component.inventory.GiveItemPermanent(Items.BoostHp, Mathf.RoundToInt(num5 * 10f)); component.inventory.GiveItemPermanent(Items.BoostDamage, Mathf.RoundToInt(num6 * 10f)); component.inventory.GiveItemPermanent(Items.HealthDecay, 30); BaseAI component3 = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component3) && Object.op_Implicit((Object)(object)component3.body)) { component3.ForceAcquireNearestEnemyIfNoCurrentEnemy(); } } }; DirectorCore instance = DirectorCore.instance; if (instance != null) { instance.TrySpawnObject(val); } } } } namespace SM64BBF.Interactables { public class MarioTreeInteractableManager : NetworkBehaviour, IInteractable, IDisplayNameProvider { [SyncVar] public string displayNameToken; [SyncVar] public string contextToken; [SyncVar] public bool available; private Xoroshiro128Plus rng; private Transform itemSpawnPoint; public string NetworkdisplayNameToken { get { return displayNameToken; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref displayNameToken, 1u); } } public string NetworkcontextToken { get { return contextToken; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref contextToken, 2u); } } public bool Networkavailable { get { return available; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref available, 4u); } } private void Start() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if (NetworkServer.active) { rng = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong); itemSpawnPoint = ((Component)this).gameObject.transform.Find("Tree/ItemSpawnPoint"); } } private void OnEnable() { TeleporterInteraction.onTeleporterBeginChargingGlobal += TeleporterInteraction_onTeleporterBeginChargingGlobal; } private void TeleporterInteraction_onTeleporterBeginChargingGlobal(TeleporterInteraction obj) { if (NetworkServer.active) { Networkavailable = false; } } private void OnDisable() { TeleporterInteraction.onTeleporterBeginChargingGlobal -= TeleporterInteraction_onTeleporterBeginChargingGlobal; } public string GetContextString([NotNull] Interactor activator) { return Language.GetString(contextToken); } public string GetDisplayName() { return Language.GetString(displayNameToken); } public Interactability GetInteractability([NotNull] Interactor activator) { if (available) { return (Interactability)2; } return (Interactability)0; } public void OnInteractionBegin([NotNull] Interactor activator) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { EntitySoundManager.EmitSoundServer((AkEventIdArg)"SM64_BBF_Play_Shake_Tree", ((Component)this).gameObject); ((MonoBehaviour)this).Invoke("DropStuff", 0.5f); Networkavailable = false; } } private void DropStuff() { //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_003a: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) WeightedSelection<(string, PickupIndex)> obj = new WeightedSelection<(string, PickupIndex)>(8); obj.AddChoice(("SM64_BBF_Play_Coin", PickupCatalog.FindPickupIndex(((MiscPickupDef)SM64BBFContent.MiscPickups.Coin).miscPickupIndex)), Config.TreeInteractable.CoinWeight.Value); obj.AddChoice(("SM64_BBF_Play_OneUp", PickupCatalog.FindPickupIndex(SM64BBFContent.Items.MarioOneUp.itemIndex)), Config.TreeInteractable.OneUpWeight.Value); obj.AddChoice(("SM64_BBF_Play_Star", PickupCatalog.FindPickupIndex(((MiscPickupDef)SM64BBFContent.MiscPickups.Starman).miscPickupIndex)), Config.TreeInteractable.StarmanWeight.Value); obj.AddChoice(default((string, PickupIndex)), Config.TreeInteractable.NothingWeight.Value); (string, PickupIndex) tuple = obj.Evaluate(Run.instance.treasureRng.nextNormalizedFloat); (string, PickupIndex) tuple2 = tuple; if (tuple2.Item1 != null || tuple2.Item2 != default(PickupIndex)) { EntitySoundManager.EmitSoundServer((AkEventIdArg)tuple.Item1, ((Component)this).gameObject); PickupDropletController.CreatePickupDroplet(new UniquePickup(tuple.Item2), itemSpawnPoint.position, Vector3.up * 5f + ((Component)this).transform.forward * 3f, false); } } public bool ShouldIgnoreSpherecastForInteractibility([NotNull] Interactor activator) { return false; } public bool ShouldShowOnScanner() { return false; } public bool ShouldProximityHighlight() { return true; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(displayNameToken); writer.Write(contextToken); writer.Write(available); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(displayNameToken); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 2u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(contextToken); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 4u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(available); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { displayNameToken = reader.ReadString(); contextToken = reader.ReadString(); available = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { displayNameToken = reader.ReadString(); } if (((uint)num & 2u) != 0) { contextToken = reader.ReadString(); } if (((uint)num & 4u) != 0) { available = reader.ReadBoolean(); } } } } namespace SM64BBF.Controllers { public class GayBowserOnDeath : MonoBehaviour { private void OnEnable() { if (!NetworkServer.active) { ((Behaviour)this).enabled = false; return; } GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeath; TeleporterInteraction.onTeleporterFinishGlobal += TeleporterInteraction_onTeleporterFinishGlobal; } private void OnDisable() { if (NetworkServer.active) { GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeath; TeleporterInteraction.onTeleporterFinishGlobal -= TeleporterInteraction_onTeleporterFinishGlobal; } } private void TeleporterInteraction_onTeleporterFinishGlobal(TeleporterInteraction teleporterInteraction) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { EntitySoundManager.EmitSoundServer((AkEventIdArg)"SM64_BBF_ThankYou", ((Component)teleporterInteraction).gameObject); } } private void OnCharacterDeath(DamageReport damageReport) { //IL_001f: 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) if (damageReport.victimBody.isPlayerControlled) { if (Object.op_Implicit((Object)(object)damageReport.attacker)) { EntitySoundManager.EmitSoundServer((AkEventIdArg)"SM64_BBF_solonggaybowser", damageReport.attacker); } else if (Object.op_Implicit((Object)(object)damageReport.victimMaster)) { EntitySoundManager.EmitSoundServer((AkEventIdArg)"SM64_BBF_solonggaybowser", ((Component)damageReport.victimMaster).gameObject); } } } } public class PathFollower : MonoBehaviour { internal Transform[] path; internal float speed = 5f; internal float reachDist = 1f; internal GameObject deathEffectPrefab; private int currentPoint; private void OnEnable() { Util.PlaySound("SM64_BBF_Play_RollingStone", ((Component)this).gameObject); } private void FixedUpdate() { //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_0036: 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_0059: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { float num = Vector3.Distance(path[currentPoint].position, ((Component)this).transform.position); ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, path[currentPoint].position, Time.deltaTime * speed); if (num <= reachDist) { currentPoint++; } if (currentPoint >= path.Length) { EffectManager.SimpleMuzzleFlash(deathEffectPrefab, ((Component)this).gameObject, "SmokeBomb", true); Object.Destroy((Object)(object)((Component)this).gameObject); } } } private void OnDisable() { Util.PlaySound("SM64_BBF_Stop_RollingStone", ((Component)this).gameObject); } } public class RollingStonesCollider : MonoBehaviour { private void OnCollisionEnter(Collision collision) { //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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0080: 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) //IL_0091: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) if ((collision.gameObject.layer == LayerIndex.defaultLayer.intVal || collision.gameObject.layer == LayerIndex.enemyBody.intVal || collision.gameObject.layer == LayerIndex.playerBody.intVal) && NetworkServer.active) { ContactPoint contact = collision.GetContact(0); new BlastAttack { radius = ((ContactPoint)(ref contact)).separation + 2f, procCoefficient = 0f, position = ((ContactPoint)(ref contact)).point, attacker = null, crit = false, baseDamage = 25f, falloffModel = (FalloffModel)0, baseForce = 8000f, teamIndex = (TeamIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)2), attackerFiltering = (AttackerFiltering)0, canRejectForce = false }.Fire(); } } } public class RollingStonesSpawner : MonoBehaviour { public GameObject rollingStonePrefab; public Transform[] path; public float spawnTimer = 4f; public float speed = 25f; private float lastStoneTimer; private static GameObject smokeBombPrefab; private void Start() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)smokeBombPrefab)) { smokeBombPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2SmokeBomb.prefab").WaitForCompletion(); } } private void FixedUpdate() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { lastStoneTimer += Time.fixedDeltaTime; if (lastStoneTimer > spawnTimer) { GameObject obj = Object.Instantiate(rollingStonePrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); PathFollower component = obj.GetComponent(); component.path = path; component.speed = speed; component.deathEffectPrefab = smokeBombPrefab; EffectManager.SimpleMuzzleFlash(smokeBombPrefab, ((Component)this).gameObject, "SmokeBomb", true); NetworkServer.Spawn(obj); lastStoneTimer = 0f; } } } } } namespace SM64BBF.Content { public class ContentProvider : IContentPackProvider { private readonly ContentPack _contentPack = new ContentPack(); public static string assetDirectory; public string identifier => "com.Viliger.SM64BBF.ContentProvider"; public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { _contentPack.identifier = identifier; string assetsFolderFullPath = (assetDirectory = Path.Combine(Path.GetDirectoryName(typeof(ContentProvider).Assembly.Location), "assetbundles")); SM64BBFContent.LoadSoundBanks(Path.Combine(Path.GetDirectoryName(typeof(ContentProvider).Assembly.Location), "Audio")); AssetBundle scenesAssetBundle = null; yield return LoadAssetBundle(Path.Combine(assetsFolderFullPath, "sm64bbfstage"), args.progressReceiver, delegate(AssetBundle assetBundle) { scenesAssetBundle = assetBundle; }); AssetBundle assetsAssetBundle = null; yield return LoadAssetBundle(Path.Combine(assetsFolderFullPath, "sm64bbfassets"), args.progressReceiver, delegate(AssetBundle assetBundle) { assetsAssetBundle = assetBundle; }); yield return SM64BBFContent.LoadAssetBundlesAsync(scenesAssetBundle, assetsAssetBundle, args.progressReceiver, _contentPack); } private IEnumerator LoadAssetBundle(string assetBundleFullPath, IProgress progress, Action onAssetBundleLoaded) { AssetBundleCreateRequest assetBundleCreateRequest = AssetBundle.LoadFromFileAsync(assetBundleFullPath); while (!((AsyncOperation)assetBundleCreateRequest).isDone) { progress.Report(((AsyncOperation)assetBundleCreateRequest).progress); yield return null; } onAssetBundleLoaded(assetBundleCreateRequest.assetBundle); } 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; } } } namespace SM64BBF.Artifacts { public class BobombOnDeathManager { public static MasterIndex BobombMasterIndex; [SystemInitializer(new Type[] { typeof(ArtifactCatalog), typeof(MasterCatalog) })] private static void Init() { //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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown if (SM64BBFPlugin.isLoaded) { BobombMasterIndex = MasterCatalog.FindMasterIndex(SM64BBFContent.BobombMaster); RunArtifactManager.onArtifactEnabledGlobal += new ArtifactStateChangeDelegate(RunArtifactManager_onArtifactEnabledGlobal); RunArtifactManager.onArtifactDisabledGlobal += new ArtifactStateChangeDelegate(RunArtifactManager_onArtifactDisabledGlobal); } } private static void RunArtifactManager_onArtifactEnabledGlobal(RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { if (NetworkServer.active && (Object)(object)artifactDef == (Object)(object)SM64BBFContent.BobombOnDeath) { GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; } } private static void RunArtifactManager_onArtifactDisabledGlobal(RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { if ((Object)(object)artifactDef == (Object)(object)SM64BBFContent.BobombOnDeath) { GlobalEventManager.onCharacterDeathGlobal -= GlobalEventManager_onCharacterDeathGlobal; } } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Invalid comparison between Unknown and I4 //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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_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_007d: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && damageReport != null) { GameObject summonerBodyObject = null; if (Object.op_Implicit((Object)(object)damageReport.victim)) { summonerBodyObject = ((Component)damageReport.victim).gameObject; } CharacterBody victimBody = damageReport.victimBody; CharacterMaster victimMaster = damageReport.victimMaster; TeamIndex victimTeamIndex = damageReport.victimTeamIndex; if (Object.op_Implicit((Object)(object)victimBody) && Object.op_Implicit((Object)(object)victimMaster) && (int)victimTeamIndex == 2 && victimMaster.masterIndex != BobombMasterIndex) { Vector3 corePosition = victimBody.corePosition; new MasterSummon { position = corePosition, ignoreTeamMemberLimit = true, masterPrefab = SM64BBFContent.BobombMaster, summonerBodyObject = summonerBodyObject, rotation = Quaternion.identity }.Perform(); } } } } } namespace SM64BBF.Achievments { [RegisterAchievement("SM64_BBF_ObtainArtifactBobombsOnDeathAchievment", "Artifacts.BBF_BobombsOnDeath", null, 3u, null)] public class ObtainArtifactBobombsOnDeathAchievment : BaseObtainArtifactAchievement { public override ArtifactDef artifactDef => SM64BBFContent.BobombOnDeath; } }