using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("sparring")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("1010101110")]
[assembly: AssemblyProduct("sparring")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3B95EEF7-4A97-4393-91A0-3626434F3631")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace sparring
{
[BepInPlugin("1010101110.sparring", "sparring", "1.1.0")]
public class Mod : BaseUnityPlugin
{
public static readonly Harmony harmony = new Harmony(typeof(Mod).GetCustomAttributes(typeof(BepInPlugin), inherit: false).Cast<BepInPlugin>().First()
.GUID);
private void Awake()
{
harmony.PatchAll();
PrefabManager.OnVanillaPrefabsAvailable += AddWeapons;
}
private void OnDestroy()
{
harmony.UnpatchSelf();
}
private static void AddWeapons()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
//IL_0055: 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)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Expected O, but got Unknown
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
//IL_015c: Expected O, but got Unknown
//IL_019f: Unknown result type (might be due to invalid IL or missing references)
//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
//IL_01c1: Expected O, but got Unknown
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01c8: 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: Unknown result type (might be due to invalid IL or missing references)
//IL_01e5: Expected O, but got Unknown
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01f3: Expected O, but got Unknown
//IL_0301: Unknown result type (might be due to invalid IL or missing references)
//IL_0308: Expected O, but got Unknown
//IL_034b: Unknown result type (might be due to invalid IL or missing references)
//IL_0350: 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_0364: Unknown result type (might be due to invalid IL or missing references)
//IL_036d: Expected O, but got Unknown
//IL_0375: Unknown result type (might be due to invalid IL or missing references)
//IL_037b: Expected O, but got Unknown
//IL_044b: Unknown result type (might be due to invalid IL or missing references)
//IL_0452: Expected O, but got Unknown
//IL_0495: Unknown result type (might be due to invalid IL or missing references)
//IL_049a: Unknown result type (might be due to invalid IL or missing references)
//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
//IL_04b7: Expected O, but got Unknown
//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
//IL_04be: 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_04d2: Unknown result type (might be due to invalid IL or missing references)
//IL_04db: Expected O, but got Unknown
//IL_04e3: Unknown result type (might be due to invalid IL or missing references)
//IL_04e9: Expected O, but got Unknown
//IL_05b9: Unknown result type (might be due to invalid IL or missing references)
//IL_05c0: Expected O, but got Unknown
//IL_0603: Unknown result type (might be due to invalid IL or missing references)
//IL_0608: Unknown result type (might be due to invalid IL or missing references)
//IL_0614: Unknown result type (might be due to invalid IL or missing references)
//IL_061c: Unknown result type (might be due to invalid IL or missing references)
//IL_0625: Expected O, but got Unknown
//IL_0627: Unknown result type (might be due to invalid IL or missing references)
//IL_062c: Unknown result type (might be due to invalid IL or missing references)
//IL_0638: Unknown result type (might be due to invalid IL or missing references)
//IL_0640: Unknown result type (might be due to invalid IL or missing references)
//IL_0649: Expected O, but got Unknown
//IL_0651: Unknown result type (might be due to invalid IL or missing references)
//IL_0658: Expected O, but got Unknown
//IL_072f: Unknown result type (might be due to invalid IL or missing references)
//IL_0736: Expected O, but got Unknown
//IL_0779: Unknown result type (might be due to invalid IL or missing references)
//IL_077e: Unknown result type (might be due to invalid IL or missing references)
//IL_078a: Unknown result type (might be due to invalid IL or missing references)
//IL_0792: Unknown result type (might be due to invalid IL or missing references)
//IL_079b: Expected O, but got Unknown
//IL_079d: Unknown result type (might be due to invalid IL or missing references)
//IL_07a2: Unknown result type (might be due to invalid IL or missing references)
//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
//IL_07b6: Unknown result type (might be due to invalid IL or missing references)
//IL_07bf: Expected O, but got Unknown
//IL_07c7: Unknown result type (might be due to invalid IL or missing references)
//IL_07ce: Expected O, but got Unknown
//IL_08a5: Unknown result type (might be due to invalid IL or missing references)
//IL_08ac: Expected O, but got Unknown
//IL_08ef: Unknown result type (might be due to invalid IL or missing references)
//IL_08f4: Unknown result type (might be due to invalid IL or missing references)
//IL_0900: Unknown result type (might be due to invalid IL or missing references)
//IL_0908: Unknown result type (might be due to invalid IL or missing references)
//IL_0911: Expected O, but got Unknown
//IL_0913: Unknown result type (might be due to invalid IL or missing references)
//IL_0918: Unknown result type (might be due to invalid IL or missing references)
//IL_0924: Unknown result type (might be due to invalid IL or missing references)
//IL_092c: Unknown result type (might be due to invalid IL or missing references)
//IL_0935: Expected O, but got Unknown
//IL_093d: Unknown result type (might be due to invalid IL or missing references)
//IL_0944: Expected O, but got Unknown
//IL_0a5b: Unknown result type (might be due to invalid IL or missing references)
//IL_0a62: Expected O, but got Unknown
//IL_0aa5: Unknown result type (might be due to invalid IL or missing references)
//IL_0aaa: Unknown result type (might be due to invalid IL or missing references)
//IL_0ab6: Unknown result type (might be due to invalid IL or missing references)
//IL_0abe: Unknown result type (might be due to invalid IL or missing references)
//IL_0ac7: Expected O, but got Unknown
//IL_0ac9: Unknown result type (might be due to invalid IL or missing references)
//IL_0ace: Unknown result type (might be due to invalid IL or missing references)
//IL_0ada: Unknown result type (might be due to invalid IL or missing references)
//IL_0ae2: Unknown result type (might be due to invalid IL or missing references)
//IL_0aeb: Expected O, but got Unknown
//IL_0af3: Unknown result type (might be due to invalid IL or missing references)
//IL_0afa: Expected O, but got Unknown
//IL_0c11: Unknown result type (might be due to invalid IL or missing references)
//IL_0c18: Expected O, but got Unknown
//IL_0c5b: Unknown result type (might be due to invalid IL or missing references)
//IL_0c60: Unknown result type (might be due to invalid IL or missing references)
//IL_0c6c: Unknown result type (might be due to invalid IL or missing references)
//IL_0c74: Unknown result type (might be due to invalid IL or missing references)
//IL_0c7d: Expected O, but got Unknown
//IL_0c7f: Unknown result type (might be due to invalid IL or missing references)
//IL_0c84: Unknown result type (might be due to invalid IL or missing references)
//IL_0c90: Unknown result type (might be due to invalid IL or missing references)
//IL_0c98: Unknown result type (might be due to invalid IL or missing references)
//IL_0ca1: Expected O, but got Unknown
//IL_0ca9: Unknown result type (might be due to invalid IL or missing references)
//IL_0cb0: Expected O, but got Unknown
//IL_0cfd: Unknown result type (might be due to invalid IL or missing references)
//IL_0d04: Expected O, but got Unknown
//IL_0d47: Unknown result type (might be due to invalid IL or missing references)
//IL_0d4c: Unknown result type (might be due to invalid IL or missing references)
//IL_0d58: Unknown result type (might be due to invalid IL or missing references)
//IL_0d60: Unknown result type (might be due to invalid IL or missing references)
//IL_0d69: Expected O, but got Unknown
//IL_0d6b: Unknown result type (might be due to invalid IL or missing references)
//IL_0d70: Unknown result type (might be due to invalid IL or missing references)
//IL_0d7c: Unknown result type (might be due to invalid IL or missing references)
//IL_0d84: Unknown result type (might be due to invalid IL or missing references)
//IL_0d8d: Expected O, but got Unknown
//IL_0d95: Unknown result type (might be due to invalid IL or missing references)
//IL_0d9c: Expected O, but got Unknown
ItemConfig val = new ItemConfig();
val.Name = "Sparring Club";
val.Description = "a weak club for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1]
{
new RequirementConfig
{
Item = "Wood",
Amount = 2,
AmountPerLevel = 2
}
};
CustomItem val2 = new CustomItem("ClubSpar", "Club", val);
val2.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 2f;
val2.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 0f;
val2.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 0f;
val2.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 1f;
val2.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 0f;
val2.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f;
ItemManager.Instance.AddItem(val2);
val = new ItemConfig();
val.Name = "Sparring Axe";
val.Description = "a weak axe for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "Wood",
Amount = 1,
AmountPerLevel = 1
},
new RequirementConfig
{
Item = "Stone",
Amount = 1,
AmountPerLevel = 1
}
};
CustomItem val3 = new CustomItem("AxeSpar", "AxeStone", val);
val3.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 0f;
val3.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 0f;
val3.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 2f;
val3.ItemDrop.m_itemData.m_shared.m_damages.m_chop = 0f;
val3.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 0f;
val3.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 0f;
val3.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 1f;
val3.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_chop = 0f;
ItemManager.Instance.AddItem(val3);
val = new ItemConfig();
val.Name = "Sparring Sword";
val.Description = "a weak sword for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1]
{
new RequirementConfig
{
Item = "Wood",
Amount = 2,
AmountPerLevel = 2
}
};
CustomItem val4 = new CustomItem("SwordSpar", "SwordBronze", val);
val4.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 0f;
val4.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 0f;
val4.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 2f;
val4.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 0f;
val4.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 0f;
val4.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 1f;
ItemManager.Instance.AddItem(val4);
val = new ItemConfig();
val.Name = "Sparring Knife";
val.Description = "a weak knife for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "Wood",
Amount = 1,
AmountPerLevel = 1
},
new RequirementConfig
{
Item = "Stone",
Amount = 1,
AmountPerLevel = 1
}
};
CustomItem val5 = new CustomItem("KnifeSpar", "KnifeFlint", val);
val5.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 0f;
val5.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 1f;
val5.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 1f;
val5.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 0f;
val5.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 1f;
val5.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 1f;
ItemManager.Instance.AddItem(val5);
val = new ItemConfig();
val.Name = "Sparring spear";
val.Description = "a weak spear for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "Wood",
Amount = 1,
AmountPerLevel = 1
},
new RequirementConfig
{
Item = "Stone",
Amount = 1,
AmountPerLevel = 1
}
};
CustomItem val6 = new CustomItem("SpearSpar", "SpearFlint", val);
val6.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 0f;
val6.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 2f;
val6.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 0f;
val6.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 0f;
val6.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 1f;
val6.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f;
ItemManager.Instance.AddItem(val6);
val = new ItemConfig();
val.Name = "Sparring Atgeir";
val.Description = "a weak atgeir for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "Wood",
Amount = 1,
AmountPerLevel = 1
},
new RequirementConfig
{
Item = "Stone",
Amount = 1,
AmountPerLevel = 1
}
};
CustomItem val7 = new CustomItem("AtgeirSpar", "AtgeirBronze", val);
val7.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 0f;
val7.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 4f;
val7.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 0f;
val7.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 0f;
val7.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 1f;
val7.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f;
ItemManager.Instance.AddItem(val7);
val = new ItemConfig();
val.Name = "Sparring 2h Axe";
val.Description = "a weak 2h axe for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "Wood",
Amount = 1,
AmountPerLevel = 1
},
new RequirementConfig
{
Item = "Stone",
Amount = 1,
AmountPerLevel = 1
}
};
CustomItem val8 = new CustomItem("BaxeSpar", "Battleaxe", val);
val8.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 0f;
val8.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 0f;
val8.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 4f;
val8.ItemDrop.m_itemData.m_shared.m_damages.m_chop = 0f;
val8.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 0f;
val8.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 0f;
val8.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 4f;
val8.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_chop = 0f;
ItemManager.Instance.AddItem(val8);
val = new ItemConfig();
val.Name = "Sparring Bow";
val.Description = "a weak Bow for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "Wood",
Amount = 1,
AmountPerLevel = 1
},
new RequirementConfig
{
Item = "Stone",
Amount = 1,
AmountPerLevel = 1
}
};
CustomItem val9 = new CustomItem("BowSpar", "Bow", val);
val9.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 0f;
val9.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 2f;
val9.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 0f;
val9.ItemDrop.m_itemData.m_shared.m_damages.m_chop = 0f;
val9.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_blunt = 0f;
val9.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 1f;
val9.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f;
val9.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_chop = 0f;
ItemManager.Instance.AddItem(val9);
val = new ItemConfig();
val.Name = "Sparring Shield";
val.Description = "a weak shield for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "Wood",
Amount = 1,
AmountPerLevel = 1
},
new RequirementConfig
{
Item = "Stone",
Amount = 1,
AmountPerLevel = 1
}
};
CustomItem val10 = new CustomItem("ShieldSpar", "ShieldWood", val);
val10.ItemDrop.m_itemData.m_shared.m_blockPower = 1f;
val10.ItemDrop.m_itemData.m_shared.m_blockPowerPerLevel = 1f;
ItemManager.Instance.AddItem(val10);
val = new ItemConfig();
val.Name = "Sparring Tower";
val.Description = "a weak tower shield for sparring";
val.Amount = 1;
val.CraftingStation = "piece_workbench";
val.RepairStation = null;
val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "Wood",
Amount = 1,
AmountPerLevel = 1
},
new RequirementConfig
{
Item = "Stone",
Amount = 1,
AmountPerLevel = 1
}
};
CustomItem val11 = new CustomItem("TowerSpar", "ShieldWoodTower", val);
val10.ItemDrop.m_itemData.m_shared.m_blockPower = 2f;
val10.ItemDrop.m_itemData.m_shared.m_blockPowerPerLevel = 1f;
ItemManager.Instance.AddItem(val11);
}
}
}
namespace sparring.Patches
{
public class SparringPatches
{
}
}