Decompiled source of Minotaurs v0.2.8

Minotaurs.dll

Decompiled 4 months ago
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 BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Jotunn;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using Jotunn.Utils;
using SpawnThat.Spawners;
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("Wildlife")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Wildlife")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("f247181f-9da0-443a-8cd2-7b38a43a08c5")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Minotaurs;

[BepInPlugin("horemvore.Minotaurs", "Minotaurs", "0.2.8")]
[BepInIncompatibility("Azumatt.AzuDevMod")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
internal class minotaursBundle : BaseUnityPlugin
{
	public const string PluginGUID = "horemvore.Minotaurs";

	public const string PluginName = "Minotaurs";

	public const string PluginVersion = "0.2.8";

	public static bool isModded = true;

	public static GameObject Minotaur1;

	public static GameObject Minotaur2;

	public static GameObject Minotaur3;

	public static GameObject Minotaur4;

	public static GameObject Minotaur5;

	public static GameObject Minotaur6;

	public static GameObject MAttack1;

	public static GameObject MAttack2;

	public static GameObject MAttack3;

	public static GameObject FMAttack1;

	public static GameObject FMAttack2;

	public static GameObject FMAttack3;

	public static GameObject FrMAttack1;

	public static GameObject FrMAttack2;

	public static GameObject FrMAttack3;

	public static GameObject SFX1;

	public static GameObject SFX2;

	public static GameObject SFX3;

	public static GameObject SFX4;

	public static GameObject SFX5;

	public static GameObject SFX6;

	public static GameObject VFX1;

	public static GameObject VFX2;

	public static GameObject VFX3;

	public static GameObject FX1;

	public static GameObject FX2;

	public static GameObject MinotaurTrophy1;

	public static GameObject MinotaurTrophy2;

	public static GameObject MinotaurTrophy3;

	public static GameObject MinotaurTrophy4;

	public static GameObject MinotaurTrophy5;

	public static GameObject MinotaurTrophy6;

	public AssetBundle MinotaursBundle;

	private CustomLocalization Localization;

	internal static ManualLogSource Log;

	public ConfigEntry<bool> SpawnsEnable;

	private void Awake()
	{
		Log = ((BaseUnityPlugin)this).Logger;
		CreateConfigurationValues();
		AddLocalizations();
		LoadBundle();
		LoadAssets();
		AddMinotaurs();
		PrefabManager.OnVanillaPrefabsAvailable += FixSFX;
		try
		{
			if (SpawnsEnable.Value)
			{
				SpawnerConfigurationManager.OnConfigure += ConfigureBiomeSpawners;
			}
		}
		catch (Exception value)
		{
			Console.WriteLine(value);
		}
	}

	public void CreateConfigurationValues()
	{
		//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
		((BaseUnityPlugin)this).Config.SaveOnConfigSet = true;
		SpawnsEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("Default Spawns", "Enable", true, new ConfigDescription("Set to false if you want to setup your own spawns via a 3rd party mod.", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
		SynchronizationManager.OnConfigurationSynchronized += delegate(object obj, ConfigurationSynchronizationEventArgs attr)
		{
			if (attr.InitialSynchronization)
			{
				Logger.LogMessage((object)"Initial Config sync event received for Fee Fi Fo");
			}
			else
			{
				Logger.LogMessage((object)"Config sync event received for Fee Fi Fo");
			}
		};
	}

	private void AddLocalizations()
	{
		try
		{
			Localization = LocalizationManager.Instance.GetLocalization();
			CustomLocalization localization = Localization;
			string text = "English";
			localization.AddTranslation(ref text, new Dictionary<string, string>
			{
				{ "item_trophy_fireminotaurarmoured_hm", "Armoured Fire Minotaur" },
				{ "item_trophy_fireminotaurarmoured_desc_hm", "Animated trophy of an Armoured Fire Minotaur" },
				{ "item_trophy_fireminotaur_hm", "Fire Minotaur" },
				{ "item_trophy_fireminotaur_desc_hm", "Animated trophy of a Fire Minotaur" },
				{ "item_trophy_frostminotaurarmoured_hm", "Armoured Frost Minotaur" },
				{ "item_trophy_frostminotaurarmoured_desc_hm", "Animated trophy of an Armoured Frost Minotaur" },
				{ "item_trophy_frostminotaur_hm", "Frost Minotaur" },
				{ "item_trophy_frostminotaur_desc_hm", "Animated trophy of a Frost Minotaur" },
				{ "item_trophy_minotaurarmoured_hm", "Armoured Minotaur" },
				{ "item_trophy_minotaurarmoured_desc_hm", "Animated trophy of an Armoured Minotaur" },
				{ "item_trophy_minotaur_hm", "Minotaur" },
				{ "item_trophy_minotaur_desc_hm", "Animated trophy of a Minotaur" },
				{ "enemy_fireminotaurarmored_hm", "Armoured Fire Minotaur" },
				{ "enemy_fireminotaur_hm", "Fire Minotaur" },
				{ "enemy_frostminotaurarmored_hm", "Armoured Frost Minotaur" },
				{ "enemy_frostminotaur_hm", "Frost Minotaur" },
				{ "enemy_minotaurarmored_hm", "Armoured Minotaur" },
				{ "enemy_minotaur_hm", "Minotaur" }
			});
		}
		catch (Exception arg)
		{
			((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding Localication for Deds Army: {arg}");
		}
	}

	public void LoadBundle()
	{
		MinotaursBundle = AssetUtils.LoadAssetBundleFromResources("minotaurs", Assembly.GetExecutingAssembly());
	}

	private void LoadAssets()
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Expected O, but got Unknown
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Expected O, but got Unknown
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Expected O, but got Unknown
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Expected O, but got Unknown
		//IL_0234: Unknown result type (might be due to invalid IL or missing references)
		//IL_023b: 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_0270: Unknown result type (might be due to invalid IL or missing references)
		//IL_0277: Expected O, but got Unknown
		//IL_028e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0295: Expected O, but got Unknown
		//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b3: Expected O, but got Unknown
		//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d1: Expected O, but got Unknown
		//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ef: Expected O, but got Unknown
		//IL_0306: Unknown result type (might be due to invalid IL or missing references)
		//IL_030d: 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_03bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c3: Expected O, but got Unknown
		//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03dd: Expected O, but got Unknown
		//IL_03f0: 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_0424: Unknown result type (might be due to invalid IL or missing references)
		//IL_042b: Expected O, but got Unknown
		//IL_043e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0445: Expected O, but got Unknown
		//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c8: Expected O, but got Unknown
		//IL_04db: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e2: Expected O, but got Unknown
		//IL_04f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fc: Expected O, but got Unknown
		//IL_050f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0516: Expected O, but got Unknown
		//IL_0529: Unknown result type (might be due to invalid IL or missing references)
		//IL_0530: Expected O, but got Unknown
		//IL_0558: Unknown result type (might be due to invalid IL or missing references)
		//IL_055f: Expected O, but got Unknown
		//IL_0587: Unknown result type (might be due to invalid IL or missing references)
		//IL_058e: Expected O, but got Unknown
		//IL_05b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bd: Expected O, but got Unknown
		//IL_05e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ec: Expected O, but got Unknown
		//IL_0614: Unknown result type (might be due to invalid IL or missing references)
		//IL_061b: Expected O, but got Unknown
		//IL_0643: Unknown result type (might be due to invalid IL or missing references)
		//IL_064a: Expected O, but got Unknown
		GameObject val = MinotaursBundle.LoadAsset<GameObject>("FireMinotaur_RD_HM");
		CustomPrefab val2 = new CustomPrefab(val, true);
		PrefabManager.Instance.AddPrefab(val2);
		GameObject val3 = MinotaursBundle.LoadAsset<GameObject>("FireMinotaurArmoured_RD_HM");
		CustomPrefab val4 = new CustomPrefab(val3, true);
		PrefabManager.Instance.AddPrefab(val4);
		GameObject val5 = MinotaursBundle.LoadAsset<GameObject>("FrostMinotaur_RD_HM");
		CustomPrefab val6 = new CustomPrefab(val5, true);
		PrefabManager.Instance.AddPrefab(val6);
		GameObject val7 = MinotaursBundle.LoadAsset<GameObject>("FrostMinotaurArmoured_RD_HM");
		CustomPrefab val8 = new CustomPrefab(val7, true);
		PrefabManager.Instance.AddPrefab(val8);
		GameObject val9 = MinotaursBundle.LoadAsset<GameObject>("Minotaur_RD_HM");
		CustomPrefab val10 = new CustomPrefab(val9, true);
		PrefabManager.Instance.AddPrefab(val10);
		GameObject val11 = MinotaursBundle.LoadAsset<GameObject>("MinotaurArmoured_RD_HM");
		CustomPrefab val12 = new CustomPrefab(val11, true);
		PrefabManager.Instance.AddPrefab(val12);
		Minotaur6 = MinotaursBundle.LoadAsset<GameObject>("FireMinotaur_HM");
		Minotaur5 = MinotaursBundle.LoadAsset<GameObject>("FireMinotaurArmoured_HM");
		Minotaur4 = MinotaursBundle.LoadAsset<GameObject>("Minotaur_HM");
		Minotaur3 = MinotaursBundle.LoadAsset<GameObject>("MinotaurArmoured_HM");
		Minotaur2 = MinotaursBundle.LoadAsset<GameObject>("FrostMinotaur_HM");
		Minotaur1 = MinotaursBundle.LoadAsset<GameObject>("FrostMinotaurArmoured_HM");
		MAttack1 = MinotaursBundle.LoadAsset<GameObject>("Minotaur_Attack1_HG");
		MAttack2 = MinotaursBundle.LoadAsset<GameObject>("Minotaur_Attack2_HG");
		MAttack3 = MinotaursBundle.LoadAsset<GameObject>("Minotaur_Attack3_HG");
		FMAttack1 = MinotaursBundle.LoadAsset<GameObject>("FrostMinotaur_Attack1_HG");
		FMAttack2 = MinotaursBundle.LoadAsset<GameObject>("FrostMinotaur_Attack2_HG");
		FMAttack3 = MinotaursBundle.LoadAsset<GameObject>("FrostMinotaur_Attack3_HG");
		FrMAttack1 = MinotaursBundle.LoadAsset<GameObject>("FireMinotaur_Attack1_HG");
		FrMAttack2 = MinotaursBundle.LoadAsset<GameObject>("FireMinotaur_Attack2_HG");
		FrMAttack3 = MinotaursBundle.LoadAsset<GameObject>("FireMinotaur_Attack3_HG");
		GameObject mAttack = MAttack1;
		CustomPrefab val13 = new CustomPrefab(mAttack, false);
		PrefabManager.Instance.AddPrefab(val13);
		GameObject mAttack2 = MAttack2;
		CustomPrefab val14 = new CustomPrefab(mAttack2, false);
		PrefabManager.Instance.AddPrefab(val14);
		GameObject mAttack3 = MAttack3;
		CustomPrefab val15 = new CustomPrefab(mAttack3, false);
		PrefabManager.Instance.AddPrefab(val15);
		GameObject fMAttack = FMAttack1;
		CustomPrefab val16 = new CustomPrefab(fMAttack, false);
		PrefabManager.Instance.AddPrefab(val16);
		GameObject fMAttack2 = FMAttack2;
		CustomPrefab val17 = new CustomPrefab(fMAttack2, false);
		PrefabManager.Instance.AddPrefab(val17);
		GameObject fMAttack3 = FMAttack3;
		CustomPrefab val18 = new CustomPrefab(fMAttack3, false);
		PrefabManager.Instance.AddPrefab(val18);
		GameObject frMAttack = FrMAttack1;
		CustomPrefab val19 = new CustomPrefab(frMAttack, false);
		PrefabManager.Instance.AddPrefab(val19);
		GameObject frMAttack2 = FrMAttack2;
		CustomPrefab val20 = new CustomPrefab(frMAttack2, false);
		PrefabManager.Instance.AddPrefab(val20);
		GameObject frMAttack3 = FrMAttack3;
		CustomPrefab val21 = new CustomPrefab(frMAttack3, false);
		PrefabManager.Instance.AddPrefab(val21);
		SFX1 = MinotaursBundle.LoadAsset<GameObject>("SFX_MinotaurAlert_HM");
		SFX2 = MinotaursBundle.LoadAsset<GameObject>("SFX_MinotaurAttack_HM");
		SFX3 = MinotaursBundle.LoadAsset<GameObject>("SFX_MinotaurDeath_HM");
		SFX4 = MinotaursBundle.LoadAsset<GameObject>("SFX_MinotaurHit_HM");
		SFX5 = MinotaursBundle.LoadAsset<GameObject>("SFX_MinotaurIdle_HM");
		SFX6 = MinotaursBundle.LoadAsset<GameObject>("SFX_MinotaurFootstep_DoD");
		CustomPrefab val22 = new CustomPrefab(SFX1, false);
		PrefabManager.Instance.AddPrefab(val22);
		CustomPrefab val23 = new CustomPrefab(SFX2, false);
		PrefabManager.Instance.AddPrefab(val23);
		CustomPrefab val24 = new CustomPrefab(SFX3, false);
		PrefabManager.Instance.AddPrefab(val24);
		CustomPrefab val25 = new CustomPrefab(SFX4, false);
		PrefabManager.Instance.AddPrefab(val25);
		CustomPrefab val26 = new CustomPrefab(SFX5, false);
		PrefabManager.Instance.AddPrefab(val26);
		CustomPrefab val27 = new CustomPrefab(SFX6, false);
		PrefabManager.Instance.AddPrefab(val27);
		VFX1 = MinotaursBundle.LoadAsset<GameObject>("VFX_Blood_Hit_HM");
		VFX2 = MinotaursBundle.LoadAsset<GameObject>("VFX_Corpse_Destruction_HM");
		VFX3 = MinotaursBundle.LoadAsset<GameObject>("VFX_HitSparks_HM");
		FX1 = MinotaursBundle.LoadAsset<GameObject>("FX_Backstab_HM");
		FX2 = MinotaursBundle.LoadAsset<GameObject>("FX_Crit_HM");
		CustomPrefab val28 = new CustomPrefab(VFX1, false);
		PrefabManager.Instance.AddPrefab(val28);
		CustomPrefab val29 = new CustomPrefab(VFX2, false);
		PrefabManager.Instance.AddPrefab(val29);
		CustomPrefab val30 = new CustomPrefab(VFX3, false);
		PrefabManager.Instance.AddPrefab(val30);
		CustomPrefab val31 = new CustomPrefab(FX1, false);
		PrefabManager.Instance.AddPrefab(val31);
		CustomPrefab val32 = new CustomPrefab(FX2, false);
		PrefabManager.Instance.AddPrefab(val32);
		MinotaurTrophy6 = MinotaursBundle.LoadAsset<GameObject>("Trophy_FireMinotaur_HM");
		CustomItem val33 = new CustomItem(MinotaurTrophy6, false);
		ItemManager.Instance.AddItem(val33);
		MinotaurTrophy5 = MinotaursBundle.LoadAsset<GameObject>("Trophy_FireMinotaurArmoured_HM");
		CustomItem val34 = new CustomItem(MinotaurTrophy5, false);
		ItemManager.Instance.AddItem(val34);
		MinotaurTrophy4 = MinotaursBundle.LoadAsset<GameObject>("Trophy_Minotaur_HM");
		CustomItem val35 = new CustomItem(MinotaurTrophy4, false);
		ItemManager.Instance.AddItem(val35);
		MinotaurTrophy3 = MinotaursBundle.LoadAsset<GameObject>("Trophy_MinotaurArmoured_HM");
		CustomItem val36 = new CustomItem(MinotaurTrophy3, false);
		ItemManager.Instance.AddItem(val36);
		MinotaurTrophy2 = MinotaursBundle.LoadAsset<GameObject>("Trophy_FrostMinotaur_HM");
		CustomItem val37 = new CustomItem(MinotaurTrophy2, false);
		ItemManager.Instance.AddItem(val37);
		MinotaurTrophy1 = MinotaursBundle.LoadAsset<GameObject>("Trophy_FrostMinotaurArmoured_HM");
		CustomItem val38 = new CustomItem(MinotaurTrophy1, false);
		ItemManager.Instance.AddItem(val38);
	}

	private void AddMinotaurs()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Expected O, but got Unknown
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Expected O, but got Unknown
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: 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_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Expected O, but got Unknown
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Expected O, but got Unknown
		//IL_00db: 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_00ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_010a: Expected O, but got Unknown
		//IL_0111: Unknown result type (might be due to invalid IL or missing references)
		//IL_0117: Expected O, but got Unknown
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Expected O, but got Unknown
		//IL_013a: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		//IL_014b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_015b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Expected O, but got Unknown
		//IL_016a: Unknown result type (might be due to invalid IL or missing references)
		//IL_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0184: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)
		//IL_019a: 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_01ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ca: Expected O, but got Unknown
		//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fa: Expected O, but got Unknown
		//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0201: Unknown result type (might be due to invalid IL or missing references)
		//IL_020d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0215: Unknown result type (might be due to invalid IL or missing references)
		//IL_021e: Unknown result type (might be due to invalid IL or missing references)
		//IL_022b: Expected O, but got Unknown
		//IL_0232: Unknown result type (might be due to invalid IL or missing references)
		//IL_0238: Expected O, but got Unknown
		//IL_024a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0251: Expected O, but got Unknown
		//IL_025b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0260: Unknown result type (might be due to invalid IL or missing references)
		//IL_026c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0274: Unknown result type (might be due to invalid IL or missing references)
		//IL_027c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0289: Expected O, but got Unknown
		//IL_028b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0290: Unknown result type (might be due to invalid IL or missing references)
		//IL_029c: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bb: Expected O, but got Unknown
		//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02de: Unknown result type (might be due to invalid IL or missing references)
		//IL_02eb: Expected O, but got Unknown
		//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f2: 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_0306: Unknown result type (might be due to invalid IL or missing references)
		//IL_030e: Unknown result type (might be due to invalid IL or missing references)
		//IL_031b: Expected O, but got Unknown
		//IL_031d: 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_0336: Unknown result type (might be due to invalid IL or missing references)
		//IL_033f: Unknown result type (might be due to invalid IL or missing references)
		//IL_034c: Expected O, but got Unknown
		//IL_0353: Unknown result type (might be due to invalid IL or missing references)
		//IL_0359: Expected O, but got Unknown
		//IL_036b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0372: Expected O, but got Unknown
		//IL_037c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0381: Unknown result type (might be due to invalid IL or missing references)
		//IL_038d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0395: Unknown result type (might be due to invalid IL or missing references)
		//IL_039d: Unknown result type (might be due to invalid IL or missing references)
		//IL_03aa: Expected O, but got Unknown
		//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_03dc: Expected O, but got Unknown
		//IL_03de: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_040c: Expected O, but got Unknown
		//IL_040e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0413: Unknown result type (might be due to invalid IL or missing references)
		//IL_041f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0427: 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_043c: Expected O, but got Unknown
		//IL_043e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0443: Unknown result type (might be due to invalid IL or missing references)
		//IL_044f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0457: Unknown result type (might be due to invalid IL or missing references)
		//IL_0460: Unknown result type (might be due to invalid IL or missing references)
		//IL_046d: Expected O, but got Unknown
		//IL_0474: Unknown result type (might be due to invalid IL or missing references)
		//IL_047a: Expected O, but got Unknown
		//IL_048c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0493: Expected O, but got Unknown
		//IL_049d: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_04be: Unknown result type (might be due to invalid IL or missing references)
		//IL_04cb: Expected O, but got Unknown
		//IL_04cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04de: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fd: Expected O, but got Unknown
		//IL_04ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0504: Unknown result type (might be due to invalid IL or missing references)
		//IL_0510: Unknown result type (might be due to invalid IL or missing references)
		//IL_0518: Unknown result type (might be due to invalid IL or missing references)
		//IL_0520: Unknown result type (might be due to invalid IL or missing references)
		//IL_052d: Expected O, but got Unknown
		//IL_052f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0534: Unknown result type (might be due to invalid IL or missing references)
		//IL_0540: Unknown result type (might be due to invalid IL or missing references)
		//IL_0548: Unknown result type (might be due to invalid IL or missing references)
		//IL_0550: Unknown result type (might be due to invalid IL or missing references)
		//IL_055d: Expected O, but got Unknown
		//IL_055f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0564: Unknown result type (might be due to invalid IL or missing references)
		//IL_0570: Unknown result type (might be due to invalid IL or missing references)
		//IL_0578: Unknown result type (might be due to invalid IL or missing references)
		//IL_0580: Unknown result type (might be due to invalid IL or missing references)
		//IL_058d: Expected O, but got Unknown
		//IL_0594: Unknown result type (might be due to invalid IL or missing references)
		//IL_059b: Expected O, but got Unknown
		//IL_05ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b5: Expected O, but got Unknown
		//IL_05bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_05c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ed: Expected O, but got Unknown
		//IL_05ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_05f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0600: Unknown result type (might be due to invalid IL or missing references)
		//IL_0609: Unknown result type (might be due to invalid IL or missing references)
		//IL_0612: Unknown result type (might be due to invalid IL or missing references)
		//IL_061f: Expected O, but got Unknown
		//IL_0621: Unknown result type (might be due to invalid IL or missing references)
		//IL_0626: Unknown result type (might be due to invalid IL or missing references)
		//IL_0632: Unknown result type (might be due to invalid IL or missing references)
		//IL_063a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0642: Unknown result type (might be due to invalid IL or missing references)
		//IL_064f: Expected O, but got Unknown
		//IL_0651: Unknown result type (might be due to invalid IL or missing references)
		//IL_0656: Unknown result type (might be due to invalid IL or missing references)
		//IL_0662: Unknown result type (might be due to invalid IL or missing references)
		//IL_066a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0672: Unknown result type (might be due to invalid IL or missing references)
		//IL_067f: Expected O, but got Unknown
		//IL_0681: Unknown result type (might be due to invalid IL or missing references)
		//IL_0686: Unknown result type (might be due to invalid IL or missing references)
		//IL_0692: Unknown result type (might be due to invalid IL or missing references)
		//IL_069a: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_06af: Expected O, but got Unknown
		//IL_06b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_06bd: Expected O, but got Unknown
		try
		{
			GameObject minotaur = Minotaur5;
			CreatureConfig val = new CreatureConfig();
			val.DropConfigs = (DropConfig[])(object)new DropConfig[5]
			{
				new DropConfig
				{
					Item = "Trophy_FireMinotaur_HM",
					MinAmount = 1,
					MaxAmount = 1,
					Chance = 5f
				},
				new DropConfig
				{
					Item = "Coins",
					MinAmount = 24,
					MaxAmount = 55,
					Chance = 100f
				},
				new DropConfig
				{
					Item = "FlametalOre",
					MinAmount = 2,
					MaxAmount = 4,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "CookedLoxMeat",
					MinAmount = 2,
					MaxAmount = 8,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "Cloudberry",
					MinAmount = 3,
					MaxAmount = 12,
					Chance = 25f
				}
			};
			CustomCreature val2 = new CustomCreature(minotaur, true, val);
			CreatureManager.Instance.AddCreature(val2);
			GameObject minotaur2 = Minotaur6;
			val = new CreatureConfig();
			val.DropConfigs = (DropConfig[])(object)new DropConfig[5]
			{
				new DropConfig
				{
					Item = "Trophy_FireMinotaurArmoured_HM",
					MinAmount = 1,
					MaxAmount = 1,
					Chance = 5f
				},
				new DropConfig
				{
					Item = "Coins",
					MinAmount = 24,
					MaxAmount = 55,
					Chance = 100f
				},
				new DropConfig
				{
					Item = "FlametalOre",
					MinAmount = 2,
					MaxAmount = 4,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "CookedLoxMeat",
					MinAmount = 2,
					MaxAmount = 8,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "Cloudberry",
					MinAmount = 3,
					MaxAmount = 12,
					Chance = 25f
				}
			};
			CustomCreature val3 = new CustomCreature(minotaur2, true, val);
			CreatureManager.Instance.AddCreature(val3);
			GameObject minotaur3 = Minotaur4;
			val = new CreatureConfig();
			val.DropConfigs = (DropConfig[])(object)new DropConfig[5]
			{
				new DropConfig
				{
					Item = "Trophy_Minotaur_HM",
					MinAmount = 1,
					MaxAmount = 1,
					Chance = 5f
				},
				new DropConfig
				{
					Item = "Coins",
					MinAmount = 17,
					MaxAmount = 41,
					Chance = 100f
				},
				new DropConfig
				{
					Item = "LoxPelt",
					MinAmount = 2,
					MaxAmount = 4,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "CookedLoxMeat",
					MinAmount = 2,
					MaxAmount = 8,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "Cloudberry",
					MinAmount = 3,
					MaxAmount = 12,
					Chance = 25f
				}
			};
			CustomCreature val4 = new CustomCreature(minotaur3, true, val);
			CreatureManager.Instance.AddCreature(val4);
			GameObject minotaur4 = Minotaur3;
			val = new CreatureConfig();
			val.DropConfigs = (DropConfig[])(object)new DropConfig[5]
			{
				new DropConfig
				{
					Item = "Trophy_MinotaurArmoured_HM",
					MinAmount = 1,
					MaxAmount = 1,
					Chance = 5f
				},
				new DropConfig
				{
					Item = "Coins",
					MinAmount = 17,
					MaxAmount = 41,
					Chance = 100f
				},
				new DropConfig
				{
					Item = "LoxPelt",
					MinAmount = 2,
					MaxAmount = 4,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "CookedLoxMeat",
					MinAmount = 2,
					MaxAmount = 8,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "Cloudberry",
					MinAmount = 3,
					MaxAmount = 12,
					Chance = 25f
				}
			};
			CustomCreature val5 = new CustomCreature(minotaur4, true, val);
			CreatureManager.Instance.AddCreature(val5);
			GameObject minotaur5 = Minotaur2;
			val = new CreatureConfig();
			val.DropConfigs = (DropConfig[])(object)new DropConfig[5]
			{
				new DropConfig
				{
					Item = "Trophy_FrostMinotaur_HM",
					MinAmount = 1,
					MaxAmount = 1,
					Chance = 5f
				},
				new DropConfig
				{
					Item = "Coins",
					MinAmount = 10,
					MaxAmount = 28,
					Chance = 100f
				},
				new DropConfig
				{
					Item = "WolfPelt",
					MinAmount = 2,
					MaxAmount = 4,
					Chance = 15f
				},
				new DropConfig
				{
					Item = "FreezeGland",
					MinAmount = 2,
					MaxAmount = 4,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "CookedWolfMeat",
					MinAmount = 3,
					MaxAmount = 5,
					Chance = 25f
				}
			};
			CustomCreature val6 = new CustomCreature(minotaur5, true, val);
			CreatureManager.Instance.AddCreature(val6);
			GameObject minotaur6 = Minotaur1;
			val = new CreatureConfig();
			val.DropConfigs = (DropConfig[])(object)new DropConfig[5]
			{
				new DropConfig
				{
					Item = "Trophy_FrostMinotaurArmoured_HM",
					MinAmount = 1,
					MaxAmount = 1,
					Chance = 5f
				},
				new DropConfig
				{
					Item = "Coins",
					MinAmount = 10,
					MaxAmount = 28,
					Chance = 100f
				},
				new DropConfig
				{
					Item = "WolfPelt",
					MinAmount = 2,
					MaxAmount = 4,
					Chance = 15f
				},
				new DropConfig
				{
					Item = "FreezeGland",
					MinAmount = 2,
					MaxAmount = 4,
					Chance = 10f
				},
				new DropConfig
				{
					Item = "CookedWolfMeat",
					MinAmount = 3,
					MaxAmount = 5,
					Chance = 25f
				}
			};
			CustomCreature val7 = new CustomCreature(minotaur6, true, val);
			CreatureManager.Instance.AddCreature(val7);
		}
		catch (Exception arg)
		{
			((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom creatures: {arg}");
		}
		finally
		{
			MinotaursBundle.Unload(false);
		}
	}

	private void FixSFX()
	{
		try
		{
			AudioSource prefab = Cache.GetPrefab<AudioSource>("sfx_arrow_hit");
			GameObject prefab2 = Cache.GetPrefab<GameObject>("SFX_MinotaurAlert_HM");
			GameObject prefab3 = Cache.GetPrefab<GameObject>("SFX_MinotaurAttack_HM");
			GameObject prefab4 = Cache.GetPrefab<GameObject>("SFX_MinotaurDeath_HM");
			GameObject prefab5 = Cache.GetPrefab<GameObject>("SFX_MinotaurHit_HM");
			GameObject prefab6 = Cache.GetPrefab<GameObject>("SFX_MinotaurIdle_HM");
			GameObject prefab7 = Cache.GetPrefab<GameObject>("SFX_MinotaurFootstep_DoD");
			if ((Object)(object)prefab2 != (Object)null)
			{
				prefab2.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup;
			}
			if ((Object)(object)prefab3 != (Object)null)
			{
				prefab3.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup;
			}
			if ((Object)(object)prefab4 != (Object)null)
			{
				prefab4.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup;
			}
			if ((Object)(object)prefab5 != (Object)null)
			{
				prefab5.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup;
			}
			if ((Object)(object)prefab6 != (Object)null)
			{
				prefab6.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup;
			}
			if ((Object)(object)prefab7 != (Object)null)
			{
				prefab7.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup;
			}
		}
		catch
		{
			Debug.LogWarning((object)"Minotaurs: SFX Fix Failed");
		}
	}

	public static void ConfigureBiomeSpawners(ISpawnerConfigurationCollection config)
	{
		try
		{
			ConfigureWorldSpawner(config);
		}
		catch (Exception ex)
		{
			Console.WriteLine("Something went horribly wrong: " + ex.Message + "\nStackTrace:\n" + ex.StackTrace);
		}
	}

	private static void ConfigureWorldSpawner(ISpawnerConfigurationCollection config)
	{
		try
		{
			ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26105u).SetPrefabName("FireMinotaurArmoured_HM").SetTemplateName("Armoured Fire Minotaur")
				.SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)32 })
				.SetSpawnChance(18f)
				.SetSpawnInterval(TimeSpan.FromSeconds(210.0))
				.SetPackSizeMin(1u)
				.SetPackSizeMax(2u)
				.SetMaxSpawned(2u)
				.SetConditionAltitudeMin(1f);
			ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26104u).SetPrefabName("FireMinotaur_HM").SetTemplateName("Fire Minotaur")
				.SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)32 })
				.SetSpawnChance(18f)
				.SetSpawnInterval(TimeSpan.FromSeconds(210.0))
				.SetPackSizeMin(1u)
				.SetPackSizeMax(2u)
				.SetMaxSpawned(2u)
				.SetConditionAltitudeMin(1f);
			ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26103u).SetPrefabName("FrostMinotaurArmoured_HM").SetTemplateName("Armoured Frost Minotaur")
				.SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)64 })
				.SetSpawnChance(18f)
				.SetSpawnInterval(TimeSpan.FromSeconds(210.0))
				.SetPackSizeMin(1u)
				.SetPackSizeMax(2u)
				.SetMaxSpawned(2u)
				.SetConditionAltitudeMin(1f);
			ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26102u).SetPrefabName("FrostMinotaur_HM").SetTemplateName("Frost Minotaur")
				.SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)64 })
				.SetSpawnChance(18f)
				.SetSpawnInterval(TimeSpan.FromSeconds(210.0))
				.SetPackSizeMin(1u)
				.SetPackSizeMax(2u)
				.SetMaxSpawned(2u)
				.SetConditionAltitudeMin(1f);
			ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26101u).SetPrefabName("MinotaurArmoured_HM").SetTemplateName("Armoured Minotaur")
				.SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)512 })
				.SetSpawnChance(18f)
				.SetSpawnInterval(TimeSpan.FromSeconds(210.0))
				.SetPackSizeMin(1u)
				.SetPackSizeMax(2u)
				.SetMaxSpawned(2u)
				.SetConditionAltitudeMin(1f);
			ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26100u).SetPrefabName("Minotaur_HM").SetTemplateName("Minotaur")
				.SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)512 })
				.SetSpawnChance(18f)
				.SetSpawnInterval(TimeSpan.FromSeconds(210.0))
				.SetPackSizeMin(1u)
				.SetPackSizeMax(2u)
				.SetMaxSpawned(2u)
				.SetConditionAltitudeMin(1f);
		}
		catch (Exception ex)
		{
			Log.LogError((object)ex);
		}
	}
}