Decompiled source of ForsakenJVL v2.0.38
plugins/Digitalroot.Valheim.ForsakenJVL.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Net.Http; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Timers; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using Digitalroot.Valheim.Common; using Digitalroot.Valheim.Common.Json; using Digitalroot.Valheim.Common.Names.Vanilla; using Digitalroot.Valheim.ForsakenJVL.Properties; using JetBrains.Annotations; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using SimpleJson; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("Digitalroot.Valheim.ForsakenJVL")] [assembly: AssemblyDescription("Digitalroot ForsakenJVL")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Digitalroot Technologies")] [assembly: AssemblyProduct("Digitalroot Valheim Mods")] [assembly: AssemblyCopyright("Copyright © Digitalroot Technologies 2021 - 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("3ccc4dc1-5b17-47c1-b996-ca03b8639a61")] [assembly: AssemblyFileVersion("2.0.38")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.0.38.0")] [module: UnverifiableCode] namespace Digitalroot.Valheim.ForsakenJVL { public class CMB_BurnWhenHeld : MonoBehaviour { private readonly System.Timers.Timer _timer; public CMB_BurnWhenHeld() { try { Log.Trace(Main.Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); _timer = new System.Timers.Timer { AutoReset = true, Enabled = false, Interval = 10000.0 }; _timer.Elapsed += TimerElapsed; } catch (Exception e) { Log.Error(Main.Instance, e); } } private void TimerElapsed(object sender, ElapsedEventArgs e) { try { Log.Trace(Main.Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); if (Utils.IsPlayerReady() && ((Humanoid)Player.m_localPlayer).IsItemEquiped(((Component)this).gameObject.GetComponent<ItemDrop>().m_itemData)) { ((Character)Player.m_localPlayer).AddFireDamage(10f); } } catch (Exception e2) { Log.Error(Main.Instance, e2); } } [UsedImplicitly] public void Start() { Log.Trace(Main.Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); _timer.Elapsed += TimerElapsed; _timer.Start(); } [UsedImplicitly] private void OnDestroy() { Log.Trace(Main.Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); _timer.Elapsed -= TimerElapsed; _timer.Stop(); _timer.Dispose(); } } [BepInPlugin("digitalroot.valheim.mods.forsaken.jvl", "Digitalroot ForsakenJVL", "2.0.38")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInIncompatibility("com.bepinex.plugins.forsaken")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin, ITraceableLogging { [UsedImplicitly] public static ConfigEntry<int> NexusId; public static Main Instance; private AssetBundle _assetBundle; [UsedImplicitly] public const string Version = "2.0.38"; [UsedImplicitly] public const string Name = "Digitalroot ForsakenJVL"; [UsedImplicitly] public const string Guid = "digitalroot.valheim.mods.forsaken.jvl"; [UsedImplicitly] public const string Namespace = "Digitalroot.Valheim.ForsakenJVL"; public string Source => "Digitalroot.Valheim.ForsakenJVL"; public bool EnableTrace { get; } public Main() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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 Instance = this; NexusId = ((BaseUnityPlugin)this).Config.Bind<int>("General", "NexusID", 1538, new ConfigDescription("Nexus mod ID for updates", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = false, Browsable = false, ReadOnly = true } })); EnableTrace = false; Log.RegisterSource(Instance); Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); } [UsedImplicitly] private void Awake() { try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); LoadAssetFile(); PrefabManager.OnVanillaPrefabsAvailable += AddCustomItems; } catch (Exception e) { Log.Error(Instance, e); } } private async void LoadAssetFile() { try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); FileInfo assetFile = new FileInfo(Path.Combine(new FileInfo(typeof(Main).Assembly.Location).DirectoryName ?? throw new InvalidOperationException("Unable to load assetFile."), "forsakenmod")); if (!assetFile.Exists) { HttpUtil.DownloadFileAsync(Resources.asseturl, assetFile); } for (int i = 0; i < 36000; i++) { assetFile.Refresh(); if (assetFile.Exists) { break; } await Task.Delay(25); } if (!assetFile.Exists) { Log.Error(Instance, "Unable to find asset file 'forsakenmod', please make sure 'forsakenmod' and 'Digitalroot.Valheim.ForsakenJVL.dll' are in " + assetFile.DirectoryName); Log.Error(Instance, "Digitalroot.Valheim.ForsakenJVL is not loaded."); } else { _assetBundle = AssetUtils.LoadAssetBundle(assetFile.FullName); } } catch (Exception e) { Log.Error(Instance, e); } } private void AddCustomItems() { try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); if (!((Object)(object)_assetBundle == (Object)null)) { AddBattleaxeLightning(); AddBowFrost(); AddSledgeFire(); AddSledgePoison(); AddSpearSpirit(); AddUnarmedFenring(); AddKnifeFrost(); AddUnarmedFrost(); AddUnarmedFrostOh(); AddSwordFire(); AddSwordLightning(); AddShieldFire(); AddSpellFire(); _assetBundle.Unload(false); PrefabManager.OnVanillaPrefabsAvailable -= AddCustomItems; } } catch (Exception e) { Log.Error(Instance, e); } } private void AddSpellFire() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_SpellFire/v801_SpellFire.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_spellfire"; component.m_itemData.m_shared.m_description = "$item_forsaken_spellfire_description"; component.m_itemData.m_shared.m_itemType = (ItemType)3; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_weight = 0.1f; component.m_itemData.m_shared.m_maxDurability = 600f; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_blockPower = 0f; component.m_itemData.m_shared.m_timedBlockBonus = 0f; component.m_itemData.m_shared.m_deflectionForce = 0f; component.m_itemData.m_shared.m_attackForce = 0f; component.m_itemData.m_shared.m_damagesPerLevel.m_fire = 20f; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 7; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[3] { new RequirementConfig { Item = ItemDropNames.Crystal, Amount = 40, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.TrophyGoblinKing, Amount = 12, AmountPerLevel = 0 }, new RequirementConfig { Item = ItemDropNames.YagluthDrop, Amount = 36, AmountPerLevel = 2 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddShieldFire() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Expected O, but got Unknown //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_ShieldFire/v801_ShieldFire.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_shieldfire"; component.m_itemData.m_shared.m_description = "$item_forsaken_shieldfire_description"; component.m_itemData.m_shared.m_itemType = (ItemType)5; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_weight = 10f; component.m_itemData.m_shared.m_maxDurability = 600f; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_blockPower = 120f; component.m_itemData.m_shared.m_timedBlockBonus = 6f; component.m_itemData.m_shared.m_deflectionForce = 8f; component.m_itemData.m_shared.m_attackForce = 0f; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 7; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.Silver, Amount = 20, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.Flametal, Amount = 40, AmountPerLevel = 12 }, new RequirementConfig { Item = ItemDropNames.TrophyGoblinKing, Amount = 10, AmountPerLevel = 0 }, new RequirementConfig { Item = ItemDropNames.YagluthDrop, Amount = 30, AmountPerLevel = 2 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddSwordLightning() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Expected O, but got Unknown //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Expected O, but got Unknown //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Expected O, but got Unknown //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Expected O, but got Unknown //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_SwordLightning/v801_SwordLightning.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_swordlightning"; component.m_itemData.m_shared.m_description = "$item_forsaken_swordlightning_description"; component.m_itemData.m_shared.m_itemType = (ItemType)3; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_maxDurability = 700f; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_timedBlockBonus = 2f; component.m_itemData.m_shared.m_deflectionForce = 2f; component.m_itemData.m_shared.m_attackForce = 8f; component.m_itemData.m_shared.m_blockPower = 30f; component.m_itemData.m_shared.m_damages.m_slash = 40f; component.m_itemData.m_shared.m_damages.m_pierce = 40f; component.m_itemData.m_shared.m_damages.m_lightning = 70f; component.m_itemData.m_shared.m_damagesPerLevel.m_slash = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_lightning = 10f; component.m_itemData.m_shared.m_attack.m_attackStamina = 20f; component.m_itemData.m_shared.m_secondaryAttack.m_damageMultiplier = 1f; component.m_itemData.m_shared.m_secondaryAttack.m_attackStamina = 30f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.3f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.3f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 7; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.Crystal, Amount = 40, AmountPerLevel = 40 }, new RequirementConfig { Item = ItemDropNames.Flametal, Amount = 60, AmountPerLevel = 60 }, new RequirementConfig { Item = ItemDropNames.TrophyGoblinKing, Amount = 12, AmountPerLevel = 0 }, new RequirementConfig { Item = ItemDropNames.YagluthDrop, Amount = 36, AmountPerLevel = 2 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddSwordFire() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Expected O, but got Unknown //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Expected O, but got Unknown //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Expected O, but got Unknown //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Expected O, but got Unknown //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Expected O, but got Unknown //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_SwordFire/v801_SwordFire.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_swordfire"; component.m_itemData.m_shared.m_description = "$item_forsaken_swordfire_description"; component.m_itemData.m_shared.m_itemType = (ItemType)14; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_weight = 30f; component.m_itemData.m_shared.m_maxDurability = 800f; component.m_itemData.m_shared.m_equipDuration = 1f; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_blockPower = 70f; component.m_itemData.m_shared.m_timedBlockBonus = 4f; component.m_itemData.m_shared.m_deflectionForce = 8f; component.m_itemData.m_shared.m_attackForce = 0f; component.m_itemData.m_shared.m_movementModifier = -0.25f; component.m_itemData.m_shared.m_damages.m_slash = 0f; component.m_itemData.m_shared.m_damages.m_fire = 46f; component.m_itemData.m_shared.m_damages.m_frost = 46f; component.m_itemData.m_shared.m_damages.m_lightning = 46f; component.m_itemData.m_shared.m_damages.m_spirit = 46f; component.m_itemData.m_shared.m_damages.m_poison = 46f; component.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f; component.m_itemData.m_shared.m_damagesPerLevel.m_fire = 10f; component.m_itemData.m_shared.m_damagesPerLevel.m_frost = 10f; component.m_itemData.m_shared.m_damagesPerLevel.m_lightning = 10f; component.m_itemData.m_shared.m_damagesPerLevel.m_spirit = 10f; component.m_itemData.m_shared.m_damagesPerLevel.m_poison = 10f; component.m_itemData.m_shared.m_attack.m_attackStamina = 25f; component.m_itemData.m_shared.m_attack.m_attackAnimation = "battleaxe_attack"; component.m_itemData.m_shared.m_attack.m_attackChainLevels = 3; component.m_itemData.m_shared.m_attack.m_speedFactor = 0.1f; component.m_itemData.m_shared.m_attack.m_speedFactorRotation = 0.1f; component.m_itemData.m_shared.m_secondaryAttack.m_attackAnimation = "battleaxe_secondary"; component.m_itemData.m_shared.m_secondaryAttack.m_attackChainLevels = 0; component.m_itemData.m_shared.m_secondaryAttack.m_attackStamina = 30f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.1f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.1f; component.m_itemData.m_shared.m_secondaryAttack.m_damageMultiplier = 1f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 7; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.Iron, Amount = 40, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.Crystal, Amount = 40, AmountPerLevel = 15 }, new RequirementConfig { Item = ItemDropNames.Silver, Amount = 36, AmountPerLevel = 12 }, new RequirementConfig { Item = ItemDropNames.TrophyEikthyr, Amount = 12, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddUnarmedFrostOh() { //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Expected O, but got Unknown //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Expected O, but got Unknown //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Expected O, but got Unknown //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Expected O, but got Unknown //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_UnarmedFrost/v801_UnarmedFrostOH.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_unarmedfrostoh"; component.m_itemData.m_shared.m_description = "$item_forsaken_unarmedfrostoh_description"; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_maxDurability = 700f; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_timedBlockBonus = 2f; component.m_itemData.m_shared.m_deflectionForce = 2f; component.m_itemData.m_shared.m_attackForce = 8f; component.m_itemData.m_shared.m_blockPower = 90f; component.m_itemData.m_shared.m_deflectionForce = 1f; component.m_itemData.m_shared.m_damages.m_blunt = 90f; component.m_itemData.m_shared.m_damages.m_frost = 80f; component.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_frost = 10f; component.m_itemData.m_shared.m_attack.m_attackStamina = 20f; component.m_itemData.m_shared.m_secondaryAttack.m_attackStamina = 20f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_damageMultiplier = 1f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_attackRange = 3.5f; component.m_itemData.m_shared.m_secondaryAttack.m_attackAngle = 180f; component.m_itemData.m_shared.m_secondaryAttack.m_attackRayWidth = 0.3f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 6; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.FreezeGland, Amount = 10, AmountPerLevel = 2 }, new RequirementConfig { Item = ItemDropNames.TrophyHatchling, Amount = 4, AmountPerLevel = 0 }, new RequirementConfig { Item = ItemDropNames.DragonTear, Amount = 20, AmountPerLevel = 5 }, new RequirementConfig { Item = ItemDropNames.TrophyDragonQueen, Amount = 4, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddUnarmedFrost() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Expected O, but got Unknown //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Expected O, but got Unknown //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_UnarmedFrost/v801_UnarmedFrost.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_unarmedfrost"; component.m_itemData.m_shared.m_description = "$item_forsaken_unarmedfrost_description"; component.m_itemData.m_shared.m_itemType = (ItemType)3; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_maxDurability = 700f; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_timedBlockBonus = 2f; component.m_itemData.m_shared.m_deflectionForce = 2f; component.m_itemData.m_shared.m_attackForce = 8f; component.m_itemData.m_shared.m_blockPower = 70f; component.m_itemData.m_shared.m_damages.m_blunt = 70f; component.m_itemData.m_shared.m_damages.m_frost = 90f; component.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_frost = 10f; component.m_itemData.m_shared.m_attack.m_attackStamina = 15f; component.m_itemData.m_shared.m_secondaryAttack.m_attackAnimation = "knife_secondary"; component.m_itemData.m_shared.m_secondaryAttack.m_attackRayWidth = 0.3f; component.m_itemData.m_shared.m_secondaryAttack.m_attackStamina = 20f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_damageMultiplier = 1.25f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_attackRange = 2.5f; component.m_itemData.m_shared.m_secondaryAttack.m_attackAngle = 50f; component.m_itemData.m_shared.m_secondaryAttack.m_attackRayWidth = 0.3f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 6; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.FreezeGland, Amount = 20, AmountPerLevel = 4 }, new RequirementConfig { Item = ItemDropNames.TrophyHatchling, Amount = 10, AmountPerLevel = 0 }, new RequirementConfig { Item = ItemDropNames.DragonTear, Amount = 80, AmountPerLevel = 20 }, new RequirementConfig { Item = ItemDropNames.TrophyDragonQueen, Amount = 8, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddKnifeFrost() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Expected O, but got Unknown //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Expected O, but got Unknown //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/weapons/v801_KnifeFrost/v801_KnifeFrost.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_knifefrost"; component.m_itemData.m_shared.m_description = "$item_forsaken_knifefrost_description"; component.m_itemData.m_shared.m_itemType = (ItemType)3; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_weight = 1.5f; component.m_itemData.m_shared.m_maxDurability = 500f; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_backstabBonus = 4f; component.m_itemData.m_shared.m_damages.m_slash = 0f; component.m_itemData.m_shared.m_damages.m_pierce = 75f; component.m_itemData.m_shared.m_damages.m_frost = 75f; component.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f; component.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_frost = 5f; component.m_itemData.m_shared.m_attack.m_attackStamina = 15f; component.m_itemData.m_shared.m_attack.m_speedFactor = 0.1f; component.m_itemData.m_shared.m_attack.m_speedFactorRotation = 0.1f; component.m_itemData.m_shared.m_attack.m_attackHeight = 1f; component.m_itemData.m_shared.m_secondaryAttack.m_damageMultiplier = 1.15f; component.m_itemData.m_shared.m_secondaryAttack.m_attackStamina = 30f; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 6; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.FreezeGland, Amount = 24, AmountPerLevel = 6 }, new RequirementConfig { Item = ItemDropNames.Needle, Amount = 60, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.DragonTear, Amount = 80, AmountPerLevel = 20 }, new RequirementConfig { Item = ItemDropNames.TrophyDragonQueen, Amount = 8, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddBattleaxeLightning() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Expected O, but got Unknown //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Expected O, but got Unknown //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Expected O, but got Unknown //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Expected O, but got Unknown //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Expected O, but got Unknown //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_BattleaxeLightning/v801_BattleaxeLightning.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_battleaxelightning"; component.m_itemData.m_shared.m_description = "$item_forsaken_battleaxelightning_description"; component.m_itemData.m_shared.m_itemType = (ItemType)3; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_maxDurability = 400f; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_weight = 2.5f; component.m_itemData.m_shared.m_attackForce = 12f; component.m_itemData.m_shared.m_deflectionForce = 6f; component.m_itemData.m_shared.m_timedBlockBonus = 6f; component.m_itemData.m_shared.m_damages.m_slash = 75f; component.m_itemData.m_shared.m_damages.m_lightning = 40f; component.m_itemData.m_shared.m_damagesPerLevel.m_slash = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_lightning = 5f; component.m_itemData.m_shared.m_attack.m_attackStamina = 30f; component.m_itemData.m_shared.m_attack.m_attackAnimation = "swing_longsword"; component.m_itemData.m_shared.m_secondaryAttack.m_attackAnimation = "atgeir_secondary"; component.m_itemData.m_shared.m_secondaryAttack.m_attackChainLevels = 0; component.m_itemData.m_shared.m_secondaryAttack.m_attackStamina = 20f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_damageMultiplier = 0.75f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_attackRange = 3.5f; component.m_itemData.m_shared.m_secondaryAttack.m_attackAngle = 360f; component.m_itemData.m_shared.m_secondaryAttack.m_attackRayWidth = 0.3f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.FineWood, Amount = 30, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.LeatherScraps, Amount = 12, AmountPerLevel = 4 }, new RequirementConfig { Item = ItemDropNames.Silver, Amount = 90, AmountPerLevel = 25 }, new RequirementConfig { Item = ItemDropNames.TrophyEikthyr, Amount = 1, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddBowFrost() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_BowFrost/v801_BowFrost.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_bowfrost"; component.m_itemData.m_shared.m_description = "$item_forsaken_bowfrost_description"; component.m_itemData.m_shared.m_itemType = (ItemType)4; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_maxDurability = 600f; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_weight = 10f; component.m_itemData.m_shared.m_timedBlockBonus = 6f; component.m_itemData.m_shared.m_deflectionForce = 8f; component.m_itemData.m_shared.m_attackForce = 0f; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 6; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.FreezeGland, Amount = 20, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.Crystal, Amount = 20, AmountPerLevel = 6 }, new RequirementConfig { Item = ItemDropNames.DragonTear, Amount = 20, AmountPerLevel = 15 }, new RequirementConfig { Item = ItemDropNames.TrophyDragonQueen, Amount = 6, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddSledgeFire() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Expected O, but got Unknown //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Expected O, but got Unknown //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Expected O, but got Unknown //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Expected O, but got Unknown //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Expected O, but got Unknown //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_SledgeFire/v801_SledgeFire.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_sledgefire"; component.m_itemData.m_shared.m_description = "$item_forsaken_sledgefire_description"; component.m_itemData.m_shared.m_itemType = (ItemType)14; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_maxDurability = 750f; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_weight = 4f; component.m_itemData.m_shared.m_blockPower = 80f; component.m_itemData.m_shared.m_timedBlockBonus = 6f; component.m_itemData.m_shared.m_deflectionForce = 6f; component.m_itemData.m_shared.m_attackForce = 6f; component.m_itemData.m_shared.m_damages.m_blunt = 40f; component.m_itemData.m_shared.m_damages.m_pierce = 100f; component.m_itemData.m_shared.m_damages.m_fire = 112f; component.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 3f; component.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 10f; component.m_itemData.m_shared.m_damagesPerLevel.m_fire = 5f; component.m_itemData.m_shared.m_attack.m_attackStamina = 20f; component.m_itemData.m_shared.m_attack.m_attackAnimation = "battleaxe_attack"; component.m_itemData.m_shared.m_attack.m_attackChainLevels = 3; component.m_itemData.m_shared.m_secondaryAttack.m_attackAnimation = "swing_sledge"; component.m_itemData.m_shared.m_secondaryAttack.m_attackStamina = 35f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; SE_Burning val2 = ScriptableObject.CreateInstance<SE_Burning>(); if ((Object)(object)val2 == (Object)null) { throw new NullReferenceException("statusEffect"); } val2.m_fireDamagePerHit = 1f; val2.m_damageInterval = 1f; component.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)val2; ItemManager instance = ItemManager.Instance; ItemConfig val3 = new ItemConfig(); val3.CraftingStation = CraftingStationNames.Forge; val3.MinStationLevel = 6; val3.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.Flametal, Amount = 60, AmountPerLevel = 15 }, new RequirementConfig { Item = ItemDropNames.SurtlingCore, Amount = 60, AmountPerLevel = 15 }, new RequirementConfig { Item = ItemDropNames.BlackMetal, Amount = 60, AmountPerLevel = 15 }, new RequirementConfig { Item = ItemDropNames.TrophySurtling, Amount = 60, AmountPerLevel = 8 } }; instance.AddItem(new CustomItem(val, false, val3)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddSledgePoison() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Expected O, but got Unknown //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Expected O, but got Unknown //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Expected O, but got Unknown //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Expected O, but got Unknown //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_SledgePoison/v801_SledgePoison.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_sledgepoison"; component.m_itemData.m_shared.m_description = "$item_forsaken_sledgepoison_description"; component.m_itemData.m_shared.m_itemType = (ItemType)14; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_maxDurability = 550f; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_weight = 4f; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_timedBlockBonus = 6f; component.m_itemData.m_shared.m_deflectionForce = 6f; component.m_itemData.m_shared.m_attackForce = 12f; component.m_itemData.m_shared.m_blockPower = 40f; component.m_itemData.m_shared.m_damages.m_blunt = 140f; component.m_itemData.m_shared.m_damages.m_poison = 80f; component.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_poison = 10f; component.m_itemData.m_shared.m_attack.m_attackStamina = 20f; component.m_itemData.m_shared.m_attack.m_attackAnimation = "battleaxe_attack"; component.m_itemData.m_shared.m_attack.m_attackChainLevels = 3; component.m_itemData.m_shared.m_secondaryAttack.m_attackAnimation = "swing_sledge"; component.m_itemData.m_shared.m_secondaryAttack.m_attackStamina = 35f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; StatusEffect equipStatusEffect = component.m_itemData.m_shared.m_equipStatusEffect; StatusEffect obj = ((equipStatusEffect is SE_Poison) ? equipStatusEffect : null); if ((Object)(object)obj == (Object)null) { throw new NullReferenceException("statusEffect"); } ((SE_Poison)obj).m_damageInterval = 1f; ((SE_Poison)obj).m_damagePerHit = 1f; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 4; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.WitheredBone, Amount = 20, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.Guck, Amount = 20, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.BlackMetal, Amount = 40, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.TrophyBonemass, Amount = 6, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddSpearSpirit() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Expected O, but got Unknown //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_SpearSpirit/v801_SpearSpirit.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_spearspirit"; component.m_itemData.m_shared.m_description = "$item_forsaken_spearspirit_description"; component.m_itemData.m_shared.m_itemType = (ItemType)3; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_maxDurability = 500f; component.m_itemData.m_shared.m_equipDuration = 0.2f; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_timedBlockBonus = 1f; component.m_itemData.m_shared.m_deflectionForce = 1f; component.m_itemData.m_shared.m_attackForce = 12f; component.m_itemData.m_shared.m_damages.m_pierce = 75f; component.m_itemData.m_shared.m_damages.m_spirit = 75f; component.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_spirit = 5f; component.m_itemData.m_shared.m_attack.m_attackStamina = 20f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.2f; component.m_itemData.m_shared.m_secondaryAttack.m_damageMultiplier = 0.75f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 4; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.ElderBark, Amount = 40, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.Crystal, Amount = 12, AmountPerLevel = 4 }, new RequirementConfig { Item = ItemDropNames.AncientSeed, Amount = 40, AmountPerLevel = 15 }, new RequirementConfig { Item = ItemDropNames.TrophyTheElder, Amount = 3, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } private void AddUnarmedFenring() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Expected O, but got Unknown //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Expected O, but got Unknown //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Expected O, but got Unknown //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Expected O, but got Unknown //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Expected O, but got Unknown //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Expected O, but got Unknown try { Log.Trace(Instance, "Digitalroot.Valheim.ForsakenJVL." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = _assetBundle.LoadAsset<GameObject>("Assets/Custom_Items/v801_UnarmedFenring/v801_UnarmedFenring.prefab"); if ((Object)(object)val == (Object)null) { throw new NullReferenceException("prefab"); } ItemDrop component = val.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { throw new NullReferenceException("itemDrop"); } component.m_itemData.m_shared.m_name = "$item_forsaken_unarmedfenring"; component.m_itemData.m_shared.m_description = "$item_forsaken_unarmedfenring_description"; component.m_itemData.m_shared.m_itemType = (ItemType)3; component.m_itemData.m_shared.m_equipDuration = 0.25f; component.m_itemData.m_shared.m_maxDurability = 800f; component.m_itemData.m_shared.m_maxQuality = 4; component.m_itemData.m_shared.m_maxStackSize = 1; component.m_itemData.m_shared.m_variants = 1; component.m_itemData.m_shared.m_weight = 2f; component.m_itemData.m_shared.m_blockPower = 30f; component.m_itemData.m_shared.m_timedBlockBonus = 2f; component.m_itemData.m_shared.m_deflectionForce = 2f; component.m_itemData.m_shared.m_attackForce = 2f; component.m_itemData.m_shared.m_movementModifier = 0f; component.m_itemData.m_shared.m_damages.m_slash = 60f; component.m_itemData.m_shared.m_damages.m_pierce = 60f; component.m_itemData.m_shared.m_damagesPerLevel.m_slash = 5f; component.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; component.m_itemData.m_shared.m_attack.m_attackStamina = 15f; component.m_itemData.m_shared.m_attack.m_speedFactor = 0.1f; component.m_itemData.m_shared.m_attack.m_speedFactorRotation = 0.1f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactor = 0.1f; component.m_itemData.m_shared.m_secondaryAttack.m_speedFactorRotation = 0.1f; component.m_itemData.m_shared.m_secondaryAttack.m_damageMultiplier = 1.15f; component.m_itemData.m_shared.m_secondaryAttack.m_forceMultiplier = 10f; component.m_itemData.m_shared.m_secondaryAttack.m_staggerMultiplier = 6f; component.m_itemData.m_shared.m_secondaryAttack.m_lowerDamagePerHit = false; ItemManager instance = ItemManager.Instance; ItemConfig val2 = new ItemConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.MinStationLevel = 5; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.FreezeGland, Amount = 40, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.Silver, Amount = 60, AmountPerLevel = 10 }, new RequirementConfig { Item = ItemDropNames.Chain, Amount = 4, AmountPerLevel = 2 }, new RequirementConfig { Item = ItemDropNames.TrophyFenring, Amount = 10, AmountPerLevel = 0 } }; instance.AddItem(new CustomItem(val, false, val2)); } catch (Exception e) { Log.Error(Instance, e); } } } } namespace Digitalroot.Valheim.ForsakenJVL.Properties { [GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [DebuggerNonUserCode] [CompilerGenerated] internal class Resources { private static ResourceManager resourceMan; private static CultureInfo resourceCulture; [EditorBrowsable(EditorBrowsableState.Advanced)] internal static ResourceManager ResourceManager { get { if (resourceMan == null) { resourceMan = new ResourceManager("Digitalroot.Valheim.ForsakenJVL.Properties.Resources", typeof(Resources).Assembly); } return resourceMan; } } [EditorBrowsable(EditorBrowsableState.Advanced)] internal static CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } internal static string asseturl => ResourceManager.GetString("asseturl", resourceCulture); internal Resources() { } } } namespace Digitalroot.Valheim.Common { internal sealed class Log { private static readonly Dictionary<string, TraceLogger> TraceLoggers; [UsedImplicitly] private static Log Instance { get; } static Log() { TraceLoggers = new Dictionary<string, TraceLogger>(); Instance = new Log(); } private Log() { TraceLoggers.Add("Digitalroot", new TraceLogger("Digitalroot", enableTrace: false)); } public static void RegisterSource(ITraceableLogging sender) { if ((!TraceLoggers.ContainsKey(sender.Source) || TraceLoggers[sender.Source].IsTraceEnabled != sender.EnableTrace) && (!TraceLoggers.ContainsKey(sender.Source) || sender.EnableTrace)) { if (TraceLoggers.ContainsKey(sender.Source) && sender.EnableTrace) { TraceLoggers[sender.Source].EnableTrace(); } else { TraceLoggers.Add(sender.Source, new TraceLogger(sender.Source, sender.EnableTrace)); } } } private static TraceLogger GetTraceLogger(ITraceableLogging sender) { if (!TraceLoggers.ContainsKey(sender.Source)) { return TraceLoggers["Digitalroot"]; } return TraceLoggers[sender.Source]; } [UsedImplicitly] public static void SetEnableTrace(ITraceableLogging sender, bool value) { if (value) { GetTraceLogger(sender).EnableTrace(); } else { GetTraceLogger(sender).DisableTrace(); } } [UsedImplicitly] public static void SetEnableTraceForAllLoggers(bool value) { foreach (TraceLogger value2 in TraceLoggers.Values) { if (value) { value2.EnableTrace(); } else { value2.DisableTrace(); } } } [UsedImplicitly] public static void Debug(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogDebug(value); } [UsedImplicitly] public static void Error(ITraceableLogging sender, Exception e, int i = 1) { Error(sender, "Message: " + e.Message); Error(sender, $"TargetSite: {e.TargetSite}"); Error(sender, "StackTrace: " + e.StackTrace); Error(sender, "Source: " + e.Source); if (e.Data.Count > 0) { foreach (object key in e.Data.Keys) { Error(sender, $"key: {key}, value: {e.Data[key]}"); } } if (e.InnerException != null) { Error(sender, $"--- InnerException [{i}][Start] ---"); Error(sender, e.InnerException, ++i); } } [UsedImplicitly] public static void Error(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogError(value); } [UsedImplicitly] public static void Info(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogInfo(value); } [UsedImplicitly] public static void Fatal(ITraceableLogging sender, Exception e, int i = 1) { Fatal(sender, "Message: " + e.Message); Fatal(sender, $"TargetSite: {e.TargetSite}"); Fatal(sender, "StackTrace: " + e.StackTrace); Fatal(sender, "Source: " + e.Source); if (e.Data.Count > 0) { foreach (object key in e.Data.Keys) { Fatal(sender, $"key: {key}, value: {e.Data[key]}"); } } if (e.InnerException != null) { Fatal(sender, $"--- InnerException [{i}][Start] ---"); Fatal(sender, e.InnerException, ++i); } } [UsedImplicitly] public static void Fatal(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogFatal(value); } [UsedImplicitly] public static void Message(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogMessage(value); } [UsedImplicitly] public static void Trace(ITraceableLogging sender, object value) { if (GetTraceLogger(sender).IsTraceEnabled || sender.EnableTrace) { GetTraceLogger(sender).LoggerRef.Log((LogLevel)63, value); } } [UsedImplicitly] public static void Warning(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogWarning(value); } } internal class TraceLogger { internal readonly ManualLogSource LoggerRef; private readonly string _source; private readonly FileInfo _traceFileInfo; public bool IsTraceEnabled { get; private set; } private DirectoryInfo AssemblyDirectory => new FileInfo(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path)).Directory; public TraceLogger(string source, bool enableTrace) { _source = source; IsTraceEnabled = enableTrace; LoggerRef = Logger.CreateLogSource(_source); _traceFileInfo = new FileInfo(Path.Combine(Paths.BepInExRootPath ?? AssemblyDirectory.FullName, "logs", _source + ".Trace.log")); if (_traceFileInfo.DirectoryName != null) { Directory.CreateDirectory(_traceFileInfo.DirectoryName); } if (_traceFileInfo.Exists) { _traceFileInfo.Delete(); _traceFileInfo.Refresh(); } LoggerRef.LogEvent += OnLogEvent; } public void EnableTrace() { IsTraceEnabled = true; } public void DisableTrace() { IsTraceEnabled = false; } [UsedImplicitly] public void StopTrace() { LoggerRef.LogEvent -= OnLogEvent; } private void OnLogEvent(object sender, LogEventArgs e) { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (e.Source.SourceName != _source || !IsTraceEnabled) { return; } using Mutex mutex = new Mutex(initiallyOwned: false, "Digitalroot.Valheim.Common.TraceLogger." + _source); mutex.WaitOne(); try { if (e.Data is string) { string contents = $"[{e.Level,-7}:{e.Source.SourceName,10}] {e.Data}{Environment.NewLine}"; File.AppendAllText(_traceFileInfo.FullName, contents, Encoding.UTF8); } else { string contents2 = $"[{e.Level,-7}:{e.Source.SourceName,10}] {JsonSerializationProvider.Serialize(e.Data)}{Environment.NewLine}"; File.AppendAllText(_traceFileInfo.FullName, contents2, Encoding.UTF8); } } finally { mutex.ReleaseMutex(); } } } internal interface ITraceableLogging { string Source { get; } bool EnableTrace { get; } } } namespace Digitalroot.Valheim.Common.Json { [UsedImplicitly] internal static class JsonSerializationProvider { [Obsolete("Use Deserialize<T>()")] public static T FromJson<T>(string json) { return Deserialize<T>(json); } public static T Deserialize<T>(string json) { return SimpleJson.DeserializeObject<T>(json, (IJsonSerializerStrategy)(object)new DigitalrootJsonSerializerStrategy()); } [Obsolete("Use Serialize()")] public static string ToJson(object obj, bool pretty = false) { return Serialize(obj); } public static string Serialize(object obj) { return SimpleJson.SerializeObject(obj, (IJsonSerializerStrategy)(object)new DigitalrootJsonSerializerStrategy()); } } internal class DigitalrootJsonSerializerStrategy : PocoJsonSerializerStrategy { public override bool TrySerializeNonPrimitiveObject(object input, out object output) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (!(input is Vector3 val)) { if (input is Quaternion val2) { output = new float[4] { val2.x, val2.y, val2.z, val2.w }; return true; } return ((PocoJsonSerializerStrategy)this).TrySerializeNonPrimitiveObject(input, ref output); } output = new float[3] { val.x, val.y, val.z }; return true; } public override object DeserializeObject(object value, Type type) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) if (type == null) { throw new ArgumentNullException("type"); } if (value == null) { throw new ArgumentNullException("value"); } if (value is string value2) { if (string.IsNullOrWhiteSpace(value2)) { throw new ArgumentNullException("value"); } if (type == typeof(Vector3)) { if (!(((PocoJsonSerializerStrategy)this).DeserializeObject(value, typeof(float[])) is float[] array) || (array != null && array.Length != 3)) { throw new ArgumentException(string.Format("The value '{0}' can be converted to a {1}.", value, "Vector3"), "value"); } return (object)new Vector3(array[0], array[1], array[2]); } if (type == typeof(Quaternion)) { if (!(((PocoJsonSerializerStrategy)this).DeserializeObject(value, typeof(float[])) is float[] array2) || (array2 != null && array2.Length != 4)) { throw new ArgumentException(string.Format("The value '{0}' can be converted to a {1}.", value, "Quaternion"), "value"); } return (object)new Quaternion(array2[0], array2[1], array2[2], array2[3]); } return ((PocoJsonSerializerStrategy)this).DeserializeObject(value, type); } throw new ArgumentException($"The value '{value}' can be converted to a {type.Name}.", "value"); } } } namespace Digitalroot.Valheim.Common { internal static class Utils { private static readonly ITraceableLogging Logger = GetLogger(); [UsedImplicitly] public static DirectoryInfo AssemblyDirectory => new FileInfo(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path)).Directory; [UsedImplicitly] public static bool IsDedicated => ZNet.instance.IsDedicated(); [UsedImplicitly] public static bool IsServer => ZNet.instance.IsServer(); public static bool IsRunningFromNUnit => AppDomain.CurrentDomain.GetAssemblies().Any((Assembly a) => a.FullName.ToLowerInvariant().StartsWith("nunit.framework")); public static string Namespace => "Digitalroot.Valheim.Common"; private static ITraceableLogging GetLogger() { return new StaticSourceLogger(); } [UsedImplicitly] public static bool IsHeadless() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 return (int)SystemInfo.graphicsDeviceType == 4; } [UsedImplicitly] public static List<T> AllOf<T>() { return Enum.GetValues(typeof(T)).OfType<T>().ToList(); } [UsedImplicitly] public static IEnumerable<string> AllNames(Type type) { foreach (FieldInfo item in from f1 in type.GetFields() where f1.FieldType == typeof(string) select f1) { yield return item.GetValue(null).ToString(); } } [UsedImplicitly] public static bool DoesPluginExist(string pluginGuid) { return Chainloader.PluginInfos.Any((KeyValuePair<string, PluginInfo> keyValuePair) => keyValuePair.Value.Metadata.GUID == pluginGuid); } [UsedImplicitly] public static Vector3 GetGroundHeight(int x, int z) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return Utils.GetGroundHeight(new Vector3Int(x, 500, z)); } [UsedImplicitly] public static Vector3 GetGroundHeight(float x, float z) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return Utils.GetGroundHeight(new Vector3(x, 500f, z)); } public static Vector3 GetGroundHeight(Vector3Int vector3) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) return new Vector3((float)((Vector3Int)(ref vector3)).x, ZoneSystem.instance.GetGroundHeight(Vector3Int.op_Implicit(vector3)), (float)((Vector3Int)(ref vector3)).z); } public static Vector3 GetGroundHeight(Vector3 vector3) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) return new Vector3(vector3.x, ZoneSystem.instance.GetGroundHeight(vector3), vector3.z); } [UsedImplicitly] public static GameObject GetItemPrefab(string itemName) { if (!IsObjectDBReady()) { return null; } return GetObjectDB().GetItemPrefab(itemName); } [UsedImplicitly] public static GameObject GetItemPrefab(int hash) { if (!IsObjectDBReady()) { return null; } return GetObjectDB().GetItemPrefab(hash); } [UsedImplicitly] public static Player GetLocalPlayer() { return Player.m_localPlayer; } [UsedImplicitly] public static Vector3 GetLocalPlayersPosition() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) return ((Component)Player.m_localPlayer).transform.position; } [UsedImplicitly] public static ObjectDB GetObjectDB() { return ObjectDB.instance; } [UsedImplicitly] public static string GetPluginPath(Type modPluginType) { return Path.GetDirectoryName(modPluginType.Assembly.Location); } [UsedImplicitly] public static GameObject GetPrefab(string itemName) { if (!IsZNetSceneReady()) { return null; } return ZNetScene.instance.GetPrefab(itemName); } [UsedImplicitly] public static GameObject GetPrefab(int hash) { if (!IsZNetSceneReady()) { return null; } return ZNetScene.instance.GetPrefab(hash); } [UsedImplicitly] public static T GetPrivateField<T>(object instance, string name) { FieldInfo field = instance.GetType().GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { return (T)field.GetValue(instance); } Log.Error(Logger, "Variable " + name + " does not exist on type: " + instance.GetType()); return default(T); } [UsedImplicitly] public static object InvokePrivate(object instance, string name, object[] args = null) { MethodInfo method = instance.GetType().GetMethod(name, BindingFlags.Instance | BindingFlags.NonPublic); if (method == null) { Type[] types = ((args == null) ? Type.EmptyTypes : args.Select((object arg) => arg.GetType()).ToArray()); method = instance.GetType().GetMethod(name, types); } if (method == null) { Log.Error(Logger, "Method " + name + " does not exist on type: " + instance.GetType()); return null; } return method.Invoke(instance, args); } [UsedImplicitly] public static bool IsGameInMainScene() { return (Object)(object)ZNetScene.instance != (Object)null; } [UsedImplicitly] public static bool IsObjectDBReady() { if (!((Object)(object)GetObjectDB() != (Object)null) || GetObjectDB().m_items.Count == 0 || !((Object)(object)GetItemPrefab("Amber") != (Object)null)) { return IsRunningFromNUnit; } return true; } [UsedImplicitly] public static bool IsPlayerReady() { return (Object)(object)GetLocalPlayer() != (Object)null; } [UsedImplicitly] public static bool IsZNetSceneReady() { if ((Object)(object)ZNetScene.instance != (Object)null) { List<GameObject> list = ZNetScene.instance?.m_prefabs; if (list != null) { return list.Count > 0; } return false; } return false; } [UsedImplicitly] public static bool IsZNetReady() { return (Object)(object)ZNet.instance != (Object)null; } [UsedImplicitly] public static string Localize(string value) { return Localization.instance.Localize(value); } [UsedImplicitly] public static Vector3 GetStartTemplesPosition() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) LocationInstance val = default(LocationInstance); if (ZoneSystem.instance.FindClosestLocation("StartTemple", Vector3.zero, ref val)) { Log.Trace(Logger, $"[GetStartTemplesPosition] StartTemple at {val.m_position}"); return val.m_position; } Log.Error(Logger, "[GetStartTemplesPosition] Can't find StartTemple"); return Vector3.zero; } [UsedImplicitly] public static void SetPrivateField(object instance, string name, object value) { FieldInfo field = instance.GetType().GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); if (field == null) { Log.Error(Logger, "Variable " + name + " does not exist on type: " + instance.GetType()); } else { field.SetValue(instance, value); } } [UsedImplicitly] public static GameObject Spawn([NotNull] string prefabName, Vector3 location, [CanBeNull] Transform parent = null) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) Log.Trace(Logger, $"{Namespace}.{MethodBase.GetCurrentMethod().DeclaringType?.Name}.{MethodBase.GetCurrentMethod().Name}({prefabName}, {location}, {((parent != null) ? ((Object)parent).name : null)})"); GameObject itemPrefab = ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(prefabName)); if (!((Object)(object)itemPrefab == (Object)null)) { return Spawn(itemPrefab, location, parent); } return null; } [UsedImplicitly] public static GameObject Spawn([NotNull] GameObject prefab, Vector3 location, [CanBeNull] Transform parent = null) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Log.Trace(Logger, $"{Namespace}.{MethodBase.GetCurrentMethod().DeclaringType?.Name}.{MethodBase.GetCurrentMethod().Name}({((Object)prefab).name}, {location}, {((parent != null) ? ((Object)parent).name : null)})"); if ((Object)(object)parent == (Object)null) { return Object.Instantiate<GameObject>(prefab, location, Quaternion.identity); } return Object.Instantiate<GameObject>(prefab, location, Quaternion.identity, parent); } public static AssetBundle LoadAssetBundleFromResources(string bundleName, Assembly resourceAssembly) { if (resourceAssembly == null) { throw new ArgumentNullException("resourceAssembly"); } string text = null; try { text = resourceAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(bundleName)); } catch (Exception) { } if (text == null) { Log.Error(Logger, "AssetBundle " + bundleName + " not found in assembly manifest"); return null; } using Stream stream = resourceAssembly.GetManifestResourceStream(text); return AssetBundle.LoadFromStream(stream); } } [DebuggerDisplay("Source = {Source}, EnableTrace = {EnableTrace}", Name = "{Source}")] internal class StaticSourceLogger : ITraceableLogging { public static StaticSourceLogger PreMadeTraceableInstance = new StaticSourceLogger(enableTrace: true); public static StaticSourceLogger PreMadeNonTraceableInstance = new StaticSourceLogger(); public string Source { get; } public bool EnableTrace { get; } public StaticSourceLogger(bool enableTrace = false) : this("Digitalroot", enableTrace) { } public StaticSourceLogger(string source, bool enableTrace = false) { Source = source; EnableTrace = enableTrace; } } } namespace Digitalroot.Valheim.Common.Names.Vanilla { internal static class CraftingStationNames { public static readonly IEnumerable<string> AllNames = Utils.AllNames(typeof(CraftingStationNames)); public static readonly string ArtisanTable = "piece_artisanstation"; public static readonly string Blackforge = "blackforge"; public static readonly string Cauldron = "piece_cauldron"; public static readonly string Forge = "forge"; public static readonly string MeadCauldron = "piece_MeadCauldron"; public static readonly string MageTable = "piece_magetable"; public static readonly string Preptable = "piece_preptable"; public static readonly string Stonecutter = "piece_stonecutter"; public static readonly string Workbench = "piece_workbench"; public static string Ketill => MeadCauldron; } internal static class ItemDropNames { public static readonly IEnumerable<string> AllNames = Utils.AllNames(typeof(ItemDropNames)); public static string Acorn = "Acorn"; public static string Amber = "Amber"; public static string AmberPearl = "AmberPearl"; public static string AncientSkull = "ancient_skull"; public static string AncientSeed = "AncientSeed"; public static string ArmorCarapaceChest = "ArmorCarapaceChest"; public static string ArmorCarapaceLegs = "ArmorCarapaceLegs"; public static string ArmorDress1 = "ArmorDress1"; public static string ArmorDress2 = "ArmorDress2"; public static string ArmorDress3 = "ArmorDress3"; public static string ArmorDress4 = "ArmorDress4"; public static string ArmorDress5 = "ArmorDress5"; public static string ArmorDress6 = "ArmorDress6"; public static string ArmorDress7 = "ArmorDress7"; public static string ArmorDress8 = "ArmorDress8"; public static string ArmorDress9 = "ArmorDress9"; public static string ArmorDress10 = "ArmorDress10"; public static string ArmorFenringChest = "ArmorFenringChest"; public static string ArmorFenringLegs = "ArmorFenringLegs"; public static string ArmorFlametalChest = "ArmorFlametalChest"; public static string ArmorFlametalLegs = "ArmorFlametalLegs"; public static string ArmorHarvester1 = "ArmorHarvester1"; public static string ArmorHarvester2 = "ArmorHarvester2"; public static string ArmorAshlandsMediumChest = "ArmorAshlandsMediumChest"; public static string ArmorAshlandsMediumlegs = "ArmorAshlandsMediumlegs"; public static string ArmorBronzeChest = "ArmorBronzeChest"; public static string ArmorBronzeLegs = "ArmorBronzeLegs"; public static string ArmorIronChest = "ArmorIronChest"; public static string ArmorIronLegs = "ArmorIronLegs"; public static string ArmorMageChest = "ArmorMageChest"; public static string ArmorMageLegs = "ArmorMageLegs"; public static string ArmorMageLegsAshlands = "ArmorMageLegs_Ashlands"; public static string ArmorLeatherChest = "ArmorLeatherChest"; public static string ArmorLeatherLegs = "ArmorLeatherLegs"; public static string ArmorPaddedCuirass = "ArmorPaddedCuirass"; public static string ArmorPaddedGreaves = "ArmorPaddedGreaves"; public static string ArmorRagsChest = "ArmorRagsChest"; public static string ArmorRagsLegs = "ArmorRagsLegs"; public static string ArmorRootChest = "ArmorRootChest"; public static string ArmorRootLegs = "ArmorRootLegs"; public static string ArmorTrollLeatherChest = "ArmorTrollLeatherChest"; public static string ArmorTrollLeatherLegs = "ArmorTrollLeatherLegs"; public static string ArmorTunic1 = "ArmorTunic1"; public static string ArmorTunic2 = "ArmorTunic2"; public static string ArmorTunic3 = "ArmorTunic3"; public static string ArmorTunic4 = "ArmorTunic4"; public static string ArmorTunic5 = "ArmorTunic5"; public static string ArmorTunic6 = "ArmorTunic6"; public static string ArmorTunic7 = "ArmorTunic7"; public static string ArmorTunic8 = "ArmorTunic8"; public static string ArmorTunic9 = "ArmorTunic9"; public static string ArmorTunic10 = "ArmorTunic10"; public static string ArmorWolfChest = "ArmorWolfChest"; public static string ArmorWolfLegs = "ArmorWolfLegs"; public static string ArrowBronze = "ArrowBronze"; public static string ArrowCarapace = "ArrowCarapace"; public static string ArrowCharred = "ArrowCharred"; public static string ArrowFire = "ArrowFire"; public static string ArrowFlint = "ArrowFlint"; public static string ArrowFrost = "ArrowFrost"; public static string ArrowIron = "ArrowIron"; public static string ArrowNeedle = "ArrowNeedle"; public static string ArrowObsidian = "ArrowObsidian"; public static string ArrowPoison = "ArrowPoison"; public static string ArrowSilver = "ArrowSilver"; public static string ArrowWood = "ArrowWood"; public static string AtgeirBlackmetal = "AtgeirBlackmetal"; public static string AtgeirBronze = "AtgeirBronze"; public static string AtgeirHimminAfl = "AtgeirHimminAfl"; public static string AtgeirIron = "AtgeirIron"; public static string AxeBlackMetal = "AxeBlackMetal"; public static string AxeBronze = "AxeBronze"; public static string AxeFlint = "AxeFlint"; public static string AxeIron = "AxeIron"; public static string AxeJotunBane = "AxeJotunBane"; public static string AxeStone = "AxeStone"; public static string BarberKit = "BarberKit"; public static string Barley = "Barley"; public static string BarleyFlour = "BarleyFlour"; public static string BarleyWine = "BarleyWine"; public static string BarleyWineBase = "BarleyWineBase"; public static string BarrelRings = "BarrelRings"; public static string Battleaxe = "Battleaxe"; public static string BattleaxeCrystal = "BattleaxeCrystal"; public static string BeechSeeds = "BeechSeeds"; public static string Bell = "Bell"; public static string BeltStrength = "BeltStrength"; public static string Bilebag = "Bilebag"; public static string BirchSeeds = "BirchSeeds"; public static string BlackCore = "BlackCore"; public static string BlackMarble = "BlackMarble"; public static string BlackMetal = "BlackMetal"; public static string BlackMetalScrap = "BlackMetalScrap"; public static string BlackSoup = "BlackSoup"; public static string Blackwood = "Blackwood"; public static string Bloodbag = "Bloodbag"; public static string BloodPudding = "BloodPudding"; public static string Blueberries = "Blueberries"; public static string BoarJerky = "BoarJerky"; public static string BoltBlackmetal = "BoltBlackmetal"; public static string BoltBone = "BoltBone"; public static string BoltCarapace = "BoltCarapace"; public static string BoltCharred = "BoltCharred"; public static string BoltIron = "BoltIron"; public static string BombBile = "BombBile"; public static string BombLava = "BombLava"; public static string BombOoze = "BombOoze"; public static string BombSiege = "BombSiege"; public static string BombSmoke = "BombSmoke"; public static string BoneFragments = "BoneFragments"; public static string BoneMawSerpentMeat = "BoneMawSerpentMeat"; public static string BonemawSerpentScale = "BonemawSerpentScale"; public static string BonemawSerpentTooth = "BonemawSerpentTooth"; public static string Bow = "Bow"; public static string BowAshlands = "BowAshlands"; public static string BowAshlandsBlood = "BowAshlandsBlood"; public static string BowAshlandsRoot = "BowAshlandsRoot"; public static string BowAshlandsStorm = "BowAshlandsStorm"; public static string BowDraugrFang = "BowDraugrFang"; public static string BowFineWood = "BowFineWood"; public static string BowHuntsman = "BowHuntsman"; public static string BowSpineSnap = "BowSpineSnap"; public static string Bread = "Bread"; public static string BreadDough = "BreadDough"; public static string Bronze = "Bronze"; public static string BronzeNails = "BronzeNails"; public static string BronzeScrap = "BronzeScrap"; public static string BugMeat = "BugMeat"; public static string CandleWick = "CandleWick"; public static string CapeAsh = "CapeAsh"; p