using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using UnityEngine; using UnityEngine.Experimental.Rendering; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("ValheimSkillCapMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ValheimSkillCapMod")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("19F0E6BA-DE2B-4504-9801-0F9360E3D9EB")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace MyBepInExPlugin; [BepInPlugin("com.example.GUID", "MyPlugin", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin { [HarmonyPatch] private static class ChangeRaiseSkillMethod { public static Player vagonUser; public static bool hasDoubleJumped = false; public static float moveTimer; public static bool canBeInvisible; public static HashSet autoPickables = new HashSet { "Pickable_Dandelion(Clone)", "RaspberryBush(Clone)", "Pickable_Mushroom(Clone)", "BlueberryBush(Clone)" }; private static GameObject _diablo; [HarmonyPrefix] [HarmonyPatch(typeof(Skills), "RaiseSkill")] public static bool RaiseSkill(Skills __instance, SkillType skillType, float factor = 1f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) if ((int)skillType == 0) { return false; } float skillLevel = __instance.GetSkillLevel(skillType); float num = skillLevel; float num2 = num; if (num2 >= 10f && num2 < 20f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_eikthyr")) { return false; } } else { float num3 = num2; if (num3 >= 20f && num3 < 30f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_gdking")) { return false; } } else { float num4 = num2; if (num4 >= 30f && num4 < 40f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_bonemass")) { return false; } } else { float num5 = num2; if (num5 >= 40f && num5 < 50f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_dragon")) { return false; } } else { float num6 = num2; if (num6 >= 50f && num6 < 60f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_goblinking")) { return false; } } else { float num7 = num2; if (num7 >= 60f && num7 < 75f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_queen")) { return false; } } else { float num8 = num2; if (num8 >= 75f && num8 < 100f && !ZoneSystem.instance.GetGlobalKeys().Contains("defeated_fader")) { return false; } } } } } } } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Skills), "OnDeath")] public static bool DoNotLowerSkills() { return false; } [HarmonyPostfix] [HarmonyPatch(typeof(Vagon), "FixedUpdate")] public static void RaiseCarrierSpeed(Vagon __instance) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown if (!(((Object)((Component)__instance).gameObject).name == "TurboCart(Clone)")) { return; } Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_attachedObject", BindingFlags.Instance | BindingFlags.NonPublic); GameObject val = (GameObject)field.GetValue(__instance); if ((Object)(object)val != (Object)null) { if ((Object)(object)vagonUser != (Object)(object)val.GetComponent()) { vagonUser = val.GetComponent(); ((Character)vagonUser).m_runSpeed = 21f; ((Character)vagonUser).m_walkSpeed = 12f; } } else if ((Object)(object)vagonUser != (Object)null) { ((Character)vagonUser).m_runSpeed = 7f; ((Character)vagonUser).m_walkSpeed = 4f; vagonUser = null; } } [HarmonyPrefix] [HarmonyPatch(typeof(InventoryGui), "DoCrafting")] public static void AddBonusItem() { SEMan sEMan = ((Character)Player.m_localPlayer).GetSEMan(); InventoryGui.instance.m_craftBonusChance = 0.25f; if (sEMan.GetStatusEffects().Count <= 0) { return; } foreach (StatusEffect statusEffect in sEMan.GetStatusEffects()) { if (((Object)statusEffect).name == "SetEffect_ChefHat") { InventoryGui.instance.m_craftBonusChance = 0.5f; } } } [HarmonyPrefix] [HarmonyPatch(typeof(CookingStation), "OnInteract")] public static void AddBonusItemCooking() { SEMan sEMan = ((Character)Player.m_localPlayer).GetSEMan(); InventoryGui.instance.m_craftBonusChance = 0.25f; if (sEMan.GetStatusEffects().Count <= 0) { return; } foreach (StatusEffect statusEffect in sEMan.GetStatusEffects()) { if (((Object)statusEffect).name == "SetEffect_ChefHat") { InventoryGui.instance.m_craftBonusChance = 0.5f; } } } [HarmonyPrefix] [HarmonyPatch(typeof(Humanoid), "Awake")] public static void ChangeEikthyrHP(Humanoid __instance) { if (((Object)__instance).name == "Eikthyr(Clone)") { ((Character)__instance).m_health = 1000f; } } [HarmonyPrefix] [HarmonyPatch(typeof(Character), "Jump")] public static void DoubleJump(Character __instance) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) if (!hasDoubleJumped && !__instance.IsOnGround() && __instance.IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer && __instance.GetSkillFactor((SkillType)100) >= 0.5f && ((Component)__instance).GetComponent().GetStamina() > 10f) { hasDoubleJumped = true; __instance.ForceJump(new Vector3(0f, 10f, 0f), true); Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_maxAirAltitude", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(__instance, __instance.GetHeight()); } } [HarmonyPrefix] [HarmonyPatch(typeof(Character), "UpdateGroundContact")] public static void ResetDoubleJump(Character __instance) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (__instance.IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer && __instance.GetSkillFactor((SkillType)100) >= 0.3f) { Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_maxAirAltitude", BindingFlags.Instance | BindingFlags.NonPublic); float num = Mathf.Max(0f, (float)field.GetValue(__instance) - ((Component)__instance).transform.position.y); if (num < 8f) { SEMan sEMan = __instance.GetSEMan(); sEMan.AddStatusEffect(newHaldorAssetBundle.LoadAsset("SetEffect_SlowFall"), false, 0, 0f); } } if (__instance.IsPlayer() && __instance.IsOnGround() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer) { hasDoubleJumped = false; } } [HarmonyPostfix] [HarmonyPatch(typeof(Character), "UpdateGroundContact")] public static void RemoveSlowFall(Character __instance) { if (!__instance.IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { return; } SEMan sEMan = __instance.GetSEMan(); List statusEffects = sEMan.GetStatusEffects(); if (statusEffects.Count <= 0) { return; } bool flag = false; StatusEffect val = ScriptableObject.CreateInstance(); foreach (StatusEffect item in statusEffects) { if (item.m_name == "SlowFall") { flag = true; val = item; } } if (flag) { sEMan.RemoveStatusEffect(val, false); } } [HarmonyPostfix] [HarmonyPatch(typeof(Character), "UpdateWalking")] public static void IncreaseSneakSpeed(Character __instance) { if (__instance.IsPlayer() && __instance.IsOnGround() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer && !__instance.IsEncumbered() && __instance.GetSkillFactor((SkillType)101) >= 0.2f) { __instance.m_crouchSpeed = 4.5f; } else if (__instance.IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer) { __instance.m_crouchSpeed = 2f; } } [HarmonyPostfix] [HarmonyPatch(typeof(Humanoid), "BlockAttack")] public static void ActivateMagicShield(Humanoid __instance) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) if (!((Character)__instance).IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer) || !((Character)__instance).HaveEitr(10f) || !((Character)__instance).IsBlocking()) { return; } SEMan sEMan = ((Character)__instance).GetSEMan(); List list = new List(); foreach (StatusEffect statusEffect in sEMan.GetStatusEffects()) { if (!(statusEffect.m_name == "Magic Shield")) { continue; } ((Character)__instance).UseEitr(10f); Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, 6f, -1, (QueryTriggerInteraction)1); if (array.Length == 0 || array == null) { continue; } Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)((Component)val).GetComponentInParent() != (Object)null) { list.Add(((Component)val).GetComponentInParent()); } } } foreach (Player item in list) { SEMan sEMan2 = ((Character)item).GetSEMan(); sEMan2.AddStatusEffect(ItemManager.Instance.GetItem("WoodCopy1").ItemDrop.m_itemData.m_shared.m_attackStatusEffect, false, 0, 0f); } } [HarmonyPostfix] [HarmonyPatch(typeof(Humanoid), "CustomFixedUpdate")] public static void Dive(Humanoid __instance) { if (!((Character)__instance).IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { return; } ((Character)__instance).m_swimDepth = 2f; if (((Character)__instance).IsSwimming() && ((Character)__instance).IsBlocking() && ((Character)__instance).GetStaminaPercentage() > 0.01f && ((Character)__instance).GetSkillFactor((SkillType)103) >= 0.2f) { ((Character)__instance).m_swimDepth = 10f; ((Character)__instance).UseStamina(Mathf.Lerp(0.4f, 0.1f, ((Character)__instance).GetSkillFactor((SkillType)103))); } if (!((Character)__instance).IsSwimming()) { return; } Inventory inventory = __instance.GetInventory(); if (!inventory.ContainsItemByName("Empty Water Bucket")) { return; } List allItems = inventory.GetAllItems(); List list = new List(); foreach (ItemData item2 in allItems) { if (item2.m_shared.m_name == "Empty Water Bucket") { list.Add(item2); } } foreach (ItemData item3 in list) { CustomItem item = ItemManager.Instance.GetItem("WaterBucket"); inventory.AddItem(item.ItemDrop.m_itemData.m_dropPrefab, item3.m_stack); inventory.RemoveItem("Empty Water Bucket", item3.m_stack, -1, true); } } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "GetStealthFactor")] public static void SetInvisible(Player __instance) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (((Character)__instance).GetSkillFactor((SkillType)101) >= 0.5f && (Object)(object)__instance == (Object)(object)Player.m_localPlayer && ((Character)__instance).IsCrouching() && canBeInvisible) { Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_stealthFactor", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(__instance, 0f); } if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { goto IL_00a3; } if (!((Character)__instance).InDodge()) { Vector3 velocity = ((Character)__instance).GetVelocity(); if (!(((Vector3)(ref velocity)).magnitude > 0.01f)) { goto IL_00a3; } } moveTimer = 180f; canBeInvisible = false; goto IL_00b5; IL_00b5: if (moveTimer <= 0f) { canBeInvisible = true; } return; IL_00a3: moveTimer -= 1f; goto IL_00b5; } [HarmonyPrefix] [HarmonyPatch(typeof(Humanoid), "HideHandItems")] public static bool AttackWhileSwimming(Humanoid __instance) { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Invalid comparison between Unknown and I4 if (((Character)__instance).IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer) { int num = 0; Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_leftItem", BindingFlags.Instance | BindingFlags.NonPublic); if (field.GetValue(__instance) == null) { num++; } type = ((object)__instance).GetType(); field = type.GetField("m_rightItem", BindingFlags.Instance | BindingFlags.NonPublic); if (field.GetValue(__instance) == null) { num++; } if (num == 2) { return false; } if (__instance.RightItem != null && (int)__instance.RightItem.m_shared.m_skillType == 2 && ((Character)__instance).GetSkillFactor((SkillType)103) >= 0.3f) { if (__instance.LeftItem != null) { __instance.UnequipItem(__instance.LeftItem, true); } return false; } } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(TombStone), "Start")] public static void ChangeCorpseRunWeight(TombStone __instance) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown SE_Stats val = (SE_Stats)__instance.m_lootStatusEffect; val.m_addMaxCarryWeight = 700f; } [HarmonyPrefix] [HarmonyPatch(typeof(Character), "OnDeath")] public static void IncreaseWorldExp(Character __instance) { if (__instance.IsBoss()) { ConfigEntry worldExpModifier = Main.worldExpModifier; worldExpModifier.Value += 0.2f; logger.LogInfo((object)Main.worldExpModifier.Value); } } [HarmonyPostfix] [HarmonyPatch(typeof(Game), "UpdateWorldRates")] public static void ForceSetWorldExpRate() { Game.m_skillGainRate = worldExpModifier.Value; } [HarmonyPatch(typeof(Trader), "Start")] [HarmonyPrefix] public static void SwapHaldor(Trader __instance) { if (((Object)((Component)__instance).gameObject).name == "Haldor(Clone)") { __instance.m_items = PrefabManager.Instance.GetPrefab("newhaldor").GetComponent().m_items; } } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "UpdateCover")] public static void HasWaxedCape(Player __instance) { if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { return; } SEMan sEMan = ((Character)__instance).GetSEMan(); List statusEffects = sEMan.GetStatusEffects(); if (statusEffects == null || statusEffects.Count <= 0) { return; } foreach (StatusEffect item in statusEffects) { if (item.m_name == "Waterproof" || item.m_name == "WaterproofSlowFall" || item.m_name == "WaterproofWindRun") { Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_underRoof", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(__instance, true); } } } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "Update")] public static void AutoPickBerries(Player __instance) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { return; } _ = ((Component)__instance).transform.position; if (((Character)__instance).GetSEMan() == null) { return; } SEMan sEMan = ((Character)__instance).GetSEMan(); __instance.m_autoPickupRange = 2f; if (sEMan.GetStatusEffects().Count <= 0) { return; } foreach (StatusEffect statusEffect in sEMan.GetStatusEffects()) { if (!(((Object)statusEffect).name == "SetEffect_GathererGloves")) { continue; } __instance.m_autoPickupRange = 4f; Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, 4f, -1, (QueryTriggerInteraction)1); if (array.Length == 0 || array == null) { continue; } Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)((Component)val).GetComponentInParent() != (Object)null) { Pickable componentInParent = ((Component)val).GetComponentInParent(); if (autoPickables.Contains(((Object)componentInParent).name)) { componentInParent.Interact((Humanoid)(object)__instance, false, false); } } } } } [HarmonyPrefix] [HarmonyPatch(typeof(Aoe), "OnHit")] public static bool RemoveDuplicateHEaling(Aoe __instance) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (__instance.m_name == "Healing AoE") { Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, 4f, -1, (QueryTriggerInteraction)1); if (array.Length != 0 && array != null) { List list = new List(); Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)((Component)val).GetComponentInParent() != (Object)null) { list.Add(((Component)val).GetComponentInParent()); } } foreach (Player item in list) { SEMan sEMan = ((Character)item).GetSEMan(); List statusEffects = sEMan.GetStatusEffects(); foreach (StatusEffect item2 in statusEffects) { if (item2.m_name == "Healing") { return false; } } } } } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(Attack), "DoAreaAttack")] public static void ApplyAoEBuffs(Attack __instance) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_character", BindingFlags.Instance | BindingFlags.NonPublic); if (!(field.GetValue(__instance).GetType() == typeof(Player))) { return; } Player val = (Player)field.GetValue(__instance); if (!((Object)(object)val == (Object)(object)Player.m_localPlayer)) { return; } if (__instance.GetWeapon().m_shared.m_name == "Odin's Tankard") { Collider[] array = Physics.OverlapSphere(((Component)val).transform.position, 6f, -1, (QueryTriggerInteraction)1); if (array.Length != 0 && array != null) { List list = new List(); Collider[] array2 = array; foreach (Collider val2 in array2) { if ((Object)(object)((Component)val2).GetComponentInParent() != (Object)null) { list.Add(((Component)val2).GetComponentInParent()); } } foreach (Player item in list) { SEMan sEMan = ((Character)item).GetSEMan(); List statusEffects = sEMan.GetStatusEffects(); List list2 = new List(); foreach (StatusEffect item2 in statusEffects) { if (item2.m_name == "Attack Buff Visual" || item2.m_name == "Attack Buff") { list2.Add(item2); } } if (list2.Count > 0) { foreach (StatusEffect item3 in list2) { sEMan.RemoveStatusEffect(item3, false); } } sEMan.AddStatusEffect(ItemManager.Instance.GetItem("WoodCopy2").ItemDrop.m_itemData.m_shared.m_attackStatusEffect, false, 0, 0f); sEMan.AddStatusEffect((StatusEffect)(object)newHaldorAssetBundle.LoadAsset("StatusEffect_AttackBuff"), false, 0, 0f); if ((Object)(object)item != (Object)(object)Player.m_localPlayer) { ((Character)val).RaiseSkill((SkillType)9, 1f); } } } } if (!(__instance.GetWeapon().m_shared.m_name == "French Horn")) { return; } Collider[] array3 = Physics.OverlapSphere(((Component)val).transform.position, 6f, -1, (QueryTriggerInteraction)1); if (array3.Length == 0 || array3 == null) { return; } List list3 = new List(); Collider[] array4 = array3; foreach (Collider val3 in array4) { if ((Object)(object)((Component)val3).GetComponentInParent() != (Object)null) { list3.Add(((Component)val3).GetComponentInParent()); } } foreach (Player item4 in list3) { SEMan sEMan2 = ((Character)item4).GetSEMan(); sEMan2.AddStatusEffect((StatusEffect)(object)newHaldorAssetBundle.LoadAsset("StatusEffect_StaminaBoost"), false, 0, 0f); if ((Object)(object)item4 != (Object)(object)Player.m_localPlayer) { ((Character)val).RaiseSkill((SkillType)9, 1f); } } } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "Start")] public static void RemovePieceDuplicates() { PieceManager.Instance.RemovePiece("Smelter"); PieceManager.Instance.RemovePiece("cartCopy"); } [HarmonyPostfix] [HarmonyPatch(typeof(Game), "Start")] public static void Remove5PlayersLimit(Game __instance) { __instance.m_difficultyScaleMaxPlayers = 99; } [HarmonyPostfix] [HarmonyPatch(typeof(Pickable), "Awake")] public static void AddFarmingToDandelion(Pickable __instance) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)__instance).gameObject).name == "Pickable_Dandelion(Clone)" || ((Object)((Component)__instance).gameObject).name == "Pickable_SmokePuff(Clone)" || ((Object)((Component)__instance).gameObject).name == "Pickable_Thistle(Clone)") { __instance.m_pickRaiseSkill = (SkillType)106; } if (((Object)((Component)__instance).gameObject).name == "Pickable_MeatPile(Clone)") { DropData item = new DropData { m_item = ZNetScene.instance.GetPrefab("RottenMeat"), m_weight = 0.8f, m_stackMin = 1, m_stackMax = 1 }; DropTable extraDrops = ((Component)__instance).GetComponent().m_extraDrops; extraDrops.m_dropMax = 4; extraDrops.m_drops.Add(item); } } [HarmonyPrefix] [HarmonyPatch(typeof(Humanoid), "UpdateEquipment")] public static void RefillTorch(Humanoid __instance) { if (!((Character)__instance).IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { return; } if (__instance.RightItem != null && __instance.RightItem.m_shared.m_useDurability && __instance.RightItem.m_shared.m_name == "Refillable Torch" && __instance.RightItem.m_durability <= 1f) { Inventory inventory = __instance.GetInventory(); if (inventory.ContainsItemByName("$item_resin")) { inventory.RemoveItem("$item_resin", 1, -1, true); __instance.RightItem.m_durability = 20f; } } if (__instance.LeftItem != null && __instance.LeftItem.m_shared.m_useDurability && __instance.LeftItem.m_shared.m_name == "Refillable Torch" && __instance.LeftItem.m_durability <= 1f) { Inventory inventory2 = __instance.GetInventory(); if (inventory2.ContainsItemByName("$item_resin")) { inventory2.RemoveItem("$item_resin", 1, -1, true); __instance.LeftItem.m_durability = 20f; } } } [HarmonyPrefix] [HarmonyPatch(typeof(ZNet), "SetPublicReferencePosition")] public static bool ForcePublic(ZNet __instance) { Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_publicReferencePosition", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(__instance, true); return false; } [HarmonyPostfix] [HarmonyPatch(typeof(Attack), "ProjectileAttackTriggered")] public static void ShootSecondProjectile(Attack __instance) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Invalid comparison between Unknown and I4 //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_ammoItem", BindingFlags.Instance | BindingFlags.NonPublic); if (field.GetValue(__instance) == null || !(field.GetValue(__instance).GetType() == typeof(ItemData))) { return; } ItemData val = (ItemData)field.GetValue(__instance); if ((int)__instance.m_attackType != 2 || (int)val.m_shared.m_skillType != 8) { return; } type = ((object)__instance).GetType(); field = type.GetField("m_character", BindingFlags.Instance | BindingFlags.NonPublic); if (!(field.GetValue(__instance).GetType() == typeof(Player))) { return; } Player val2 = (Player)field.GetValue(__instance); if ((Object)(object)val2 == (Object)(object)Player.m_localPlayer) { Random random = new Random(); if (((Character)val2).GetSkillFactor((SkillType)8) >= 0.5f && random.Next(2) < 1) { MethodInfo method = typeof(Attack).GetMethod("FireProjectileBurst", BindingFlags.Instance | BindingFlags.NonPublic); method.Invoke(__instance, Array.Empty()); } } } [HarmonyPrefix] [HarmonyPatch(typeof(Projectile), "SpawnOnHit")] public static bool SpearRaycast(Projectile __instance) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Invalid comparison between Unknown and I4 //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: 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: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) if ((int)__instance.m_type == 64) { ItemDrop component = Object.Instantiate(__instance.m_spawnItem.m_dropPrefab, ((Component)__instance).transform.position + ((Component)__instance).transform.TransformDirection(__instance.m_spawnOffset), Quaternion.identity).GetComponent(); component.m_itemData = __instance.m_spawnItem.Clone(); if (component.m_itemData.m_quality > 1) { component.SetQuality(component.m_itemData.m_quality); } bool flag = true; component.m_itemData.m_stack = 1; if (component.m_onDrop != null) { component.m_onDrop(component); } Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_owner", BindingFlags.Instance | BindingFlags.NonPublic); if (field.GetValue(__instance).GetType() == typeof(Player)) { object? value = field.GetValue(__instance); Player val = (Player)((value is Player) ? value : null); if ((Object)(object)val == (Object)(object)Player.m_localPlayer && ((Character)val).GetSkillFactor((SkillType)5) >= 0.3f) { LineRenderer val2 = ((Component)component).gameObject.AddComponent(); val2.positionCount = 2; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(((Component)__instance).transform.position.x, ((Component)__instance).transform.position.y + 5f, ((Component)__instance).transform.position.z); Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(((Component)__instance).transform.position.x, ((Component)__instance).transform.position.y - 100f, ((Component)__instance).transform.position.z); Vector3[] positions = (Vector3[])(object)new Vector3[2] { val3, val4 }; val2.SetPositions(positions); val2.SetPositions(positions); Material material = ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/smoke (1)")).GetComponent().material; ((Renderer)val2).material.shader = material.shader; ((Renderer)val2).material.color = new Color(1f, 1f, 1f, 0.25f); val2.widthMultiplier = 0.5f; } } return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(ItemDrop), "Start")] public static void SpearRaycast(ItemDrop __instance) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 if ((int)__instance.m_itemData.m_shared.m_skillType != 5) { } } [HarmonyPrefix] [HarmonyPatch(typeof(Player), "CheckRun")] public static void ActivateSecondWind(Player __instance) { if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer) || ((Character)__instance).HaveStamina(0f)) { return; } SEMan sEMan = ((Character)__instance).GetSEMan(); List statusEffects = sEMan.GetStatusEffects(); if (statusEffects != null && statusEffects.Count > 0) { foreach (StatusEffect item in statusEffects) { if (item.m_name == newHaldorAssetBundle.LoadAsset("StatusEffect_SecondWind").m_name) { return; } } } sEMan.AddStatusEffect(newHaldorAssetBundle.LoadAsset("StatusEffect_SecondWind"), false, 0, 0f); } [HarmonyPrefix] [HarmonyPatch(typeof(Beehive), "RPC_Extract")] public static void GenerateWax(Beehive __instance) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) CustomItem item = ItemManager.Instance.GetItem("wax"); ItemDrop itemDrop = item.ItemDrop; Random random = new Random(); MethodInfo method = typeof(Beehive).GetMethod("GetHoneyLevel", BindingFlags.Instance | BindingFlags.NonPublic); int num = (int)method.Invoke(__instance, Array.Empty()); if (num <= 0) { return; } for (int i = 0; i < num; i++) { if (random.Next(10) == 0) { __instance.m_spawnEffect.Create(__instance.m_spawnPoint.position, Quaternion.identity, (Transform)null, 1f, -1); Vector3 position = __instance.m_spawnPoint.position; ItemDrop component = ((Component)Object.Instantiate(itemDrop, position, Quaternion.identity)).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetStack(Game.instance.ScaleDrops(item.ItemDrop.m_itemData, 1)); } } } } [HarmonyPostfix] [HarmonyPatch(typeof(Minimap), "Awake")] private static void OnAwake() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown _diablo = new GameObject(); CustomBoiiiii customBoiiiii = _diablo.AddComponent(); } [HarmonyPrefix] [HarmonyPatch(typeof(Minimap), "OnDestroy")] private static void OnDestroy() { Object.Destroy((Object)(object)_diablo); RenderPipelineManager.beginCameraRendering -= OnRender; } private static void OnRender(ScriptableRenderContext context, Camera camera) { } } private class CustomBoiiiii : MonoBehaviour { private static GameObject _targetToRender; private static List _renderers = new List(); private static Material _postProcessMaterial; private static Texture2D tex; private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) Shader val = Shader.Find("Sprites/Default"); _postProcessMaterial = new Material(val); _targetToRender = Minimap.instance.m_largeRoot; Camera.onPostRender = (CameraCallback)Delegate.Combine((Delegate?)(object)Camera.onPostRender, (Delegate?)new CameraCallback(OnPostRenderTamere)); tex = new Texture2D(8, 8, (TextureFormat)4, false); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { tex.SetPixel(i, j, Color.red); } } tex.Apply(); } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown Camera.onPostRender = (CameraCallback)Delegate.Remove((Delegate?)(object)Camera.onPostRender, (Delegate?)new CameraCallback(OnPostRenderTamere)); } private void OnPostRenderTamere(Camera camera) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) RenderTexture temporary = RenderTexture.GetTemporary(1024, 1024, 0, (GraphicsFormat)8); List list = new List(); _targetToRender.GetComponentsInChildren(true, list); CommandBuffer val = new CommandBuffer(); val.SetRenderTarget(RenderTargetIdentifier.op_Implicit((Texture)(object)temporary)); foreach (Renderer item in list) { val.DrawRenderer(item, (Material)null); } Graphics.ExecuteCommandBuffer(val); Graphics.Blit((Texture)(object)temporary, camera.activeTexture, _postProcessMaterial); Graphics.DrawTexture(new Rect(0f, 0f, 1600f, 900f), (Texture)(object)temporary); RenderTexture.ReleaseTemporary(temporary); } } private const string pluginGUID = "com.example.GUID"; private const string pluginName = "MyPlugin"; private const string pluginVersion = "1.0.0"; private readonly Harmony HarmonyInstance = new Harmony("com.example.GUID"); public static ManualLogSource logger = Logger.CreateLogSource("MyPlugin"); public AssetBundle waxAsset; public GameObject waxPrefab; public AssetBundle capesBundle; public GameObject capeDeer; public GameObject capeTroll; public GameObject capeWolfWaterproof; public GameObject capeLoxWaterproof; public GameObject capeLinenWaterproof; public GameObject capeFeatherWaterproof; public GameObject capeAsksvinWaterproof; public GameObject capeAshWaterproof; public static AssetBundle newHaldorAssetBundle; public GameObject newHaldor; public AssetBundle foodsAssetBundle; public static ConfigEntry worldExpModifier; public Shader standardSurface2; public Shader CustomParticleUnlit; public void Awake() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); HarmonyInstance.PatchAll(executingAssembly); LoadAssets(); AddRecipes(); PrefabManager.OnVanillaPrefabsAvailable += CreateWax; PrefabManager.OnVanillaPrefabsAvailable += CreateCapes; PrefabManager.OnVanillaPrefabsAvailable += AddClonedItems; PrefabManager.OnVanillaPrefabsAvailable += FixShaders; PrefabManager.OnVanillaPrefabsAvailable += CreateNewHaldor; } private void LoadAssets() { //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Expected O, but got Unknown string location = Assembly.GetExecutingAssembly().Location; location = location.Substring(0, location.Length - 22); location = location.Replace('\\', '/'); string text = location; string text2 = location; string text3 = location; string text4 = location; string text5 = location; waxAsset = AssetUtils.LoadAssetBundle(text += "wax"); waxPrefab = waxAsset.LoadAsset("wax"); capesBundle = AssetUtils.LoadAssetBundle(text2 += "capes"); capeDeer = capesBundle.LoadAsset("capeDeer"); capeTroll = capesBundle.LoadAsset("capeTroll"); capeWolfWaterproof = capesBundle.LoadAsset("capeWolfWaterproof"); capeLoxWaterproof = capesBundle.LoadAsset("capeLoxWaterproof"); capeLinenWaterproof = capesBundle.LoadAsset("capeLinenWaterproof"); capeFeatherWaterproof = capesBundle.LoadAsset("capeFeatherWaterproof"); capeAsksvinWaterproof = capesBundle.LoadAsset("capeAsksvinWaterproof"); capeAshWaterproof = capesBundle.LoadAsset("capeAshWaterproof"); newHaldorAssetBundle = AssetUtils.LoadAssetBundle(text3 += "newhaldor"); newHaldor = newHaldorAssetBundle.LoadAsset("newhaldor"); foodsAssetBundle = AssetUtils.LoadAssetBundle(text4 += "foods"); worldExpModifier = ((BaseUnityPlugin)this).Config.Bind("Server config", "FloatValue1", 1f, new ConfigDescription("Server side float", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); } private void CreateCorrectShaders() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown PieceConfig val = new PieceConfig(); val.Name = "Standard Surface 2"; CustomPiece val2 = new CustomPiece("piece_cauldroncopy", "piece_cauldron", val); standardSurface2 = ((Renderer)((Component)val2.PiecePrefab.transform.Find("HaveFire/Waterplane")).GetComponent()).material.shader; ItemConfig val3 = new ItemConfig(); val3.Name = "foobar"; CustomItem val4 = new CustomItem("MeadBaseHealthMediumcopy", "MeadBaseHealthMedium", val3); CustomParticleUnlit = ((Component)val4.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects.m_effectPrefabs[0].m_prefab.transform.Find("trails")).GetComponent().materials[0].shader; } private void AddClonedItems() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Expected O, but got Unknown //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Expected O, but got Unknown //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Expected O, but got Unknown //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Expected O, but got Unknown //IL_0857: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Expected O, but got Unknown //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d2: Expected O, but got Unknown //IL_0bfa: Unknown result type (might be due to invalid IL or missing references) //IL_0c01: Expected O, but got Unknown //IL_0c7e: Unknown result type (might be due to invalid IL or missing references) //IL_0c85: Expected O, but got Unknown //IL_0cf9: Unknown result type (might be due to invalid IL or missing references) //IL_0d00: Expected O, but got Unknown //IL_0d4c: Unknown result type (might be due to invalid IL or missing references) //IL_0d53: Expected O, but got Unknown //IL_0d80: Unknown result type (might be due to invalid IL or missing references) //IL_0d87: Expected O, but got Unknown //IL_0df5: Unknown result type (might be due to invalid IL or missing references) //IL_0dfc: Expected O, but got Unknown //IL_0e70: Unknown result type (might be due to invalid IL or missing references) //IL_0e77: Expected O, but got Unknown //IL_0ec3: Unknown result type (might be due to invalid IL or missing references) //IL_0eca: Expected O, but got Unknown //IL_0ef7: Unknown result type (might be due to invalid IL or missing references) //IL_0efe: Expected O, but got Unknown //IL_0f4a: Unknown result type (might be due to invalid IL or missing references) //IL_0f51: Expected O, but got Unknown //IL_0fa5: Unknown result type (might be due to invalid IL or missing references) //IL_0fac: Expected O, but got Unknown //IL_1023: Unknown result type (might be due to invalid IL or missing references) //IL_102a: Expected O, but got Unknown //IL_1053: Unknown result type (might be due to invalid IL or missing references) //IL_10a4: Unknown result type (might be due to invalid IL or missing references) //IL_1120: Unknown result type (might be due to invalid IL or missing references) //IL_1127: Expected O, but got Unknown //IL_119f: Unknown result type (might be due to invalid IL or missing references) //IL_11a6: Expected O, but got Unknown //IL_11cf: Unknown result type (might be due to invalid IL or missing references) //IL_12fd: Unknown result type (might be due to invalid IL or missing references) //IL_1304: Expected O, but got Unknown //IL_137c: Unknown result type (might be due to invalid IL or missing references) //IL_1383: Expected O, but got Unknown //IL_141d: Unknown result type (might be due to invalid IL or missing references) //IL_1424: Expected O, but got Unknown //IL_1489: Unknown result type (might be due to invalid IL or missing references) //IL_1490: Expected O, but got Unknown //IL_14e5: Unknown result type (might be due to invalid IL or missing references) //IL_1522: Unknown result type (might be due to invalid IL or missing references) //IL_15af: Unknown result type (might be due to invalid IL or missing references) //IL_15b6: Expected O, but got Unknown //IL_15dc: Unknown result type (might be due to invalid IL or missing references) //IL_15e3: Expected O, but got Unknown //IL_1615: Unknown result type (might be due to invalid IL or missing references) //IL_161c: Expected O, but got Unknown //IL_16ca: Unknown result type (might be due to invalid IL or missing references) //IL_16d1: Expected O, but got Unknown //IL_17d4: Unknown result type (might be due to invalid IL or missing references) //IL_17db: Expected O, but got Unknown //IL_186b: Unknown result type (might be due to invalid IL or missing references) //IL_1872: Expected O, but got Unknown //IL_18d0: Unknown result type (might be due to invalid IL or missing references) //IL_18d7: Expected O, but got Unknown //IL_1958: Unknown result type (might be due to invalid IL or missing references) //IL_195f: Expected O, but got Unknown //IL_19bd: Unknown result type (might be due to invalid IL or missing references) //IL_19c4: Expected O, but got Unknown //IL_1a45: Unknown result type (might be due to invalid IL or missing references) //IL_1a4c: Expected O, but got Unknown //IL_1ac5: Unknown result type (might be due to invalid IL or missing references) //IL_1acc: Expected O, but got Unknown //IL_1b4c: Unknown result type (might be due to invalid IL or missing references) //IL_1b53: Expected O, but got Unknown //IL_1bcc: Unknown result type (might be due to invalid IL or missing references) //IL_1bd3: Expected O, but got Unknown //IL_1c53: Unknown result type (might be due to invalid IL or missing references) //IL_1c5a: Expected O, but got Unknown //IL_1cd3: Unknown result type (might be due to invalid IL or missing references) //IL_1cda: Expected O, but got Unknown //IL_1d42: Unknown result type (might be due to invalid IL or missing references) //IL_1d49: Expected O, but got Unknown //IL_1dd4: Unknown result type (might be due to invalid IL or missing references) //IL_1ddb: Expected O, but got Unknown //IL_1e25: Unknown result type (might be due to invalid IL or missing references) //IL_1e2c: Expected O, but got Unknown //IL_1eb7: Unknown result type (might be due to invalid IL or missing references) //IL_1ebe: Expected O, but got Unknown //IL_1f20: Unknown result type (might be due to invalid IL or missing references) //IL_1f27: Expected O, but got Unknown //IL_1f34: Unknown result type (might be due to invalid IL or missing references) //IL_1f3b: Expected O, but got Unknown //IL_1fa3: Unknown result type (might be due to invalid IL or missing references) //IL_1faa: Expected O, but got Unknown //IL_2023: Unknown result type (might be due to invalid IL or missing references) //IL_202a: Expected O, but got Unknown //IL_20a2: Unknown result type (might be due to invalid IL or missing references) //IL_20a9: Expected O, but got Unknown //IL_20bb: Unknown result type (might be due to invalid IL or missing references) //IL_20e4: Unknown result type (might be due to invalid IL or missing references) //IL_20eb: Expected O, but got Unknown //IL_2154: Unknown result type (might be due to invalid IL or missing references) //IL_215b: Expected O, but got Unknown //IL_21b9: Unknown result type (might be due to invalid IL or missing references) //IL_21c0: Expected O, but got Unknown //IL_2223: Unknown result type (might be due to invalid IL or missing references) //IL_222a: Expected O, but got Unknown //IL_2237: Unknown result type (might be due to invalid IL or missing references) //IL_223e: Expected O, but got Unknown //IL_2264: Unknown result type (might be due to invalid IL or missing references) //IL_226b: Expected O, but got Unknown //IL_2278: Unknown result type (might be due to invalid IL or missing references) //IL_227f: Expected O, but got Unknown //IL_22d9: Unknown result type (might be due to invalid IL or missing references) //IL_22e0: Expected O, but got Unknown //IL_22ed: Unknown result type (might be due to invalid IL or missing references) //IL_22f4: Expected O, but got Unknown //IL_2332: Unknown result type (might be due to invalid IL or missing references) //IL_2339: Expected O, but got Unknown //IL_23bd: Unknown result type (might be due to invalid IL or missing references) //IL_23c4: Expected O, but got Unknown //IL_23db: Unknown result type (might be due to invalid IL or missing references) //IL_23e2: Expected O, but got Unknown //IL_23f9: Unknown result type (might be due to invalid IL or missing references) //IL_2400: Expected O, but got Unknown //IL_2417: Unknown result type (might be due to invalid IL or missing references) //IL_241e: Expected O, but got Unknown //IL_2435: Unknown result type (might be due to invalid IL or missing references) //IL_243c: Expected O, but got Unknown //IL_2453: Unknown result type (might be due to invalid IL or missing references) //IL_245a: Expected O, but got Unknown //IL_2471: Unknown result type (might be due to invalid IL or missing references) //IL_2478: Expected O, but got Unknown //IL_248f: Unknown result type (might be due to invalid IL or missing references) //IL_2496: Expected O, but got Unknown //IL_24ad: Unknown result type (might be due to invalid IL or missing references) //IL_24b4: Expected O, but got Unknown //IL_24cb: Unknown result type (might be due to invalid IL or missing references) //IL_24d2: Expected O, but got Unknown //IL_24df: Unknown result type (might be due to invalid IL or missing references) //IL_24e6: Expected O, but got Unknown //IL_2531: Unknown result type (might be due to invalid IL or missing references) //IL_2538: Expected O, but got Unknown //IL_255d: Unknown result type (might be due to invalid IL or missing references) //IL_2564: Expected O, but got Unknown //IL_25d2: Unknown result type (might be due to invalid IL or missing references) //IL_25d9: Expected O, but got Unknown //IL_2730: Unknown result type (might be due to invalid IL or missing references) //IL_2737: Expected O, but got Unknown //IL_27b5: Unknown result type (might be due to invalid IL or missing references) //IL_27bc: Expected O, but got Unknown //IL_2830: Unknown result type (might be due to invalid IL or missing references) //IL_2837: Expected O, but got Unknown //IL_28c3: Unknown result type (might be due to invalid IL or missing references) //IL_28ca: Expected O, but got Unknown //IL_2995: Unknown result type (might be due to invalid IL or missing references) //IL_299c: Expected O, but got Unknown //IL_2a1b: Unknown result type (might be due to invalid IL or missing references) //IL_2a22: Expected O, but got Unknown //IL_2acd: Unknown result type (might be due to invalid IL or missing references) //IL_2ad4: Expected O, but got Unknown //IL_2b52: Unknown result type (might be due to invalid IL or missing references) //IL_2b59: Expected O, but got Unknown //IL_2c1f: Unknown result type (might be due to invalid IL or missing references) //IL_2c26: Expected O, but got Unknown //IL_2caf: Unknown result type (might be due to invalid IL or missing references) //IL_2cb6: Expected O, but got Unknown //IL_2e93: Unknown result type (might be due to invalid IL or missing references) //IL_2e9a: Expected O, but got Unknown //IL_2f04: Unknown result type (might be due to invalid IL or missing references) //IL_2f0b: Expected O, but got Unknown //IL_3067: Unknown result type (might be due to invalid IL or missing references) //IL_306e: Expected O, but got Unknown //IL_30d8: Unknown result type (might be due to invalid IL or missing references) //IL_30df: Expected O, but got Unknown //IL_3249: Unknown result type (might be due to invalid IL or missing references) //IL_3250: Expected O, but got Unknown //IL_32ba: Unknown result type (might be due to invalid IL or missing references) //IL_32c1: Expected O, but got Unknown //IL_3396: Unknown result type (might be due to invalid IL or missing references) //IL_339d: Expected O, but got Unknown //IL_33ee: Unknown result type (might be due to invalid IL or missing references) //IL_33f5: Expected O, but got Unknown //IL_3419: Unknown result type (might be due to invalid IL or missing references) //IL_3420: Expected O, but got Unknown //IL_3467: Unknown result type (might be due to invalid IL or missing references) //IL_346e: Expected O, but got Unknown //IL_3484: Unknown result type (might be due to invalid IL or missing references) //IL_348b: Expected O, but got Unknown //IL_34be: Unknown result type (might be due to invalid IL or missing references) //IL_34c5: Expected O, but got Unknown //IL_353f: Unknown result type (might be due to invalid IL or missing references) //IL_3546: Expected O, but got Unknown //IL_35c5: Unknown result type (might be due to invalid IL or missing references) //IL_35cc: Expected O, but got Unknown //IL_35f2: Unknown result type (might be due to invalid IL or missing references) //IL_35f9: Expected O, but got Unknown //IL_3721: Unknown result type (might be due to invalid IL or missing references) //IL_3728: Expected O, but got Unknown //IL_376d: Unknown result type (might be due to invalid IL or missing references) //IL_3774: Expected O, but got Unknown //IL_378d: Unknown result type (might be due to invalid IL or missing references) //IL_3794: Expected O, but got Unknown //IL_37c1: Unknown result type (might be due to invalid IL or missing references) //IL_37cb: Expected O, but got Unknown //IL_38b9: Unknown result type (might be due to invalid IL or missing references) //IL_38c0: Expected O, but got Unknown //IL_3905: Unknown result type (might be due to invalid IL or missing references) //IL_390c: Expected O, but got Unknown //IL_3925: Unknown result type (might be due to invalid IL or missing references) //IL_392c: Expected O, but got Unknown //IL_3959: Unknown result type (might be due to invalid IL or missing references) //IL_3963: Expected O, but got Unknown //IL_3964: Unknown result type (might be due to invalid IL or missing references) //IL_396b: Expected O, but got Unknown //IL_3985: Unknown result type (might be due to invalid IL or missing references) //IL_398c: Expected O, but got Unknown //IL_3a23: Unknown result type (might be due to invalid IL or missing references) //IL_3a2a: Expected O, but got Unknown //IL_3a7f: Unknown result type (might be due to invalid IL or missing references) //IL_3a86: Expected O, but got Unknown CreateCorrectShaders(); ItemConfig val = new ItemConfig(); val.Name = "capeDeerHideCopy"; CustomItem val2 = new CustomItem("CapeDeerHideCopy", "CapeDeerHide", val); ItemManager.Instance.AddItem(val2); ItemConfig val3 = new ItemConfig(); val3.Name = "capeWolfCopy"; CustomItem val4 = new CustomItem("CapeWolfCopy", "CapeWolf", val3); ItemManager.Instance.AddItem(val4); ItemConfig val5 = new ItemConfig(); val5.Name = "TrollArmorCopy"; CustomItem val6 = new CustomItem("TrollArmorCopy", "ArmorTrollLeatherChest", val5); ItemManager.Instance.AddItem(val6); PieceConfig val7 = new PieceConfig(); val7.Name = "smelterCopy"; val7.PieceTable = PieceTables.Hammer; CustomPiece val8 = new CustomPiece("Smelter", "smelter", val7); PieceManager.Instance.AddPiece(val8); PieceConfig val9 = new PieceConfig(); val9.Name = "cartCopy"; val9.PieceTable = PieceTables.Hammer; CustomPiece val10 = new CustomPiece("cartCopy", "Cart", val9); PieceManager.Instance.AddPiece(val10); PieceConfig val11 = new PieceConfig(); val11.Name = "infiniteWoodTorch"; val11.AddRequirement("Resin", 20, true); val11.AddRequirement("Wood", 2, true); PieceConfig val12 = new PieceConfig(); val12.Name = "infiniteIronTorch"; val12.AddRequirement("Resin", 20, true); val12.AddRequirement("Iron", 2, true); PieceConfig val13 = new PieceConfig(); val13.Name = "infiniteGuckTorch"; val13.AddRequirement("GreydwarfEye", 20, true); val13.AddRequirement("Iron", 2, true); PieceConfig val14 = new PieceConfig(); val14.Name = "infiniteEyeTorch"; val14.AddRequirement("Guck", 20, true); val14.AddRequirement("Iron", 2, true); CustomPiece val15 = new CustomPiece("InfiniteWoodTorch", "piece_groundtorch_wood", val11); val15.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val15); CustomPiece val16 = new CustomPiece("InfiniteIronTorch", "piece_groundtorch", val12); val16.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val16); CustomPiece val17 = new CustomPiece("InfiniteGuckTorch", "piece_groundtorch_green", val13); val17.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val17); CustomPiece val18 = new CustomPiece("InfiniteEyeTorch", "piece_groundtorch_blue", val14); val18.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val18); PieceConfig val19 = new PieceConfig(); val19.Name = "infiniteSconce"; val19.AddRequirement("Copper", 2, true); val19.AddRequirement("Wood", 2, true); val19.AddRequirement("Resin", 20, true); CustomPiece val20 = new CustomPiece("InfiniteSconce", "piece_walltorch", val19); val20.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val20); Shader shader = ((Renderer)((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("New/default")).GetComponent()).material.shader; Shader shader2 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/smoke (1)")).GetComponent().material.shader; Shader shader3 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/flames (1)")).GetComponent().material.shader; Shader shader4 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/flare (1)")).GetComponent().material.shader; PieceConfig val21 = new PieceConfig(); val21.Name = "Supercharged Smelter"; val21.Description = "If heat is too slow to melt metals, try extreme cold!"; val21.AddRequirement("Stone", 20, true); val21.AddRequirement("SurtlingCore", 5, true); val21.AddRequirement("TrophyCultist_Hildir", 1, true); val21.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(new CustomPiece(newHaldorAssetBundle, "SuperchargedSmelter", false, val21)); ((Renderer)((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("New/default")).GetComponent()).material.shader = shader; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/smoke (1)")).GetComponent().material.shader = shader2; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames")).GetComponent().material.shader = shader3; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames (1)")).GetComponent().material.shader = shader3; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames (2)")).GetComponent().material.shader = shader3; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/SmokeSpawner")).GetComponent().m_smokePrefab = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/SmokeSpawner")).GetComponent().m_smokePrefab; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (1)")).GetComponent().material.shader = shader4; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (2)")).GetComponent().material.shader = shader4; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (3)")).GetComponent().material.shader = shader4; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare")).GetComponent().material.shader = shader4; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_produceEffects.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_produceEffects.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_fuelAddedEffects.m_effectPrefabs[1] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_fuelAddedEffects.m_effectPrefabs[1]; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_oreAddedEffects.m_effectPrefabs[1] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_oreAddedEffects.m_effectPrefabs[1]; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs[0]; MeshRenderer[] componentsInChildren = ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("smelter_Destruction")).GetComponentsInChildren(); MeshRenderer[] array = componentsInChildren; foreach (MeshRenderer val22 in array) { ((Renderer)val22).material.shader = shader; } PieceConfig val23 = new PieceConfig(); val23.PieceTable = PieceTables.Hammer; val23.Name = "Turbo Cart"; val23.AddRequirement("Wood", 20, true); val23.AddRequirement("BronzeNails", 10, true); val23.AddRequirement("TrophyGoblinBruteBrosShaman", 1, true); val23.AddRequirement("TrophyGoblinBruteBrosBrute", 1, true); PieceManager.Instance.AddPiece(new CustomPiece(newHaldorAssetBundle, "TurboCart", false, val23)); ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/new/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Wheel1/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Wheel2/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/worn/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/broken/default")).GetComponent()).material.shader = shader; PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_switchEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_switchEffect.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; MeshRenderer[] componentsInChildren2 = ((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("cart_Destruction")).GetComponentsInChildren(); MeshRenderer[] array2 = componentsInChildren2; foreach (MeshRenderer val24 in array2) { ((Renderer)val24).material.shader = shader; } PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; componentsInChildren2 = ((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("load")).GetComponentsInChildren(); MeshRenderer[] array3 = componentsInChildren2; foreach (MeshRenderer val25 in array3) { ((Renderer)val25).material.shader = shader; } ItemConfig val26 = new ItemConfig(); val26.Name = "Bone Crossbow"; val26.Description = "Withered bones waster."; val26.CraftingStation = CraftingStations.Forge; val26.AddRequirement("RoundLog", 15, 5); val26.AddRequirement("Iron", 5, 2); val26.AddRequirement("Root", 1, 1); val26.AddRequirement("BoneFragments", 5, 5); val26.RepairStation = CraftingStations.Forge; CustomItem val27 = new CustomItem("BoneCrossbow", "CrossbowArbalest", val26); val27.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 150f; val27.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; val27.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("BoneCrossbow"); ItemManager.Instance.AddItem(val27); ItemConfig val28 = new ItemConfig(); val28.Name = "Withered Bone Bolt"; val28.Description = "More frail than it's standard bone counterpart, but much less expensive."; val28.CraftingStation = CraftingStations.Forge; val28.AddRequirement("WitheredBone", 4, 0); val28.Amount = 20; CustomItem val29 = new CustomItem("WitheredBoneBolt", "BoltBone", val28); val29.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 16f; ItemManager.Instance.AddItem(val29); ItemConfig val30 = new ItemConfig(); val30.Name = "Wooden Crossbow"; val30.Description = "What material could possibly be light and solid enough to make bolts at this point? It would have to come from a very powerful being."; val30.CraftingStation = CraftingStations.Workbench; val30.AddRequirement("Wood", 15, 5); val30.AddRequirement("LeatherScraps", 5, 2); val30.AddRequirement("Resin", 6, 3); val30.RepairStation = CraftingStations.Workbench; CustomItem val31 = new CustomItem("WoodenCrossbow", "CrossbowArbalest", val30); val31.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 55f; val31.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; val31.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("WoodenCrossbow"); ItemManager.Instance.AddItem(val31); ItemConfig val32 = new ItemConfig(); val32.Name = "Antler Bolt"; val32.Description = "It is really worth the time to summon and destroy Eikthyr over and over again?"; val32.CraftingStation = CraftingStations.Workbench; val32.AddRequirement("HardAntler", 3, 0); val32.Amount = 20; CustomItem val33 = new CustomItem("AntlerBolt", "BoltBone", val32); val33.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 42f; ItemManager.Instance.AddItem(val33); ItemConfig val34 = new ItemConfig(); val34.Name = "Majestic Carapace Bolt"; val34.Description = "Sturdiest. Bolt. Ever."; val34.CraftingStation = CraftingStations.BlackForge; val34.AddRequirement("QueenDrop", 1, 0); val34.Amount = 20; CustomItem val35 = new CustomItem("CarapaceBolt", "BoltCarapace", val34); val35.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 112f; val35.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("carapacebolt"); ItemManager.Instance.AddItem(val35); ItemConfig val36 = new ItemConfig(); val36.Name = "Apprentice Hood"; val36.Description = "Makes you look like a real mage"; val36.CraftingStation = CraftingStations.Workbench; val36.Icon = newHaldorAssetBundle.LoadAsset("ApprenticeHoodIcon"); val36.AddRequirement("DeerHide", 4, 2); val36.AddRequirement("TrollHide", 5, 3); val36.AddRequirement("TrophyGreydwarfBrute", 1, 0); CustomItem val37 = new CustomItem("ApprenticeHood", "HelmetTrollLeather", val36); Material material = ((Renderer)((Component)val37.ItemDrop).GetComponentInChildren()).material; material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f); GameObject gameObject = ((Component)((Component)val37.ItemDrop).gameObject.transform.Find("attach_skin/hood")).gameObject; material = ((Renderer)gameObject.GetComponentInChildren()).material; material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f); val37.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val37.ItemDrop.m_itemData.m_shared.m_setName = ""; val37.ItemDrop.m_itemData.m_shared.m_setSize = 0; val37.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.1f; ItemManager.Instance.AddItem(val37); ItemConfig val38 = new ItemConfig(); val38.Name = "Apprentice Robe"; val38.Description = "Fancy."; val38.CraftingStation = CraftingStations.Workbench; val38.Icon = newHaldorAssetBundle.LoadAsset("ApprenticeRobeIcon"); val38.AddRequirement("DeerHide", 8, 4); val38.AddRequirement("TrollHide", 10, 5); val38.AddRequirement("TrophyGreydwarfShaman", 2, 1); CustomItem val39 = new CustomItem("ApprenticeRobe", "ArmorTrollLeatherChest", val38); material = ((Renderer)((Component)val39.ItemDrop).GetComponentInChildren()).material; material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f); gameObject = ((Component)((Component)val39.ItemDrop).gameObject.transform.Find("attach_skin/shorts")).gameObject; SkinnedMeshRenderer component = gameObject.GetComponent(); List list = new List(); list.Add(newHaldorAssetBundle.LoadAsset("TrollLeatherChest")); list[0].shader = ItemManager.Instance.GetItem("TrollArmorCopy").ItemDrop.m_itemData.m_shared.m_armorMaterial.shader; ((Renderer)component).SetMaterials(list); material = newHaldorAssetBundle.LoadAsset("TrollLeatherChest"); val39.ItemDrop.m_itemData.m_shared.m_armorMaterial = material; val39.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val39.ItemDrop.m_itemData.m_shared.m_setName = ""; val39.ItemDrop.m_itemData.m_shared.m_setSize = 0; val39.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.2f; ItemManager.Instance.AddItem(val39); ItemConfig val40 = new ItemConfig(); val40.Name = "Apprentice Leggings"; val40.Description = "Not made of spandex."; val40.CraftingStation = CraftingStations.Workbench; val40.Icon = newHaldorAssetBundle.LoadAsset("ApprenticeLegsIcon"); val40.AddRequirement("DeerHide", 8, 4); val40.AddRequirement("TrollHide", 10, 5); val40.AddRequirement("TrophyGreydwarf", 2, 1); CustomItem val41 = new CustomItem("ApprenticeLegs", "ArmorTrollLeatherLegs", val40); material = newHaldorAssetBundle.LoadAsset("TrollLeatherPants"); val41.ItemDrop.m_itemData.m_shared.m_armorMaterial = material; val41.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val41.ItemDrop.m_itemData.m_shared.m_setName = ""; val41.ItemDrop.m_itemData.m_shared.m_setSize = 0; val41.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.2f; ItemManager.Instance.AddItem(val41); ItemConfig val42 = new ItemConfig(); val42.Name = "Chef Hat"; val42.Description = "Bork! Bork! Bork! \n ~Sweedish Chef - The Muppets"; val42.CraftingStation = CraftingStations.Workbench; val42.AddRequirement("DeerHide", 100, 0); val42.AddRequirement("LeatherScraps", 200, 0); val42.AddRequirement("TrophySkeletonHildir", 1, 0); CustomItem val43 = new CustomItem("ChefHat", "HelmetTrollLeather", val42); val43.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_ChefHat"); val43.ItemDrop.m_itemData.m_shared.m_subtitle = "Doubles your chance to cook a bonus item!"; material = ((Renderer)((Component)val43.ItemDrop).GetComponentInChildren()).material; material.color = Color.white; gameObject = ((Component)((Component)val43.ItemDrop).gameObject.transform.Find("attach_skin/hood")).gameObject; material = ((Renderer)gameObject.GetComponentInChildren()).material; material.color = Color.white; val43.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val43.ItemDrop.m_itemData.m_shared.m_setName = ""; val43.ItemDrop.m_itemData.m_shared.m_setSize = 0; val43.ItemDrop.m_itemData.m_shared.m_icons[0] = ((StatusEffect)newHaldorAssetBundle.LoadAsset("SetEffect_ChefHat")).m_icon; ItemManager.Instance.AddItem(val43); ItemConfig val44 = new ItemConfig(); val44.Name = "Mining Hat"; val44.Description = "I am a dwarf and I'm digging a hole! Diggy diggy hole! Diggy diggy hole!"; CustomItem val45 = new CustomItem("MiningHat", "HelmetDverger", val44); val45.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_MiningHat"); ItemManager.Instance.AddItem(val45); ItemConfig val46 = new ItemConfig(); val46.AddRequirement("DeerHide", 8, 0); val46.AddRequirement("LeatherScraps", 10, 0); val46.AddRequirement("TrophyWraith", 1, 0); val46.AddRequirement("Raspberry", 5, 0); val46.AddRequirement("Mushroom", 5, 0); val46.AddRequirement("Dandelion", 5, 0); val46.AddRequirement("Blueberries", 5, 0); val46.AddRequirement("Thistle", 5, 0); val46.AddRequirement("BjornPaw", 1, 0); val46.Name = "Gloves"; val46.Description = "With this wraith trophy's essence you can infuse these gloves with reaping abilities! Simply walk nearby gatherables to reap them."; CustomItem val47 = new CustomItem("GatheringGloves", "TrinketBlackDamageHealth", val46); val47.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_GathererGloves"); val47.ItemDrop.m_itemData.m_shared.m_subtitle = ""; val47.ItemDrop.m_itemData.m_shared.m_icons[0] = val47.ItemDrop.m_itemData.m_shared.m_equipStatusEffect.m_icon; val47.ItemDrop.m_itemData.m_shared.m_description = "Gathering has never been easier!"; val47.ItemDrop.m_itemData.m_shared.m_blockAdrenaline = 0f; val47.ItemDrop.m_itemData.m_shared.m_fullAdrenalineSE = null; val47.ItemDrop.m_itemData.m_shared.m_maxAdrenaline = 0f; val47.ItemDrop.m_itemData.m_shared.m_perfectBlockAdrenaline = 0f; ItemManager.Instance.AddItem(val47); ItemConfig val48 = new ItemConfig(); val48.CraftingStation = CraftingStations.Cauldron; val48.Name = "Meatloaf"; val48.Description = "Meatloaf.... it sustains you. It's like........ oatmeal."; val48.Icon = foodsAssetBundle.LoadAsset("meatloaficonreal"); val48.AddRequirement("BjornMeat", 3, 0); val48.AddRequirement("RawMeat", 1, 0); val48.AddRequirement("DeerMeat", 1, 0); val48.AddRequirement("Carrot", 1, 0); val48.Amount = 3; CustomItem val49 = new CustomItem("Meatloaf", "BloodPudding", val48); val49.ItemDrop.m_itemData.m_shared.m_food = 50f; val49.ItemDrop.m_itemData.m_shared.m_foodStamina = 45f; val49.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; ItemManager.Instance.AddItem(val49); ItemConfig val50 = new ItemConfig(); val50.CraftingStation = CraftingStations.Cauldron; val50.Name = "Dandelion Salad"; val50.Description = "Dandelion salad. Yummy yummy."; val50.Icon = foodsAssetBundle.LoadAsset("dandelionsalad"); val50.AddRequirement("Dandelion", 3, 0); val50.AddRequirement("BeechSeeds", 2, 0); val50.AddRequirement("Mushroom", 1, 0); val50.Amount = 2; CustomItem val51 = new CustomItem("DandelionSalad", "Salad", val50); val51.ItemDrop.m_itemData.m_shared.m_food = 13f; val51.ItemDrop.m_itemData.m_shared.m_foodStamina = 40f; val51.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; ItemManager.Instance.AddItem(val51); ItemConfig val52 = new ItemConfig(); val52.CraftingStation = CraftingStations.Cauldron; val52.Name = "EitrJam"; val52.Description = "Surely there are magical energies to be drawn from these ingredients... Because taste sure isn't."; val52.Icon = foodsAssetBundle.LoadAsset("eitrjam"); val52.AddRequirement("Pukeberries", 6, 0); val52.AddRequirement("MushroomYellow", 2, 0); val52.AddRequirement("AncientSeed", 1, 0); val52.Amount = 2; CustomItem val53 = new CustomItem("EitrJam", "QueensJam", val52); val53.ItemDrop.m_itemData.m_shared.m_food = 20f; val53.ItemDrop.m_itemData.m_shared.m_foodStamina = 20f; val53.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; val53.ItemDrop.m_itemData.m_shared.m_foodEitr = 31f; ItemManager.Instance.AddItem(val53); ItemConfig val54 = new ItemConfig(); val54.Name = "Goulash"; val54.Description = "Actually it's like gibelotte. Nobody knows what it is, but as least it's got turninp in it."; val54.CraftingStation = CraftingStations.Cauldron; val54.Icon = newHaldorAssetBundle.LoadAsset("GoulashIcon"); val54.AddRequirement("Turnip", 3, 0); val54.AddRequirement("Guck", 2, 0); val54.AddRequirement("Ooze", 2, 0); val54.Amount = 2; CustomItem val55 = new CustomItem("Goulash", "TurnipStew", val54); val55.ItemDrop.m_itemData.m_shared.m_food = 10f; val55.ItemDrop.m_itemData.m_shared.m_foodStamina = 35f; val55.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; val55.ItemDrop.m_itemData.m_shared.m_foodEitr = 40f; ItemManager.Instance.AddItem(val55); ItemConfig val56 = new ItemConfig(); val56.Name = "Magic Sausage"; val56.Description = "It's long and hard... and blue?"; val56.CraftingStation = CraftingStations.Cauldron; val56.Icon = newHaldorAssetBundle.LoadAsset("MagicSausageIcon"); val56.AddRequirement("Entrails", 4, 0); val56.AddRequirement("WolfMeat", 1, 0); val56.AddRequirement("Crystal", 1, 0); val56.Amount = 2; CustomItem val57 = new CustomItem("MagicSausage", "Sausages", val56); val57.ItemDrop.m_itemData.m_shared.m_food = 45f; val57.ItemDrop.m_itemData.m_shared.m_foodStamina = 15f; val57.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; val57.ItemDrop.m_itemData.m_shared.m_foodEitr = 50f; ItemManager.Instance.AddItem(val57); ItemConfig val58 = new ItemConfig(); val58.Name = "Empty Water Bucket"; val58.Description = "Go swim to fill it up."; val58.CraftingStation = CraftingStations.Workbench; val58.Icon = newHaldorAssetBundle.LoadAsset("BucketIcon"); val58.AddRequirement("Wood", 5, 0); val58.AddRequirement("BarrelRings", 2, 0); CustomItem val59 = new CustomItem("EmptyWaterBucket", "Wood", val58); ((Component)((Component)val59.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent().mesh = newHaldorAssetBundle.LoadAsset("EmptyBucket").GetComponent().mesh; ((Renderer)((Component)((Component)val59.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent()).material = ((Renderer)newHaldorAssetBundle.LoadAsset("EmptyBucket").GetComponent()).material; ItemManager.Instance.AddItem(val59); ItemConfig val60 = new ItemConfig(); val60.Name = "Water Bucket"; val60.Description = "Did you steal it from Lolrus?"; val60.CraftingStation = CraftingStations.None; val58.Icon = newHaldorAssetBundle.LoadAsset("FilledBucketIcon"); CustomItem val61 = new CustomItem("WaterBucket", "EmptyWaterBucket", val60); ((Component)((Component)val61.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent().mesh = newHaldorAssetBundle.LoadAsset("Bucket").GetComponent().mesh; ((Renderer)((Component)((Component)val61.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent()).material = ((Renderer)newHaldorAssetBundle.LoadAsset("Bucket").GetComponent()).material; ItemManager.Instance.AddItem(val61); ItemConfig val62 = new ItemConfig(); val62.Name = "Salt"; val62.Description = "NaCl. Actually did you know when you evaporate sea water you end up with other things too like magnesium? Too bad it's not in the game."; val62.CraftingStation = CraftingStations.Cauldron; val62.Icon = newHaldorAssetBundle.LoadAsset("SaltIcon"); val62.AddRequirement("WaterBucket", 1, 0); val62.Amount = 5; CustomItem val63 = new CustomItem("Salt", "SpiceMountains", val62); ItemManager.Instance.AddItem(val63); ItemConfig val64 = new ItemConfig(); val64.Name = "Turnip Fries"; val64.Description = "Next best thing to potato fries, and sweet potato fries, and..."; val64.CraftingStation = CraftingStations.Cauldron; val64.Icon = newHaldorAssetBundle.LoadAsset("TurnipFriesIcon"); val64.AddRequirement("Turnip", 3, 0); val64.AddRequirement("Salt", 1, 0); CustomItem val65 = new CustomItem("TurnipFries", "BoarJerky", val64); val65.ItemDrop.m_itemData.m_shared.m_food = 15f; val65.ItemDrop.m_itemData.m_shared.m_foodStamina = 45f; val65.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; val65.ItemDrop.m_itemData.m_shared.m_foodEitr = 50f; ItemManager.Instance.AddItem(val65); ItemConfig val66 = new ItemConfig(); val66.Name = "Broth"; val66.Description = "Can't tell if it's made from beef bones, chicken bones, vegetables..."; val66.CraftingStation = CraftingStations.Cauldron; val66.AddRequirement("Wishbone", 1, 0); val66.AddRequirement("Carrot", 1, 0); val66.AddRequirement("Turnip", 1, 0); val66.Icon = foodsAssetBundle.LoadAsset("brothicon"); CustomItem val67 = new CustomItem("Broth", "MeadBugRepellent", val66); val67.ItemDrop.m_itemData.m_shared.m_itemType = (ItemType)1; val67.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = null; ItemManager.Instance.AddItem(val67); ItemConfig val68 = new ItemConfig(); val68.Name = "Fish Stew"; val68.Description = "Only missing noodles, and then it's a ramen."; val68.CraftingStation = CraftingStations.Cauldron; val68.AddRequirement("FishCooked", 1, 0); val68.AddRequirement("Broth", 1, 0); val68.Icon = foodsAssetBundle.LoadAsset("fishstew"); CustomItem val69 = new CustomItem("FishStew", "SerpentStew", val68); val69.ItemDrop.m_itemData.m_shared.m_food = 85f; val69.ItemDrop.m_itemData.m_shared.m_foodStamina = 75f; val69.ItemDrop.m_itemData.m_shared.m_foodRegen = 4f; ItemManager.Instance.AddItem(val69); ItemConfig val70 = new ItemConfig(); val70.Name = "Organic Iron"; val70.Description = "The magical energies from the Swamp Key allows its mineral iron to be easily convertible into organic iron."; val70.CraftingStation = CraftingStations.Cauldron; val70.AddRequirement("CryptKey", 1, 0); val70.Amount = 5; val70.Icon = foodsAssetBundle.LoadAsset("organiciron"); CustomItem val71 = new CustomItem("OrganicIron", "PowderedDragonEgg", val70); ItemManager.Instance.AddItem(val71); ItemConfig val72 = new ItemConfig(); val72.Name = "PotionPrefab"; val72.Description = "SHOULD NOT BE SEEN!!!"; CustomItem val73 = new CustomItem("PotionPrefab", "MeadHealthMajor", val72); ItemManager.Instance.AddItem(val73); ItemConfig val74 = new ItemConfig(); val74.Name = "Salty Mead"; val74.Description = "Made from the finest tears that could rivalize with those from League of Legends."; val74.CraftingStation = CraftingStations.MeadKetill; val74.AddRequirement("DragonTear", 1, 0); val74.Icon = foodsAssetBundle.LoadAsset("SaltyMeadBase"); CustomItem val75 = new CustomItem("SaltyMead", "MeadBaseFrostResist", val74); ItemManager.Instance.AddItem(val75); ItemConfig val76 = new ItemConfig(); val76.Name = "Salty Potion"; val76.Description = "Drink the tears of your enemies."; val76.Icon = foodsAssetBundle.LoadAsset("SaltyPotion"); CustomItem val77 = new CustomItem("SaltyPotion", "MeadHealthMajor", val76); val77.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = (StatusEffect)(object)foodsAssetBundle.LoadAsset("SaltyPotionEffect"); EffectList startEffects = ItemManager.Instance.GetItem("PotionPrefab").ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects; val77.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects = startEffects; ItemManager.Instance.AddItem(val77); CustomItem val78 = new CustomItem("newMossyBait", "FishingBaitForest"); ItemManager.Instance.AddItem(val78); CustomItem val79 = new CustomItem("newStickyBait", "FishingBaitSwamp"); ItemManager.Instance.AddItem(val79); CustomItem val80 = new CustomItem("newStingyBait", "FishingBaitPlains"); ItemManager.Instance.AddItem(val80); CustomItem val81 = new CustomItem("newHeavyBait", "FishingBaitOcean"); ItemManager.Instance.AddItem(val81); CustomItem val82 = new CustomItem("newMistyBait", "FishingBaitMistlands"); ItemManager.Instance.AddItem(val82); CustomItem val83 = new CustomItem("newHotBait", "FishingBaitAshlands"); ItemManager.Instance.AddItem(val83); CustomItem val84 = new CustomItem("newFrostyBait", "FishingBaitDeepNorth"); ItemManager.Instance.AddItem(val84); CustomItem val85 = new CustomItem("newColdBait", "FishingBaitCave"); ItemManager.Instance.AddItem(val85); CustomItem val86 = new CustomItem("newFishingRod", "FishingRod"); ItemManager.Instance.AddItem(val86); CustomItem val87 = new CustomItem("newHoops", "BarrelRings"); ItemManager.Instance.AddItem(val87); ItemConfig val88 = new ItemConfig(); val88.Name = "Worm food"; val88.Description = "Word is a certain peddler is looking for some."; val88.CraftingStation = CraftingStations.FoodPreparationTable; val88.Icon = foodsAssetBundle.LoadAsset("WormFood"); CustomItem val89 = new CustomItem("WormFood", "BarleyFlour", val88); val89.ItemDrop.m_itemData.m_shared.m_value = 100; ItemManager.Instance.AddItem(val89); ItemConfig val90 = new ItemConfig(); val90.Name = "Phantasmal Sword"; val90.Description = "Spooky scary. Goes right through physical things."; val90.CraftingStation = CraftingStations.Forge; val90.AddRequirement("RoundLog", 10, 5); val90.AddRequirement("Ectoplasm", 2, 1); val90.AddRequirement("Tin", 6, 3); val90.RepairStation = CraftingStations.Forge; CustomItem val91 = new CustomItem("PhantasmalSword", "THSwordSlayer", val90); val91.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 0f; val91.ItemDrop.m_itemData.m_shared.m_damages.m_spirit = 100f; val91.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_spirit = 20f; val91.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f; val91.ItemDrop.m_itemData.m_shared.m_attackForce = 25f; val91.ItemDrop.m_itemData.m_shared.m_blockPower = 32f; val91.ItemDrop.m_itemData.m_shared.m_attack.m_attackStamina = 18f; val91.ItemDrop.m_itemData.m_shared.m_deflectionForce = 25f; val91.ItemDrop.m_itemData.m_shared.m_deflectionForcePerLevel = 5f; val91.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val91.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("PhantasmalSword"); ItemManager.Instance.AddItem(val91); ItemConfig val92 = new ItemConfig(); val92.Name = "Fire Knife"; val92.Description = "Enough resin to burn for a lifetime."; val92.CraftingStation = CraftingStations.Workbench; val92.AddRequirement("Wood", 2, 0); val92.AddRequirement("Flint", 4, 2); val92.AddRequirement("LeatherScraps", 2, 0); val92.AddRequirement("Resin", 50, 10); val92.RepairStation = CraftingStations.Workbench; CustomItem val93 = new CustomItem("FireKnife", "KnifeFlint", val92); val93.ItemDrop.m_itemData.m_shared.m_damages.m_fire = 10f; val93.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_fire = 1f; val93.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FireKnife"); ItemManager.Instance.AddItem(val93); ItemConfig val94 = new ItemConfig(); val94.Name = "Fire Wand"; val94.Description = "Pew! Pew! Made from only the finest of finewoods among the selection."; val94.CraftingStation = CraftingStations.Forge; val94.AddRequirement("FineWood", 18, 5); val94.AddRequirement("Copper", 4, 2); val94.AddRequirement("Bronze", 2, 1); val94.AddRequirement("Acorn", 2, 0); val94.AddRequirement("SurtlingCore", 1, 1); val94.RepairStation = CraftingStations.Forge; CustomItem val95 = new CustomItem("FireWand", "StaffFireball", val94); val95.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val95.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 12f; val95.ItemDrop.m_itemData.m_shared.m_damages.m_fire = 24f; val95.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_fire = 4f; val95.ItemDrop.m_itemData.m_shared.m_attack.m_attackEitr = 10f; val95.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FireWand"); ItemManager.Instance.AddItem(val95); ItemConfig val96 = new ItemConfig(); val96.Name = "Frost Wand"; val96.Description = "BRRRRRRR! Made from only the finest of corewoods among the selection."; val96.CraftingStation = CraftingStations.Forge; val96.AddRequirement("RoundLog", 28, 10); val96.AddRequirement("Silver", 4, 2); val96.AddRequirement("Bronze", 2, 1); val96.AddRequirement("FreezeGland", 20, 2); val96.RepairStation = CraftingStations.Forge; CustomItem val97 = new CustomItem("FrostWand", "StaffIceShards", val96); val97.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val97.ItemDrop.m_itemData.m_shared.m_damages.m_frost = 25f; val97.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_frost = 1f; val97.ItemDrop.m_itemData.m_shared.m_attack.m_attackEitr = 4f; val97.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FrostWand"); ItemManager.Instance.AddItem(val97); ItemConfig val98 = new ItemConfig(); val98.Name = "Lightning Wand"; val98.Description = "Zap! Cooper coils and manual action induce an electrical current causing this staff to shoot lightning bolts... but sure let's call it \"magic\"."; val98.CraftingStation = CraftingStations.Forge; val98.AddRequirement("Iron", 3, 3); val98.AddRequirement("Copper", 40, 5); val98.AddRequirement("Ruby", 10, 1); val98.AddRequirement("Feathers", 6, 0); val98.RepairStation = CraftingStations.Forge; CustomItem val99 = new CustomItem("LightningWand", "StaffLightning", val98); val99.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val99.ItemDrop.m_itemData.m_shared.m_damages.m_lightning = 10f; val99.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_lightning = 1f; val99.ItemDrop.m_itemData.m_shared.m_attack.m_reloadEitrDrain = 12f; val99.ItemDrop.m_itemData.m_shared.m_attackForce = 20f; val99.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("LightningWand"); ItemManager.Instance.AddItem(val99); ItemConfig val100 = new ItemConfig(); val100.Name = "Blood Wand"; val100.CraftingStation = CraftingStations.Forge; val100.Icon = newHaldorAssetBundle.LoadAsset("BloodWandIcon"); val100.AddRequirement("BlackMetal", 10, 2); val100.AddRequirement("GoblinTotem", 2, 1); val100.AddRequirement("Bloodbag", 10, 2); val100.AddRequirement("CuredSquirrelHamstring", 5, 1); val100.RepairStation = CraftingStations.Forge; CustomItem val101 = new CustomItem(newHaldorAssetBundle, "BloodWand", false, val100); ItemManager.Instance.AddItem(val101); Projectile component2 = ItemManager.Instance.GetItem("BloodWand").ItemDrop.m_itemData.m_shared.m_attack.m_attackProjectile.GetComponent(); GameObject prefab = component2.m_hitEffects.m_effectPrefabs[0].m_prefab; prefab.GetComponent().material.shader = shader4; ((Component)prefab.transform.Find("vfx_RockHit (1)")).GetComponent().material.shader = shader; ((Component)prefab.transform.Find("vfx_ice_hit")).GetComponent().material.shader = shader2; ((Component)prefab.transform.Find("smoke")).GetComponent().material.shader = shader2; ((Component)((Component)component2).transform.Find("flames (1)")).GetComponent().material.shader = shader; ((Component)((Component)component2).transform.Find("sparcs_world")).GetComponent().material.shader = shader; GameObject prefab2 = ItemManager.Instance.GetItem("BloodWand").ItemDrop.m_itemData.m_shared.m_attack.m_burstEffect.m_effectPrefabs[0].m_prefab; prefab2.GetComponent().material.shader = shader; ((Component)prefab2.transform.Find("smoke")).GetComponent().material.shader = shader2; GameObject itemPrefab = ItemManager.Instance.GetItem("BloodWand").ItemPrefab; ((Component)itemPrefab.transform.Find("attach/default (1)/effects/flare")).GetComponent().material.shader = shader4; ((Component)itemPrefab.transform.Find("attach/default (1)/effects/embers (1)")).GetComponent().material.shader = shader2; ItemConfig val102 = new ItemConfig(); val102.Name = "ResinBomb"; val102.CraftingStation = CraftingStations.Workbench; val102.Icon = newHaldorAssetBundle.LoadAsset("BombResinIcon"); val102.AddRequirement("Resin", 12, 0); val102.AddRequirement("LeatherScraps", 5, 0); val102.RepairStation = CraftingStations.Workbench; CustomItem val103 = new CustomItem(newHaldorAssetBundle, "BombResin", false, val102); ItemManager.Instance.AddItem(val103); ItemDrop itemDrop = ItemManager.Instance.GetItem("BombResin").ItemDrop; GameObject attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile; GameObject spawnOnHit = attackProjectile.GetComponent().m_spawnOnHit; ((Component)spawnOnHit.transform.Find("particles/wetsplsh")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/ooz (1)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/flakes")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/low_flames")).GetComponent().material.shader = shader3; ((Component)spawnOnHit.transform.Find("particles/flame ring")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/flames (2)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/splash_overtime")).GetComponent().material.shader = shader2; CustomItem item = ItemManager.Instance.GetItem("capeDeerHideCopy"); logger.LogInfo((object)item); ItemConfig val104 = new ItemConfig(); val104.Name = "FrostBomb"; val104.CraftingStation = CraftingStations.Workbench; val104.Icon = newHaldorAssetBundle.LoadAsset("BombFrostIcon"); val104.AddRequirement("FreezeGland", 12, 0); val104.AddRequirement("LeatherScraps", 5, 0); val104.RepairStation = CraftingStations.Workbench; CustomItem val105 = new CustomItem(newHaldorAssetBundle, "BombFrost", false, val104); ItemManager.Instance.AddItem(val105); PrefabManager.Instance.AddPrefab(val105.ItemPrefab); itemDrop = ItemManager.Instance.GetItem("BombFrost").ItemDrop; attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile; PrefabManager.Instance.AddPrefab(attackProjectile); spawnOnHit = attackProjectile.GetComponent().m_spawnOnHit; PrefabManager.Instance.AddPrefab(spawnOnHit); ((Component)spawnOnHit.transform.Find("particles/wetsplsh")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/ooz (1)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/flakes")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/low_flames")).GetComponent().material.shader = shader3; ((Component)spawnOnHit.transform.Find("particles/flame ring")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/flames (2)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/splash_overtime")).GetComponent().material.shader = shader2; ItemConfig val106 = new ItemConfig(); val106.Name = "HealingBomb"; val106.CraftingStation = CraftingStations.Workbench; val106.Icon = newHaldorAssetBundle.LoadAsset("BombHealingIcon"); val106.AddRequirement("MushroomYellow", 12, 0); val106.AddRequirement("LeatherScraps", 5, 0); val106.RepairStation = CraftingStations.Workbench; CustomItem val107 = new CustomItem(newHaldorAssetBundle, "BombHealing", false, val106); ItemManager.Instance.AddItem(val107); itemDrop = ItemManager.Instance.GetItem("BombHealing").ItemDrop; attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile; spawnOnHit = attackProjectile.GetComponent().m_spawnOnHit; ((Component)spawnOnHit.transform.Find("particles/wetsplsh")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/ooz (1)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/interior_dust")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/splash_overtime")).GetComponent().material.shader = shader2; ItemConfig val108 = new ItemConfig(); val108.Name = "Refillable Torch"; val108.Description = "Automatically consumes resin to refill itself when it is about to break."; val108.CraftingStation = CraftingStations.Workbench; val108.AddRequirement("Iron", 1, 0); val108.AddRequirement("wax", 1, 0); CustomItem val109 = new CustomItem("RefillableTorch", "Torch", val108); val109.ItemDrop.m_itemData.m_shared.m_destroyBroken = false; ItemManager.Instance.AddItem(val109); ItemConfig val110 = new ItemConfig(); val110.Name = "MegaWisplight"; val110.AddRequirement("Wisp", 100, 0); val110.AddRequirement("Silver", 1, 0); val110.AddRequirement("TrophyTick", 1, 0); CustomItem val111 = new CustomItem("MegaWisplight", "Demister", val110); SE_Demister val112 = (SE_Demister)val111.ItemDrop.m_itemData.m_shared.m_equipStatusEffect; ((Component)val112.m_ballPrefab.transform.Find("effects/Particle System Force Field")).GetComponent().endRange = 20f; ItemManager.Instance.AddItem(val111); ItemConfig val113 = new ItemConfig(); val113.Name = "Magic Shield"; val113.Description = "We stand together! Block any hit with enough Eitr to activate the shield's protective powers over you and your allies."; val113.CraftingStation = CraftingStations.Forge; val113.Icon = newHaldorAssetBundle.LoadAsset("MagicShieldIcon"); val113.AddRequirement("FineWood", 25, 10); val113.AddRequirement("Copper", 10, 3); val113.AddRequirement("SerpentScale", 3, 1); CustomItem val114 = new CustomItem("MagicShield", "ShieldIronTower", val113); val114.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_MagicShield"); val114.ItemDrop.m_itemData.m_shared.m_blockPower = 30f; val114.ItemDrop.m_itemData.m_shared.m_blockPowerPerLevel = 6f; val114.ItemDrop.m_itemData.m_shared.m_toolTier = 1; ItemManager.Instance.AddItem(val114); ItemConfig val115 = new ItemConfig(); val115.Name = "Staff Protection Copy"; val115.Description = "not supposed to show up"; CustomItem val116 = new CustomItem("StaffProtectionCopy", "StaffShield", val115); ItemManager.Instance.AddItem(val116); SE_Shield val117 = newHaldorAssetBundle.LoadAsset("StatusEffect_MagicShieldActivated"); GameObject val118 = newHaldorAssetBundle.LoadAsset("Bubble"); GameObject prefab3 = ItemManager.Instance.GetItem("StaffProtectionCopy").ItemDrop.m_itemData.m_shared.m_attackStatusEffect.m_startEffects.m_effectPrefabs[0].m_prefab; ((Component)val118.transform.Find("smoke_world")).GetComponent().material.shader = ((Component)prefab3.transform.Find("smoke_world")).GetComponent().material.shader; ((Component)val118.transform.Find("smoke_world (1)")).GetComponent().material.shader = ((Component)prefab3.transform.Find("smoke_world (1)")).GetComponent().material.shader; ((Component)val118.transform.Find("Sphere")).GetComponent().material.shader = ((Component)prefab3.transform.Find("Sphere")).GetComponent().material.shader; EffectData val119 = new EffectData(); val119.m_prefab = val118; val119.m_attach = true; val119.m_enabled = true; val119.m_variant = -1; val119.m_scale = true; EffectData[] effectPrefabs = (EffectData[])(object)new EffectData[1] { val119 }; ((StatusEffect)val117).m_startEffects.m_effectPrefabs = effectPrefabs; ItemConfig val120 = new ItemConfig(); val120.Name = "woodCopy1"; CustomItem val121 = new CustomItem("WoodCopy1", "Wood", val120); val121.ItemDrop.m_itemData.m_shared.m_attackStatusEffect = (StatusEffect)(object)val117; ItemManager.Instance.AddItem(val121); ItemManager.Instance.AddStatusEffect(new CustomStatusEffect((StatusEffect)(object)val117, false)); SE_Burning val122 = newHaldorAssetBundle.LoadAsset("StatusEffect_AttackBuffVisual"); GameObject val123 = newHaldorAssetBundle.LoadAsset("AttackBuff"); val123.GetComponent().material.shader = standardSurface2; ((Component)val123.transform.Find("flare")).GetComponent().material.shader = shader4; ((Component)val123.transform.Find("flames")).GetComponent().material.shader = shader3; ((Component)val123.transform.Find("flames_world")).GetComponent().material.shader = shader3; ((Component)val123.transform.Find("sparcs (1)")).GetComponent().material.shader = shader; ((Component)val123.transform.Find("flames (1)")).GetComponent().material.shader = CustomParticleUnlit; EffectData val124 = new EffectData(); val124.m_prefab = val123; val124.m_attach = true; val124.m_enabled = true; val124.m_variant = -1; val124.m_scale = true; EffectData[] effectPrefabs2 = (EffectData[])(object)new EffectData[1] { val124 }; ((StatusEffect)val122).m_startEffects.m_effectPrefabs = effectPrefabs2; ItemConfig val125 = new ItemConfig(); val125.Name = "woodCopy2"; CustomItem val126 = new CustomItem("WoodCopy2", "Wood", val125); val126.ItemDrop.m_itemData.m_shared.m_attackStatusEffect = (StatusEffect)(object)val122; ItemManager.Instance.AddItem(val126); ItemManager.Instance.AddStatusEffect(new CustomStatusEffect((StatusEffect)(object)val122, false)); ItemConfig val127 = new ItemConfig(); val127.Name = "Odin's Tankard"; CustomItem val128 = new CustomItem(newHaldorAssetBundle, "OdinsTankard", false, val127); ((Component)val128.ItemDrop.m_itemData.m_shared.m_startEffect.m_effectPrefabs[0].m_prefab.transform.Find("wetsplsh")).GetComponent().material.shader = shader2; ((Component)val128.ItemDrop.m_itemData.m_shared.m_startEffect.m_effectPrefabs[0].m_prefab.transform.Find("vfx_MeadSplash")).GetComponent().material.shader = standardSurface2; ItemManager.Instance.AddItem(val128); ItemConfig val129 = new ItemConfig(); val129.Name = "French Horn"; val129.CraftingStation = CraftingStations.Workbench; val129.AddRequirement("FineWood", 6, 0); val129.AddRequirement("Iron", 3, 0); val129.AddRequirement("TrophyDraugr", 9, 0); CustomItem val130 = new CustomItem(newHaldorAssetBundle, "FrenchHorn", false, val129); ItemManager.Instance.AddItem(val130); PrefabManager.OnVanillaPrefabsAvailable -= AddClonedItems; } private void FixShaders() { Shader shader = ((Renderer)ItemManager.Instance.GetItem("CapeDeerHideCopy").ItemPrefab.GetComponentInChildren()).sharedMaterial.shader; Material[] materials = ((Renderer)capeDeer.GetComponentInChildren()).materials; materials[0].shader = shader; Transform val = capeDeer.transform.Find("attach_skin/cape2"); Material[] materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeTroll.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeTroll.transform.Find("attach_skin/cape2"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; Shader shader2 = ((Renderer)ItemManager.Instance.GetItem("CapeWolfCopy").ItemPrefab.GetComponentInChildren()).sharedMaterial.shader; materials = ((Renderer)capeWolfWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader2; val = capeWolfWaterproof.transform.Find("attach_skin/WolfCape"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials2[1].shader = shader; Transform val2 = capeWolfWaterproof.transform.Find("attach_skin/WolfCape_Cloth/WolfCape_cloth"); Material[] materials3 = ((Renderer)((Component)val2).GetComponent()).materials; materials3[0].shader = shader; materials = ((Renderer)capeLoxWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeLoxWaterproof.transform.Find("attach_skin/LoxCape"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeLinenWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeLinenWaterproof.transform.Find("attach_skin/cape1"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeFeatherWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeFeatherWaterproof.transform.Find("attach_skin/MageCape"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeAsksvinWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeAsksvinWaterproof.transform.Find("attach_skin/Asksvincape"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeAshWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeAshWaterproof.transform.Find("attach_skin/Plane"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; PrefabManager.OnVanillaPrefabsAvailable -= FixShaders; } private void CreateNewHaldor() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected O, but got Unknown Trader component = newHaldor.GetComponent(); TradeItem val = new TradeItem(); val.m_price = 50; val.m_stack = 20; val.m_prefab = ItemManager.Instance.GetItem("newMossyBait").ItemDrop; val.m_requiredGlobalKey = GlobalKey.KilledEikthyr; component.m_items.Add(val); TradeItem val2 = new TradeItem(); val2.m_price = 100; val2.m_stack = 20; val2.m_prefab = ItemManager.Instance.GetItem("newStickyBait").ItemDrop; val2.m_requiredGlobalKey = GlobalKey.KilledElder; component.m_items.Add(val2); TradeItem val3 = new TradeItem(); val3.m_price = 150; val3.m_stack = 20; val3.m_prefab = ItemManager.Instance.GetItem("newStingyBait").ItemDrop; val3.m_requiredGlobalKey = GlobalKey.KilledModer; component.m_items.Add(val3); TradeItem val4 = new TradeItem(); val4.m_price = 200; val4.m_stack = 20; val4.m_prefab = ItemManager.Instance.GetItem("newHeavyBait").ItemDrop; val4.m_requiredGlobalKey = GlobalKey.KilledTroll; component.m_items.Add(val4); TradeItem val5 = new TradeItem(); val5.m_price = 250; val5.m_stack = 20; val5.m_prefab = ItemManager.Instance.GetItem("newMistyBait").ItemDrop; val5.m_requiredGlobalKey = GlobalKey.KilledModer; component.m_items.Add(val5); TradeItem val6 = new TradeItem(); val6.m_price = 300; val6.m_stack = 20; val6.m_prefab = ItemManager.Instance.GetItem("newHotBait").ItemDrop; val6.m_requiredGlobalKey = GlobalKey.KilledYagluth; component.m_items.Add(val6); TradeItem val7 = new TradeItem(); val7.m_price = 350; val7.m_stack = 20; val7.m_prefab = ItemManager.Instance.GetItem("newFrostyBait").ItemDrop; val7.m_requiredGlobalKey = GlobalKey.KilledYagluth; component.m_items.Add(val7); TradeItem val8 = new TradeItem(); val8.m_price = 400; val8.m_stack = 20; val8.m_prefab = ItemManager.Instance.GetItem("newColdBait").ItemDrop; val8.m_requiredGlobalKey = GlobalKey.KilledYagluth; component.m_items.Add(val8); TradeItem val9 = new TradeItem(); val9.m_prefab = ItemManager.Instance.GetItem("newFishingRod").ItemDrop; val9.m_price = 350; component.m_items[4] = val9; TradeItem val10 = new TradeItem(); val10.m_price = 100; val10.m_stack = 3; val10.m_prefab = ItemManager.Instance.GetItem("newHoops").ItemDrop; component.m_items[8] = val10; TradeItem val11 = new TradeItem(); val11.m_price = 620; val11.m_stack = 1; val11.m_prefab = ItemManager.Instance.GetItem("MiningHat").ItemDrop; component.m_items[1] = val11; PrefabManager.Instance.AddPrefab(newHaldor); CustomPiece piece = PieceManager.Instance.GetPiece("InfiniteWoodTorch"); Fireplace component2 = ((Component)piece.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; CustomPiece piece2 = PieceManager.Instance.GetPiece("InfiniteIronTorch"); component2 = ((Component)piece2.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; CustomPiece piece3 = PieceManager.Instance.GetPiece("InfiniteGuckTorch"); component2 = ((Component)piece3.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; CustomPiece piece4 = PieceManager.Instance.GetPiece("InfiniteEyeTorch"); component2 = ((Component)piece4.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; CustomPiece piece5 = PieceManager.Instance.GetPiece("InfiniteSconce"); component2 = ((Component)piece5.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; PrefabManager.OnVanillaPrefabsAvailable -= CreateNewHaldor; } private void CreateWax() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown CustomItem val = new CustomItem(waxPrefab, false); ItemManager.Instance.AddItem(val); PrefabManager.OnVanillaPrefabsAvailable -= CreateWax; } private void CreateCapes() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown CustomItem val = new CustomItem(capeDeer, false); CustomItem val2 = new CustomItem(capeTroll, false); CustomItem val3 = new CustomItem(capeWolfWaterproof, false); CustomItem val4 = new CustomItem(capeLoxWaterproof, false); CustomItem val5 = new CustomItem(capeLinenWaterproof, false); CustomItem val6 = new CustomItem(capeFeatherWaterproof, false); CustomItem val7 = new CustomItem(capeAsksvinWaterproof, false); CustomItem val8 = new CustomItem(capeAshWaterproof, false); ItemManager.Instance.AddItem(val); ItemManager.Instance.AddItem(val2); ItemManager.Instance.AddItem(val3); ItemManager.Instance.AddItem(val4); ItemManager.Instance.AddItem(val5); ItemManager.Instance.AddItem(val6); ItemManager.Instance.AddItem(val7); ItemManager.Instance.AddItem(val8); PrefabManager.OnVanillaPrefabsAvailable -= CreateCapes; } private void AddRecipes() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Expected O, but got Unknown //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Expected O, but got Unknown //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected O, but got Unknown //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Expected O, but got Unknown //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Expected O, but got Unknown //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Expected O, but got Unknown //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Expected O, but got Unknown //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Expected O, but got Unknown //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Expected O, but got Unknown //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Expected O, but got Unknown //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Expected O, but got Unknown //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Expected O, but got Unknown //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Expected O, but got Unknown //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Expected O, but got Unknown //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Expected O, but got Unknown //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Expected O, but got Unknown //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Expected O, but got Unknown //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Expected O, but got Unknown //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Expected O, but got Unknown //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Expected O, but got Unknown //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Expected O, but got Unknown //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Expected O, but got Unknown //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Expected O, but got Unknown //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Expected O, but got Unknown //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Expected O, but got Unknown //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Expected O, but got Unknown //IL_06a9: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Expected O, but got Unknown //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Expected O, but got Unknown //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Expected O, but got Unknown //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0713: Expected O, but got Unknown //IL_0768: Unknown result type (might be due to invalid IL or missing references) //IL_0772: Expected O, but got Unknown //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Expected O, but got Unknown //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Expected O, but got Unknown //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_07c3: Expected O, but got Unknown //IL_0800: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Expected O, but got Unknown RecipeConfig val = new RecipeConfig(); val.CraftingStation = CraftingStations.Cauldron; val.Name = "Waterproof Deer Hide Cape"; val.RepairStation = CraftingStations.Workbench; val.Item = "CapeDeer"; val.AddRequirement(new RequirementConfig("CapeDeerHide", 1, 0, true)); val.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val.AddRequirement(new RequirementConfig("DeerHide", 0, 4, true)); val.AddRequirement(new RequirementConfig("BoneFragments", 0, 5, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val)); RecipeConfig val2 = new RecipeConfig(); val2.CraftingStation = CraftingStations.Cauldron; val2.Name = "Waterproof Troll Hide Cape"; val2.RepairStation = CraftingStations.Workbench; val2.Item = "CapeTroll"; val2.AddRequirement(new RequirementConfig("CapeTrollHide", 1, 0, true)); val2.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val2.AddRequirement(new RequirementConfig("TrollHide", 0, 5, true)); val2.AddRequirement(new RequirementConfig("BoneFragments", 0, 5, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val2)); RecipeConfig val3 = new RecipeConfig(); val3.CraftingStation = CraftingStations.Cauldron; val3.Name = "Waterproof Wolf Fur Cape"; val3.RepairStation = CraftingStations.Workbench; val3.Item = "CapeWolfWaterproof"; val3.AddRequirement(new RequirementConfig("CapeWolf", 1, 0, true)); val3.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val3.AddRequirement(new RequirementConfig("WolfPelt", 0, 4, true)); val3.AddRequirement(new RequirementConfig("Silver", 2, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val3)); RecipeConfig val4 = new RecipeConfig(); val4.CraftingStation = CraftingStations.Cauldron; val4.Name = "Waterproof Lox Cape"; val4.RepairStation = CraftingStations.Workbench; val4.Item = "CapeLoxWaterproof"; val4.AddRequirement(new RequirementConfig("CapeLox", 1, 0, true)); val4.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val4.AddRequirement(new RequirementConfig("LoxPelt", 0, 2, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val4)); RecipeConfig val5 = new RecipeConfig(); val5.CraftingStation = CraftingStations.Cauldron; val5.Name = "Waterproof Linen Cape"; val5.RepairStation = CraftingStations.Workbench; val5.Item = "CapeLinenWaterproof"; val5.AddRequirement(new RequirementConfig("CapeLinen", 1, 0, true)); val5.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val5.AddRequirement(new RequirementConfig("LinenThread", 0, 4, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val5)); RecipeConfig val6 = new RecipeConfig(); val6.CraftingStation = CraftingStations.Cauldron; val6.Name = "Waterproof Feather Cape"; val6.RepairStation = CraftingStations.Workbench; val6.Item = "CapeFeatherWaterproof"; val6.AddRequirement(new RequirementConfig("CapeFeather", 1, 0, true)); val6.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val6.AddRequirement(new RequirementConfig("Feathers", 0, 2, true)); val6.AddRequirement(new RequirementConfig("ScaleHide", 0, 5, true)); val6.AddRequirement(new RequirementConfig("Eitr", 0, 3, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val6)); RecipeConfig val7 = new RecipeConfig(); val7.CraftingStation = CraftingStations.Cauldron; val7.Name = "Waterproof Asksvin Cloak"; val7.RepairStation = CraftingStations.Workbench; val7.Item = "CapeAsksvinWaterproof"; val7.AddRequirement(new RequirementConfig("CapeAsksvin", 1, 0, true)); val7.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val7.AddRequirement(new RequirementConfig("AskHide", 0, 2, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val7)); RecipeConfig val8 = new RecipeConfig(); val8.CraftingStation = CraftingStations.Cauldron; val8.Name = "Waterproof Ashen Cape"; val8.RepairStation = CraftingStations.Workbench; val8.Item = "CapeAshWaterproof"; val8.AddRequirement(new RequirementConfig("CapeAsh", 1, 0, true)); val8.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val8.AddRequirement(new RequirementConfig("AskHide", 0, 2, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val8)); RecipeConfig val9 = new RecipeConfig(); val9.CraftingStation = CraftingStations.Cauldron; val9.Name = "Transmute Gold (Elder)"; val9.Item = "TrophyEikthyr"; val9.Amount = 2; val9.AddRequirement("TrophyTheElder", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val9)); RecipeConfig val10 = new RecipeConfig(); val10.CraftingStation = CraftingStations.Cauldron; val10.Name = "Transmute Gold (Eikthyr)"; val10.Item = "Coins"; val10.Amount = 50; val10.AddRequirement("TrophyEikthyr", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val10)); RecipeConfig val11 = new RecipeConfig(); val11.CraftingStation = CraftingStations.Cauldron; val11.Name = "Transmute Gold (Bonemass)"; val11.Item = "TrophyTheElder"; val11.Amount = 2; val11.AddRequirement("TrophyBonemass", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val11)); RecipeConfig val12 = new RecipeConfig(); val12.CraftingStation = CraftingStations.Cauldron; val12.Name = "Transmute Gold (Moder)"; val12.Item = "TrophyBonemass"; val12.Amount = 2; val12.AddRequirement("TrophyDragonQueen", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val12)); RecipeConfig val13 = new RecipeConfig(); val13.CraftingStation = CraftingStations.Cauldron; val13.Name = "Transmute Gold (Yagluth)"; val13.Item = "TrophyDragonQueen"; val13.Amount = 2; val13.AddRequirement("TrophyGoblinKing", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val13)); RecipeConfig val14 = new RecipeConfig(); val14.CraftingStation = CraftingStations.Cauldron; val14.Name = "Transmute Gold (Queen)"; val14.Item = "TrophyGoblinKing"; val14.Amount = 2; val14.AddRequirement("TrophySeekerQueen", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val14)); RecipeConfig val15 = new RecipeConfig(); val15.CraftingStation = CraftingStations.Cauldron; val15.Name = "Transmute Gold (Fader)"; val15.Item = "TrophySeekerQueen"; val15.Amount = 2; val15.AddRequirement("TrophyFader", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val15)); RecipeConfig val16 = new RecipeConfig(); val16.CraftingStation = CraftingStations.Cauldron; val16.Name = "OrganicIron to Bloodbags"; val16.Item = "Bloodbag"; val16.Amount = 2; val16.AddRequirement("OrganicIron", 1, 0); val16.AddRequirement("Entrails", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val16)); FermenterConversionConfig val17 = new FermenterConversionConfig(); ((ConversionConfig)val17).ToItem = "SaltyPotion"; ((ConversionConfig)val17).FromItem = "SaltyMead"; ((ConversionConfig)val17).Station = Fermenters.Fermenter; val17.ProducedItems = 6; ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val17)); RecipeConfig val18 = new RecipeConfig(); val18.Name = "Worm Food"; val18.Item = "WormFood"; val18.CraftingStation = CraftingStations.FoodPreparationTable; val18.AddRequirement("RottenMeat", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val18)); } }