using System;
using System.Collections.Generic;
using System.Diagnostics;
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.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: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[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.7.3")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class RtDMonsters : BaseUnityPlugin
{
public const string PluginGUID = "Soloredis.RtDMonsters";
public const string PluginName = "RtDMonsters";
public const string PluginVersion = "1.7.3";
internal static ManualLogSource Log;
public static AssetBundle MyAssets;
public ConfigEntry<bool> LoggingEnable;
public string[] AshLandsMonsterList = new string[6] { "Assassin_RtD", "Berserker_RtD", "Demon_RtD", "DragonBoar_RtD", "FallenCrusader_RtD", "Wizard_RtD" };
public string[] AshLandsBushList = new string[5] { "AshLandsRock3_RtD", "CrystalFormation5_RtD", "CrystalFormation6_RtD", "CrystalFormation7_RtD", "CrystalFormation8_RtD" };
public string[] AshLandsVegetetationList = new string[2] { "MagicTree7_RtD", "MagicTree8_RtD" };
public string[] DeepNorthMonsterList = new string[11]
{
"ElfHunterF_RtD", "ElfHunterM_RtD", "ElfPriestM_RtD", "ElfWarriorF_RtD", "ElfWarriorM_RtD", "FaeWolfIce_RtD", "FaeWolfLightening_RtD", "Fairy1_RtD", "Fairy2_RtD", "Fairy3_RtD",
"Golem_RtD"
};
public string[] DeepNorthBushList = new string[5] { "CrystalFormation1_RtD", "CrystalFormation2_RtD", "CrystalFormation3_RtD", "CrystalFormation4_RtD", "DeepNorthRock3_RtD" };
public string[] DeepNorthVegetationList = new string[2] { "MagicTree4_RtD1", "MagicTree5_RtD1" };
public static SpawnConfig[] AshLandsSpawnConfig = (SpawnConfig[])(object)new SpawnConfig[1]
{
new SpawnConfig
{
SpawnDistance = 100f,
SpawnInterval = 240f,
SpawnChance = 15f,
SpawnAtNight = true,
SpawnAtDay = true,
MaxSpawned = 2,
MaxLevel = 2,
MaxAltitude = 450f,
Biome = (Biome)32
}
};
public static SpawnConfig[] DeepNorthSpawnConfig = (SpawnConfig[])(object)new SpawnConfig[1]
{
new SpawnConfig
{
SpawnDistance = 100f,
SpawnInterval = 240f,
SpawnChance = 15f,
SpawnAtNight = true,
SpawnAtDay = true,
MaxSpawned = 2,
MaxLevel = 2,
MaxAltitude = 450f,
Biome = (Biome)64
}
};
public static CreatureConfig AshLandsCreatureConfig = new CreatureConfig
{
Faction = (Faction)4,
UseCumulativeLevelEffects = true,
SpawnConfigs = AshLandsSpawnConfig
};
public static VegetationConfig AshLandsVegetationConfig = new VegetationConfig
{
Min = 1f,
Max = 1f,
ScaleMin = 0.75f,
ScaleMax = 1.25f,
MinAltitude = 1f,
Biome = (Biome)32,
MaxTilt = 90f,
MaxTerrainDelta = 2f,
GroupSizeMin = 1,
GroupSizeMax = 1
};
public static VegetationConfig AshLandsBushConfig = new VegetationConfig
{
Min = 0.5f,
Max = 1f,
ScaleMin = 0.75f,
ScaleMax = 1.25f,
MinAltitude = 1f,
Biome = (Biome)32,
MaxTilt = 40f,
MaxTerrainDelta = 2f,
GroupSizeMin = 1,
GroupSizeMax = 1
};
public static VegetationConfig DeepNorthBushConfig = new VegetationConfig
{
Min = 0.5f,
Max = 1f,
ScaleMin = 0.75f,
ScaleMax = 1.25f,
MinAltitude = 1f,
Biome = (Biome)64,
MaxTilt = 40f,
MaxTerrainDelta = 2f,
GroupSizeMin = 1,
GroupSizeMax = 1
};
public static VegetationConfig DeepNorthVegetationConfig = new VegetationConfig
{
Min = 1f,
Max = 1f,
ScaleMin = 0.75f,
ScaleMax = 1.25f,
MinAltitude = 1f,
Biome = (Biome)64,
MaxTilt = 90f,
MaxTerrainDelta = 2f,
GroupSizeMin = 1,
GroupSizeMax = 1
};
public static CreatureConfig DeepNorthCreatureConfig = new CreatureConfig
{
Faction = (Faction)5,
UseCumulativeLevelEffects = true,
SpawnConfigs = DeepNorthSpawnConfig
};
private CustomLocalization Localization;
public string[] CustomSEShieldList = new string[1] { "SE_FairyShield_RtD" };
public string[] CustomSEList = new string[1] { "SE_FairyHeal_RtD" };
public string[] ItemsList = new string[27]
{
"BurningGland_RtD", "CookedDragonBoarMeat_RtD", "DemonHide_RtD", "DemonHorn_RtD", "DragonBoarMeat_RtD", "DragonCore_RtD", "DragonEgg_RtD", "TrophyDragonKing_RtD", "TrophyHatchling_RtD", "CookedFaeWolfMeat_RtD",
"FaeNectar_RtD", "FaeSeed_RtD", "FaeTrophyWolf_RtD", "FaeWolfFang_RtD", "FaeWolfMeat_RtD", "FaeWolfPelt_RtD", "FairySilk_RtD", "SpiritHeart_RtD", "TrophySpirit_RtD", "IceCrystal_RtD",
"ShadowCrystal_RtD", "FroWood_RtD", "FroMetalOre_RtD", "FroMetalBar_RtD", "CinderWood_RtD", "AshLandsSeed1_RtD", "ThorHammer_RtD"
};
public string[] PrefabsList = new string[218]
{
"Ragdoll_SO_Thor_RtD", "projectile_thorhammer_RtD", "elextricvfx_RtD", "fx_eikthyr_stomp_RtD", "fx_fae_death_RtD", "fx_fae_hit_RtD", "fx_fairyprotect_RtD", "vfx_dragon_firebreath_RtD", "vfx_elementalgolem_death_RtD", "vfx_elementalgolem_hurt_RtD",
"vfx_FairyShield_RtD", "vfx_fireball_dragonlaunch_RtD", "fx_flameexplosion_death_rtd", "AirTornadoMeadowsAOEMonster_RtD", "ArcaneLargeAOEMonster_RtD", "ArcaneMediumAOEMonster_RtD", "ArcaneSmallAOEMonster_RtD", "EarthQuakeMistLandsAOEMonster_RtD", "EarthShieldSwampAOEMonster_RrtD", "FireLargeAOEMonster_RtD",
"FireMediumAOEMonster_RtD", "FireRingBlackForestAOEMonster_RtD", "FireSmallAOEMonster_RtD", "FrostEnchantmentMountainAOEMonster_RtD", "LightDamgeAOEMonster_RtD", "LighteningRainBlackForestAOEMonster_RtD", "VoidAOEMonster_RtD", "WaterAOEMonster_RtD", "AirProjectileMonsterS_RtD", "arbalest_projectile_bone_RtD",
"ArcaneProjectileLargeMonsterS_RtD", "ArcaneProjectileLargeSecondaryMonsterS_RtD", "ArcaneProjectileMediumMonsterS_RtD", "ArcaneProjectileSmallMonsterS_RtD", "bow_projectile_frost_RtD", "bow_projectile_poison_RtD", "EarthProjectileMonsterS_RtD", "EarthProjectileQuakeMonsterS_RtD", "ElfSpearProjectile_RtD", "FairyHealAOE_RtD",
"FairyProtectAOE_RtD", "FireProjectileLargeMonsterS_RtD", "FireProjectileLargeSecondaryMonsterS_RtD", "FireProjectileMediumMonsterS_RtD", "FireProjectileMonsterS_RtD", "FrostProjectileLargeMonsterS_RtD", "FrostProjectileMonsterS_RtD", "LighteningProjectileMonsterS_RtD", "LightProjectileMonsterS_RtD", "spawn_meteorselementalgolem1_RtD",
"spawn_meteorselementalgolem2_RtD", "spawn_meteorsIarcane_RtD", "spawn_meteorslightening_RtD", "spawn_meteorsnecromancer1_RtD", "spawn_meteorsnecromancer2_RtD", "VoidProjectileMonsterS_RtD", "VoidProjectileMonsterSpawn_RtD", "VoidProjectileMonsterSummon_RtD", "WaterProjectileMonsterS_RtD", "ArcaneExplosionLargeMonsterS_RtD",
"ArcaneExplosionMediumMonsterS_RtD", "ArcaneExplosionSmallMonsterS_RtD", "EarthExplosionLargeMonsterS_RtD", "EarthExplosionSmallMonsterS_RtD", "FireExplosionLargeMonsterS_RtD", "FireExplosionMediumMonsterS_RtD", "FireExplosionSmallMonsterS_RtD", "FrostExplosionLargeMonsterS_RtD", "FrostExplosionSmallMonsterS_RtD", "LightExplosionSmallMonsterS_RtD",
"LightningExplosionSmallMonsterS_RtD", "StormExplosionSmallMonsterS_RtD", "VoidExplosionSmallMonsterS_RtD", "WaterExplosionMonsterS_RtD", "vfx_ArcaneSlashHitM_RtD", "vfx_EarthSlashHitM_RtD", "vfx_FireSlashHitM_RtD", "vfx_FrostSlashHitM_RtD", "vfx_LightningSlashHitM_RtD", "vfx_LightSlashHitM_RtD",
"vfx_ShadowSlashHitM_RtD", "vfx_StormSlashHitM_RtD", "vfx_WaterSlashHitM_RtD", "AssassinAttack1_RtD", "AssassinAttack2_RtD", "AssassinAttack3_RtD", "BerserkerAttack1_RtD", "BerserkerAttack2_RtD", "BerserkerAttack3_RtD", "BerserkerAttack4_RtD",
"BerserkerAttack5_RtD", "BoarAttck1_RtD", "BoarAttck2_RtD", "CrusaderAttack1_RtD", "CrusaderAttack2_RtD", "CrusaderAttack3_RtD", "DemonClawAttack_RtD", "DemonHornAttack_RtD", "DemonProjectileAttack_RtD", "dragon_bite1_RtD",
"dragon_claw_left1_RtD", "dragon_claw_right1_RtD", "dragon_firebreath1_RtD", "dragon_spit_shotgun1_RtD", "dragon_taunt1_RtD", "NecromancerMelee1_RtD", "NecromancerMelee2_RtD", "NecromancerSpell1_RtD", "NecromancerSpell2_RtD", "NecromancerSpell3_RtD",
"NecromancerSpell4_RtD", "NecromancerSpell5_RtD", "NecromancerSpell6_RtD", "PigletAttck1_RtD", "PigletAttck2_RtD", "WizardAttack1_RtD", "WizardAttack2_RtD", "WizardAttack3_RtD", "LightProjectileMonsterspawnS_RtD", "LightProjectileMonsterspawnSummon_RtD",
"ElementalAttack1_RtD", "ElementalAttack2_RtD", "ElemetalRanged2_RtD", "ElemetalRanged3_RtD", "ElfWarriorAttackF1_RtD", "ElfWarriorAttackF2_RtD", "ElfWarriorAttackF3_RtD", "ElfWarriorAttackF4_RtD", "ElfWarriorAttackM1_RtD", "ElfWarriorAttackM2_RtD",
"ElfWarriorAttackM3_RtD", "ElfWarriorAttackM4_RtD", "FairyAttack3_RtD", "FairyAttackAOE_RtD", "FairyAttackFire1_RtD", "FairyAttackIce1_RtD", "FairyHealAttack_RtD", "FairyIceAOE_RtD", "FairyProtect1_RtD", "FairyProtect2_RtD",
"HunterBowAttack1_RtD", "HunterBowAttack2_RtD", "HunterMBomb_RtD", "HunterMelee1_RtD", "HunterMelee2_RtD", "HunterMelee3_RtD", "HunterMKick_RtD", "HunterSpear4_RtD", "PriestMelee1_RtD", "PriestSpell2_RtD",
"PriestSpell3_RtD", "PriestSpell4_RtD", "SpiritAOEAttack2_RtD", "SpiritAttackDoubleHand1_RtD", "SpiritAttackDoubleHand2_RtD", "SpiritAttackMelee1_RtD", "SpiritHealAttack1_RtD", "SpiritHealIceAttack2_RtD", "SpiritHealLighteningAttack3_RtD", "Wolf_Attack1_RtD",
"Wolf_Attack2_RtD", "Wolf_Attack3frost_RtD", "Wolf_Attack3lightening_RtD", "Ragdoll_Assassin_RtD", "Ragdoll_Berserker_RtD", "Ragdoll_Demon_RtD", "Ragdoll_DragonBoar_RtD", "Ragdoll_FallenCrusader_RtD", "Ragdoll_ElfHunterF_RtD", "Ragdoll_ElfHunterM_RtD",
"Ragdoll_ElfPriestM_RtD", "Ragdoll_ElfWarriorF_RtD", "Ragdoll_ElfWarriorM_RtD", "ThorAOEattack1_RtD", "ThorAOEattack2_RtD", "ThorMelee1_RtD", "ThorMelee2_RtD", "ThorSpell1_RtD", "ThorSpell2_RtD", "ThorSpell3_RtD",
"ThorSummon1_RtD", "ThorProjectile1_RtD", "ThorProjectile2_RtD", "ThorProjectile3_RtD", "ThorExplosionSmall_RtD", "ThorExplosionMedium_RtD", "ThorExplosionLarge_RtD", "ThorHammerAOE_RtD", "ThorSpellAOE_RtD", "Spawner_Assassin_RtD",
"Spawner_Berserker_RtD", "Spawner_Demon_RtD", "Spawner_DragonBoar_RtD", "Spawner_FallenCrusader_RtD", "Spawner_Wizard_RtD", "Spawner_ElfHunterM_RtD", "Spawner_ElfHunterF_RtD", "Spawner_ElfPriest_RtD", "Spawner_ElfWarriorM_RtD", "Spawner_ElfWarriorF_RtD",
"Spawner_FaeWolfIce_RtD", "Spawner_FaeWolfLightning_RtD", "Spawner_Fairy1_RtD", "Spawner_Fairy2_RtD", "Spawner_Fairy3_RtD", "Spawner_Golem_RtD", "MagicLog4Half1", "MagicLog5Half1", "MagicLog7", "MagicLog7Half",
"MagicLog8", "MagicLog8Half", "MagicLog11", "MagicLog12", "MagicStump7", "MagicStump8", "MagicStump11", "MagicStump12"
};
public string[] SoundEffectList = new string[24]
{
"sfx_arcanemonster_RtD", "sfx_earthcastmonster_RtD", "sfx_firecastmonster_RtD", "sfx_icecastmonster_RtD", "sfx_lifecastmonster_RtD", "sfx_lightcastmonster_RtD", "sfx_lighteningcastmonster_RtD", "sfx_naturecasttmonster_RtD", "sfx_stormcastmonster_RtD", "sfx_voidcastmonster_RtD",
"sfx_watercastmonster_RtD", "sfx_elfalerted_RtD", "sfx_ElfAttackF_RtD", "sfx_ElfAttackM_RtD", "sfx_ElfDeathF_RtD", "sfx_ElfDeathM_RtD", "sfx_ElfHitF_RtD", "sfx_ElfHitM_RtD", "sfx_elfidle_RtD", "sfx_fae_alerted_RtD",
"sfx_fae_attack_RtD", "sfx_fae_cast_RtD", "sfx_fae_death_RtD", "sfx_fae_idle_RtD"
};
public string[] MonsterList = new string[10] { "Spirit_RtD", "DragonBoarTamed_RtD", "FaeWolfLighteningCub_RtD", "FaeWolfIceCub_RtD", "FaeWolfIceTamed_RtD", "FaeWolfLighteningTamed_RtD", "Fader_RtD", "Necromancer_RtD", "DragonPiglet_RtD", "SO_Thor_RtD" };
private void Awake()
{
CreateConfigs();
LoadBundle();
AddItemConversions();
AddlocalizationsEnglish();
AddShieldEffect();
AddSEStatusEffect();
AddItems();
AddPrefabs();
RegisterMonsters();
AddSoundEffects();
Locations();
AshLandsSpawners();
DeepNorthSpawners();
AshLandsVegetation();
DeepNorthVegetation();
AshLandsBushes();
DeepNorthBushes();
AddSaplings();
PrefabManager.OnPrefabsRegistered += FixSoundEffects;
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)"Logging is enabled in the config.");
}
}
private void LoadBundle()
{
try
{
MyAssets = AssetUtils.LoadAssetBundleFromResources("monsterproject", Assembly.GetExecutingAssembly());
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while loading bundle: {arg}");
}
}
public void CreateConfigs()
{
//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_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
try
{
((BaseUnityPlugin)this).Config.SaveOnConfigSet = true;
LoggingEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("Logging", "Enable", false, new ConfigDescription("Enable or Disable Logging.", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
{
IsAdminOnly = true,
Order = 15
} }));
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding configuration values: {arg}");
}
}
private void AshLandsBushes()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
try
{
string[] ashLandsBushList = AshLandsBushList;
foreach (string text in ashLandsBushList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
ZoneManager.Instance.AddCustomVegetation(new CustomVegetation(val, true, AshLandsBushConfig));
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added Vegetation: " + text));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding monsters: {arg}");
}
}
private void DeepNorthBushes()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
try
{
string[] deepNorthBushList = DeepNorthBushList;
foreach (string text in deepNorthBushList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
ZoneManager.Instance.AddCustomVegetation(new CustomVegetation(val, true, DeepNorthBushConfig));
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added Vegetation: " + text));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding monsters: {arg}");
}
}
private void AshLandsVegetation()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
try
{
string[] ashLandsVegetetationList = AshLandsVegetetationList;
foreach (string text in ashLandsVegetetationList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
ZoneManager.Instance.AddCustomVegetation(new CustomVegetation(val, true, AshLandsVegetationConfig));
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added Vegetation: " + text));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding monsters: {arg}");
}
}
private void DeepNorthVegetation()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
try
{
string[] deepNorthVegetationList = DeepNorthVegetationList;
foreach (string text in deepNorthVegetationList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
ZoneManager.Instance.AddCustomVegetation(new CustomVegetation(val, true, DeepNorthVegetationConfig));
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added Vegetation: " + text));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding monsters: {arg}");
}
}
private void AddItemConversions()
{
//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_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Expected O, but got Unknown
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Expected O, but got Unknown
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Expected O, but got Unknown
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: 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));
SmelterConversionConfig val3 = new SmelterConversionConfig();
((ConversionConfig)val3).Station = Smelters.BlastFurnace;
((ConversionConfig)val3).FromItem = "FroMetalOre_RtD";
((ConversionConfig)val3).ToItem = "FroMetalBar_RtD";
ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val3));
SmelterConversionConfig val4 = new SmelterConversionConfig();
((ConversionConfig)val4).Station = Smelters.BlastFurnace;
((ConversionConfig)val4).FromItem = "FlametalOre";
((ConversionConfig)val4).ToItem = "Flametal";
ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val4));
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom Item: {arg}");
}
}
public void AddShieldEffect()
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
try
{
string[] customSEShieldList = CustomSEShieldList;
foreach (string text in customSEShieldList)
{
SE_Shield val = MyAssets.LoadAsset<SE_Shield>(text);
if ((Object)(object)val != (Object)null)
{
CustomStatusEffect val2 = new CustomStatusEffect((StatusEffect)(object)val, true);
ItemManager.Instance.AddStatusEffect(val2);
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added: " + ((object)val)?.ToString() + " to the Object database"));
}
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding SE_Stats Effects: {arg}");
}
}
public void AddSEStatusEffect()
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
try
{
string[] customSEList = CustomSEList;
foreach (string text in customSEList)
{
SE_Stats val = MyAssets.LoadAsset<SE_Stats>(text);
if ((Object)(object)val != (Object)null)
{
CustomStatusEffect val2 = new CustomStatusEffect((StatusEffect)(object)val, true);
ItemManager.Instance.AddStatusEffect(val2);
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added: " + ((object)val)?.ToString() + " to the Object database"));
}
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding SE_Stats Effects: {arg}");
}
}
private void AddItems()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
try
{
string[] itemsList = ItemsList;
foreach (string text in itemsList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
CustomItem val2 = new CustomItem(val, true);
ItemManager.Instance.AddItem(val2);
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added: " + text + " to the Object database"));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding prefabs: {arg}");
}
}
private void AddPrefabs()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
try
{
string[] prefabsList = PrefabsList;
foreach (string text in prefabsList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
CustomPrefab val2 = new CustomPrefab(val, true);
PrefabManager.Instance.AddPrefab(val2);
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added: " + text + " to the Object database"));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding prefabs: {arg}");
}
}
private void RegisterMonsters()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
try
{
string[] monsterList = MonsterList;
foreach (string text in monsterList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
CustomCreature val2 = new CustomCreature(val, true);
CreatureManager.Instance.AddCreature(val2);
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added: " + text + " to the Object database"));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding prefabs: {arg}");
}
}
private void AddSoundEffects()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
try
{
string[] soundEffectList = SoundEffectList;
foreach (string text in soundEffectList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
CustomPrefab val2 = new CustomPrefab(val, true);
PrefabManager.Instance.AddPrefab(val2);
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added: " + text + " to the Object database"));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding prefabs: {arg}");
}
}
private void FixSoundEffects()
{
try
{
AudioSource prefab = Cache.GetPrefab<AudioSource>("sfx_arrow_hit");
string[] soundEffectList = SoundEffectList;
foreach (string text in soundEffectList)
{
GameObject prefab2 = Cache.GetPrefab<GameObject>(text);
prefab2.GetComponentInChildren<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup;
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Audio Mixer set on: " + text));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while fixing custom audio: {arg}");
}
finally
{
PrefabManager.OnPrefabsRegistered -= FixSoundEffects;
}
}
private void AddlocalizationsEnglish()
{
Localization = LocalizationManager.Instance.GetLocalization();
CustomLocalization localization = Localization;
string text = "English";
localization.AddTranslation(ref text, new Dictionary<string, string>
{
{ "AshLandsRock3_RtD", "Charred Rock" },
{ "DeepNorthRock3_RtD", "Icy Rock" },
{ "DeepNorthFroOre_RtD", "Valhallium Ore" },
{ "FroMetalBar_RtD", "Valhallium Bar" },
{ "BurningGland_RtD", "Soul Essence" },
{ "BurningGland_desc_RtD", "Used to summon a very powerful Necromancer" },
{ "Fader_RtD", "Fader" },
{ "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" },
{ "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 & is used to plant magical trees" },
{ "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" },
{ "ElfHunterM_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" },
{ "Vegvisir_Spirit_RtD", "Vegvisir" },
{ "Vegvisir_Spirit_register_RtD", "Forest Spirit" },
{ "SpiritShrineMap_RtD", "Spirit Shrine" },
{ "Vegvisir_Fader_RtD", "Vegvisir" },
{ "CrystalFormation5_RtD", "Shadow Crystal" },
{ "CrystalFormation6_RtD", "Shadow Crystal" },
{ "CrystalFormation7_RtD", "Shadow Crystal" },
{ "CrystalFormation8_RtD", "Shadow Crystal" },
{ "Vegvisir_Necromancer_RtD", "Vegvisir" },
{ "Vegvisir_Fader_register_RtD", "King of Dragons" },
{ "Vegvisir_Necromancer_register_RtD", "Necromancer Lord" },
{ "DragonKingAltarMap_RtD", "Dragon King" },
{ "NecromancerAltarMap_RtD", "Necromancer" },
{ "SO_Thor_RtD", "Thor" },
{ "CrystalFormation1_RtD", "Ice Crystal" },
{ "CrystalFormation2_RtD", "Ice Crystal" },
{ "CrystalFormation3_RtD", "Ice Crystal" },
{ "CrystalFormation4_RtD", "Ice Crystal" },
{ "MagicLog4", "Log" },
{ "MagicLog5", "Log" },
{ "MagicStump4", "Stump" },
{ "MagicStump5", "Stump" },
{ "MagicLog7", "Log" },
{ "MagicLog8", "Log" },
{ "MagicTree7_RtD", "Charred Tree" },
{ "MagicTree8_RtD", "Charred Tree" },
{ "MagicStump7", "Stump" },
{ "MagicStump8", "Stump" },
{ "MagicTree4_RtD", "Magic Tree" },
{ "MagicTree5_RtD", "Magic Tree" },
{ "ThorHammer_RtD", "Thor's Hammer" },
{ "ThorHammer_desc_RtD", "Strength of the gods" },
{ "DragonBoarRuinStone_RtD", "Chris P Bacon discovered this Rune Stone, then died within minutes from being eaten." },
{ "Vegvisir_Thor_RtD", "Vegvisir" },
{ "SpiritThorMap_RtD", "Thors Shrine" },
{ "Vegvisir_Thor_register_RtD", "The god of lightning" },
{ "MagicTreeSapling1_RtD", "Magic Sapling" },
{ "AshLandsSaplingD2_RtD", "Diseased Sapling" }
});
}
private void AddSaplings()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Expected O, but got Unknown
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Expected O, but got Unknown
try
{
PieceConfig val = new PieceConfig();
val.PieceTable = PieceTables.Cultivator;
val.AddRequirement(new RequirementConfig("FaeSeed_RtD", 1, 0, true));
val.Category = "Saplings";
PieceManager.Instance.AddPiece(new CustomPiece(MyAssets, "MagicTreeSapling1_RtD", true, val));
PieceConfig val2 = new PieceConfig();
val2.PieceTable = PieceTables.Cultivator;
val2.AddRequirement(new RequirementConfig("AshLandsSeed1_RtD", 1, 0, true));
val2.Category = "Saplings";
PieceManager.Instance.AddPiece(new CustomPiece(MyAssets, "AshLandsSaplingD2_RtD", true, val2));
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding prefabs: {arg}");
}
}
private void Locations()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Expected O, but got Unknown
//IL_0028: 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_00a1: Expected O, but got Unknown
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c6: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Unknown result type (might be due to invalid IL or missing references)
//IL_013f: Expected O, but got Unknown
//IL_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0166: Expected O, but got Unknown
//IL_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0201: Expected O, but got Unknown
//IL_0222: Unknown result type (might be due to invalid IL or missing references)
//IL_0229: Expected O, but got Unknown
//IL_0236: 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_02ca: Expected O, but got Unknown
//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
//IL_02f2: Expected O, but got Unknown
//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
//IL_038c: Unknown result type (might be due to invalid IL or missing references)
//IL_0393: Expected O, but got Unknown
//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
//IL_03bb: Expected O, but got Unknown
//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
//IL_0432: Unknown result type (might be due to invalid IL or missing references)
//IL_0439: Expected O, but got Unknown
//IL_045a: Unknown result type (might be due to invalid IL or missing references)
//IL_0461: Expected O, but got Unknown
//IL_046e: 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_0501: Expected O, but got Unknown
//IL_0522: Unknown result type (might be due to invalid IL or missing references)
//IL_0529: Expected O, but got Unknown
//IL_0536: Unknown result type (might be due to invalid IL or missing references)
//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
//IL_05c9: Expected O, but got Unknown
//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
//IL_05f1: Expected O, but got Unknown
//IL_05fe: Unknown result type (might be due to invalid IL or missing references)
//IL_068b: Unknown result type (might be due to invalid IL or missing references)
//IL_0692: Expected O, but got Unknown
//IL_06b3: Unknown result type (might be due to invalid IL or missing references)
//IL_06ba: Expected O, but got Unknown
//IL_06c7: Unknown result type (might be due to invalid IL or missing references)
//IL_0754: Unknown result type (might be due to invalid IL or missing references)
//IL_075b: Expected O, but got Unknown
//IL_077c: Unknown result type (might be due to invalid IL or missing references)
//IL_0783: Expected O, but got Unknown
//IL_0790: Unknown result type (might be due to invalid IL or missing references)
//IL_07e3: Unknown result type (might be due to invalid IL or missing references)
//IL_07ea: Expected O, but got Unknown
//IL_080b: Unknown result type (might be due to invalid IL or missing references)
//IL_0812: Expected O, but got Unknown
//IL_081f: Unknown result type (might be due to invalid IL or missing references)
//IL_0884: Unknown result type (might be due to invalid IL or missing references)
//IL_088b: Expected O, but got Unknown
//IL_08ac: Unknown result type (might be due to invalid IL or missing references)
//IL_08b3: Expected O, but got Unknown
//IL_08c0: 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_0917: Expected O, but got Unknown
//IL_0938: Unknown result type (might be due to invalid IL or missing references)
//IL_093f: Expected O, but got Unknown
//IL_094c: Unknown result type (might be due to invalid IL or missing references)
//IL_09b1: Unknown result type (might be due to invalid IL or missing references)
//IL_09b8: Expected O, but got Unknown
//IL_09d9: Unknown result type (might be due to invalid IL or missing references)
//IL_09e0: Expected O, but got Unknown
//IL_09ed: Unknown result type (might be due to invalid IL or missing references)
//IL_0a52: Unknown result type (might be due to invalid IL or missing references)
//IL_0a59: Expected O, but got Unknown
//IL_0a7a: Unknown result type (might be due to invalid IL or missing references)
//IL_0a81: Expected O, but got Unknown
//IL_0a8e: Unknown result type (might be due to invalid IL or missing references)
//IL_0b04: Unknown result type (might be due to invalid IL or missing references)
//IL_0b0b: Expected O, but got Unknown
try
{
GameObject val = MyAssets.LoadAsset<GameObject>("FaeRuins1_RtD");
LocationConfig 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 = 85;
val2.ExteriorRadius = 24f;
val2.MaxTerrainDelta = 3f;
val2.MinDistanceFromSimilar = 256f;
val2.ClearArea = true;
val2.Priotized = true;
CustomLocation val3 = new CustomLocation(val, true, val2);
ZoneManager.Instance.AddCustomLocation(val3);
GameObject val4 = 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 = 85;
val2.MinDistanceFromSimilar = 256f;
val2.ExteriorRadius = 15f;
val2.ClearArea = true;
val2.Priotized = true;
CustomLocation val5 = new CustomLocation(val4, true, val2);
ZoneManager.Instance.AddCustomLocation(val5);
GameObject val6 = 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 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)3;
val2.MinAltitude = 1f;
val2.MaxAltitude = 500f;
val2.Quantity = 125;
val2.ForestTresholdMin = 1f;
val2.ForestTrasholdMax = 99f;
val2.MinDistanceFromSimilar = 50f;
val2.Priotized = true;
CustomLocation val13 = new CustomLocation(val12, true, val2);
ZoneManager.Instance.AddCustomLocation(val13);
GameObject val14 = MyAssets.LoadAsset<GameObject>("DragonKingAltar_RtD");
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 = 12f;
val2.ClearArea = true;
val2.Priotized = true;
CustomLocation val15 = new CustomLocation(val14, true, val2);
ZoneManager.Instance.AddCustomLocation(val15);
GameObject val16 = MyAssets.LoadAsset<GameObject>("NecromancerAltar_RtD");
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;
val2.Priotized = true;
CustomLocation val17 = new CustomLocation(val16, true, val2);
ZoneManager.Instance.AddCustomLocation(val17);
GameObject val18 = 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 = 12;
val2.MaxTerrainDelta = 3f;
val2.ForestTresholdMin = 1f;
val2.ForestTrasholdMax = 99f;
val2.MinDistanceFromSimilar = 256f;
val2.ClearArea = true;
val2.SlopeRotation = true;
CustomLocation val19 = new CustomLocation(val18, true, val2);
ZoneManager.Instance.AddCustomLocation(val19);
GameObject val20 = MyAssets.LoadAsset<GameObject>("Vegvisir_Necromancer_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 = 12;
val2.MaxTerrainDelta = 3f;
val2.ForestTresholdMin = 1f;
val2.ForestTrasholdMax = 99f;
val2.MinDistanceFromSimilar = 256f;
val2.ClearArea = true;
val2.SlopeRotation = true;
CustomLocation val21 = new CustomLocation(val20, true, val2);
ZoneManager.Instance.AddCustomLocation(val21);
GameObject val22 = 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 val23 = new CustomLocation(val22, true, val2);
ZoneManager.Instance.AddCustomLocation(val23);
GameObject val24 = 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.MaxTerrainDelta = 2f;
val2.ExteriorRadius = 15f;
val2.ClearArea = true;
val2.Priotized = true;
CustomLocation val25 = new CustomLocation(val24, true, val2);
ZoneManager.Instance.AddCustomLocation(val25);
GameObject val26 = MyAssets.LoadAsset<GameObject>("Vegvisir_Spirit_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 = 12;
val2.ExteriorRadius = 5f;
val2.ClearArea = true;
CustomLocation val27 = new CustomLocation(val26, true, val2);
ZoneManager.Instance.AddCustomLocation(val27);
GameObject val28 = MyAssets.LoadAsset<GameObject>("ThorShrine_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.MaxTerrainDelta = 2f;
val2.ExteriorRadius = 15f;
val2.ClearArea = true;
val2.Priotized = true;
CustomLocation val29 = new CustomLocation(val28, true, val2);
ZoneManager.Instance.AddCustomLocation(val29);
GameObject val30 = MyAssets.LoadAsset<GameObject>("Vegvisir_Thor_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.MaxTerrainDelta = 2f;
val2.ExteriorRadius = 15f;
val2.ClearArea = true;
val2.Priotized = true;
CustomLocation val31 = new CustomLocation(val30, true, val2);
ZoneManager.Instance.AddCustomLocation(val31);
GameObject val32 = MyAssets.LoadAsset<GameObject>("FaeTree_RtD");
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 = 200;
val2.MaxTerrainDelta = 2f;
val2.MinDistanceFromSimilar = 50f;
val2.ExteriorRadius = 8f;
val2.ClearArea = true;
val2.Priotized = true;
CustomLocation val33 = new CustomLocation(val32, true, val2);
ZoneManager.Instance.AddCustomLocation(val33);
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom location: {arg}");
}
}
private void AshLandsSpawners()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
try
{
string[] ashLandsMonsterList = AshLandsMonsterList;
foreach (string text in ashLandsMonsterList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
CreatureManager.Instance.AddCreature(new CustomCreature(val, true, AshLandsCreatureConfig));
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added monster: " + text));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding monsters: {arg}");
}
}
private void DeepNorthSpawners()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
try
{
string[] deepNorthMonsterList = DeepNorthMonsterList;
foreach (string text in deepNorthMonsterList)
{
GameObject val = MyAssets.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
CreatureManager.Instance.AddCreature(new CustomCreature(val, true, DeepNorthCreatureConfig));
if (LoggingEnable.Value)
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Added monster: " + text));
}
}
else
{
((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database"));
}
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding monsters: {arg}");
}
}
}
}