Decompiled source of OdinsHares v1.2.3
OdinsHares.dll
Decompiled 3 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 BepInEx.Logging; using HarmonyLib; using JetBrains.Annotations; using LocalizationManager; using Microsoft.CodeAnalysis; using OdinsHares.Functions; using OdinsHares.Utils; using ServerSync; using TMPro; using UnityEngine; 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: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyFileVersion("1.2.3")] [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: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyConfiguration("")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.3.0")] [module: UnverifiableCode] [module: <7eb2efa5-5b30-48ff-be82-1f14453022c7>RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [<c9f257f7-357a-403a-8737-0c5dd743fffb>Embedded] internal sealed class <c9f257f7-357a-403a-8737-0c5dd743fffb>EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [<c9f257f7-357a-403a-8737-0c5dd743fffb>Embedded] [CompilerGenerated] internal sealed class <7eb2efa5-5b30-48ff-be82-1f14453022c7>RefSafetyRulesAttribute : Attribute { public readonly int Version; public <7eb2efa5-5b30-48ff-be82-1f14453022c7>RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace OdinsHares { [BepInPlugin("blacks7ar.OdinsHares", "OdinsHares", "1.2.3")] 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.3"; public const string modLink = "https://valheim.thunderstore.io/package/blacks7ar/OdinsHares/"; private static string configFileName = "blacks7ar.OdinsHares.cfg"; private static string configFileFullPath; public static readonly ManualLogSource OHLogger; private static readonly Harmony _harmony; private static readonly ConfigSync _configSync; 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; } private void ConfigWatcher() { FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(Paths.ConfigPath, configFileName); fileSystemWatcher.Changed += OnConfigChanged; fileSystemWatcher.Created += OnConfigChanged; fileSystemWatcher.Renamed += OnConfigChanged; fileSystemWatcher.IncludeSubdirectories = true; fileSystemWatcher.SynchronizingObject = ThreadingHelper.SynchronizingObject; fileSystemWatcher.EnableRaisingEvents = true; } private void OnConfigChanged(object sender, FileSystemEventArgs e) { if (!File.Exists(configFileFullPath)) { return; } try { Logging.LogDebug("OnConfigChanged called.."); ((BaseUnityPlugin)this).Config.Reload(); } catch { Logging.LogError("There was an issue loading your " + configFileName); Logging.LogError("Please check your config entries for spelling and format!"); } } public void Awake() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown Localizer.Load(); _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(); Assembly executingAssembly = Assembly.GetExecutingAssembly(); _harmony.PatchAll(executingAssembly); ConfigWatcher(); _onZNetSceneAwake = (Action)Delegate.Combine(_onZNetSceneAwake, new Action(HareSetup.Init)); } private void OnDestroy() { ((BaseUnityPlugin)this).Config.Save(); } static Plugin() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown string configPath = Paths.ConfigPath; char directorySeparatorChar = Path.DirectorySeparatorChar; configFileFullPath = configPath + directorySeparatorChar + configFileName; OHLogger = Logger.CreateLogSource("OdinsHares"); _harmony = new Harmony("blacks7ar.OdinsHares"); _configSync = new ConfigSync("blacks7ar.OdinsHares") { DisplayName = "OdinsHares", CurrentVersion = "1.2.3", MinimumRequiredVersion = "1.2.3", ModRequired = true }; } } } namespace OdinsHares.Patches { [HarmonyPatch] public class ObjectDBPatch { [HarmonyPatch(typeof(ObjectDB), "Awake")] [HarmonyPriority(700)] [HarmonyPostfix] public static void Awake_Postfix(ObjectDB __instance) { RegisterPrefabsToObjectDB.Init(); RegisterRecipesToObjectDB.Init(); __instance.UpdateItemHashes(); } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [HarmonyPostfix] [HarmonyPriority(700)] public static void CopyOtherDB_Postfix(ObjectDB __instance) { RegisterPrefabsToObjectDB.Init(); RegisterRecipesToObjectDB.Init(); __instance.UpdateItemHashes(); } } [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("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("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("Hunters Instinct")) { return true; } if (EnvMan.instance.IsCold()) { ((Character)__instance).GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("Cold"), false); } return true; } } [HarmonyPatch] public class ProjectilePatch { [HarmonyPrefix] [HarmonyPatch(typeof(Projectile), "OnHit")] 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("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_food = 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Expected O, but got Unknown //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Expected O, but got Unknown //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Expected O, but got Unknown //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Expected O, but got Unknown //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Expected O, but got Unknown //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Expected O, but got Unknown //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Expected O, but got Unknown //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Expected O, but got Unknown //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Expected O, but got Unknown //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Expected O, but got Unknown //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Expected O, but got Unknown //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Expected O, but got Unknown //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Expected O, but got Unknown //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Expected O, but got Unknown //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Expected O, but got Unknown string group = Localization.instance.Localize("$boh_hunterslapin_hood").Trim(); _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 = Localization.instance.Localize("$boh_hunterslapin_tunic").Trim(); _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 = Localization.instance.Localize("$boh_hunterslapin_pants").Trim(); _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 = Localization.instance.Localize("$boh_hunterslapin_cape").Trim(); _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 = Localization.instance.Localize("$boh_harestew").Trim(); _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 = Localization.instance.Localize("$boh_cookedhare_meat").Trim(); _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 void Init() { BrownHare(); DarkGreyHare(); ExoticHare(); NativeHare(); WhiteHare(); } private static void BrownHare() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Expected O, but got Unknown //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Expected O, but got Unknown //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Expected O, but got Unknown //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Expected O, but got Unknown //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Expected O, but got Unknown //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Expected O, but got Unknown string group = Localization.instance.Localize("$boh_hare_brown").Trim(); _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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Expected O, but got Unknown //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Expected O, but got Unknown //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Expected O, but got Unknown //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Expected O, but got Unknown //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Expected O, but got Unknown //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Expected O, but got Unknown string group = Localization.instance.Localize("$boh_hare_darkgrey").Trim(); _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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: 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_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Expected O, but got Unknown //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Expected O, but got Unknown //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Expected O, but got Unknown //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0319: 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_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Expected O, but got Unknown //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Expected O, but got Unknown //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Expected O, but got Unknown //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Expected O, but got Unknown string group = Localization.instance.Localize("$boh_hare_exotic").Trim(); _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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Expected O, but got Unknown //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Expected O, but got Unknown //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Expected O, but got Unknown //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Expected O, but got Unknown //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Expected O, but got Unknown //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Expected O, but got Unknown string group = Localization.instance.Localize("$boh_hare_native").Trim(); _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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: 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_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Expected O, but got Unknown //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Expected O, but got Unknown //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Expected O, but got Unknown //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0319: 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_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Expected O, but got Unknown //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Expected O, but got Unknown //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Expected O, but got Unknown //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Expected O, but got Unknown string group = Localization.instance.Localize("$boh_hare_white").Trim(); _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 Logging { public static void LogDebug(string debug) { Plugin.OHLogger.LogDebug((object)debug); } public static void LogInfo(string info) { Plugin.OHLogger.LogInfo((object)info); } public static void LogWarning(string warning) { Plugin.OHLogger.LogWarning((object)warning); } public static void LogError(string error) { Plugin.OHLogger.LogError((object)error); } } 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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Expected O, but got Unknown //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Expected O, but got Unknown string group = Localization.instance.Localize("$boh_rug_brown").Trim(); _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 = Localization.instance.Localize("$boh_rug_grey").Trim(); _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 = Localization.instance.Localize("$boh_rug_white").Trim(); _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 = Localization.instance.Localize("$boh_furrbed").Trim(); _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 = Localization.instance.Localize("$boh_odinstrap").Trim(); _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(gameOb