Decompiled source of Shawesomes Dark Gift v1.0.3

Shawesomes_Dark_Gift.dll

Decompiled 2 weeks ago
using System;
using System.Collections.Generic;
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 BepInEx.Logging;
using HarmonyLib;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using Jotunn.Utils;
using UnityEngine;
using shawcape;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Shawesomes_Infinte_Multiverse")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Shawesomes_Infinte_Multiverse")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e0e26f8d-a8f0-41a7-a502-951624fa6f31")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
public static class Utils2
{
	private const BindingFlags bindingFlags = BindingFlags.Public;

	public static T GetCopyOf<T>(this Component comp, T other) where T : Component
	{
		Type type = ((object)comp).GetType();
		if (type != ((object)other).GetType())
		{
			return default(T);
		}
		List<Type> list = new List<Type>();
		Type baseType = type.BaseType;
		while (baseType != null && !(baseType == typeof(MonoBehaviour)))
		{
			list.Add(baseType);
			baseType = baseType.BaseType;
		}
		IEnumerable<PropertyInfo> enumerable = type.GetProperties(BindingFlags.Public);
		foreach (Type item in list)
		{
			enumerable = enumerable.Concat(item.GetProperties(BindingFlags.Public));
		}
		enumerable = from property in enumerable
			where !(type == typeof(Rigidbody)) || !(property.Name == "inertiaTensor")
			where !property.CustomAttributes.Any((CustomAttributeData attribute) => attribute.AttributeType == typeof(ObsoleteAttribute))
			select property;
		foreach (PropertyInfo pinfo in enumerable)
		{
			if (pinfo.CanWrite && !enumerable.Any((PropertyInfo e) => e.Name == $"shared{char.ToUpper(pinfo.Name[0])}{pinfo.Name.Substring(1)}"))
			{
				try
				{
					pinfo.SetValue(comp, pinfo.GetValue(other, null), null);
				}
				catch
				{
				}
			}
		}
		IEnumerable<FieldInfo> enumerable2 = type.GetFields(BindingFlags.Public);
		foreach (FieldInfo finfo in enumerable2)
		{
			foreach (Type item2 in list)
			{
				if (!enumerable2.Any((FieldInfo e) => e.Name == $"shared{char.ToUpper(finfo.Name[0])}{finfo.Name.Substring(1)}"))
				{
					enumerable2 = enumerable2.Concat(item2.GetFields(BindingFlags.Public));
				}
			}
		}
		foreach (FieldInfo item3 in enumerable2)
		{
			item3.SetValue(comp, item3.GetValue(other));
		}
		enumerable2 = enumerable2.Where((FieldInfo field) => field.CustomAttributes.Any((CustomAttributeData attribute) => attribute.AttributeType == typeof(ObsoleteAttribute)));
		foreach (FieldInfo item4 in enumerable2)
		{
			item4.SetValue(comp, item4.GetValue(other));
		}
		return (T)(object)((comp is T) ? comp : null);
	}

	public static T AddComponent<T>(this GameObject go, T toAdd) where T : Component
	{
		return go.AddComponent(((object)toAdd).GetType()).GetCopyOf(toAdd);
	}

	public static void updateSKMesh(Transform parent, SkinnedMeshRenderer skmesh)
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: 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_0042: Unknown result type (might be due to invalid IL or missing references)
		List<ParticleSystem> list = ((Component)parent).GetComponentsInChildren<ParticleSystem>().ToList();
		foreach (ParticleSystem item in list)
		{
			ShapeModule shape = item.shape;
			if (!Object.op_Implicit((Object)(object)((ShapeModule)(ref shape)).skinnedMeshRenderer))
			{
				ShapeModule shape2 = item.shape;
				((ShapeModule)(ref shape2)).skinnedMeshRenderer = skmesh;
			}
		}
	}

	public static SkinnedMeshRenderer createSkMeshRen(Transform objectTrans, Transform attach_skin)
	{
		SkinnedMeshRenderer val = default(SkinnedMeshRenderer);
		if (!((Component)objectTrans).gameObject.TryGetComponent<SkinnedMeshRenderer>(ref val))
		{
			val = ((Component)objectTrans).gameObject.AddComponent<SkinnedMeshRenderer>();
		}
		val.rootBone = attach_skin.Find("Armature").Find("Hips");
		return val;
	}

	public static Mesh createBonedMesh(Mesh newmesh, Mesh copymesh, Vector3 pos, Vector3 rot, Vector3 scale, bool stretch = true)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		Mesh newmesh2 = AlignedSkinMesh(newmesh, pos, rot, scale);
		return copyBoneWeights(newmesh2, copymesh, stretch);
	}

	public static Mesh AlignedSkinMesh(Mesh meshtomodify, Vector3 pos, Vector3 rot, Vector3 scale)
	{
		//IL_0016: 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)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: 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_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_0097: Unknown result type (might be due to invalid IL or missing references)
		Mesh val = Object.Instantiate<Mesh>(meshtomodify);
		List<Vector3> list = new List<Vector3>();
		for (int i = 0; i < meshtomodify.vertices.Count(); i++)
		{
			Vector3 val2 = Quaternion.Euler(rot) * new Vector3(meshtomodify.vertices[i].x * scale.x, meshtomodify.vertices[i].y * scale.y, meshtomodify.vertices[i].z * scale.z);
			list.Add(new Vector3(val2.x + pos.x, val2.y + pos.y, val2.z + pos.z));
		}
		val.SetVertices(list);
		((Object)val).name = "copymesh";
		return val;
	}

	public static Mesh copyBoneWeights(Mesh newmesh, Mesh copymesh, bool stretch = true)
	{
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		BoneWeight[] array = (BoneWeight[])(object)new BoneWeight[newmesh.vertexCount];
		newmesh.bindposes = copymesh.bindposes;
		if (stretch)
		{
			for (int i = 0; i < newmesh.vertexCount; i++)
			{
				int closestVert = getClosestVert(newmesh.vertices[i], copymesh.vertices);
				array[i] = copymesh.boneWeights[closestVert];
			}
		}
		else
		{
			Vector3 val = Vector3.zero;
			for (int j = 0; j < newmesh.vertexCount; j++)
			{
				val += newmesh.vertices[j];
			}
			int closestVert2 = getClosestVert(val / (float)newmesh.vertexCount, copymesh.vertices);
			for (int k = 0; k < newmesh.vertexCount; k++)
			{
				array[k] = copymesh.boneWeights[closestVert2];
			}
		}
		newmesh.boneWeights = array;
		return newmesh;
	}

	public static int getClosestVert(Vector3 vert, Vector3[] basemesh)
	{
		//IL_000e: 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)
		float num = 99999f;
		int result = -1;
		for (int i = 0; i < basemesh.Length; i++)
		{
			float num2 = Vector3.Distance(vert, basemesh[i]);
			if (num2 < num)
			{
				num = num2;
				result = i;
			}
		}
		return result;
	}

	public static void alignMeshAllChidren(Transform objectTrans, Transform basetransform)
	{
		//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_0026: 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_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: 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_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		MeshFilter[] componentsInChildren = ((Component)objectTrans).GetComponentsInChildren<MeshFilter>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			Transform val = ((Component)componentsInChildren[i]).transform;
			Vector3 val2 = val.localPosition;
			Vector3 val3 = ((Component)val).transform.localEulerAngles;
			Vector3 val4 = ((Component)val).transform.localScale;
			for (int j = 0; j < 20; j++)
			{
				if (!((Object)(object)val.parent != (Object)(object)objectTrans))
				{
					break;
				}
				val = val.parent;
				val4 = Vector3.Scale(val4, val.localScale);
				val2 = Vector3.Scale(val4, val2) + val.localPosition;
				val3 += val.localEulerAngles;
			}
			SkinnedMeshRenderer val5 = createSkMeshRen(((Component)componentsInChildren[i]).transform, basetransform);
			val5.sharedMesh = AlignedSkinMesh(val5.sharedMesh, val2, val3, val4);
		}
	}

	public static void boneMeshAllChidren(Transform objectTrans, Transform basetransform, Mesh baseMesh, bool stretch = true)
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: 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_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: 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_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		Transform val = basetransform.Find("Armature").Find("Hips");
		MeshFilter[] componentsInChildren = ((Component)objectTrans).GetComponentsInChildren<MeshFilter>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			Transform val2 = ((Component)componentsInChildren[i]).transform;
			Vector3 val3 = val2.localPosition;
			Vector3 val4 = ((Component)val2).transform.localEulerAngles;
			Vector3 val5 = ((Component)val2).transform.localScale;
			for (int j = 0; j < 20; j++)
			{
				if (!((Object)(object)val2.parent != (Object)(object)objectTrans))
				{
					break;
				}
				val2 = val2.parent;
				val5 = Vector3.Scale(val5, val2.localScale);
				val3 = Vector3.Scale(val5, val3) + val2.localPosition;
				val4 += val2.localEulerAngles;
			}
			val3 += new Vector3(0f, 0f - val.localPosition.y, 0f - val.localPosition.z);
			SkinnedMeshRenderer val6 = createSkMeshRen(((Component)componentsInChildren[i]).transform, basetransform);
			val6.sharedMesh = createBonedMesh(val6.sharedMesh, baseMesh, val3, val4, val5, stretch);
		}
	}

	public static void setStyleTex(Material mat, Texture2D styles)
	{
		mat.EnableKeyword("_USESTYLES_ON");
		mat.SetFloat("_Style", 0f);
		mat.SetFloat("_UseStyles", 1f);
		mat.SetTexture("_StyleTex", (Texture)(object)styles);
	}

	public static Mesh createScaledCape(Mesh originalMesh, Vector3 scaleTop, Vector3 scaleBot, Vector3 offset = default(Vector3))
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//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)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0112: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0131: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0147: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		//IL_015f: Unknown result type (might be due to invalid IL or missing references)
		//IL_016c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_017a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_0188: Unknown result type (might be due to invalid IL or missing references)
		//IL_018f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0196: Unknown result type (might be due to invalid IL or missing references)
		Vector3 zero = Vector3.zero;
		Vector3 one = Vector3.one;
		Mesh val = Object.Instantiate<Mesh>(originalMesh);
		List<Vector3> list = new List<Vector3>();
		for (int i = 0; i < originalMesh.vertices.Count(); i++)
		{
			Vector3 val2 = originalMesh.vertices[i];
			((Vector3)(ref zero))..ctor(Mathf.Max(zero.x, val2.x), Mathf.Max(zero.y, val2.y), Mathf.Max(zero.z, val2.z));
			((Vector3)(ref one))..ctor(Mathf.Min(one.x, val2.x), Mathf.Min(one.y, val2.y), Mathf.Min(one.z, val2.z));
		}
		Vector3 val4 = default(Vector3);
		for (int j = 0; j < originalMesh.vertices.Count(); j++)
		{
			Vector3 val3 = originalMesh.vertices[j];
			float num = val3.x * (scaleBot.x + (scaleTop.x - scaleBot.x) * (val3.z - one.z) / (zero.z - one.z));
			float num2 = val3.y * (scaleBot.y + (scaleTop.y - scaleBot.y) * (val3.z - one.z) / (zero.z - one.z));
			((Vector3)(ref val4))..ctor(num, num2, val3.z);
			list.Add(new Vector3(val4.x + offset.x, val4.y + offset.y, val4.z + offset.z));
		}
		val.SetVertices(list);
		((Object)val).name = "scaled_" + ((Object)val).name;
		return val;
	}

	public static void resolveMocksinChildren(Transform parentTrans)
	{
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		for (int num = parentTrans.childCount - 1; num >= 0; num--)
		{
			Transform child = parentTrans.GetChild(num);
			if (((Object)child).name.StartsWith("ATmock_"))
			{
				GameObject val = getmockGo(((Object)child).name, parentTrans);
				if (Object.op_Implicit((Object)(object)val))
				{
					Transform val2 = Shawesomes_Divine_Armaments.CopyIntoParent<Transform>(val.transform, parentTrans);
					val2.localPosition = child.localPosition;
					val2.localEulerAngles = child.localEulerAngles;
					val2.localScale = child.localScale;
					((Object)val2).name = ((Object)child).name.Split(new char[1] { '.' })[0];
					child.parent = null;
				}
			}
		}
	}

	public static GameObject getmockGo(string mockname, Transform newParent)
	{
		string[] array = mockname.Split(new char[1] { '.' });
		if (!array[0].StartsWith("ATmock_"))
		{
			return null;
		}
		Transform transform;
		try
		{
			transform = PrefabManager.Instance.GetPrefab(array[0].Replace("ATmock_", "")).transform;
		}
		catch
		{
			return null;
		}
		for (int i = 1; i < array.Length; i++)
		{
			try
			{
				transform = ((Component)transform.Find(array[i])).transform;
			}
			catch
			{
			}
		}
		return ((Component)transform).gameObject;
	}
}
namespace shawcape
{
	[BepInPlugin("IDshawesome4u5", "Shawesomes_Vampires", "1.0.3")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Shawesomes_Divine_Armaments : BaseUnityPlugin
	{
		public Harmony harmony;

		public static GameObject Root;

		public string version = "1.0.0";

		public static ManualLogSource logger;

		public static ManualLogSource harmonyLog;

		private static AssetBundle Shawcassets;

		public void Awake()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			logger = ((BaseUnityPlugin)this).Logger;
			harmony = new Harmony("IDshawesome4u5");
			Root = new GameObject("Shaw Root");
			harmonyLog = ((BaseUnityPlugin)this).Logger;
			Shawcassets = AssetUtils.LoadAssetBundleFromResources("shaw_v", Assembly.GetExecutingAssembly());
			PrefabManager.OnVanillaPrefabsAvailable += additems;
		}

		public static void additems()
		{
			AddDarkGift();
			AddDarkGiftII();
			AddDarkGiftIII();
			AddDarkGiftIV();
			Adddwhip();
			Addchainmace();
			Adddraculaboss();
			Addberserklegs();
			Addberserkchest();
			Addberserkhelm();
			Addslayerbow();
			Addslayersword();
			Addslayersword2();
			Addboc();
			Addboc1();
			PrefabManager.OnVanillaPrefabsAvailable -= additems;
		}

		public static void Addashes()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 10, 0, false));
			val.AddRequirement(new RequirementConfig("TrophyFader", 1, 0, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 1, 0, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 10, 0, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsmashes2ashes.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addboc1()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 10, 10, false));
			val.AddRequirement(new RequirementConfig("TrophyFader", 1, 0, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 1, 1, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 10, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsm_BOC_chains.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addboc()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 10, 10, false));
			val.AddRequirement(new RequirementConfig("TrophyFader", 1, 0, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 1, 1, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 10, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsmboc.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addslayersword2()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 10, 10, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 1, 1, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 10, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsmdsds1.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addslayersword()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 30, 15, false));
			val.AddRequirement(new RequirementConfig("TrophyFader", 1, 1, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 4, 4, false));
			val.AddRequirement(new RequirementConfig("shwsmdsds1", 1, 0, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsmdsds.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addslayerbow()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 5, 10, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 1, 1, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 10, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsmdsbow.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addberserklegs()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 30, 15, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 4, 1, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 20, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsmdslegs.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addberserkchest()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 30, 15, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 4, 1, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 20, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsmdschest.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addberserkhelm()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 30, 15, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 4, 1, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 20, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsmdshelm.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Addchainmace()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 30, 15, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 4, 4, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 20, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsm_vslayer_mace.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void Adddraculaboss()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			CreatureConfig val = new CreatureConfig();
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/shwsm_Dragulia.prefab");
			CustomCreature val3 = new CustomCreature(val2, true, val);
			CreatureManager.Instance.AddCreature(val3);
		}

		public static void Adddwhip()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			val.AddRequirement(new RequirementConfig("FlametalNew", 30, 15, false));
			val.AddRequirement(new RequirementConfig("GemstoneRed", 4, 4, false));
			val.AddRequirement(new RequirementConfig("BlackMetal", 20, 10, false));
			val.CraftingStation = CraftingStations.BlackForge;
			val.MinStationLevel = 1;
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/shwsm_vslayer_whip.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
		}

		public static void AddDarkGiftIV()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/shwsmDarkGiftIV.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
			Drop val4 = new Drop();
			val4.m_chance = 0.8f;
			val4.m_dontScale = true;
			val4.m_levelMultiplier = false;
			val4.m_prefab = PrefabManager.Instance.GetPrefab(((Object)val3.ItemPrefab).name);
			val4.m_amountMax = 4;
			val4.m_amountMin = 1;
			GameObject prefab = PrefabManager.Instance.GetPrefab("Fader");
			prefab.GetComponent<CharacterDrop>().m_drops.Add(val4);
		}

		public static void AddDarkGiftIII()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/shwsmDarkGiftIII.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
			Drop val4 = new Drop();
			val4.m_chance = 0.8f;
			val4.m_dontScale = true;
			val4.m_levelMultiplier = false;
			val4.m_prefab = PrefabManager.Instance.GetPrefab(((Object)val3.ItemPrefab).name);
			val4.m_amountMax = 4;
			val4.m_amountMin = 1;
			GameObject prefab = PrefabManager.Instance.GetPrefab("SeekerQueen");
			prefab.GetComponent<CharacterDrop>().m_drops.Add(val4);
		}

		public static void AddDarkGiftII()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/shwsmDarkGiftII.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
			Drop val4 = new Drop();
			val4.m_chance = 0.8f;
			val4.m_dontScale = true;
			val4.m_levelMultiplier = false;
			val4.m_prefab = PrefabManager.Instance.GetPrefab(((Object)val3.ItemPrefab).name);
			val4.m_amountMax = 4;
			val4.m_amountMin = 1;
			GameObject prefab = PrefabManager.Instance.GetPrefab("GoblinKing");
			prefab.GetComponent<CharacterDrop>().m_drops.Add(val4);
		}

		public static void AddDarkGift()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/shwsmDarkGift.prefab");
			CustomItem val3 = new CustomItem(val2, true, val);
			ItemManager.Instance.AddItem(val3);
			Drop val4 = new Drop();
			val4.m_chance = 0.8f;
			val4.m_dontScale = true;
			val4.m_levelMultiplier = false;
			val4.m_prefab = PrefabManager.Instance.GetPrefab(((Object)val3.ItemPrefab).name);
			val4.m_amountMax = 4;
			val4.m_amountMin = 1;
			GameObject prefab = PrefabManager.Instance.GetPrefab("Dragon");
			prefab.GetComponent<CharacterDrop>().m_drops.Add(val4);
		}

		public static T CopyIntoParent<T>(T go, T parent) where T : Component
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			T val = Object.Instantiate<T>(go);
			((Object)(object)val).name = ((Object)(object)go).name;
			((Component)val).transform.parent = ((Component)parent).transform;
			((Component)val).transform.localPosition = new Vector3(0f, 0f, 0f);
			return val;
		}
	}
}
namespace Shawesomes_Dark_Gift
{
	internal class Class2
	{
	}
}