Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of OdinsHares v1.3.2
OdinsHares.dll
Decompiled 3 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using HarmonyLib; using JetBrains.Annotations; using LocalizationManager; using Microsoft.CodeAnalysis; using OdinsHares.Functions; using OdinsHares.Utils; using ServerSync; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Core.Tokens; using YamlDotNet.Helpers; using YamlDotNet.Serialization; using YamlDotNet.Serialization.Converters; using YamlDotNet.Serialization.EventEmitters; using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NodeDeserializers; using YamlDotNet.Serialization.NodeTypeResolvers; using YamlDotNet.Serialization.ObjectFactories; using YamlDotNet.Serialization.ObjectGraphTraversalStrategies; using YamlDotNet.Serialization.ObjectGraphVisitors; using YamlDotNet.Serialization.Schemas; using YamlDotNet.Serialization.TypeInspectors; using YamlDotNet.Serialization.TypeResolvers; using YamlDotNet.Serialization.Utilities; using YamlDotNet.Serialization.ValueDeserializers; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("blacks7ar")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.3.2")] [assembly: AssemblyInformationalVersion("1.0.0+c24319330cd15e1c404466debc18e41e5f0b801f")] [assembly: AssemblyProduct("OdinsHares")] [assembly: AssemblyTitle("OdinsHares")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace OdinsHares { [BepInPlugin("blacks7ar.OdinsHares", "OdinsHares", "1.3.2")] 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.3.2"; public const string modLink = "https://valheim.thunderstore.io/package/blacks7ar/OdinsHares/"; private static readonly Harmony _harmony = new Harmony("blacks7ar.OdinsHares"); private static readonly ConfigSync _configSync = new ConfigSync("blacks7ar.OdinsHares") { DisplayName = "OdinsHares", CurrentVersion = "1.3.2", MinimumRequiredVersion = "1.3.2", ModRequired = true }; private static ConfigEntry<Toggle> _serverConfigLocked; public static ConfigEntry<float> _dropChance; public static ConfigEntry<int> _dropBonus; public static GameObject _harePrefab; public static GameObject _hareRagdoll; public static ItemDrop _foodItem; public static Action _onZNetSceneAwake; public static Plugin _instance; public ConfigEntry<T> config<T>(string group, string name, T value, ConfigDescription description, bool synchronizedSetting = true) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown ConfigDescription val = new ConfigDescription(description.Description + (synchronizedSetting ? " [Synced with Server]" : " [Not Synced with Server]"), description.AcceptableValues, description.Tags); ConfigEntry<T> val2 = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, val); _configSync.AddConfigEntry<T>(val2).SynchronizedConfig = synchronizedSetting; return val2; } public void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown _instance = this; ((BaseUnityPlugin)this).Config.SaveOnConfigSet = false; Localizer.Load(); _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(); _onZNetSceneAwake = (Action)Delegate.Combine(_onZNetSceneAwake, new Action(HareSetup.Init)); Assembly executingAssembly = Assembly.GetExecutingAssembly(); _harmony.PatchAll(executingAssembly); ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; ((BaseUnityPlugin)this).Config.Save(); } private void OnDestroy() { ((BaseUnityPlugin)this).Config.Save(); } } } namespace OdinsHares.Patches { [HarmonyPatch] public class CharacterDropPatch { [HarmonyPatch(typeof(CharacterDrop), "GenerateDropList")] private static class GenerateDropListPatch { [HarmonyPriority(100)] [UsedImplicitly] private static void Postfix(CharacterDrop __instance, ref List<KeyValuePair<GameObject, int>> __result) { if (!CharacterPatch.CharRPCDamagePatch.IsHunting || (Object)(object)__instance.m_character == (Object)null || !CharacterPatch.IsPrey(__instance.m_character)) { return; } Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null || !((Character)localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct"))) { return; } List<KeyValuePair<GameObject, int>> list = new List<KeyValuePair<GameObject, int>>(); int num = ((!Object.op_Implicit((Object)(object)__instance.m_character)) ? 1 : Mathf.Max(1, (int)Mathf.Pow(2f, (float)(__instance.m_character.GetLevel() - 1)))); foreach (Drop drop in __instance.m_drops) { if ((Object)(object)drop.m_prefab == (Object)null) { continue; } float num2 = drop.m_chance; if (drop.m_levelMultiplier) { num2 *= (float)num; } if (Random.value <= num2) { int num3 = Random.Range(drop.m_amountMin, drop.m_amountMax); if (drop.m_levelMultiplier) { num3 *= num; } if (drop.m_onePerPlayer) { num3 = ZNet.instance.GetNrOfPlayers(); } if (num3 > 0) { SE_HuntersInstinct sE_HuntersInstinct = ((Character)localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct")) as SE_HuntersInstinct; int num4 = new Random().Next(1, 100); Debug.Log((object)("Random Chance: " + num4)); if ((float)num4 <= sE_HuntersInstinct.GetChance()) { int value = Mathf.FloorToInt((float)num3 * sE_HuntersInstinct.GetBonus() + Random.Range(0f, 1f)); list.Add(new KeyValuePair<GameObject, int>(drop.m_prefab, value)); } else { list.Add(new KeyValuePair<GameObject, int>(drop.m_prefab, num3)); } } } __result = list; } } } } [HarmonyPatch] public class CharacterPatch { [HarmonyPatch(typeof(Character), "RPC_Damage")] public static class CharRPCDamagePatch { public static bool IsHunting; public static void Prefix(Character __instance, HitData hit) { Character attacker = hit.GetAttacker(); Player val = (Player)(object)((attacker is Player) ? attacker : null); if (val != null && ((Humanoid)val).GetCurrentWeapon() != null && IsUsingHuntingWeapon(val) && IsPrey(__instance) && ((Character)val).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct"))) { IsHunting = true; } } } [HarmonyPostfix] [HarmonyPatch(typeof(Character), "CustomFixedUpdate")] 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 ItemDropPatch { [HarmonyPostfix] [HarmonyPatch(typeof(ItemDrop), "Awake")] private static void Awake_Postfix(ItemDrop __instance) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name != "main" || (Object)(object)__instance == (Object)null) { return; } string name = __instance.m_itemData.m_shared.m_name; if (!(name == "$boh_cookedhare_meat")) { if (name == "$boh_harestew") { FoodStats.HareStew(__instance); } } else { FoodStats.CookedHareMeat(__instance); } } } [HarmonyPatch] public class ObjectDBPatch { [HarmonyPriority(700)] [HarmonyPostfix] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static void Awake_Postfix(ObjectDB __instance) { RegisterPrefabsToObjectDB.Init(); RegisterRecipesToObjectDB.Init(); __instance.UpdateRegisters(); } [HarmonyPriority(700)] [HarmonyPostfix] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static void CopyOtherDB_Postfix(ObjectDB __instance) { RegisterPrefabsToObjectDB.Init(); RegisterRecipesToObjectDB.Init(); __instance.UpdateRegisters(); } } [HarmonyPatch] public class PlayerPatch { [HarmonyPrefix] [HarmonyPatch(typeof(Player), "UpdateEnvStatusEffects")] private static bool UpdateEnvStatusEffects_Prefix(Player __instance, float dt) { if (!((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Hunters Instinct"))) { return true; } if (EnvMan.IsCold()) { ((Character)__instance).GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("Cold"), false); } return true; } } [HarmonyPatch] public class ProjectilePatch { [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(StringExtensionMethods.GetStableHashCode("Hunters Instinct"))) { return nameHash != StringExtensionMethods.GetStableHashCode("Cold"); } return true; } } [HarmonyPatch(typeof(SpawnSystem), "UpdateSpawnList")] public class SpawnSytemPatch { public static void Postfix(SpawnSystem __instance) { SpawnerSetup.Init(__instance); } } [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 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected O, but got Unknown //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Expected O, but got Unknown //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Expected O, but got Unknown //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0336: 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_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Expected O, but got Unknown //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown string group = "Brown Hare"; _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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected O, but got Unknown //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Expected O, but got Unknown //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Expected O, but got Unknown //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0336: 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_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Expected O, but got Unknown //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown string group = "DarkGrey Hare"; _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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Expected O, but got Unknown //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Expected O, but got Unknown //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Expected O, but got Unknown //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Expected O, but got Unknown //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Expected O, but got Unknown //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Expected O, but got Unknown //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Expected O, but got Unknown //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Expected O, but got Unknown //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Expected O, but got Unknown string group = "Exotic Hare"; _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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected O, but got Unknown //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Expected O, but got Unknown //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Expected O, but got Unknown //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0336: 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_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Expected O, but got Unknown //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown string group = "Native Hare"; _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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Expected O, but got Unknown //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Expected O, but got Unknown //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Expected O, but got Unknown //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Expected O, but got Unknown //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Expected O, but got Unknown //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Expected O, but got Unknown //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Expected O, but got Unknown //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Expected O, but got Unknown //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Expected O, but got Unknown string group = "White Hare"; _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 FoodStats { public static void CookedHareMeat(ItemDrop item) { ItemConfigSetup._cookedHareMeatFood.SettingChanged += delegate { item.m_itemData.m_shared.m_food = ItemConfigSetup._cookedHareMeatFood.Value; }; item.m_itemData.m_shared.m_food = ItemConfigSetup._cookedHareMeatFood.Value; ItemConfigSetup._cookedHareMeatFoodStamina.SettingChanged += delegate { item.m_itemData.m_shared.m_foodStamina = ItemConfigSetup._cookedHareMeatFoodStamina.Value; }; item.m_itemData.m_shared.m_foodStamina = ItemConfigSetup._cookedHareMeatFoodStamina.Value; ItemConfigSetup._cookedHareMeatFoodEitr.SettingChanged += delegate { item.m_itemData.m_shared.m_foodEitr = ItemConfigSetup._cookedHareMeatFoodEitr.Value; }; item.m_itemData.m_shared.m_foodEitr = ItemConfigSetup._cookedHareMeatFoodEitr.Value; ItemConfigSetup._cookedHareMeatFoodBurnTime.SettingChanged += delegate { item.m_itemData.m_shared.m_foodBurnTime = ItemConfigSetup._cookedHareMeatFoodBurnTime.Value; }; item.m_itemData.m_shared.m_foodBurnTime = ItemConfigSetup._cookedHareMeatFoodBurnTime.Value; ItemConfigSetup._cookedHareMeatFoodRegen.SettingChanged += delegate { item.m_itemData.m_shared.m_foodRegen = ItemConfigSetup._cookedHareMeatFoodRegen.Value; }; item.m_itemData.m_shared.m_foodRegen = ItemConfigSetup._cookedHareMeatFoodRegen.Value; } public static void HareStew(ItemDrop item) { ItemConfigSetup._hareStewFood.SettingChanged += delegate { item.m_itemData.m_shared.m_food = ItemConfigSetup._hareStewFood.Value; }; item.m_itemData.m_shared.m_food = ItemConfigSetup._hareStewFood.Value; ItemConfigSetup._hareStewFoodStamina.SettingChanged += delegate { item.m_itemData.m_shared.m_foodStamina = ItemConfigSetup._hareStewFoodStamina.Value; }; item.m_itemData.m_shared.m_foodStamina = ItemConfigSetup._hareStewFoodStamina.Value; ItemConfigSetup._hareStewFoodEitr.SettingChanged += delegate { item.m_itemData.m_shared.m_foodEitr = ItemConfigSetup._hareStewFoodEitr.Value; }; item.m_itemData.m_shared.m_foodEitr = ItemConfigSetup._hareStewFoodEitr.Value; ItemConfigSetup._hareStewFoodBurnTime.SettingChanged += delegate { item.m_itemData.m_shared.m_foodBurnTime = ItemConfigSetup._hareStewFoodBurnTime.Value; }; item.m_itemData.m_shared.m_foodBurnTime = ItemConfigSetup._hareStewFoodBurnTime.Value; ItemConfigSetup._hareStewFoodRegen.SettingChanged += delegate { item.m_itemData.m_shared.m_foodRegen = ItemConfigSetup._hareStewFoodRegen.Value; }; item.m_itemData.m_shared.m_foodRegen = ItemConfigSetup._hareStewFoodRegen.Value; } } public static class HareSetup { public static void Init() { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)Plugin._harePrefab.GetComponent<Tameable>())) { Plugin._harePrefab.RemoveComponent(typeof(AnimalAI)); Plugin._harePrefab.RemoveComponent(typeof(Character)); MonsterAI obj = Plugin._harePrefab.ApplyCopyOf<MonsterAI>(PrefabSetup._darkGreyHare); obj.m_attackPlayerObjects = false; obj.m_consumeItems.Add(Plugin._foodItem); Plugin._harePrefab.ApplyCopyOf(PrefabSetup._darkGreyHare, typeof(Tameable)); Procreation val = Plugin._harePrefab.ApplyCopyOf<Procreation>(PrefabSetup._darkGreyHare); Humanoid obj2 = Plugin._harePrefab.ApplyCopyOf<Humanoid>(PrefabSetup._darkGreyHare); ((Character)obj2).m_eye = ((Component)obj2).transform.Find("EyePos"); ((Character)obj2).m_name = "$enemy_hare"; ((Character)obj2).m_deathEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[3] { new EffectData { m_prefab = PrefabSetup._fxDeath, m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = Plugin._hareRagdoll, m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = PrefabSetup._sfxDeath, m_enabled = true, m_variant = -1 } }; val.m_birthEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = PrefabSetup._sfxBirth, m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = PrefabSetup._vfxBirth, m_enabled = true, m_variant = -1 } }; val.m_loveEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = PrefabSetup._sfxLove, m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = PrefabSetup._vfxLove, m_enabled = true, m_variant = -1 } }; PrefabSetup._hareKitten.GetComponent<Growup>().m_grownPrefab = Plugin._harePrefab; Plugin._harePrefab.GetComponent<Procreation>().m_offspring = PrefabSetup._hareKitten; } } } 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Expected O, but got Unknown //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0205: 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_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Expected O, but got Unknown //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Expected O, but got Unknown //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Expected O, but got Unknown //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0396: 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_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Expected O, but got Unknown //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Expected O, but got Unknown //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Expected O, but got Unknown //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Expected O, but got Unknown //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Expected O, but got Unknown //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Expected O, but got Unknown //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Expected O, but got Unknown //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Expected O, but got Unknown //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Expected O, but got Unknown string group = "Hunters Lapin Hood"; _lapinHoodEnable = Plugin._instance.config(group, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinHoodMat1 = Plugin._instance.config(group, "Required Material 1", "BOH_BrownHare_Hide:3:1", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinHoodMat2 = Plugin._instance.config(group, "Required Material 2", "BOH_GreyHare_Hide:3:1", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinHoodMat3 = Plugin._instance.config(group, "Required Material 3", "BOH_WhiteHare_Hide:3:1", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group2 = "Hunters Lapin Tunic"; _lapinTunicEnable = Plugin._instance.config(group2, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinTunicMat1 = Plugin._instance.config(group2, "Required Material 1", "BOH_BrownHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinTunicMat2 = Plugin._instance.config(group2, "Required Material 2", "BOH_GreyHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinTunicMat3 = Plugin._instance.config(group2, "Required Material 3", "BOH_WhiteHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group3 = "Hunters Lapin Pants"; _lapinPantsEnable = Plugin._instance.config(group3, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinPantsMat1 = Plugin._instance.config(group3, "Required Material 1", "BOH_BrownHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinPantsMat2 = Plugin._instance.config(group3, "Required Material 2", "BOH_GreyHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinPantsMat3 = Plugin._instance.config(group3, "Required Material 3", "BOH_WhiteHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group4 = "Hunters Lapin Cape"; _lapinCapeEnable = Plugin._instance.config(group4, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinCapeMat1 = Plugin._instance.config(group4, "Required Material 1", "BOH_BrownHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinCapeMat2 = Plugin._instance.config(group4, "Required Material 2", "BOH_GreyHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _lapinCapeMat3 = Plugin._instance.config(group4, "Required Material 3", "BOH_WhiteHare_Hide:6:3", new ConfigDescription("Item name : amount : amount per level (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group5 = "Hare Meat Stew"; _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 = "Grilled Hare Meat"; _cookedHareMeatFood = Plugin._instance.config(group6, "Food", 30f, new ConfigDescription("Health amount added to max health.", (AcceptableValueBase)null, Array.Empty<object>())); _cookedHareMeatFoodStamina = Plugin._instance.config(group6, "Food Stamina", 12f, new ConfigDescription("Stamina amount added to max stamina", (AcceptableValueBase)null, Array.Empty<object>())); _cookedHareMeatFoodEitr = Plugin._instance.config(group6, "Food Eitr", 0f, new ConfigDescription("Eitr amount added to max eitr.", (AcceptableValueBase)null, Array.Empty<object>())); _cookedHareMeatFoodBurnTime = Plugin._instance.config(group6, "Food Burn Time", 1500f, new ConfigDescription("Food duration.", (AcceptableValueBase)null, Array.Empty<object>())); _cookedHareMeatFoodRegen = Plugin._instance.config(group6, "Food Regen", 2f, new ConfigDescription("Health regen.", (AcceptableValueBase)null, Array.Empty<object>())); } } public static class 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Expected O, but got Unknown string group = "Brown Fur Rug"; _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 = "Grey Fur Rug"; _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 = "White Fur Rug"; _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 = "Furr Bed"; _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 = "Odins Trap"; _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 = Enumerable.Single(executingAssembly.GetManifestResourceNames(), (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.AddClon