using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
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 Microsoft.CodeAnalysis;
using Shawesomes_Dark_Gift;
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]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace shawcape
{
public static class VanillaShaders
{
private static bool s_logFilterInitialized;
private static bool s_patchInitialized;
private static readonly HashSet<string> s_registeredPrefabs = new HashSet<string>();
private static readonly HashSet<string> s_registeredBundles = new HashSet<string>();
private static readonly Dictionary<string, Shader> s_shaderCache = new Dictionary<string, Shader>();
private static bool s_cacheBuilt;
private static HashSet<int> s_processedObjects = new HashSet<int>();
private static int s_totalFixed;
public static void RegisterAssetBundle(string bundleName)
{
s_registeredBundles.Add(bundleName);
}
public static void RegisterPrefab(string prefabName)
{
s_registeredPrefabs.Add(prefabName);
}
public static bool IsRegistered(string prefabName)
{
return s_registeredPrefabs.Contains(prefabName);
}
public static void InitLogFilter()
{
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Expected O, but got Unknown
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Expected O, but got Unknown
if (s_logFilterInitialized)
{
return;
}
s_logFilterInitialized = true;
ManualLogSource logger = global::Shawesomes_Dark_Gift.Shawesomes_Dark_Gift.logger;
if (logger != null)
{
logger.LogInfo((object)"[VanillaShaders] Initializing shader fixer...");
}
Harmony val = new Harmony("Shawesomes.Vampire.VanillaShaders");
Type type = Type.GetType("BepInEx.Logging.UnityLogSource, BepInEx");
if (type != null)
{
MethodInfo method = type.GetMethod("OnUnityLogMessageReceived", BindingFlags.Static | BindingFlags.NonPublic);
if (method != null)
{
val.Patch((MethodBase)method, new HarmonyMethod(typeof(VanillaShaders), "FilterUnityLogMessage", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
}
}
if (!s_patchInitialized)
{
s_patchInitialized = true;
MethodInfo method2 = typeof(ZNetView).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic);
if (method2 != null)
{
val.Patch((MethodBase)method2, (HarmonyMethod)null, new HarmonyMethod(typeof(VanillaShaders), "OnZNetViewAwake", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
}
}
}
private static void OnZNetViewAwake(ZNetView __instance)
{
if ((Object)(object)__instance == (Object)null)
{
return;
}
string prefabName = Utils.GetPrefabName(((Component)__instance).gameObject);
if (s_registeredPrefabs.Contains(prefabName) || IsPrefabFromRegisteredBundle(prefabName))
{
ManualLogSource logger = global::Shawesomes_Dark_Gift.Shawesomes_Dark_Gift.logger;
if (logger != null)
{
logger.LogDebug((object)("[VanillaShaders] Auto-fixing shaders on: " + prefabName));
}
FixShaders(((Component)__instance).gameObject);
}
}
private static bool IsPrefabFromRegisteredBundle(string prefabName)
{
foreach (string bundleName in s_registeredBundles)
{
AssetBundle val = AssetBundle.GetAllLoadedAssetBundles().FirstOrDefault((Func<AssetBundle, bool>)((AssetBundle b) => string.Equals(((Object)b).name, bundleName, StringComparison.OrdinalIgnoreCase)));
if (!((Object)(object)val != (Object)null))
{
continue;
}
string[] allAssetNames = val.GetAllAssetNames();
string[] array = allAssetNames;
foreach (string path in array)
{
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(path);
if (string.Equals(fileNameWithoutExtension, prefabName, StringComparison.OrdinalIgnoreCase))
{
s_registeredPrefabs.Add(prefabName);
return true;
}
}
}
return false;
}
private static bool FilterUnityLogMessage(string message)
{
if (message != null && message.Contains("Failed to find expected binary shader data"))
{
return false;
}
return true;
}
private static void BuildShaderCache()
{
if (s_cacheBuilt)
{
return;
}
Shader[] array = Resources.FindObjectsOfTypeAll<Shader>();
Dictionary<string, Shader> dictionary = new Dictionary<string, Shader>();
Shader[] array2 = array;
foreach (Shader val in array2)
{
if (!((Object)(object)val == (Object)null) && !string.IsNullOrEmpty(((Object)val).name))
{
if (val.isSupported && val.passCount > 0)
{
s_shaderCache[((Object)val).name] = val;
}
else if (!s_shaderCache.ContainsKey(((Object)val).name))
{
dictionary[((Object)val).name] = val;
}
}
}
foreach (KeyValuePair<string, Shader> item in dictionary)
{
if (!s_shaderCache.ContainsKey(item.Key))
{
s_shaderCache[item.Key] = item.Value;
}
}
s_cacheBuilt = true;
ManualLogSource logger = global::Shawesomes_Dark_Gift.Shawesomes_Dark_Gift.logger;
if (logger != null)
{
logger.LogInfo((object)$"[VanillaShaders] Cached {s_shaderCache.Count} shaders ({dictionary.Count} were stubs)");
}
}
public static void FixShaders(GameObject gameObject)
{
if ((Object)(object)gameObject == (Object)null)
{
return;
}
BuildShaderCache();
s_processedObjects.Clear();
s_totalFixed = 0;
FixShadersRecursive(gameObject, 0);
if (s_totalFixed > 0)
{
ManualLogSource logger = global::Shawesomes_Dark_Gift.Shawesomes_Dark_Gift.logger;
if (logger != null)
{
logger.LogInfo((object)$"[VanillaShaders] Fixed {s_totalFixed} shaders on {((Object)gameObject).name} and its references");
}
}
}
private static void FixShadersRecursive(GameObject gameObject, int depth)
{
if ((Object)(object)gameObject == (Object)null || depth > 10)
{
return;
}
int instanceID = ((Object)gameObject).GetInstanceID();
if (s_processedObjects.Contains(instanceID))
{
return;
}
s_processedObjects.Add(instanceID);
FixRenderersOnObject(gameObject);
Component[] componentsInChildren = gameObject.GetComponentsInChildren<Component>(true);
foreach (Component val in componentsInChildren)
{
if (!((Object)(object)val == (Object)null))
{
FindAndFixReferences(val, depth);
}
}
}
private static void FindAndFixReferences(Component component, int depth)
{
if ((Object)(object)component == (Object)null)
{
return;
}
Type type = ((object)component).GetType();
FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
FieldInfo[] array = fields;
foreach (FieldInfo fieldInfo in array)
{
try
{
object value = fieldInfo.GetValue(component);
if (value == null)
{
continue;
}
GameObject val = (GameObject)((value is GameObject) ? value : null);
if (val != null)
{
FixShadersRecursive(val, depth + 1);
continue;
}
Material val2 = (Material)((value is Material) ? value : null);
if (val2 != null)
{
FixMaterial(val2);
continue;
}
if (value is GameObject[] array2)
{
GameObject[] array3 = array2;
foreach (GameObject gameObject in array3)
{
FixShadersRecursive(gameObject, depth + 1);
}
continue;
}
if (value is Material[] array4)
{
Material[] array5 = array4;
foreach (Material material in array5)
{
FixMaterial(material);
}
continue;
}
EffectList val3 = (EffectList)((value is EffectList) ? value : null);
if (val3 != null)
{
FixEffectList(val3, depth);
}
else
{
if (!(value is IList list) || list.Count <= 0)
{
continue;
}
foreach (object item in list)
{
if (item == null)
{
continue;
}
Type type2 = item.GetType();
FieldInfo field = type2.GetField("m_prefab");
if (field != null)
{
object? value2 = field.GetValue(item);
GameObject val4 = (GameObject)((value2 is GameObject) ? value2 : null);
if ((Object)(object)val4 != (Object)null)
{
FixShadersRecursive(val4, depth + 1);
}
}
}
continue;
}
}
catch
{
}
}
}
private static void FixEffectList(EffectList effectList, int depth)
{
if (effectList?.m_effectPrefabs == null)
{
return;
}
EffectData[] effectPrefabs = effectList.m_effectPrefabs;
foreach (EffectData val in effectPrefabs)
{
if ((Object)(object)val?.m_prefab != (Object)null)
{
FixShadersRecursive(val.m_prefab, depth + 1);
}
}
}
private static void FixRenderersOnObject(GameObject gameObject)
{
Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true);
Renderer[] array = componentsInChildren;
foreach (Renderer val in array)
{
if ((Object)(object)val == (Object)null)
{
continue;
}
Material[] sharedMaterials = val.sharedMaterials;
bool flag = false;
for (int j = 0; j < sharedMaterials.Length; j++)
{
if (FixMaterial(sharedMaterials[j]))
{
flag = true;
}
}
if (flag)
{
val.sharedMaterials = sharedMaterials;
}
}
}
private static bool FixMaterial(Material material)
{
if ((Object)(object)material == (Object)null || (Object)(object)material.shader == (Object)null)
{
return false;
}
Shader shader = material.shader;
string name = ((Object)shader).name;
if (shader.isSupported && shader.passCount > 0)
{
return false;
}
if (!s_shaderCache.TryGetValue(name, out Shader value))
{
return false;
}
if (!value.isSupported || value.passCount == 0)
{
return false;
}
material.shader = value;
s_totalFixed++;
return true;
}
public static void RebuildCache()
{
s_shaderCache.Clear();
s_cacheBuilt = false;
BuildShaderCache();
}
}
}
namespace Shawesomes_Dark_Gift
{
[BepInPlugin("Shawesome.Shawesomes_Dark_Gift", "Shawesomes_Dark_Gift", "1.1.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Shawesomes_Dark_Gift : 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 static List<GameObject> EffectList = new List<GameObject>();
public void Awake()
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Expected O, but got Unknown
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
logger = ((BaseUnityPlugin)this).Logger;
VanillaShaders.InitLogFilter();
VanillaShaders.RegisterAssetBundle("shaw_v");
harmony = new Harmony("IDshawesome4u5");
Root = new GameObject("Shaw Root");
harmonyLog = ((BaseUnityPlugin)this).Logger;
Shawcassets = AssetUtils.LoadAssetBundleFromResources("shaw_v", Assembly.GetExecutingAssembly());
LoadAssets();
PrefabManager.OnVanillaPrefabsAvailable += additems;
PrefabManager.OnPrefabsRegistered += delegate
{
harmonyLog.LogMessage((object)"Registering VFX via PrefabManager (safe, ZNetScene ready)...");
AddEffectsToZNet();
};
}
public static void LoadAssets()
{
EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/Bat1.prefab"));
EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/Batdraculaspawn.prefab"));
EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/drac_taunt.prefab"));
EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampire/sfx_fenring_howl1.prefab"));
EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/sfx_whip_hit.prefab"));
EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeVampHunter/sfx_whip_start.prefab"));
}
public static void AddEffectsToZNet()
{
harmonyLog.LogMessage((object)"Adding effects to ZNet");
foreach (GameObject effect in EffectList)
{
int stableHashCode = StringExtensionMethods.GetStableHashCode(((Object)effect).name);
harmonyLog.LogMessage((object)("Attempting to add to Znet " + stableHashCode + ":" + ((Object)effect).name));
if ((Object)(object)ZNetScene.instance != (Object)null && !ZNetScene.instance.m_namedPrefabs.ContainsKey(stableHashCode))
{
harmonyLog.LogMessage((object)("Adding to ZNet" + ((Object)effect).name));
PrefabManager.Instance.RegisterToZNetScene(effect);
}
harmonyLog.LogMessage((object)((Object)(object)ZNetScene.instance.GetPrefab(stableHashCode) != (Object)null));
}
}
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;
}
}
}