Decompiled source of OdinsHares v1.2.8
OdinsHares.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using HarmonyLib; using JetBrains.Annotations; using LocalizationManager; using Microsoft.CodeAnalysis; using OdinsHares.Functions; using OdinsHares.Utils; using ServerSync; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Core.Tokens; using YamlDotNet.Helpers; using YamlDotNet.Serialization; using YamlDotNet.Serialization.Converters; using YamlDotNet.Serialization.EventEmitters; using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NodeDeserializers; using YamlDotNet.Serialization.NodeTypeResolvers; using YamlDotNet.Serialization.ObjectFactories; using YamlDotNet.Serialization.ObjectGraphTraversalStrategies; using YamlDotNet.Serialization.ObjectGraphVisitors; using YamlDotNet.Serialization.Schemas; using YamlDotNet.Serialization.TypeInspectors; using YamlDotNet.Serialization.TypeResolvers; using YamlDotNet.Serialization.Utilities; using YamlDotNet.Serialization.ValueDeserializers; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyFileVersion("1.2.8")] [assembly: Guid("85FAD536-6C90-4A9B-917F-6FEF32ACC9AA")] [assembly: ComVisible(false)] [assembly: AssemblyTrademark("")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyProduct("OdinsHares")] [assembly: AssemblyCompany("blacks7ar")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyDescription("https://valheim.thunderstore.io/package/blacks7ar/OdinsHares/")] [assembly: AssemblyTitle("OdinsHares")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyConfiguration("")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.8.0")] [module: UnverifiableCode] [module: <4599f982-6baf-4ec2-9048-0ac259685f85>RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [<9f670031-56a4-493a-b039-3d75f2d0ecc9>Embedded] internal sealed class <9f670031-56a4-493a-b039-3d75f2d0ecc9>EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [<9f670031-56a4-493a-b039-3d75f2d0ecc9>Embedded] [CompilerGenerated] internal sealed class <4599f982-6baf-4ec2-9048-0ac259685f85>RefSafetyRulesAttribute : Attribute { public readonly int Version; public <4599f982-6baf-4ec2-9048-0ac259685f85>RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace OdinsHares { [BepInPlugin("blacks7ar.OdinsHares", "OdinsHares", "1.2.8")] public class Plugin : BaseUnityPlugin { private const string modGUID = "blacks7ar.OdinsHares"; public const string modName = "OdinsHares"; public const string modAuthor = "blacks7ar"; public const string modVersion = "1.2.8"; public const string modLink = "https://valheim.thunderstore.io/package/blacks7ar/OdinsHares/"; private static readonly Harmony _harmony = new Harmony("blacks7ar.OdinsHares"); private static readonly ConfigSync _configSync = new ConfigSync("blacks7ar.OdinsHares") { DisplayName = "OdinsHares", CurrentVersion = "1.2.8", MinimumRequiredVersion = "1.2.8", ModRequired = true }; private static ConfigEntry<Toggle> _serverConfigLocked; public static ConfigEntry<float> _dropChance; public static ConfigEntry<int> _dropBonus; public static GameObject _harePrefab; public static GameObject _hareRagdoll; public static ItemDrop _foodItem; public static Action _onZNetSceneAwake; public static Plugin _instance; public ConfigEntry<T> config<T>(string group, string name, T value, ConfigDescription description, bool synchronizedSetting = true) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown ConfigDescription val = new ConfigDescription(description.Description + (synchronizedSetting ? " [Synced with Server]" : " [Not Synced with Server]"), description.AcceptableValues, description.Tags); ConfigEntry<T> val2 = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, val); _configSync.AddConfigEntry<T>(val2).SynchronizedConfig = synchronizedSetting; return val2; } public void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown Localizer.Load(); ((BaseUnityPlugin)this).Config.SaveOnConfigSet = false; _instance = this; _serverConfigLocked = config("1- ServerSync", "Lock Configuration", Toggle.On, new ConfigDescription("If On, the configuration is locked and can be changed by server admins only.", (AcceptableValueBase)null, Array.Empty<object>())); _configSync.AddLockingConfigEntry<Toggle>(_serverConfigLocked); _dropChance = config("2- Hunters.Instinct", "Bonus Drop Chance", 20f, new ConfigDescription("Bonus drop chance for additional loot in percentage. (NOTE: Need to reequip the seteffect in order to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 50f), Array.Empty<object>())); _dropBonus = config("2- Hunters.Instinct", "Bonus Drop Multiplier", 3, new ConfigDescription("Bonus drop multiplier for Hunters Instinct SetEffect. (NOTE: Need to reequip the seteffect in order to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>())); PrefabSetup.Init(); CreatureConfigSetup.Init(); ItemConfigSetup.Init(); PieceConfigSetup.Init(); ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; ((BaseUnityPlugin)this).Config.Save(); Assembly executingAssembly = Assembly.GetExecutingAssembly(); _harmony.PatchAll(executingAssembly); _onZNetSceneAwake = (Action)Delegate.Combine(_onZNetSceneAwake, new Action(HareSetup.Init)); } private void OnDestroy() { ((BaseUnityPlugin)this).Config.Save(); } } } namespace OdinsHares.Patches { [HarmonyPatch] public class ItemDropPatch { [HarmonyPatch(typeof(ItemDrop), "Awake")] [HarmonyPostfix] private static void Awake_Postfix(ItemDrop __instance) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name != "main" || (Object)(object)__instance == (Object)null) { return; } string name = __instance.m_itemData.m_shared.m_name; if (!(name == "$boh_cookedhare_meat")) { if (name == "$boh_harestew") { FoodStats.HareStew(__instance); } } else { FoodStats.CookedHareMeat(__instance); } } } [HarmonyPatch] public class ObjectDBPatch { [HarmonyPatch(typeof(ObjectDB), "Awake")] [HarmonyPostfix] [HarmonyPriority(700)] public static void Awake_Postfix(ObjectDB __instance) { RegisterPrefabsToObjectDB.Init(); RegisterRecipesToObjectDB.Init(); __instance.UpdateRegisters(); } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [HarmonyPostfix] [HarmonyPriority(700)] public static void CopyOtherDB_Postfix(ObjectDB __instance) { RegisterPrefabsToObjectDB.Init(); RegisterRecipesToObjectDB.Init(); __instance.UpdateRegisters(); } } [HarmonyPatch(typeof(SpawnSystem), "UpdateSpawnList")] public class SpawnSytemPatch { public static void Postfix(SpawnSystem __instance) { SpawnerSetup.Init(__instance); } } [HarmonyPatch] public class CharacterDropPatch { [HarmonyPatch(typeof(CharacterDrop), "GenerateDropList")] private static class GenerateDropListPatch { [UsedImplicitly] [HarmonyPriority(100)] private static void Postfix(CharacterDrop __instance, ref List<KeyValuePair<GameObject, int>> __result) { if (!CharacterPatch.CharRPCDamagePatch.IsHunting || (Object)(object)__instance.m_character == (Object)null || !CharacterPatch.IsPrey(__instance.m_character)) { return; } Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null || !((Character)localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct"))) { return; } List<KeyValuePair<GameObject, int>> list = new List<KeyValuePair<GameObject, int>>(); int num = ((!Object.op_Implicit((Object)(object)__instance.m_character)) ? 1 : Mathf.Max(1, (int)Mathf.Pow(2f, (float)(__instance.m_character.GetLevel() - 1)))); foreach (Drop drop in __instance.m_drops) { if ((Object)(object)drop.m_prefab == (Object)null) { continue; } float num2 = drop.m_chance; if (drop.m_levelMultiplier) { num2 *= (float)num; } if (Random.value <= num2) { int num3 = Random.Range(drop.m_amountMin, drop.m_amountMax); if (drop.m_levelMultiplier) { num3 *= num; } if (drop.m_onePerPlayer) { num3 = ZNet.instance.GetNrOfPlayers(); } if (num3 > 0) { SE_HuntersInstinct sE_HuntersInstinct = ((Character)localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct")) as SE_HuntersInstinct; int num4 = new Random().Next(1, 100); Debug.Log((object)("Random Chance: " + num4)); if ((float)num4 <= sE_HuntersInstinct.GetChance()) { int value = Mathf.FloorToInt((float)num3 * sE_HuntersInstinct.GetBonus() + Random.Range(0f, 1f)); list.Add(new KeyValuePair<GameObject, int>(drop.m_prefab, value)); } else { list.Add(new KeyValuePair<GameObject, int>(drop.m_prefab, num3)); } } } __result = list; } } } } [HarmonyPatch] public class CharacterPatch { [HarmonyPatch(typeof(Character), "RPC_Damage")] public static class CharRPCDamagePatch { public static bool IsHunting; public static void Prefix(Character __instance, HitData hit) { Character attacker = hit.GetAttacker(); Player val = (Player)(object)((attacker is Player) ? attacker : null); if (val != null && ((Humanoid)val).GetCurrentWeapon() != null && IsUsingHuntingWeapon(val) && IsPrey(__instance) && ((Character)val).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct"))) { IsHunting = true; } } } [HarmonyPatch(typeof(Character), "CustomFixedUpdate")] [HarmonyPostfix] public static void CustomFixedUpdate_Postfix(Character __instance) { if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer) && !__instance.IsPlayer() && !__instance.IsBoss() && __instance.IsTamed() && !Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<Growup>()) && !((Object)(object)__instance == (Object)null) && Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<Tameable>())) { ((Component)__instance).GetComponent<Tameable>().m_commandable = true; } } public static bool IsPrey(Character character) { string name = character.m_name; if (name.ToLower().Contains("deer")) { return true; } if (name.ToLower().Contains("boar")) { return true; } if (name.ToLower().Contains("neck")) { return true; } if (name.ToLower().Contains("boh_hare_")) { return true; } if (name.ToLower().Contains("hare")) { return true; } if (name.ToLower().Contains("chicken")) { return true; } return false; } private static bool IsUsingHuntingWeapon(Player player) { string name = ((Humanoid)player).GetCurrentWeapon().m_shared.m_name; if (name.ToLower().Contains("bow")) { return true; } if (name.ToLower().Contains("knife")) { return true; } if (name.ToLower().Contains("spear")) { return true; } return false; } } [HarmonyPatch] public class PlayerPatch { [HarmonyPrefix] [HarmonyPatch(typeof(Player), "UpdateEnvStatusEffects")] private static bool UpdateEnvStatusEffects_Prefix(Player __instance, float dt) { if (!((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct"))) { return true; } if (EnvMan.IsCold()) { ((Character)__instance).GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("Cold"), false); } return true; } } [HarmonyPatch] public class ProjectilePatch { [HarmonyPatch(typeof(Projectile), "OnHit")] [HarmonyPrefix] public static void ProjectileOnHit_Prefix(Projectile __instance, Collider collider, Vector3 hitPoint, bool water) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Invalid comparison between Unknown and I4 //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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Invalid comparison between Unknown and I4 //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Invalid comparison between Unknown and I4 //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)__instance.m_owner) == Object.op_Implicit((Object)(object)Player.m_localPlayer) || ((int)__instance.m_skill != 5 && (int)__instance.m_skill != 8 && (int)__instance.m_skill != 2)) { return; } GameObject val = (Object.op_Implicit((Object)(object)collider) ? Projectile.FindHitObject(collider) : null); IDestructible val2 = (Object.op_Implicit((Object)(object)val) ? val.GetComponent<IDestructible>() : null); bool flag = false; if (val2 != null) { if (!__instance.IsValidTarget(val2)) { return; } flag = true; } Character val3 = (Character)(object)((val2 is Character) ? val2 : null); bool flag2 = Object.op_Implicit((Object)(object)val3) && CharacterPatch.IsPrey(val3) && flag && (Object)(object)__instance.m_owner != (Object)null && __instance.m_owner.IsPlayer(); if (flag2) { SkillType skill = __instance.m_skill; bool flag3 = (((int)skill == 2 || (int)skill == 5 || (int)skill == 8) ? true : false); flag2 = flag3; } if (flag2) { CharacterPatch.CharRPCDamagePatch.IsHunting = true; } } } [HarmonyPatch] public class SEManPatch { [HarmonyPrefix] [HarmonyPatch(typeof(SEMan), "Internal_AddStatusEffect")] public static bool InternalAddStatusEffect_Prefix(SEMan __instance, ref int nameHash) { if (__instance.HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct"))) { return nameHash != StringExtensionMethods.GetStableHashCode("Cold"); } return true; } } [HarmonyPatch] public static class ZNetScenePatch { [HarmonyPostfix] [HarmonyPatch(typeof(ZNetScene), "Awake")] public static void ZNetSceneAwake_Postfix(ZNetScene __instance) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown if (!((Object)(object)__instance == (Object)null)) { List<GameObject> prefabs = __instance.m_prefabs; if (prefabs != null && prefabs.Count > 0) { __instance.GetPrefab("piece_cookingstation").GetComponent<CookingStation>().m_conversion.Add(new ItemConversion { m_cookTime = 25f, m_from = PrefabSetup._rawHareMeat.GetComponent<ItemDrop>(), m_to = PrefabSetup._cookedHareMeat.GetComponent<ItemDrop>() }); RegisterPrefabsToZNetScene.Init(); RegisterEffectsToZNetScene.Init(); Plugin._harePrefab = __instance.GetPrefab("Hare"); Plugin._hareRagdoll = __instance.GetPrefab("Hare_ragdoll"); Plugin._foodItem = __instance.GetPrefab("Carrot").GetComponent<ItemDrop>(); Helper.RunZNetSceneAwakeInvoker(); } } } } } namespace OdinsHares.Utils { public enum Toggle { On = 1, Off = 0 } } namespace OdinsHares.Functions { public class AlertedFixed : MonoBehaviour { private MonsterAI m_monsterAI; public void OnEnable() { m_monsterAI = ((Component)this).GetComponent<MonsterAI>(); } public void FixedUpdate() { Character val = ((BaseAI)m_monsterAI).FindEnemy(); if (Object.op_Implicit((Object)(object)val) && ((BaseAI)m_monsterAI).CanSenseTarget(val)) { ((BaseAI)m_monsterAI).Alert(); } } } public static class FoodStats { public static void CookedHareMeat(ItemDrop item) { ItemConfigSetup._cookedHareMeatFood.SettingChanged += delegate { item.m_itemData.m_shared.m_food = ItemConfigSetup._cookedHareMeatFood.Value; }; item.m_itemData.m_shared.m_food = ItemConfigSetup._cookedHareMeatFood.Value; ItemConfigSetup._cookedHareMeatFoodStamina.SettingChanged += delegate { item.m_itemData.m_shared.m_foodStamina = ItemConfigSetup._cookedHareMeatFoodStamina.Value; }; item.m_itemData.m_shared.m_foodStamina = ItemConfigSetup._cookedHareMeatFoodStamina.Value; ItemConfigSetup._cookedHareMeatFoodEitr.SettingChanged += delegate { item.m_itemData.m_shared.m_foodEitr = ItemConfigSetup._cookedHareMeatFoodEitr.Value; }; item.m_itemData.m_shared.m_foodEitr = ItemConfigSetup._cookedHareMeatFoodEitr.Value; ItemConfigSetup._cookedHareMeatFoodBurnTime.SettingChanged += delegate { item.m_itemData.m_shared.m_foodBurnTime = ItemConfigSetup._cookedHareMeatFoodBurnTime.Value; }; item.m_itemData.m_shared.m_foodBurnTime = ItemConfigSetup._cookedHareMeatFoodBurnTime.Value; ItemConfigSetup._cookedHareMeatFoodRegen.SettingChanged += delegate { item.m_itemData.m_shared.m_foodRegen = ItemConfigSetup._cookedHareMeatFoodRegen.Value; }; item.m_itemData.m_shared.m_foodRegen = ItemConfigSetup._cookedHareMeatFoodRegen.Value; } public static void HareStew(ItemDrop item) { ItemConfigSetup._hareStewFood.SettingChanged += delegate { item.m_itemData.m_shared.m_food = ItemConfigSetup._hareStewFood.Value; }; item.m_itemData.m_shared.m_food = ItemConfigSetup._hareStewFood.Value; ItemConfigSetup._hareStewFoodStamina.SettingChanged += delegate { item.m_itemData.m_shared.m_foodStamina = ItemConfigSetup._hareStewFoodStamina.Value; }; item.m_itemData.m_shared.m_foodStamina = ItemConfigSetup._hareStewFoodStamina.Value; ItemConfigSetup._hareStewFoodEitr.SettingChanged += delegate { item.m_itemData.m_shared.m_foodEitr = ItemConfigSetup._hareStewFoodEitr.Value; }; item.m_itemData.m_shared.m_foodEitr = ItemConfigSetup._hareStewFoodEitr.Value; ItemConfigSetup._hareStewFoodBurnTime.SettingChanged += delegate { item.m_itemData.m_shared.m_foodBurnTime = ItemConfigSetup._hareStewFoodBurnTime.Value; }; item.m_itemData.m_shared.m_foodBurnTime = ItemConfigSetup._hareStewFoodBurnTime.Value; ItemConfigSetup._hareStewFoodRegen.SettingChanged += delegate { item.m_itemData.m_shared.m_foodRegen = ItemConfigSetup._hareStewFoodRegen.Value; }; item.m_itemData.m_shared.m_foodRegen = ItemConfigSetup._hareStewFoodRegen.Value; } } internal static class Helper { public static void RunZNetSceneAwakeInvoker() { Delegate[] array = Plugin._onZNetSceneAwake?.GetInvocationList(); if (array == null) { return; } List<Delegate> list = new List<Delegate>(); while (list.Count < array.Length) { Delegate[] array2 = array; foreach (Delegate @delegate in array2) { if (!list.Contains(@delegate)) { @delegate.Method.Invoke(@delegate.Target, null); list.Add(@delegate); } } } } public static void RemoveComponent(this GameObject target, Type type) { Component component = target.GetComponent(type); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } public static T ApplyCopyOf<T>(this GameObject target, GameObject source, bool includeBaseFields = false) where T : class { return target.ApplyCopyOf(source, typeof(T), includeBaseFields) as T; } public static Object ApplyCopyOf(this GameObject target, GameObject source, Type type, bool includeBaseFields = false) { Component component = target.GetComponent(type); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } Component componentInChildren = source.GetComponentInChildren(type); component = target.AddComponent(((object)componentInChildren).GetType()); BindingFlags bindingFlags = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; if (includeBaseFields) { bindingFlags &= ~BindingFlags.DeclaredOnly; } try { PropertyInfo[] properties = ((object)componentInChildren).GetType().GetProperties(bindingFlags); foreach (PropertyInfo propertyInfo in properties) { if ((!includeBaseFields || !(propertyInfo.DeclaringType != null) || !propertyInfo.DeclaringType.ToString().Contains("UnityEngine")) && propertyInfo.CanWrite) { try { propertyInfo.SetValue(component, propertyInfo.GetValue(componentInChildren, null), null); } catch { } } } FieldInfo[] fields = ((object)componentInChildren).GetType().GetFields(bindingFlags); foreach (FieldInfo fieldInfo in fields) { if (!includeBaseFields || !(fieldInfo.DeclaringType != null) || !fieldInfo.DeclaringType.ToString().Contains("UnityEngine")) { fieldInfo.SetValue(component, fieldInfo.GetValue(componentInChildren)); } } return (Object)(object)component; } catch { return (Object)(object)component; } } public static void AddClonedObject(this ZNetScene zNetScene, GameObject gameObject, bool overWrite = true) { GameObject prefab; if ((Object)(object)(prefab = zNetScene.GetPrefab(((Object)gameObject).name)) != (Object)null) { if (!overWrite) { return; } zNetScene.m_prefabs.Remove(prefab); zNetScene.m_namedPrefabs.Remove(StringExtensionMethods.GetStableHashCode(((Object)gameObject).name)); } zNetScene.m_prefabs.Add(gameObject); zNetScene.m_namedPrefabs.Add(StringExtensionMethods.GetStableHashCode(((Object)gameObject).name), gameObject); } public static void AddClonedObject(this ObjectDB objectDB, GameObject gameObject, bool overWrite = true) { GameObject itemPrefab; if ((Object)(object)(itemPrefab = objectDB.GetItemPrefab(((Object)gameObject).name)) != (Object)null) { if (!overWrite) { return; } objectDB.m_items.Remove(itemPrefab); objectDB.m_itemByHash.Remove(StringExtensionMethods.GetStableHashCode(((Object)gameObject).name)); } objectDB.m_items.Add(gameObject); objectDB.m_itemByHash.Add(StringExtensionMethods.GetStableHashCode(((Object)gameObject).name), gameObject); } public static void AddRecipe(this ObjectDB objectDB, Recipe recipe, bool overWrite = true) { if (objectDB.m_recipes.Contains(recipe)) { if (!overWrite) { return; } objectDB.m_recipes.Remove(recipe); } objectDB.m_recipes.Add(recipe); } public static bool ObjectDBAwake() { if ((Object)(object)ObjectDB.instance != (Object)null && ObjectDB.instance.m_items.Count != 0) { return (Object)(object)ObjectDB.instance.GetItemPrefab("Wood") != (Object)null; } return false; } public static bool ZNetSceneAwake() { if ((Object)(object)ZNetScene.instance != (Object)null && ZNetScene.instance.m_prefabs.Count != 0) { return (Object)(object)ZNetScene.instance.GetPrefab("piece_workbench") != (Object)null; } return false; } public static void AddToHammer(this ObjectDB objectDB, GameObject gameObject, bool overWrite = true) { PieceTable buildPieces = objectDB.GetItemPrefab("Hammer").GetComponent<ItemDrop>().m_itemData.m_shared.m_buildPieces; if (buildPieces.m_pieces.Contains(gameObject)) { if (!overWrite) { return; } buildPieces.m_pieces.Remove(gameObject); } buildPieces.m_pieces.Add(gameObject); } } public static class ItemConfigSetup { public static ConfigEntry<bool> _lapinHoodEnable; public static ConfigEntry<string> _lapinHoodMat1; public static ConfigEntry<string> _lapinHoodMat2; public static ConfigEntry<string> _lapinHoodMat3; public static ConfigEntry<bool> _lapinTunicEnable; public static ConfigEntry<string> _lapinTunicMat1; public static ConfigEntry<string> _lapinTunicMat2; public static ConfigEntry<string> _lapinTunicMat3; public static ConfigEntry<bool> _lapinPantsEnable; public static ConfigEntry<string> _lapinPantsMat1; public static ConfigEntry<string> _lapinPantsMat2; public static ConfigEntry<string> _lapinPantsMat3; public static ConfigEntry<bool> _lapinCapeEnable; public static ConfigEntry<string> _lapinCapeMat1; public static ConfigEntry<string> _lapinCapeMat2; public static ConfigEntry<string> _lapinCapeMat3; public static ConfigEntry<bool> _hareStewEnable; public static ConfigEntry<string> _hareStewMat1; public static ConfigEntry<string> _hareStewMat2; public static ConfigEntry<string> _hareStewMat3; public static ConfigEntry<string> _hareStewMat4; public static ConfigEntry<float> _hareStewFood; public static ConfigEntry<float> _hareStewFoodStamina; public static ConfigEntry<float> _hareStewFoodEitr; public static ConfigEntry<float> _hareStewFoodBurnTime; public static ConfigEntry<float> _hareStewFoodRegen; public static ConfigEntry<float> _cookedHareMeatFood; public static ConfigEntry<float> _cookedHareMeatFoodStamina; public static ConfigEntry<float> _cookedHareMeatFoodEitr; public static ConfigEntry<float> _cookedHareMeatFoodBurnTime; public static ConfigEntry<float> _cookedHareMeatFoodRegen; private const string _enableDesc = "Enable/Disables recipe. (Needs logout)"; private const string _matDesc = "Item name : amount : amount per level (Needs logout)"; private const string _foodDesc = "Health amount added to max health."; private const string _foodStaminaDesc = "Stamina amount added to max stamina"; private const string _foodEitrDesc = "Eitr amount added to max eitr."; private const string _foodBurnTimeDesc = "Food duration."; private const string _foodRegenDesc = "Health regen."; public static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Expected O, but got Unknown //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Expected O, but got Unknown //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Expected O, but got Unknown //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Expected O, but got Unknown //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Expected O, but got Unknown //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Expected O, but got Unknown //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Expected O, but got Unknown //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Expected O, but got Unknown //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Expected O, but got Unknown //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Expected O, but got Unknown //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Expected O, but got Unknown //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Expected O, but got Unknown //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Expected O, but got Unknown string group = CreatureConfigSetup.english.Localize("$boh_hunterslapin_hood"); _lapinHoodEnable = Plugin._instance.config(group, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinHoodMat1 = Plugin._instance.config(group, "Required Material 1", "BOH_BrownHare_Hide:3:1", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinHoodMat2 = Plugin._instance.config(group, "Required Material 2", "BOH_GreyHare_Hide:3:1", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinHoodMat3 = Plugin._instance.config(group, "Required Material 3", "BOH_WhiteHare_Hide:3:1", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group2 = CreatureConfigSetup.english.Localize("$boh_hunterslapin_tunic"); _lapinTunicEnable = Plugin._instance.config(group2, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinTunicMat1 = Plugin._instance.config(group2, "Required Material 1", "BOH_BrownHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinTunicMat2 = Plugin._instance.config(group2, "Required Material 2", "BOH_GreyHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinTunicMat3 = Plugin._instance.config(group2, "Required Material 3", "BOH_WhiteHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group3 = CreatureConfigSetup.english.Localize("$boh_hunterslapin_pants"); _lapinPantsEnable = Plugin._instance.config(group3, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinPantsMat1 = Plugin._instance.config(group3, "Required Material 1", "BOH_BrownHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinPantsMat2 = Plugin._instance.config(group3, "Required Material 2", "BOH_GreyHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinPantsMat3 = Plugin._instance.config(group3, "Required Material 3", "BOH_WhiteHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group4 = CreatureConfigSetup.english.Localize("$boh_hunterslapin_cape"); _lapinCapeEnable = Plugin._instance.config(group4, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinCapeMat1 = Plugin._instance.config(group4, "Required Material 1", "BOH_BrownHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinCapeMat2 = Plugin._instance.config(group4, "Required Material 2", "BOH_GreyHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinCapeMat3 = Plugin._instance.config(group4, "Required Material 3", "BOH_WhiteHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group5 = CreatureConfigSetup.english.Localize("$boh_harestew"); _hareStewFood = Plugin._instance.config(group5, "Food", 35f, new ConfigDescription("Health amount added to max health.", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewFoodStamina = Plugin._instance.config(group5, "Food Stamina", 26f, new ConfigDescription("Stamina amount added to max stamina", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewFoodEitr = Plugin._instance.config(group5, "Food Eitr", 0f, new ConfigDescription("Eitr amount added to max eitr.", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewFoodBurnTime = Plugin._instance.config(group5, "Food Burn Time", 1500f, new ConfigDescription("Food duration.", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewFoodRegen = Plugin._instance.config(group5, "Food Regen", 2f, new ConfigDescription("Health regen.", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewEnable = Plugin._instance.config(group5, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewMat1 = Plugin._instance.config(group5, "Required Material 1", "BOH_RawHare_Meat:4", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewMat2 = Plugin._instance.config(group5, "Required Material 2", "Dandelion:6", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewMat3 = Plugin._instance.config(group5, "Required Material 3", "Mushroom:4", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _hareStewMat4 = Plugin._instance.config(group5, "Required Material 4", "Raspberry:4", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group6 = CreatureConfigSetup.english.Localize("$boh_cookedhare_meat"); _cookedHareMeatFood = Plugin._instance.config(group6, "Food", 30f, new ConfigDescription("Health amount added to max health.", (AcceptableValueBase)null, Array.Empty<object>())); _cookedHareMeatFoodStamina = Plugin._instance.config(group6, "Food Stamina", 12f, new ConfigDescription("Stamina amount added to max stamina", (AcceptableValueBase)null, Array.Empty<object>())); _cookedHareMeatFoodEitr = Plugin._instance.config(group6, "Food Eitr", 0f, new ConfigDescription("Eitr amount added to max eitr.", (AcceptableValueBase)null, Array.Empty<object>())); _cookedHareMeatFoodBurnTime = Plugin._instance.config(group6, "Food Burn Time", 1500f, new ConfigDescription("Food duration.", (AcceptableValueBase)null, Array.Empty<object>())); _cookedHareMeatFoodRegen = Plugin._instance.config(group6, "Food Regen", 2f, new ConfigDescription("Health regen.", (AcceptableValueBase)null, Array.Empty<object>())); } } public static class CreatureConfigSetup { public static ConfigEntry<bool> _brownHareEnable; public static ConfigEntry<Biome> _brownHareBiome; public static ConfigEntry<BiomeArea> _brownHareBiomeArea; public static ConfigEntry<int> _brownHareMaxSpawned; public static ConfigEntry<float> _brownHareSpawnInterval; public static ConfigEntry<float> _brownHareSpawnChance; public static ConfigEntry<float> _brownHareSpawnDistance; public static ConfigEntry<string> _brownHareGlobalKey; public static ConfigEntry<int> _brownHareGroupSizeMin; public static ConfigEntry<int> _brownHareGroupSizeMax; public static ConfigEntry<float> _brownHareGroupRadius; public static ConfigEntry<bool> _brownHareSpawnAtDay; public static ConfigEntry<bool> _brownHareSpawnAtNight; public static ConfigEntry<float> _brownHareMinAltitude; public static ConfigEntry<float> _brownHareMaxAltitude; public static ConfigEntry<float> _brownHareMinTilt; public static ConfigEntry<float> _brownHareMaxTilt; public static ConfigEntry<bool> _brownHareInForest; public static ConfigEntry<bool> _brownHareOutForest; public static ConfigEntry<float> _brownHareGroundOffset; public static ConfigEntry<int> _brownHareMaxLevel; public static ConfigEntry<int> _brownHareMinLevel; public static ConfigEntry<float> _brownHareOverrideLevelUpChance; public static ConfigEntry<float> _brownHareLevelUpMinCenterDistance; public static ConfigEntry<float> _brownHareHP; public static ConfigEntry<float> _brownHareRunSpeed; public static ConfigEntry<bool> _darkGreyHareEnable; public static ConfigEntry<Biome> _darkGreyHareBiome; public static ConfigEntry<BiomeArea> _darkGreyHareBiomeArea; public static ConfigEntry<int> _darkGreyHareMaxSpawned; public static ConfigEntry<float> _darkGreyHareSpawnInterval; public static ConfigEntry<float> _darkGreyHareSpawnChance; public static ConfigEntry<float> _darkGreyHareSpawnDistance; public static ConfigEntry<string> _darkGreyHareGlobalKey; public static ConfigEntry<int> _darkGreyHareGroupSizeMin; public static ConfigEntry<int> _darkGreyHareGroupSizeMax; public static ConfigEntry<float> _darkGreyHareGroupRadius; public static ConfigEntry<bool> _darkGreyHareSpawnAtDay; public static ConfigEntry<bool> _darkGreyHareSpawnAtNight; public static ConfigEntry<float> _darkGreyHareMinAltitude; public static ConfigEntry<float> _darkGreyHareMaxAltitude; public static ConfigEntry<float> _darkGreyHareMinTilt; public static ConfigEntry<float> _darkGreyHareMaxTilt; public static ConfigEntry<bool> _darkGreyHareInForest; public static ConfigEntry<bool> _darkGreyHareOutForest; public static ConfigEntry<float> _darkGreyHareGroundOffset; public static ConfigEntry<int> _darkGreyHareMaxLevel; public static ConfigEntry<int> _darkGreyHareMinLevel; public static ConfigEntry<float> _darkGreyHareOverrideLevelUpChance; public static ConfigEntry<float> _darkGreyHareLevelUpMinCenterDistance; public static ConfigEntry<float> _darkGreyHareHP; public static ConfigEntry<float> _darkGreyHareRunSpeed; public static ConfigEntry<bool> _exoticHareEnable; public static ConfigEntry<Biome> _exoticHareBiome; public static ConfigEntry<BiomeArea> _exoticHareBiomeArea; public static ConfigEntry<int> _exoticHareMaxSpawned; public static ConfigEntry<float> _exoticHareSpawnInterval; public static ConfigEntry<float> _exoticHareSpawnChance; public static ConfigEntry<float> _exoticHareSpawnDistance; public static ConfigEntry<string> _exoticHareGlobalKey; public static ConfigEntry<int> _exoticHareGroupSizeMin; public static ConfigEntry<int> _exoticHareGroupSizeMax; public static ConfigEntry<float> _exoticHareGroupRadius; public static ConfigEntry<bool> _exoticHareSpawnAtDay; public static ConfigEntry<bool> _exoticHareSpawnAtNight; public static ConfigEntry<float> _exoticHareMinAltitude; public static ConfigEntry<float> _exoticHareMaxAltitude; public static ConfigEntry<float> _exoticHareMinTilt; public static ConfigEntry<float> _exoticHareMaxTilt; public static ConfigEntry<bool> _exoticHareInForest; public static ConfigEntry<bool> _exoticHareOutForest; public static ConfigEntry<float> _exoticHareGroundOffset; public static ConfigEntry<int> _exoticHareMaxLevel; public static ConfigEntry<int> _exoticHareMinLevel; public static ConfigEntry<float> _exoticHareOverrideLevelUpChance; public static ConfigEntry<float> _exoticHareLevelUpMinCenterDistance; public static ConfigEntry<float> _exoticHareHP; public static ConfigEntry<float> _exoticHareRunSpeed; public static ConfigEntry<bool> _nativeHareEnable; public static ConfigEntry<Biome> _nativeHareBiome; public static ConfigEntry<BiomeArea> _nativeHareBiomeArea; public static ConfigEntry<int> _nativeHareMaxSpawned; public static ConfigEntry<float> _nativeHareSpawnInterval; public static ConfigEntry<float> _nativeHareSpawnChance; public static ConfigEntry<float> _nativeHareSpawnDistance; public static ConfigEntry<string> _nativeHareGlobalKey; public static ConfigEntry<int> _nativeHareGroupSizeMin; public static ConfigEntry<int> _nativeHareGroupSizeMax; public static ConfigEntry<float> _nativeHareGroupRadius; public static ConfigEntry<bool> _nativeHareSpawnAtDay; public static ConfigEntry<bool> _nativeHareSpawnAtNight; public static ConfigEntry<float> _nativeHareMinAltitude; public static ConfigEntry<float> _nativeHareMaxAltitude; public static ConfigEntry<float> _nativeHareMinTilt; public static ConfigEntry<float> _nativeHareMaxTilt; public static ConfigEntry<bool> _nativeHareInForest; public static ConfigEntry<bool> _nativeHareOutForest; public static ConfigEntry<float> _nativeHareGroundOffset; public static ConfigEntry<int> _nativeHareMaxLevel; public static ConfigEntry<int> _nativeHareMinLevel; public static ConfigEntry<float> _nativeHareOverrideLevelUpChance; public static ConfigEntry<float> _nativeHareLevelUpMinCenterDistance; public static ConfigEntry<float> _nativeHareHP; public static ConfigEntry<float> _nativeHareRunSpeed; public static ConfigEntry<bool> _whiteHareEnable; public static ConfigEntry<Biome> _whiteHareBiome; public static ConfigEntry<BiomeArea> _whiteHareBiomeArea; public static ConfigEntry<int> _whiteHareMaxSpawned; public static ConfigEntry<float> _whiteHareSpawnInterval; public static ConfigEntry<float> _whiteHareSpawnChance; public static ConfigEntry<float> _whiteHareSpawnDistance; public static ConfigEntry<string> _whiteHareGlobalKey; public static ConfigEntry<int> _whiteHareGroupSizeMin; public static ConfigEntry<int> _whiteHareGroupSizeMax; public static ConfigEntry<float> _whiteHareGroupRadius; public static ConfigEntry<bool> _whiteHareSpawnAtDay; public static ConfigEntry<bool> _whiteHareSpawnAtNight; public static ConfigEntry<float> _whiteHareMinAltitude; public static ConfigEntry<float> _whiteHareMaxAltitude; public static ConfigEntry<float> _whiteHareMinTilt; public static ConfigEntry<float> _whiteHareMaxTilt; public static ConfigEntry<bool> _whiteHareInForest; public static ConfigEntry<bool> _whiteHareOutForest; public static ConfigEntry<float> _whiteHareGroundOffset; public static ConfigEntry<int> _whiteHareMaxLevel; public static ConfigEntry<int> _whiteHareMinLevel; public static ConfigEntry<float> _whiteHareOverrideLevelUpChance; public static ConfigEntry<float> _whiteHareLevelUpMinCenterDistance; public static ConfigEntry<float> _whiteHareHP; public static ConfigEntry<float> _whiteHareRunSpeed; private const string _enableDesc = "Enable/Disables spawning this hare."; private const string _biomeDesc = "The biome to spawn this hare."; private const string _biomeAreaDesc = "Biome Area."; private const string _maxSpawnedDesc = "Total nr of instances (if near player is set, only instances within the max spawn radius is counted)"; private const string _spawnIntervalDesc = "How often do we spawn"; private const string _spawnChanceDesc = "Chance to spawn each spawn interval"; private const string _spawnDistanceDesc = "Minimum distance to another instance"; private const string _globalKeyDesc = "Only spawn if this key is set"; private const string _groupingDesc = "Group spawning"; private const string _timeOfDayDesc = "Time of day"; private const string _altitudeDesc = "Altitude"; private const string _terrainTiltDesc = "Terrain tilt"; private const string _forestDesc = "Forest"; private const string _statesDesc = "States"; private const string _levelDesc = "Level"; public static Localization english; public static void Init() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown english = new Localization(); english.SetupLanguage("English"); BrownHare(); DarkGreyHare(); ExoticHare(); NativeHare(); WhiteHare(); } private static void BrownHare() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Expected O, but got Unknown //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Expected O, but got Unknown //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Expected O, but got Unknown //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Expected O, but got Unknown //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Expected O, but got Unknown string group = english.Localize("$boh_hare_brown"); _brownHareEnable = Plugin._instance.config(group, "Enable", value: true, new ConfigDescription("Enable/Disables spawning this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareBiome = Plugin._instance.config<Biome>(group, "Biome", (Biome)9, new ConfigDescription("The biome to spawn this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareBiomeArea = Plugin._instance.config<BiomeArea>(group, "Biome Area", (BiomeArea)3, new ConfigDescription("Biome Area.", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareMaxSpawned = Plugin._instance.config(group, "Max Spawned", 2, new ConfigDescription("Total nr of instances (if near player is set, only instances within the max spawn radius is counted)", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareSpawnInterval = Plugin._instance.config(group, "Spawn Interval", 600f, new ConfigDescription("How often do we spawn", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareSpawnChance = Plugin._instance.config(group, "Spawn Chance", 10f, new ConfigDescription("Chance to spawn each spawn interval", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareSpawnDistance = Plugin._instance.config(group, "Spawn Distance", 64f, new ConfigDescription("Minimum distance to another instance", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareGlobalKey = Plugin._instance.config(group, "Required Global Key", string.Empty, new ConfigDescription("Only spawn if this key is set", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareGroupSizeMin = Plugin._instance.config(group, "Group Size Min", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareGroupSizeMax = Plugin._instance.config(group, "Group Size Max", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareGroupRadius = Plugin._instance.config(group, "Group Radius", 5f, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareSpawnAtDay = Plugin._instance.config(group, "Spawn At Day", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareSpawnAtNight = Plugin._instance.config(group, "Spawn At Night", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareMinAltitude = Plugin._instance.config(group, "Min Altitude", 0f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareMaxAltitude = Plugin._instance.config(group, "Max Altitude", 1000f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareMinTilt = Plugin._instance.config(group, "Min Tilt", 0f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareMaxTilt = Plugin._instance.config(group, "Max Tilt", 35f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareInForest = Plugin._instance.config(group, "In Forest", value: true, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareOutForest = Plugin._instance.config(group, "Outside Forest", value: false, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareGroundOffset = Plugin._instance.config(group, "Ground Offset", 0.5f, new ConfigDescription("States", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareMaxLevel = Plugin._instance.config(group, "Max Level", 3, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareMinLevel = Plugin._instance.config(group, "Min Level", 1, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareLevelUpMinCenterDistance = Plugin._instance.config(group, "LevelUp Min Center Distance", 800f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareOverrideLevelUpChance = Plugin._instance.config(group, "Override LevelUp Chance", -1f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _brownHareHP = Plugin._instance.config(group, "Health", 10f, new ConfigDescription("Brown hares health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); _brownHareRunSpeed = Plugin._instance.config(group, "Run Speed", 5f, new ConfigDescription("Brown hares run speed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); } private static void DarkGreyHare() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Expected O, but got Unknown //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Expected O, but got Unknown //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Expected O, but got Unknown //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Expected O, but got Unknown //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Expected O, but got Unknown string group = english.Localize("$boh_hare_darkgrey"); _darkGreyHareEnable = Plugin._instance.config(group, "Enable", value: true, new ConfigDescription("Enable/Disables spawning this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareBiome = Plugin._instance.config<Biome>(group, "Biome", (Biome)9, new ConfigDescription("The biome to spawn this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareBiomeArea = Plugin._instance.config<BiomeArea>(group, "Biome Area", (BiomeArea)3, new ConfigDescription("Biome Area.", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareMaxSpawned = Plugin._instance.config(group, "Max Spawned", 2, new ConfigDescription("Total nr of instances (if near player is set, only instances within the max spawn radius is counted)", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareSpawnInterval = Plugin._instance.config(group, "Spawn Interval", 600f, new ConfigDescription("How often do we spawn", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareSpawnChance = Plugin._instance.config(group, "Spawn Chance", 10f, new ConfigDescription("Chance to spawn each spawn interval", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareSpawnDistance = Plugin._instance.config(group, "Spawn Distance", 64f, new ConfigDescription("Minimum distance to another instance", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareGlobalKey = Plugin._instance.config(group, "Required Global Key", string.Empty, new ConfigDescription("Only spawn if this key is set", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareGroupSizeMin = Plugin._instance.config(group, "Group Size Min", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareGroupSizeMax = Plugin._instance.config(group, "Group Size Max", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareGroupRadius = Plugin._instance.config(group, "Group Radius", 5f, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareSpawnAtDay = Plugin._instance.config(group, "Spawn At Day", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareSpawnAtNight = Plugin._instance.config(group, "Spawn At Night", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareMinAltitude = Plugin._instance.config(group, "Min Altitude", 0f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareMaxAltitude = Plugin._instance.config(group, "Max Altitude", 1000f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareMinTilt = Plugin._instance.config(group, "Min Tilt", 0f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareMaxTilt = Plugin._instance.config(group, "Max Tilt", 35f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareInForest = Plugin._instance.config(group, "In Forest", value: true, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareOutForest = Plugin._instance.config(group, "Outside Forest", value: false, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareGroundOffset = Plugin._instance.config(group, "Ground Offset", 0.5f, new ConfigDescription("States", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareMaxLevel = Plugin._instance.config(group, "Max Level", 3, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareMinLevel = Plugin._instance.config(group, "Min Level", 1, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareLevelUpMinCenterDistance = Plugin._instance.config(group, "LevelUp Min Center Distance", 800f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareOverrideLevelUpChance = Plugin._instance.config(group, "Override LevelUp Chance", -1f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _darkGreyHareHP = Plugin._instance.config(group, "Health", 10f, new ConfigDescription("Darkgrey hares health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); _darkGreyHareRunSpeed = Plugin._instance.config(group, "Run Speed", 5f, new ConfigDescription("Darkgrey hares run speed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); } private static void ExoticHare() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Expected O, but got Unknown //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Expected O, but got Unknown //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Expected O, but got Unknown //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Expected O, but got Unknown //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Expected O, but got Unknown //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Expected O, but got Unknown //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Expected O, but got Unknown //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Expected O, but got Unknown //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Expected O, but got Unknown //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Expected O, but got Unknown //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Expected O, but got Unknown //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Expected O, but got Unknown string group = english.Localize("$boh_hare_exotic"); _exoticHareEnable = Plugin._instance.config(group, "Enable", value: true, new ConfigDescription("Enable/Disables spawning this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareBiome = Plugin._instance.config<Biome>(group, "Biome", (Biome)5, new ConfigDescription("The biome to spawn this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareBiomeArea = Plugin._instance.config<BiomeArea>(group, "Biome Area", (BiomeArea)3, new ConfigDescription("Biome Area.", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareMaxSpawned = Plugin._instance.config(group, "Max Spawned", 2, new ConfigDescription("Total nr of instances (if near player is set, only instances within the max spawn radius is counted)", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareSpawnInterval = Plugin._instance.config(group, "Spawn Interval", 600f, new ConfigDescription("How often do we spawn", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareSpawnChance = Plugin._instance.config(group, "Spawn Chance", 10f, new ConfigDescription("Chance to spawn each spawn interval", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareSpawnDistance = Plugin._instance.config(group, "Spawn Distance", 64f, new ConfigDescription("Minimum distance to another instance", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareGlobalKey = Plugin._instance.config(group, "Required Global Key", string.Empty, new ConfigDescription("Only spawn if this key is set", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareGroupSizeMin = Plugin._instance.config(group, "Group Size Min", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareGroupSizeMax = Plugin._instance.config(group, "Group Size Max", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareGroupRadius = Plugin._instance.config(group, "Group Radius", 5f, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareSpawnAtDay = Plugin._instance.config(group, "Spawn At Day", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareSpawnAtNight = Plugin._instance.config(group, "Spawn At Night", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareMinAltitude = Plugin._instance.config(group, "Min Altitude", 0f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareMaxAltitude = Plugin._instance.config(group, "Max Altitude", 1000f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareMinTilt = Plugin._instance.config(group, "Min Tilt", 0f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareMaxTilt = Plugin._instance.config(group, "Max Tilt", 35f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareInForest = Plugin._instance.config(group, "In Forest", value: false, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareOutForest = Plugin._instance.config(group, "Outside Forest", value: true, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareGroundOffset = Plugin._instance.config(group, "Ground Offset", 0.5f, new ConfigDescription("States", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareMaxLevel = Plugin._instance.config(group, "Max Level", 3, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareMinLevel = Plugin._instance.config(group, "Min Level", 1, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareLevelUpMinCenterDistance = Plugin._instance.config(group, "LevelUp Min Center Distance", 800f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareOverrideLevelUpChance = Plugin._instance.config(group, "Override LevelUp Chance", -1f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _exoticHareHP = Plugin._instance.config(group, "Health", 10f, new ConfigDescription("Exotic hares health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); _exoticHareRunSpeed = Plugin._instance.config(group, "Run Speed", 5f, new ConfigDescription("Exotic hares run speed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); } private static void NativeHare() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Expected O, but got Unknown //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Expected O, but got Unknown //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Expected O, but got Unknown //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Expected O, but got Unknown //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Expected O, but got Unknown string group = english.Localize("$boh_hare_native"); _nativeHareEnable = Plugin._instance.config(group, "Enable", value: true, new ConfigDescription("Enable/Disables spawning this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareBiome = Plugin._instance.config<Biome>(group, "Biome", (Biome)9, new ConfigDescription("The biome to spawn this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareBiomeArea = Plugin._instance.config<BiomeArea>(group, "Biome Area", (BiomeArea)3, new ConfigDescription("Biome Area.", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareMaxSpawned = Plugin._instance.config(group, "Max Spawned", 2, new ConfigDescription("Total nr of instances (if near player is set, only instances within the max spawn radius is counted)", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareSpawnInterval = Plugin._instance.config(group, "Spawn Interval", 600f, new ConfigDescription("How often do we spawn", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareSpawnChance = Plugin._instance.config(group, "Spawn Chance", 10f, new ConfigDescription("Chance to spawn each spawn interval", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareSpawnDistance = Plugin._instance.config(group, "Spawn Distance", 64f, new ConfigDescription("Minimum distance to another instance", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareGlobalKey = Plugin._instance.config(group, "Required Global Key", string.Empty, new ConfigDescription("Only spawn if this key is set", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareGroupSizeMin = Plugin._instance.config(group, "Group Size Min", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareGroupSizeMax = Plugin._instance.config(group, "Group Size Max", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareGroupRadius = Plugin._instance.config(group, "Group Radius", 64f, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareSpawnAtDay = Plugin._instance.config(group, "Spawn At Day", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareSpawnAtNight = Plugin._instance.config(group, "Spawn At Night", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareMinAltitude = Plugin._instance.config(group, "Min Altitude", 0f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareMaxAltitude = Plugin._instance.config(group, "Max Altitude", 1000f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareMinTilt = Plugin._instance.config(group, "Min Tilt", 0f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareMaxTilt = Plugin._instance.config(group, "Max Tilt", 35f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareInForest = Plugin._instance.config(group, "In Forest", value: true, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareOutForest = Plugin._instance.config(group, "Outside Forest", value: true, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareGroundOffset = Plugin._instance.config(group, "Ground Offset", 0.5f, new ConfigDescription("States", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareMaxLevel = Plugin._instance.config(group, "Max Level", 3, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareMinLevel = Plugin._instance.config(group, "Min Level", 1, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareLevelUpMinCenterDistance = Plugin._instance.config(group, "LevelUp Min Center Distance", 800f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareOverrideLevelUpChance = Plugin._instance.config(group, "Override LevelUp Chance", -1f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _nativeHareHP = Plugin._instance.config(group, "Health", 10f, new ConfigDescription("Native hares health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); _nativeHareRunSpeed = Plugin._instance.config(group, "Run Speed", 5f, new ConfigDescription("Native hares run speed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); } private static void WhiteHare() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Expected O, but got Unknown //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Expected O, but got Unknown //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Expected O, but got Unknown //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Expected O, but got Unknown //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Expected O, but got Unknown //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Expected O, but got Unknown //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Expected O, but got Unknown //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Expected O, but got Unknown //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Expected O, but got Unknown //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Expected O, but got Unknown //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Expected O, but got Unknown //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Expected O, but got Unknown string group = english.Localize("$boh_hare_white"); _whiteHareEnable = Plugin._instance.config(group, "Enable", value: true, new ConfigDescription("Enable/Disables spawning this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareBiome = Plugin._instance.config<Biome>(group, "Biome", (Biome)5, new ConfigDescription("The biome to spawn this hare.", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareBiomeArea = Plugin._instance.config<BiomeArea>(group, "Biome Area", (BiomeArea)3, new ConfigDescription("Biome Area.", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareMaxSpawned = Plugin._instance.config(group, "Max Spawned", 2, new ConfigDescription("Total nr of instances (if near player is set, only instances within the max spawn radius is counted)", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareSpawnInterval = Plugin._instance.config(group, "Spawn Interval", 600f, new ConfigDescription("How often do we spawn", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareSpawnChance = Plugin._instance.config(group, "Spawn Chance", 10f, new ConfigDescription("Chance to spawn each spawn interval", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareSpawnDistance = Plugin._instance.config(group, "Spawn Distance", 64f, new ConfigDescription("Minimum distance to another instance", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareGlobalKey = Plugin._instance.config(group, "Required Global Key", string.Empty, new ConfigDescription("Only spawn if this key is set", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareGroupSizeMin = Plugin._instance.config(group, "Group Size Min", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareGroupSizeMax = Plugin._instance.config(group, "Group Size Max", 1, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareGroupRadius = Plugin._instance.config(group, "Group Radius", 5f, new ConfigDescription("Group spawning", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareSpawnAtDay = Plugin._instance.config(group, "Spawn At Day", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareSpawnAtNight = Plugin._instance.config(group, "Spawn At Night", value: true, new ConfigDescription("Time of day", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareMinAltitude = Plugin._instance.config(group, "Min Altitude", 0f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareMaxAltitude = Plugin._instance.config(group, "Max Altitude", 1000f, new ConfigDescription("Altitude", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareMinTilt = Plugin._instance.config(group, "Min Tilt", 0f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareMaxTilt = Plugin._instance.config(group, "Max Tilt", 35f, new ConfigDescription("Terrain tilt", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareInForest = Plugin._instance.config(group, "In Forest", value: false, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareOutForest = Plugin._instance.config(group, "Outside Forest", value: true, new ConfigDescription("Forest", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareGroundOffset = Plugin._instance.config(group, "Ground Offset", 0.5f, new ConfigDescription("States", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareMaxLevel = Plugin._instance.config(group, "Max Level", 3, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareMinLevel = Plugin._instance.config(group, "Min Level", 1, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareLevelUpMinCenterDistance = Plugin._instance.config(group, "LevelUp Min Center Distance", 800f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareOverrideLevelUpChance = Plugin._instance.config(group, "Override LevelUp Chance", -1f, new ConfigDescription("Level", (AcceptableValueBase)null, Array.Empty<object>())); _whiteHareHP = Plugin._instance.config(group, "Health", 10f, new ConfigDescription("White hares health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); _whiteHareRunSpeed = Plugin._instance.config(group, "Run Speed", 5f, new ConfigDescription("White hares run speed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); } } public static class PieceConfigSetup { public static ConfigEntry<string> _brownHareRugMat; public static ConfigEntry<string> _greyHareRugMat; public static ConfigEntry<string> _whiteHareRugMat; public static ConfigEntry<string> _furrBedMat1; public static ConfigEntry<string> _furrBedMat2; public static ConfigEntry<string> _furrBedMat3; public static ConfigEntry<string> _furrBedMat4; public static ConfigEntry<string> _odinsTrapMat1; public static ConfigEntry<string> _odinsTrapMat2; public static ConfigEntry<string> _odinsTrapMat3; public static ConfigEntry<string> _odinsTrapMat4; private const string _matDesc = "Item name : amount : recover (Needs logout)"; public static void Init() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Expected O, but got Unknown //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Expected O, but got Unknown string group = CreatureConfigSetup.english.Localize("$boh_rug_brown"); _brownHareRugMat = Plugin._instance.config(group, "Required Material", "BOH_BrownHare_Hide:10:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group2 = CreatureConfigSetup.english.Localize("$boh_rug_grey"); _greyHareRugMat = Plugin._instance.config(group2, "Required Material", "BOH_GreyHare_Hide:10:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group3 = CreatureConfigSetup.english.Localize("$boh_rug_white"); _whiteHareRugMat = Plugin._instance.config(group3, "Required Material", "BOH_WhiteHare_Hide:10:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group4 = CreatureConfigSetup.english.Localize("$boh_furrbed"); _furrBedMat1 = Plugin._instance.config(group4, "Required Material 1", "BOH_BrownHare_Hide:10:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _furrBedMat2 = Plugin._instance.config(group4, "Required Material 2", "BOH_GreyHare_Hide:10:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _furrBedMat3 = Plugin._instance.config(group4, "Required Material 3", "BOH_WhiteHare_Hide:10:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _furrBedMat4 = Plugin._instance.config(group4, "Required Material 4", "FineWood:30:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group5 = CreatureConfigSetup.english.Localize("$boh_odinstrap"); _odinsTrapMat1 = Plugin._instance.config(group5, "Required Material 1", "Copper:6:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _odinsTrapMat2 = Plugin._instance.config(group5, "Required Material 2", "Tin:4:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _odinsTrapMat3 = Plugin._instance.config(group5, "Required Material 3", "Stone:2:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _odinsTrapMat4 = Plugin._instance.config(group5, "Required Material 4", "Wood:8:true", new ConfigDescription("Item name : amount : recover (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); } } public static class PrefabSetup { public static AssetBundle _hareBundle; public static GameObject _brownHare; public static GameObject _brownHareKitten; public static GameObject _darkGreyHare; public static GameObject _darkGreyHareKitten; public static GameObject _exoticHare; public static GameObject _exoticHareKitten; public static GameObject _huntersLapinCape; public static GameObject _huntersLapinHood; public static GameObject _huntersLapinPants; public static GameObject _huntersLapinTunic; public static GameObject _nativeHare; public static GameObject _nativeHareKitten; public static GameObject _whiteHare; public static GameObject _whiteHareKitten; public static GameObject _brownHareHide; public static GameObject _cookedHareMeat; public static GameObject _furrBed; public static GameObject _greyHareHide; public static GameObject _hareKitten; public static GameObject _brownHareRug; public static GameObject _greyHareRug; public static GameObject _whiteHareRug; public static GameObject _hareStew; public static GameObject _odinsTrap; public static GameObject _rawHareMeat; public static GameObject _whiteHareHide; public static GameObject _sfxBirth; public static GameObject _vfxBirth; public static GameObject _sfxLove; public static GameObject _vfxLove; public static GameObject _fxDeath; public static GameObject _sfxDeath; public static void Init() { _hareBundle = GetAssetBundleFromResources("harebundle"); _brownHare = _hareBundle.LoadAsset<GameObject>("BOH_Hare_Brown"); _brownHareKitten = _hareBundle.LoadAsset<GameObject>("BOH_Hare_BrownKitten"); _darkGreyHare = _hareBundle.LoadAsset<GameObject>("BOH_Hare_DarkGrey"); _darkGreyHareKitten = _hareBundle.LoadAsset<GameObject>("BOH_Hare_DarkGreyKitten"); _exoticHare = _hareBundle.LoadAsset<GameObject>("BOH_Hare_Exotic"); _exoticHareKitten = _hareBundle.LoadAsset<GameObject>("BOH_Hare_ExoticKitten"); _huntersLapinCape = _hareBundle.LoadAsset<GameObject>("BOH_HuntersLapinCape"); ShaderReplacer.Replace(_huntersLapinCape); _huntersLapinHood = _hareBundle.LoadAsset<GameObject>("BOH_HuntersLapinHood"); ShaderReplacer.Replace(_huntersLapinHood); _huntersLapinPants = _hareBundle.LoadAsset<GameObject>("BOH_HuntersLapinPants"); ShaderReplacer.Replace(_huntersLapinPants); _huntersLapinTunic = _hareBundle.LoadAsset<GameObject>("BOH_HuntersLapinTunic"); ShaderReplacer.Replace(_huntersLapinTunic); _nativeHare = _hareBundle.LoadAsset<GameObject>("BOH_Hare_Native"); _nativeHareKitten = _hareBundle.LoadAsset<GameObject>("BOH_Hare_NativeKitten"); _whiteHare = _hareBundle.LoadAsset<GameObject>("BOH_Hare_White"); _whiteHareKitten = _hareBundle.LoadAsset<GameObject>("BOH_Hare_WhiteKitten"); _brownHareHide = _hareBundle.LoadAsset<GameObject>("BOH_BrownHare_Hide"); _cookedHareMeat = _hareBundle.LoadAsset<GameObject>("BOH_CookedHare_Meat"); _furrBed = _hareBundle.LoadAsset<GameObject>("BOH_FurrBed"); ShaderReplacer.Replace(_furrBed); _greyHareHide = _hareBundle.LoadAsset<GameObject>("BOH_GreyHare_Hide"); _hareKitten = _hareBundle.LoadAsset<GameObject>("BOH_Hare_Kitten"); ShaderReplacer.Replace(_hareKitten); _brownHareRug = _hareBundle.LoadAsset<GameObject>("BOH_Hare_Rug_Brown"); ShaderReplacer.Replace(_brownHareRug); _greyHareRug = _hareBundle.LoadAsset<GameObject>("BOH_Hare_Rug_Grey"); ShaderReplacer.Replace(_greyHareRug); _whiteHareRug = _hareBundle.LoadAsset<GameObject>("BOH_Hare_Rug_White"); ShaderReplacer.Replace(_whiteHareRug); _hareStew = _hareBundle.LoadAsset<GameObject>("BOH_HareStew"); _odinsTrap = _hareBundle.LoadAsset<GameObject>("BOH_OdinsTrap"); _rawHareMeat = _hareBundle.LoadAsset<GameObject>("BOH_RawHare_Meat"); _whiteHareHide = _hareBundle.LoadAsset<GameObject>("BOH_WhiteHare_Hide"); _sfxBirth = _hareBundle.LoadAsset<GameObject>("boh_sfx_hare_birth"); _vfxBirth = _hareBundle.LoadAsset<GameObject>("boh_vfx_hare_birth"); _sfxLove = _hareBundle.LoadAsset<GameObject>("boh_sfx_hare_love"); _vfxLove = _hareBundle.LoadAsset<GameObject>("boh_vfx_hare_love"); _fxDeath = _hareBundle.LoadAsset<GameObject>("boh_fx_hare_death"); _sfxDeath = _hareBundle.LoadAsset<GameObject>("boh_sfx_hare_death_vocal"); } private static AssetBundle GetAssetBundleFromResources(string filename) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); string name = executingAssembly.GetManifestResourceNames().Single((string x) => x.EndsWith(filename)); using Stream stream = executingAssembly.GetManifestResourceStream(name); return AssetBundle.LoadFromStream(stream); } } public static class RegisterEffectsToZNetScene { private static ZNetScene _zNetScene => ZNetScene.instance; public static void Init() { if (Helper.ZNetSceneAwake()) { _zNetScene.AddClonedObject(PrefabSetup._sfxBirth); _zNetScene.AddClonedObject(PrefabSetup._vfxBirth); _zNetScene.AddClonedObject(PrefabSetup._sfxLove); _zNetScene.AddClonedObject(PrefabSetup._vfxLove); _zNetScene.AddClonedObject(PrefabSetup._fxDeath); _zNetScene.AddClonedObject(PrefabSetup._sfxDeath); GameObject gameObject = PrefabSetup._hareBundle.LoadAsset<GameObject>("BOH_Hare_BrownRagdoll"); _zNetScene.AddClonedObject(gameObject); GameObject gameObject2 = PrefabSetup._hareBundle.LoadAsset<GameObject>("BOH_Hare_DarkGreyRagdoll"); _zNetScene.AddClonedObject(gameObject2); GameObject gameObject3 = PrefabSetup._hareBundle.LoadAsset<GameObject>("BOH_Hare_ExoticRagdoll"); _zNetScene.AddClonedObject(gameObject3); GameObject gameObject4 = PrefabSetup._hareBundle.LoadAsset<GameObject>("BOH_Hare_NativeRagdoll"); _zNetScene.AddClonedObject(gameObject4); GameObject gameObject5 = PrefabSetup._hareBundle.LoadAsset<GameObject>("BOH_Hare_WhiteRagdoll"); _zNetScene.AddClonedObject(gameObject5); GameObject gameObject6 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_fx_hare_backstab"); _zNetScene.AddClonedObject(gameObject6); GameObject gameObject7 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_fx_hare_crit"); _zNetScene.AddClonedObject(gameObject7); GameObject gameObject8 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_fx_hare_pet"); _zNetScene.AddClonedObject(gameObject8); GameObject gameObject9 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_fx_hare_tamed"); _zNetScene.AddClonedObject(gameObject9); GameObject gameObject10 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_fx_odintrap_arm"); _zNetScene.AddClonedObject(gameObject10); GameObject gameObject11 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_fx_odintrap_trigger"); _zNetScene.AddClonedObject(gameObject11); GameObject gameObject12 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_bonemass_hit"); _zNetScene.AddClonedObject(gameObject12); GameObject gameObject13 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_build_hammer_default"); _zNetScene.AddClonedObject(gameObject13); GameObject gameObject14 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_build_hammer_metal"); _zNetScene.AddClonedObject(gameObject14); GameObject gameObject15 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_build_hammer_wood"); _zNetScene.AddClonedObject(gameObject15); GameObject gameObject16 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_hare_alerted"); _zNetScene.AddClonedObject(gameObject16); GameObject gameObject17 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_hare_consume"); _zNetScene.AddClonedObject(gameObject17); GameObject gameObject18 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_hare_footstep_run"); _zNetScene.AddClonedObject(gameObject18); GameObject gameObject19 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_hare_hit"); _zNetScene.AddClonedObject(gameObject19); GameObject gameObject20 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_hare_idle"); _zNetScene.AddClonedObject(gameObject20); GameObject gameObject21 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_hare_idle_eating"); _zNetScene.AddClonedObject(gameObject21); GameObject gameObject22 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_metal_blocked"); _zNetScene.AddClonedObject(gameObject22); GameObject gameObject23 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_sfx_wood_destroyed"); _zNetScene.AddClonedObject(gameObject23); GameObject gameObject24 = PrefabSetup._hareBundle.LoadAsset<GameObject>("boh_vfx_bloodhit"); _zN