Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of RtDMonsters v1.3.2
RtDMonsters.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("RtDMonsters")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("RtDMonsters")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("dfc92a04-5c3f-4439-a3c2-7286e71d6625")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace RtDMonsters { [BepInPlugin("Soloredis.RtDMonsters", "RtDMonsters", "1.3.2")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Monsters : BaseUnityPlugin { public const string PluginGUID = "Soloredis.RtDMonsters"; public const string PluginName = "RtDMonsters"; public const string PluginVersion = "1.3.2"; internal static ManualLogSource Log; public AssetBundle MyAssets; public static GameObject ForgeRtD; public ConfigEntry<bool> BoneSquidEnable; public ConfigEntry<bool> MurkPodEnable; public ConfigEntry<bool> BoneFishEnable; public ConfigEntry<bool> GreatWhiteEnable; public ConfigEntry<bool> LuminousLookerEnable; public ConfigEntry<bool> AshLandsEnable; public ConfigEntry<bool> DeepNorthEnable; public ConfigEntry<bool> AshLandsLocationsEnable; public ConfigEntry<bool> DeepNorthLocationsEnable; private CustomLocalization Localization; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; LoadBundle(); RtDForge(); AddProjectiles(); AddItems(); AddFX(); AddlocalizationsEnglish(); AddlocalizationsEnglish(); JSON1(); CreateConfigs(); if (BoneSquidEnable.Value) { AddBoneSquid(); } if (MurkPodEnable.Value) { AddMurkPod(); } if (BoneFishEnable.Value) { AddBoneFish(); } if (GreatWhiteEnable.Value) { AddGreatWhite(); } if (LuminousLookerEnable.Value) { AddLuminousLooker(); } if (AshLandsEnable.Value) { AddAshLandsMonsters(); } if (AshLandsLocationsEnable.Value) { AddAshLandsLocations(); } if (DeepNorthEnable.Value) { AddDeepNorthCreatures(); } if (DeepNorthLocationsEnable.Value) { AddDeepNorthLocations(); } } private void LoadBundle() { try { MyAssets = AssetUtils.LoadAssetBundleFromResources("monsterproject", Assembly.GetExecutingAssembly()); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while loading bundle: {arg}"); } } private void AddlocalizationsEnglish() { Localization = LocalizationManager.Instance.GetLocalization(); CustomLocalization localization = Localization; string text = "English"; localization.AddTranslation(ref text, new Dictionary<string, string> { { "BurningGland_RtD", "Soul Essence" }, { "BurningGland_desc_RtD", "Used to summon a very powerful Necromancer" }, { "DragonCore_RtD", "Burning Gland" }, { "DragonCore_desc_RtD", "Used to create a special Forge" }, { "DragonEgg_RtD", "Searing Dragon Egg" }, { "DragonEgg_desc_RtD", "These eggs were once frigid. As the lands began to burn the eggs became filled with a burning contempt for all life." }, { "TrophyDragonKing_RtD", "Dragon King Trophy" }, { "TrophyDragonKing_desc_RtD", "The head from the King of Dragons & Father of all fury." }, { "TrophyHatchling_RtD", "Hatchling Trophy" }, { "TrophyHatchling_desc_RtD", "Will be for future use, or your imagination." }, { "ArtisanTable_RtD", "Artisan Forge" }, { "Assassin_RtD", "Undead Assassin" }, { "Berserker_RtD", "Flesh Eater" }, { "FallenCrusader_RtD", "Fallen Crusader" }, { "Wizard_RtD", "Undead Wizard" }, { "Necromancer_RtD", "Necromancer Lord" }, { "BoneFish_RtD", "Bone Fish" }, { "BoneSquid_RtD", "Bone Squid" }, { "LuminousLooker_RtD", "Luminous Looker" }, { "MurkPod_RtD", "MurkPod" }, { "Shark_RtD", "Great White" }, { "Demon_RtD", "Demon" }, { "DragonBoar_RtD", "Dragon Boar" }, { "DragonBoar_RtD1", "Dragon Boar" }, { "DragonPiglet_RtD", "Dragon Piglet" }, { "DragonBoarMeat_RtD", "Raw Dragon Boar Meat" }, { "CookedDragonBoarMeat_RtD", "Cooked Dragon Boar Meat" }, { "DemonHide_RtD", "Demon Hide" }, { "DemonHide_desc_RtD", "A very tough hide that can be used for strong armors" }, { "CookedFaeWolfMeat_RtD", "Fae Wolf Meat" }, { "CookedFaeWolfMeat_desc_RtD", "A delicious meal" }, { "FaeWolfMeat_RtD", "Raw FaeWolf Meat" }, { "FaeWolfMeat_desc_RtD", "A delicious meal if prepared right" }, { "FaeNectar_RtD", "Fae Nectar" }, { "FaeNectar_desc_RtD", "A magical aora emits from the Fae Nectar" }, { "FaeSeed_RtD", "FaeSeed" }, { "FaeSeed_desc_RtD", "The seed is cold to the touch" }, { "FaeTrophyWolf_RtD", "FaeWolf Trophy" }, { "FaeTrophyWolf_desc_RtD", "A trophy from a powerful Foe" }, { "FaeWolfFang_RtD", "FaeWolf Fang" }, { "FaeWolfFang_desc_RtD", "A very sharp Fang" }, { "FaeWolfPelt_RtD", "FaeWolf Pelt" }, { "FaeWolfPelt_desc_RtD", "A very thick fur hide" }, { "FairySilk_RtD", "Fae Silk" }, { "FairySilk_desc_RtD", "A very fine silk" }, { "ElfHunterF_RtD", "Elf Hunter" }, { "ElfPriestM_RtD", "Elf Priest" }, { "ElfWarriorF_RtD", "Elf Warrior" }, { "ElfWarriorM_RtD", "Elf Warrior" }, { "FaeWolfIce_RtD", "FaeWolf" }, { "FaeWolfIce_RtD1", "FaeWolf" }, { "FaeWolfIceCub_RtD", "FaeWolf Cub" }, { "FaeWolfLightening_RtD", "FaeWolf" }, { "FaeWolfLightening_RtD1", "FaeWolf" }, { "FaeWolfLighteningCub_RtD", "FaeWolf Cub" }, { "Fairy1_RtD", "Fairy" }, { "Fairy2_RtD", "Fairy" }, { "Fairy3_RtD", "Fairy" }, { "Golem_RtD", "Elemental Golem" }, { "FaeTree_RtD", "Magical Fae Tree" }, { "Spirit_RtD", "Spirit of the Wood" }, { "TrophySpirit_RtD", "Spirit Trophy" }, { "TrophySpirit_desc_RtD", "Spirit of the Wood Trophy" }, { "SpiritHeart_RtD", "Spirit Heart" }, { "SpiritHeart_desc_RtD", "Used to craft Thors Hammer." }, { "FaeSpawner_RtD", "Fae Spawner" } }); } private void JSON1() { TextAsset[] array = MyAssets.LoadAllAssets<TextAsset>(); TextAsset[] array2 = array; foreach (TextAsset val in array2) { string text = ((Object)val).name.Replace("_RtDMonsters.json", null); Localization.AddJsonFile(text, ((object)val).ToString()); } } public void CreateConfigs() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //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_00f3: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Expected O, but got Unknown ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; BoneSquidEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("BoneSquid", "Enable", true, new ConfigDescription("Enable or Disable the spawning of BoneSquid", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); MurkPodEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("MurkPod", "Enable", true, new ConfigDescription("Enable or Disable the spawning of MurkPod", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); BoneFishEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("BoneFish", "Enable", true, new ConfigDescription("Enable or Disable the spawning of BoneFish", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); GreatWhiteEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("Great White", "Enable", true, new ConfigDescription("Enable or Disable the spawning of Great White", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); LuminousLookerEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("Luminous Looker", "Enable", true, new ConfigDescription("Enable or Disable the spawning of Luminous Looker", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); AshLandsEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("AshLands Monsters", "Enable", true, new ConfigDescription("Enable or Disable the spawning of AshLands monsters. (Does not disable local spawners)", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); AshLandsLocationsEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("AshLands Locations", "Enable", true, new ConfigDescription("Enable or Disable the spawning of AshLands locations. (Disables local spawners)", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); DeepNorthEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("DeepNorth Monsters", "Enable", true, new ConfigDescription("Enable or Disable the spawning of DeepNorth monsters. (Does not disable local spawners)", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); DeepNorthLocationsEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("DeepNorth Locations", "Enable", true, new ConfigDescription("Enable or Disable the spawning of DeepNorth locations. (Disables local spawners)", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); SynchronizationManager.OnConfigurationSynchronized += delegate(object obj, ConfigurationSynchronizationEventArgs attr) { if (attr.InitialSynchronization) { ((BaseUnityPlugin)this).Logger.LogMessage((object)"Initial Config sync received"); } else { ((BaseUnityPlugin)this).Logger.LogMessage((object)"Config sync received"); } }; SynchronizationManager.OnAdminStatusChanged += delegate { ((BaseUnityPlugin)this).Logger.LogMessage((object)("Admin status recieved: " + (SynchronizationManager.Instance.PlayerIsAdmin ? "Congrats you're an admin!" : "Welcome to hell"))); }; } private void AddAshLandsLocations() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Expected O, but got Unknown //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Expected O, but got Unknown //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Expected O, but got Unknown //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Expected O, but got Unknown //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Expected O, but got Unknown //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("DragonKingAltar_RtD"); LocationConfig val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)32 }); val2.BiomeArea = (BiomeArea)2; val2.MinAltitude = 25f; val2.MaxAltitude = 500f; val2.Quantity = 6; val2.MaxTerrainDelta = 3f; val2.ForestTresholdMin = 1f; val2.ForestTrasholdMax = 99f; val2.MinDistanceFromSimilar = 256f; val2.ExteriorRadius = 35f; val2.ClearArea = true; CustomLocation val3 = new CustomLocation(val, true, val2); ZoneManager.Instance.AddCustomLocation(val3); GameObject val4 = MyAssets.LoadAsset<GameObject>("DrakeNest_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)32 }); val2.BiomeArea = (BiomeArea)2; val2.MinAltitude = 1f; val2.MaxAltitude = 500f; val2.Quantity = 150; val2.MaxTerrainDelta = 3f; val2.ForestTresholdMin = 1f; val2.ForestTrasholdMax = 99f; val2.MinDistanceFromSimilar = 256f; val2.ExteriorRadius = 5f; val2.ClearArea = true; CustomLocation val5 = new CustomLocation(val4, true, val2); ZoneManager.Instance.AddCustomLocation(val5); GameObject val6 = MyAssets.LoadAsset<GameObject>("Vegvisir_Fader_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)32 }); val2.BiomeArea = (BiomeArea)2; val2.MinAltitude = 1f; val2.MaxAltitude = 500f; val2.ExteriorRadius = 20f; val2.Quantity = 18; val2.MaxTerrainDelta = 3f; val2.ForestTresholdMin = 1f; val2.ForestTrasholdMax = 99f; val2.MinDistanceFromSimilar = 256f; val2.ClearArea = true; val2.SlopeRotation = true; CustomLocation val7 = new CustomLocation(val6, true, val2); ZoneManager.Instance.AddCustomLocation(val7); GameObject val8 = MyAssets.LoadAsset<GameObject>("GothicRuin1_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)32 }); val2.BiomeArea = (BiomeArea)3; val2.MinAltitude = 1f; val2.MaxAltitude = 500f; val2.ExteriorRadius = 20f; val2.Quantity = 100; val2.MaxTerrainDelta = 3f; val2.ForestTresholdMin = 1f; val2.ForestTrasholdMax = 99f; val2.MinDistanceFromSimilar = 256f; val2.ClearArea = true; val2.SlopeRotation = true; CustomLocation val9 = new CustomLocation(val8, true, val2); ZoneManager.Instance.AddCustomLocation(val9); GameObject val10 = MyAssets.LoadAsset<GameObject>("GothicRuin2_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)32 }); val2.BiomeArea = (BiomeArea)3; val2.MinAltitude = 1f; val2.MaxAltitude = 500f; val2.ExteriorRadius = 20f; val2.Quantity = 100; val2.MaxTerrainDelta = 3f; val2.ForestTresholdMin = 1f; val2.ForestTrasholdMax = 99f; val2.MinDistanceFromSimilar = 256f; val2.ClearArea = true; val2.SlopeRotation = true; CustomLocation val11 = new CustomLocation(val10, true, val2); ZoneManager.Instance.AddCustomLocation(val11); GameObject val12 = MyAssets.LoadAsset<GameObject>("DragonBoarRuinStone_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)32 }); val2.BiomeArea = (BiomeArea)1; val2.MinAltitude = 1f; val2.MaxAltitude = 500f; val2.ExteriorRadius = 3f; val2.Quantity = 125; val2.MaxTerrainDelta = 3f; val2.ForestTresholdMin = 1f; val2.ForestTrasholdMax = 99f; val2.MinDistanceFromSimilar = 256f; val2.ClearArea = true; val2.SlopeRotation = true; CustomLocation val13 = new CustomLocation(val12, true, val2); ZoneManager.Instance.AddCustomLocation(val13); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void AddAshLandsMonsters() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Expected O, but got Unknown //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Expected O, but got Unknown //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0296: 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_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Expected O, but got Unknown //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Expected O, but got Unknown //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Expected O, but got Unknown //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Expected O, but got Unknown //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Expected O, but got Unknown //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Expected O, but got Unknown //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Expected O, but got Unknown //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Expected O, but got Unknown //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Expected O, but got Unknown //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: 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_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_050a: 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_0520: Expected O, but got Unknown //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("Fader_RtD"); CreatureConfig val2 = new CreatureConfig(); val2.Faction = (Faction)8; val2.UseCumulativeLevelEffects = true; val2.AddSpawnConfig(new SpawnConfig { SpawnDistance = 60f, SpawnChance = 0f, SpawnAtNight = true, SpawnAtDay = true }); CreatureManager.Instance.AddCreature(new CustomCreature(val, true, val2)); GameObject val3 = MyAssets.LoadAsset<GameObject>("Demon_RtD"); CreatureConfig val4 = new CreatureConfig(); val4.Faction = (Faction)4; val4.UseCumulativeLevelEffects = true; val4.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 900f, SpawnChance = 10f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)32 }); CreatureManager.Instance.AddCreature(new CustomCreature(val3, true, val4)); GameObject val5 = MyAssets.LoadAsset<GameObject>("Assassin_RtD"); CreatureConfig val6 = new CreatureConfig(); val6.Faction = (Faction)4; val6.UseCumulativeLevelEffects = true; val6.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)32 }); CreatureManager.Instance.AddCreature(new CustomCreature(val5, true, val6)); GameObject val7 = MyAssets.LoadAsset<GameObject>("Berserker_RtD"); CreatureConfig val8 = new CreatureConfig(); val8.Faction = (Faction)4; val8.UseCumulativeLevelEffects = true; val8.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)32 }); CreatureManager.Instance.AddCreature(new CustomCreature(val7, true, val8)); GameObject val9 = MyAssets.LoadAsset<GameObject>("FallenCrusader_RtD"); CreatureConfig val10 = new CreatureConfig(); val10.Faction = (Faction)4; val10.UseCumulativeLevelEffects = true; val10.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)32 }); CreatureManager.Instance.AddCreature(new CustomCreature(val9, true, val10)); GameObject val11 = MyAssets.LoadAsset<GameObject>("Wizard_RtD"); CreatureConfig val12 = new CreatureConfig(); val12.Faction = (Faction)4; val12.UseCumulativeLevelEffects = true; val12.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)32 }); CreatureManager.Instance.AddCreature(new CustomCreature(val11, true, val12)); GameObject val13 = MyAssets.LoadAsset<GameObject>("Necromancer_RtD"); CreatureConfig val14 = new CreatureConfig(); val14.Faction = (Faction)8; val14.UseCumulativeLevelEffects = true; val14.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnAtNight = true, SpawnChance = 0f, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)32 }); CreatureManager.Instance.AddCreature(new CustomCreature(val13, true, val14)); GameObject val15 = MyAssets.LoadAsset<GameObject>("DragonBoar_RtD"); CreatureConfig val16 = new CreatureConfig(); val16.Faction = (Faction)4; val16.UseCumulativeLevelEffects = true; val16.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 450f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)32 }); CreatureManager.Instance.AddCreature(new CustomCreature(val15, true, val16)); GameObject val17 = MyAssets.LoadAsset<GameObject>("DragonPiglet_RtD"); CreatureConfig val18 = new CreatureConfig(); val18.Faction = (Faction)4; val18.UseCumulativeLevelEffects = true; val18.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 1650f, SpawnChance = 0f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)32 }); CreatureManager.Instance.AddCreature(new CustomCreature(val17, true, val18)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void AddDeepNorthLocations() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00c2: 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_0118: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Expected O, but got Unknown //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("FaeTree_RtD"); LocationConfig val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)64 }); val2.BiomeArea = (BiomeArea)3; val2.MinAltitude = 3f; val2.MaxAltitude = 500f; val2.Quantity = 400; val2.MinDistanceFromSimilar = 50f; val2.ExteriorRadius = 10f; val2.ClearArea = true; CustomLocation val3 = new CustomLocation(val, true, val2); ZoneManager.Instance.AddCustomLocation(val3); GameObject val4 = MyAssets.LoadAsset<GameObject>("FaeRuins1_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)64 }); val2.BiomeArea = (BiomeArea)3; val2.MinAltitude = 5f; val2.MaxAltitude = 500f; val2.Quantity = 120; val2.ExteriorRadius = 16f; val2.ClearArea = true; CustomLocation val5 = new CustomLocation(val4, true, val2); ZoneManager.Instance.AddCustomLocation(val5); GameObject val6 = MyAssets.LoadAsset<GameObject>("FaeRuins2_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)64 }); val2.BiomeArea = (BiomeArea)3; val2.MinAltitude = 5f; val2.MaxAltitude = 500f; val2.Quantity = 120; val2.ExteriorRadius = 15f; val2.ClearArea = true; CustomLocation val7 = new CustomLocation(val6, true, val2); ZoneManager.Instance.AddCustomLocation(val7); GameObject val8 = MyAssets.LoadAsset<GameObject>("FaeSpawner_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)64 }); val2.BiomeArea = (BiomeArea)3; val2.MinAltitude = 5f; val2.MaxAltitude = 500f; val2.Quantity = 150; val2.ExteriorRadius = 10f; val2.ClearArea = true; CustomLocation val9 = new CustomLocation(val8, true, val2); ZoneManager.Instance.AddCustomLocation(val9); GameObject val10 = MyAssets.LoadAsset<GameObject>("SpiritShrine_RtD"); val2 = new LocationConfig(); val2.Biome = ZoneManager.AnyBiomeOf((Biome[])(object)new Biome[1] { (Biome)64 }); val2.BiomeArea = (BiomeArea)3; val2.MinAltitude = 25f; val2.MaxAltitude = 500f; val2.Quantity = 6; val2.ExteriorRadius = 15f; val2.ClearArea = true; CustomLocation val11 = new CustomLocation(val10, true, val2); ZoneManager.Instance.AddCustomLocation(val11); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void AddDeepNorthCreatures() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //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_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Expected O, but got Unknown //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Expected O, but got Unknown //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Expected O, but got Unknown //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Expected O, but got Unknown //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Expected O, but got Unknown //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Expected O, but got Unknown //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Expected O, but got Unknown //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Expected O, but got Unknown //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Expected O, but got Unknown //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Expected O, but got Unknown //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Expected O, but got Unknown //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Expected O, but got Unknown //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Expected O, but got Unknown //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Expected O, but got Unknown //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Expected O, but got Unknown //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Expected O, but got Unknown //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Expected O, but got Unknown //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Expected O, but got Unknown //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Expected O, but got Unknown //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Expected O, but got Unknown //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0631: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0649: 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_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Expected O, but got Unknown //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("Fairy1_RtD"); CreatureConfig val2 = new CreatureConfig(); val2.Faction = (Faction)5; val2.UseCumulativeLevelEffects = true; val2.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 850f, SpawnChance = 5f, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val, true, val2)); GameObject val3 = MyAssets.LoadAsset<GameObject>("Fairy2_RtD"); CreatureConfig val4 = new CreatureConfig(); val4.Faction = (Faction)5; val4.UseCumulativeLevelEffects = true; val4.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 850f, SpawnChance = 5f, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val3, true, val4)); GameObject val5 = MyAssets.LoadAsset<GameObject>("Fairy3_RtD"); CreatureConfig val6 = new CreatureConfig(); val6.Faction = (Faction)5; val6.UseCumulativeLevelEffects = true; val6.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 850f, SpawnChance = 5f, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val5, true, val6)); GameObject val7 = MyAssets.LoadAsset<GameObject>("Golem_RtD"); CreatureConfig val8 = new CreatureConfig(); val8.Faction = (Faction)8; val8.UseCumulativeLevelEffects = true; val8.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 4f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val7, true, val8)); GameObject val9 = MyAssets.LoadAsset<GameObject>("FaeWolfIce_RtD"); CreatureConfig val10 = new CreatureConfig(); val10.Faction = (Faction)5; val10.UseCumulativeLevelEffects = true; val10.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 10f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val9, true, val10)); GameObject val11 = MyAssets.LoadAsset<GameObject>("FaeWolfLightening_RtD"); CreatureConfig val12 = new CreatureConfig(); val12.Faction = (Faction)5; val12.UseCumulativeLevelEffects = true; val12.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 10f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val11, true, val12)); GameObject val13 = MyAssets.LoadAsset<GameObject>("ElfHunterF_RtD"); CreatureConfig val14 = new CreatureConfig(); val14.Faction = (Faction)5; val14.UseCumulativeLevelEffects = true; val14.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val13, true, val14)); GameObject val15 = MyAssets.LoadAsset<GameObject>("ElfPriestM_RtD"); CreatureConfig val16 = new CreatureConfig(); val16.Faction = (Faction)5; val16.UseCumulativeLevelEffects = true; val16.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val15, true, val16)); GameObject val17 = MyAssets.LoadAsset<GameObject>("ElfWarriorF_RtD"); CreatureConfig val18 = new CreatureConfig(); val18.Faction = (Faction)5; val18.UseCumulativeLevelEffects = true; val18.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val17, true, val18)); GameObject val19 = MyAssets.LoadAsset<GameObject>("ElfWarriorM_RtD"); CreatureConfig val20 = new CreatureConfig(); val20.Faction = (Faction)5; val20.UseCumulativeLevelEffects = true; val20.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 5f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val19, true, val20)); GameObject val21 = MyAssets.LoadAsset<GameObject>("Spirit_RtD"); CreatureConfig val22 = new CreatureConfig(); val22.Faction = (Faction)5; val22.UseCumulativeLevelEffects = true; val22.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 2000f, SpawnChance = 0f, SpawnAtNight = true, SpawnAtDay = true, MaxSpawned = 1, MaxLevel = 5, Biome = (Biome)64 }); CreatureManager.Instance.AddCreature(new CustomCreature(val21, true, val22)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void AddBoneSquid() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("BoneSquid_RtD"); CreatureConfig val2 = new CreatureConfig(); val2.Faction = (Faction)6; val2.UseCumulativeLevelEffects = true; val2.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 10f, SpawnAtNight = true, SpawnAtDay = false, MaxSpawned = 1, MaxLevel = 5, MaxAltitude = 0f, Biome = (Biome)256 }); CreatureManager.Instance.AddCreature(new CustomCreature(val, true, val2)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void AddMurkPod() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("MurkPod_RtD"); CreatureConfig val2 = new CreatureConfig(); val2.Faction = (Faction)6; val2.UseCumulativeLevelEffects = true; val2.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 5f, MaxSpawned = 1, MaxLevel = 5, MaxAltitude = 0f, Biome = (Biome)256 }); CreatureManager.Instance.AddCreature(new CustomCreature(val, true, val2)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void AddBoneFish() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("BoneFish_RtD"); CreatureConfig val2 = new CreatureConfig(); val2.Faction = (Faction)6; val2.UseCumulativeLevelEffects = true; val2.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 850f, SpawnChance = 5f, MaxSpawned = 1, MaxLevel = 5, MaxAltitude = 0f, Biome = (Biome)256 }); CreatureManager.Instance.AddCreature(new CustomCreature(val, true, val2)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void AddGreatWhite() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("Shark_RtD"); CreatureConfig val2 = new CreatureConfig(); val2.Faction = (Faction)6; val2.UseCumulativeLevelEffects = true; val2.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 1050f, SpawnChance = 8f, MaxSpawned = 1, MaxLevel = 5, MaxAltitude = 0f, Biome = (Biome)256 }); CreatureManager.Instance.AddCreature(new CustomCreature(val, true, val2)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void AddLuminousLooker() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown try { GameObject val = MyAssets.LoadAsset<GameObject>("LuminousLooker_RtD"); CreatureConfig val2 = new CreatureConfig(); val2.Faction = (Faction)6; val2.UseCumulativeLevelEffects = true; val2.AddSpawnConfig(new SpawnConfig { SpawnDistance = 100f, SpawnInterval = 650f, SpawnChance = 10f, SpawnAtNight = true, SpawnAtDay = false, MaxSpawned = 1, MaxLevel = 5, MaxAltitude = 0f, Biome = (Biome)256 }); CreatureManager.Instance.AddCreature(new CustomCreature(val, true, val2)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}"); } } private void RtDForge() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0050: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007b: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown try { PieceConfig val = new PieceConfig(); val.PieceTable = "Hammer"; val.Category = "Crafting"; val.AllowedInDungeons = false; val.AddRequirement(new RequirementConfig { Item = "CinderWood_RtD", Amount = 30, Recover = true }); val.AddRequirement(new RequirementConfig { Item = "BurningGland_RtD", Amount = 30, Recover = true }); val.AddRequirement(new RequirementConfig { Item = "DragonCore_RtD", Amount = 20, Recover = true }); CustomPiece val2 = new CustomPiece(MyAssets, "ArtisanForge_RtD", false, val); PieceManager.Instance.AddPiece(val2); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom piece: {arg}"); } } private void AddItems() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Expected O, but got Unknown //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Expected O, but got Unknown //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Expected O, but got Unknown //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Expected O, but got Unknown //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Expected O, but got Unknown //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Expected O, but got Unknown try { CookingConversionConfig val = new CookingConversionConfig(); ((ConversionConfig)val).FromItem = "DragonBoarMeat_RtD"; ((ConversionConfig)val).ToItem = "CookedDragonBoarMeat_RtD"; ((ConversionConfig)val).Station = CookingStations.IronCookingStation; val.CookTime = 20f; ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val)); CookingConversionConfig val2 = new CookingConversionConfig(); ((ConversionConfig)val2).FromItem = "FaeWolfMeat_RtD"; ((ConversionConfig)val2).ToItem = "CookedFaeWolfMeat_RtD"; ((ConversionConfig)val2).Station = CookingStations.IronCookingStation; val2.CookTime = 20f; ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val2)); GameObject val3 = MyAssets.LoadAsset<GameObject>("BurningGland_RtD"); CustomItem val4 = new CustomItem(val3, false); ItemManager.Instance.AddItem(val4); GameObject val5 = MyAssets.LoadAsset<GameObject>("DemonHorn_RtD"); CustomItem val6 = new CustomItem(val5, false); ItemManager.Instance.AddItem(val6); GameObject val7 = MyAssets.LoadAsset<GameObject>("DragonCore_RtD"); CustomItem val8 = new CustomItem(val7, false); ItemManager.Instance.AddItem(val8); GameObject val9 = MyAssets.LoadAsset<GameObject>("DragonEgg_RtD"); CustomItem val10 = new CustomItem(val9, false); ItemManager.Instance.AddItem(val10); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "Pickable_DragonEgg_RtD", true)); GameObject val11 = MyAssets.LoadAsset<GameObject>("TrophyHatchling_RtD"); CustomItem val12 = new CustomItem(val11, false); ItemManager.Instance.AddItem(val12); GameObject val13 = MyAssets.LoadAsset<GameObject>("DemonHide_RtD"); CustomItem val14 = new CustomItem(val13, false); ItemManager.Instance.AddItem(val14); GameObject val15 = MyAssets.LoadAsset<GameObject>("DragonBoarMeat_RtD"); CustomItem val16 = new CustomItem(val15, false); ItemManager.Instance.AddItem(val16); GameObject val17 = MyAssets.LoadAsset<GameObject>("CookedDragonBoarMeat_RtD"); CustomItem val18 = new CustomItem(val17, false); ItemManager.Instance.AddItem(val18); GameObject val19 = MyAssets.LoadAsset<GameObject>("FaeNectar_RtD"); CustomItem val20 = new CustomItem(val19, false); ItemManager.Instance.AddItem(val20); GameObject val21 = MyAssets.LoadAsset<GameObject>("FaeSeed_RtD"); CustomItem val22 = new CustomItem(val21, false); ItemManager.Instance.AddItem(val22); GameObject val23 = MyAssets.LoadAsset<GameObject>("FaeTrophyWolf_RtD"); CustomItem val24 = new CustomItem(val23, false); ItemManager.Instance.AddItem(val24); GameObject val25 = MyAssets.LoadAsset<GameObject>("FaeWolfFang_RtD"); CustomItem val26 = new CustomItem(val25, false); ItemManager.Instance.AddItem(val26); GameObject val27 = MyAssets.LoadAsset<GameObject>("FaeWolfMeat_RtD"); CustomItem val28 = new CustomItem(val27, false); ItemManager.Instance.AddItem(val28); GameObject val29 = MyAssets.LoadAsset<GameObject>("FaeWolfPelt_RtD"); CustomItem val30 = new CustomItem(val29, false); ItemManager.Instance.AddItem(val30); GameObject val31 = MyAssets.LoadAsset<GameObject>("FairySilk_RtD"); CustomItem val32 = new CustomItem(val31, false); ItemManager.Instance.AddItem(val32); GameObject val33 = MyAssets.LoadAsset<GameObject>("TrophyDragonKing_RtD"); CustomItem val34 = new CustomItem(val33, false); ItemManager.Instance.AddItem(val34); GameObject val35 = MyAssets.LoadAsset<GameObject>("TrophySpirit_RtD"); CustomItem val36 = new CustomItem(val35, false); ItemManager.Instance.AddItem(val36); GameObject val37 = MyAssets.LoadAsset<GameObject>("CookedFaeWolfMeat_RtD"); CustomItem val38 = new CustomItem(val37, false); ItemManager.Instance.AddItem(val38); GameObject val39 = MyAssets.LoadAsset<GameObject>("SpiritHeart_RtD"); CustomItem val40 = new CustomItem(val39, false); ItemManager.Instance.AddItem(val40); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom Item: {arg}"); } } private void AddFX() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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 //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown try { PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "fx_DvergerMage_Nova_ring_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "fx_eikthyr_stomp_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "elextricvfx_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "fx_crit_RtD", true)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom FX: {arg}"); } } private void AddProjectiles() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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 //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Expected O, but got Unknown //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown try { PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "DemonProjectile_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "bilebomb_projectile_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "arbalest_projectile_bone_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "DemonAOEAttack_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "DvergerStaffNova_aoe_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "WizardProjectile1_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "WizardProjectile2_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "WizardProjectile3_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "spawn_meteors1_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "spawn_meteors2_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "PriestProjectile_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "ProjectileElemental_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "DvergerStaffBlocker_projectile1_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "GoblinSpear_projectile_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "projectile_spiritbeam_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "spirit_root_projectile_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "staff_iceshard_projectile1_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "projectile_meteor1_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "projectile_meteor2_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "projectile_meteor3_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "spawn_meteorsIce1_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "spawn_meteorsIce2_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "spawn_meteorsIce3_RtD", true)); PrefabManager.Instance.AddPrefab(new CustomPrefab(MyAssets, "spawn_meteorslightening_RtD", true)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom Projectiles: {arg}"); } } } public class DeepSeaCreature : MonoBehaviour, IWaterInteractable { public float m_height = 0.2f; private readonly int[] m_liquids = new int[2]; private MonsterAI m_avoidLand; private Rigidbody m_body; private Humanoid m_canSwim; private Humanoid m_flying; private float m_inWater = 27f; private LiquidSurface m_liquidSurface; private LODGroup m_lodGroup; private bool m_lodVisible = true; private ZNetView m_nview; private Vector3 m_originalLocalRef; private float m_waterDepth; private WaterVolume m_waterVolume; private void Awake() { m_nview = ((Component)this).GetComponent<ZNetView>(); m_body = ((Component)this).GetComponent<Rigidbody>(); m_flying = ((Component)this).GetComponent<Humanoid>(); m_canSwim = ((Component)this).GetComponent<Humanoid>(); m_avoidLand = ((Component)this).GetComponent<MonsterAI>(); m_waterVolume = WaterVolume.Instances.FirstOrDefault(); } private void Start() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) m_waterDepth = m_waterVolume.Depth(((Component)this).transform.position); } public string DebugInformation(WaterVolume waterVolume) { StringBuilder stringBuilder = new StringBuilder(); Type type = ((object)waterVolume).GetType(); float[] array = (float[])type.GetField("m_normalizedDepth", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(waterVolume); stringBuilder.AppendLine($"m_normalizedDepth: {array?.Length}"); if (array != null && array.Length != 0) { stringBuilder.AppendLine("->\tValues: " + string.Join(",", array) + "\n"); } stringBuilder.AppendLine(string.Format("{0}: {1}", "m_heightmap", waterVolume.m_heightmap)); stringBuilder.AppendLine(string.Format("{0}: {1}", "m_forceDepth", waterVolume.m_forceDepth)); stringBuilder.AppendLine(string.Format("{0}: {1}", "m_surfaceOffset", waterVolume.m_surfaceOffset)); stringBuilder.AppendLine(string.Format("{0}: {1}", "m_useGlobalWind", waterVolume.m_useGlobalWind)); return stringBuilder.ToString(); } private void FixedUpdate() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if ((double)m_inWater <= -10000.0 || (double)m_inWater < (double)((Component)this).transform.position.y + (double)m_height) { m_body.useGravity = true; ((Character)m_flying).m_flying = false; m_avoidLand.m_avoidLand = true; ((Character)m_canSwim).m_canSwim = true; if (CustomIsOutOfWater()) { return; } } else { m_body.useGravity = false; } ((Character)m_flying).m_flying = true; m_avoidLand.m_avoidLand = false; ((Character)m_canSwim).m_canSwim = false; if ((Object)(object)m_waterVolume != (Object)null && !CustomIsOutOfWater()) { } } public void SetLiquidLevel(float level, LiquidType type, Component liquidObj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 if ((int)type == 0) { m_inWater = level; } m_liquidSurface = null; m_waterVolume = null; WaterVolume val = (WaterVolume)(object)((liquidObj is WaterVolume) ? liquidObj : null); if (val == null) { LiquidSurface val2 = (LiquidSurface)(object)((liquidObj is LiquidSurface) ? liquidObj : null); if (val2 != null) { m_liquidSurface = val2; } } else { m_waterVolume = val; } } public Transform GetTransform() { return ((Object)(object)this == (Object)null) ? null : ((Component)this).transform; } public int Increment(LiquidType type) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return ++m_liquids[type]; } public int Decrement(LiquidType type) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return --m_liquids[type]; } public bool CustomIsOutOfWater() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) return (double)m_inWater < (double)((Component)this).transform.position.y - (double)m_height; } protected void SetVisible(bool visible) { //IL_005b: 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) if (!((Object)(object)m_lodGroup == (Object)null) && m_lodVisible != visible) { m_lodVisible = visible; if (m_lodVisible) { m_lodGroup.localReferencePoint = m_originalLocalRef; } else { m_lodGroup.localReferencePoint = new Vector3(999999f, 999999f, 999999f); } } } } }