Decompiled source of DeltaruneMod v1.8.7
DeltaruneMod.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
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.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using DeltaruneMod.Interactables; using DeltaruneMod.Items; using DeltaruneMod.Items.Lunar; using DeltaruneMod.Items.Spamton; using DeltaruneMod.Util; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Projectile; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("DeltaruneMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+4b776c515e6db3c21527a0473d5fa99e68e1696c")] [assembly: AssemblyProduct("DeltaruneMod")] [assembly: AssemblyTitle("DeltaruneMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] 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; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace DeltaruneMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("AGU.DeltaruneMod", "DeltaruneMod", "1.8.6")] public class DeltarunePlugin : BaseUnityPlugin { [CompilerGenerated] private sealed class <LoadSoundBankWhenReady>d__17 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public DeltarunePlugin <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LoadSoundBankWhenReady>d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; goto IL_0051; case 1: <>1__state = -1; goto IL_0051; case 2: { <>1__state = -1; SoundBank.Init(); return false; } IL_0051: if (!AkSoundEngine.IsInitialized()) { Debug.Log((object)"Waiting for sound engine"); <>2__current = null; <>1__state = 1; return true; } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string PluginGUID = "AGU.DeltaruneMod"; public const string PluginAuthor = "AGU"; public const string PluginName = "DeltaruneMod"; public const string PluginVersion = "1.8.6"; public static DeltarunePlugin Instance; public static CharacterMaster characterMaster; public static CharacterBody characterBody; public static AssetBundle MainAssets; public List<ItemBase> Items = new List<ItemBase>(); public List<InteractableBase> Interactables = new List<InteractableBase>(); public static HashSet<ItemDef> BlacklistedFromPrinter = new HashSet<ItemDef>(); public static bool useChapter1 = true; public static bool useChapter2 = true; public static bool useChapter3 = true; public static bool useChapter4 = true; public const short TextSyncMsgId = 4242; public void Awake() { useChapter1 = ((BaseUnityPlugin)this).Config.Bind<bool>("Chapter Settings", "Use Chapter 1 Features", true, "Enable or Disable Chapter 1").Value; useChapter2 = ((BaseUnityPlugin)this).Config.Bind<bool>("Chapter Settings", "Use Chapter 2 Features", true, "Enable or Disable Chapter 2").Value; useChapter3 = ((BaseUnityPlugin)this).Config.Bind<bool>("Chapter Settings", "Use Chapter 3 Features", true, "Enable or Disable Chapter 3").Value; useChapter4 = ((BaseUnityPlugin)this).Config.Bind<bool>("Chapter Settings", "Use Chapter 4 Features", true, "Enable or Disable Chapter 4").Value; Instance = this; Log.Init(((BaseUnityPlugin)this).Logger); Debug.Log((object)"Starting Model Intialization for DeltaruneMod"); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("DeltaruneMod.AssetBundle.deltarune_mod")) { MainAssets = AssetBundle.LoadFromStream(stream); } Debug.Log((object)"Model Intialization for DeltaruneMod successful!"); Debug.Log((object)"Starting Item Intialization for DeltaruneMod"); IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase)) select type; foreach (Type item in enumerable) { ItemBase itemBase = (ItemBase)Activator.CreateInstance(item); if (ValidateItem(itemBase, Items)) { itemBase.Init(); Debug.Log((object)("Item: " + itemBase.ItemName + " Initialized!")); } } Debug.Log((object)"Item Intialization for DeltaruneMod successful!"); Log.Debug("Trashcan empty... loading!"); IEnumerable<Type> enumerable2 = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(InteractableBase)) select type; foreach (Type item2 in enumerable2) { InteractableBase interactableBase = (InteractableBase)Activator.CreateInstance(item2); if (ValidateInteractable(interactableBase, Interactables)) { interactableBase.Init(); Debug.Log((object)("Interactable: " + interactableBase.InteractableName + " Initialized!")); } } Log.Debug("Trashcan full!"); ((MonoBehaviour)this).StartCoroutine(LoadSoundBankWhenReady()); Log.Debug("DeltaruneMod loaded successfully!"); } [IteratorStateMachine(typeof(<LoadSoundBankWhenReady>d__17))] private IEnumerator LoadSoundBankWhenReady() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LoadSoundBankWhenReady>d__17(0) { <>4__this = this }; } public bool ValidateItem(ItemBase item, List<ItemBase> itemList) { bool flag = ((BaseUnityPlugin)this).Config.Bind<bool>(item.ConfigCategory, "Enable Item?", true, "Should this item appear in runs?").Value; bool flag2 = item.ItemTags.Contains((ItemTag)4); bool value = ((BaseUnityPlugin)this).Config.Bind<bool>(item.ConfigCategory, "Blacklist Item from AI Use?", flag2, "Should the AI not be able to obtain this item?").Value; bool value2 = ((BaseUnityPlugin)this).Config.Bind<bool>(item.ConfigCategory, "Blacklist Item from Printers?", false, "Should the printers be able to print this item?").Value; if (!useChapter1 && item.isChapter1) { flag = false; } if (!useChapter2 && item.isChapter2) { flag = false; } if (!useChapter3 && item.isChapter3) { flag = false; } if (!useChapter4 && item.isChapter4) { flag = false; } if (flag) { itemList.Add(item); if (value2) { item.PrinterBlacklisted = true; } if (value) { item.AIBlacklisted = true; } } return flag; } public bool ValidateInteractable(InteractableBase interactable, List<InteractableBase> interactableList) { bool flag = ((BaseUnityPlugin)this).Config.Bind<bool>(interactable.ConfigCategory, "Enable Interactable?", true, "Should this interactable appear in runs?").Value; if (!useChapter1 && interactable.isChapter1) { flag = false; } if (!useChapter2 && interactable.isChapter2) { flag = false; } if (!useChapter3 && interactable.isChapter3) { flag = false; } if (!useChapter4 && interactable.isChapter4) { flag = false; } if (flag) { interactableList.Add(interactable); } return flag; } private void Update() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_005a: 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) if (!Input.GetKeyDown((KeyCode)283)) { return; } Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform; foreach (ItemBase item in Items) { PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(item.ItemDef.itemIndex), transform.position, transform.forward * 20f); } } } } namespace DeltaruneMod.Util { public class Components { public class FollowTarget : MonoBehaviour { public Transform target; public Vector3 offset = Vector3.zero; public bool followRotation = false; private void FixedUpdate() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_004e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target)) { ((Component)this).transform.position = target.position + offset; if (followRotation) { ((Component)this).transform.rotation = target.rotation; } } } } public class TextController : NetworkBehaviour { public TextMeshPro textMesh; public void SetText(string newText) { ((TMP_Text)textMesh).text = newText; } } public class Timer : MonoBehaviour { private float timer = 0f; private bool timerActive = false; public bool CallTimer(float interval) { timer = interval; timerActive = true; while (timer > 0f) { Debug.Log((object)("Timer: " + timer)); } return true; } private void Update() { if (timerActive) { timer -= Time.deltaTime; } } } } public abstract class CoreModule { public abstract string Name { get; } public abstract void Init(); } public class Helpers { public static List<ItemDef> GetItems(int tierIndex) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Invalid comparison between Unknown and I4 //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Invalid comparison between Unknown and I4 //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Invalid comparison between Unknown and I4 //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Invalid comparison between Unknown and I4 //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Invalid comparison between Unknown and I4 //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Invalid comparison between Unknown and I4 //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Invalid comparison between Unknown and I4 //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Invalid comparison between Unknown and I4 //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Invalid comparison between Unknown and I4 List<ItemDef> list = new List<ItemDef>(); for (ItemIndex val = (ItemIndex)0; (int)val < ItemCatalog.itemCount; val = (ItemIndex)(val + 1)) { ItemDef itemDef = ItemCatalog.GetItemDef(val); if ((Object)(object)itemDef == (Object)null) { continue; } switch (tierIndex) { case 99: list.Add(itemDef); continue; case 0: if ((int)itemDef.tier == 0) { list.Add(itemDef); continue; } break; } if (tierIndex == 1 && (int)itemDef.tier == 1) { list.Add(itemDef); } else if (tierIndex == 2 && (int)itemDef.tier == 2) { list.Add(itemDef); } else if (tierIndex == 3 && (int)itemDef.tier == 3) { list.Add(itemDef); } else if (tierIndex == 4 && (int)itemDef.tier == 4) { list.Add(itemDef); } else if (tierIndex == 5 && (int)itemDef.tier == 5) { list.Add(itemDef); } else if (tierIndex == 6 && (int)itemDef.tier == 6) { list.Add(itemDef); } else if (tierIndex == 7 && (int)itemDef.tier == 7) { list.Add(itemDef); } else if (tierIndex == 8 && (int)itemDef.tier == 8) { list.Add(itemDef); } else if (tierIndex == 9 && (int)itemDef.tier == 9) { list.Add(itemDef); } else if (tierIndex == 10 && (int)itemDef.tier == 10) { list.Add(itemDef); } } return list; } public static List<ItemDef> GetAllItemsFromInventory(Inventory inv) { //IL_0008: 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_0043: Invalid comparison between Unknown and I4 //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) List<ItemDef> list = new List<ItemDef>(); for (ItemIndex val = (ItemIndex)0; (int)val < ItemCatalog.itemCount; val = (ItemIndex)(val + 1)) { ItemDef itemDef = ItemCatalog.GetItemDef(val); if (!((Object)(object)itemDef == (Object)null) && inv.GetItemCount(val) > 0) { list.Add(itemDef); } } return list; } public static List<BuffDef> GetBuffs(int type) { List<BuffDef> list = new List<BuffDef>(); FieldInfo[] fields = typeof(Buffs).GetFields(BindingFlags.Static | BindingFlags.Public); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { object? value = fieldInfo.GetValue(null); BuffDef val = (BuffDef)((value is BuffDef) ? value : null); if (val != null && !val.isHidden) { if (type == 0 && !val.isElite && !val.isDebuff) { list.Add(val); } else if (type == 1 && val.isDebuff) { list.Add(val); } else if (type == 2 && val.isElite) { list.Add(val); } else if (type == 99) { list.Add(val); } } } fields = typeof(Buffs).GetFields(BindingFlags.Static | BindingFlags.Public); FieldInfo[] array2 = fields; foreach (FieldInfo fieldInfo2 in array2) { object? value2 = fieldInfo2.GetValue(null); BuffDef val2 = (BuffDef)((value2 is BuffDef) ? value2 : null); if (val2 != null && !val2.isHidden) { if (type == 0 && !val2.isElite && !val2.isDebuff) { list.Add(val2); } else if (type == 1 && val2.isDebuff) { list.Add(val2); } else if (type == 2 && val2.isElite) { list.Add(val2); } else if (type == 99) { list.Add(val2); } } } fields = typeof(Buffs).GetFields(BindingFlags.Static | BindingFlags.Public); FieldInfo[] array3 = fields; foreach (FieldInfo fieldInfo3 in array3) { object? value3 = fieldInfo3.GetValue(null); BuffDef val3 = (BuffDef)((value3 is BuffDef) ? value3 : null); if (val3 != null && !val3.isHidden) { if (type == 0 && !val3.isElite && !val3.isDebuff) { list.Add(val3); } else if (type == 1 && val3.isDebuff) { list.Add(val3); } else if (type == 2 && val3.isElite) { list.Add(val3); } else if (type == 99) { list.Add(val3); } } } return list; } public static void CreateNetworkedEffectPrefab(GameObject obj, bool isFollower) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) EffectComponent val = obj.GetComponent<EffectComponent>(); if (!Object.op_Implicit((Object)(object)val)) { val = obj.AddComponent<EffectComponent>(); } val.applyScale = isFollower; val.effectIndex = (EffectIndex)(-1); val.parentToReferencedTransform = isFollower; val.positionAtReferencedTransform = isFollower; ContentAddition.AddEffect(obj); } public static void AddEffectPrefabToContentAddition(GameObject obj) { if (!Object.op_Implicit((Object)(object)obj.GetComponent<NetworkIdentity>())) { obj.AddComponent<NetworkIdentity>(); } if (!Object.op_Implicit((Object)(object)obj.GetComponent<EffectComponent>())) { obj.AddComponent<EffectComponent>(); } ContentAddition.AddEffect(obj); } public static void CreateNetworkedObjectPrefab(GameObject obj) { if (!Object.op_Implicit((Object)(object)obj.GetComponent<NetworkIdentity>())) { obj.AddComponent<NetworkIdentity>(); } PrefabAPI.RegisterNetworkPrefab(obj); ContentAddition.AddNetworkedObject(obj); } public static void CreateNetworkedProjectilePrefab(GameObject obj) { if (!Object.op_Implicit((Object)(object)obj.GetComponent<ProjectileController>())) { obj.AddComponent<ProjectileController>(); } if (!Object.op_Implicit((Object)(object)obj.GetComponent<ProjectileSimple>())) { obj.AddComponent<ProjectileSimple>(); } if (!Object.op_Implicit((Object)(object)obj.GetComponent<NetworkIdentity>())) { obj.AddComponent<NetworkIdentity>(); } if (Object.op_Implicit((Object)(object)obj)) { PrefabAPI.RegisterNetworkPrefab(obj); } ContentAddition.AddProjectile(obj); } public static GameObject ModifyVanillaPrefab(string addressablePath, string newName, bool shouldNetwork, Func<GameObject, GameObject> modifierCallback) { //IL_0002: 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) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)addressablePath).WaitForCompletion(), "Temporary Setup Prefab", false); GameObject val2 = modifierCallback(val); GameObject result = PrefabAPI.InstantiateClone(val2, newName, shouldNetwork); Object.Destroy((Object)(object)val); Object.Destroy((Object)(object)val2); return result; } public static NetworkSoundEventDef CreateNetworkSoundEventDef(string eventName) { NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>(); val.akId = AkSoundEngine.GetIDFromString(eventName); val.eventName = eventName; ContentAddition.AddNetworkSoundEventDef(val); return val; } public static void GetAllComponentNames(GameObject obj) { Component[] components = obj.GetComponents<Component>(); foreach (Component val in components) { Debug.Log((object)val); } } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } public static class SoundBank { public static uint _soundBankId; public const string soundBankFolderName = "AGU-DeltaruneMod"; public const string soundBankFileName = "DeltaruneSoundBank.bnk"; public static string SoundBankDirectory => Path.GetDirectoryName(((BaseUnityPlugin)DeltarunePlugin.Instance).Info.Location); public static void Init() { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Invalid comparison between Unknown and I4 //IL_00d1: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)SoundBankDirectory); try { string text = ((!SoundBankDirectory.Contains("AGU-DeltaruneMod")) ? Path.Combine(SoundBankDirectory, "AGU-DeltaruneMod", "DeltaruneSoundBank.bnk") : Path.Combine(SoundBankDirectory, "DeltaruneSoundBank.bnk")); Debug.Log((object)(SoundBankDirectory + " ||| DeltaruneSoundBank.bnk")); Debug.Log((object)$"SoundBank size: {new FileInfo(text).Length} bytes"); Debug.Log((object)"Attempting to load sound bank..."); if (!File.Exists(text)) { Debug.Log((object)"Sound bank path does not exist!!"); return; } AKRESULT val = AkSoundEngine.LoadBank(text, ref _soundBankId); if ((int)val == 1) { Debug.Log((object)"SoundBank loaded successfully!"); } else { Debug.Log((object)$"SoundBank failed to load. {val}"); } SoundBanks.Add(text); } catch (Exception ex) { Debug.Log((object)("Failed to load soundbank: " + ex)); } } } public class StatHooks : CoreModule { public class StatHookEventArgs : EventArgs { public float healthMultAdd = 0f; public float baseHealthAdd = 0f; public float baseShieldAdd = 0f; public float regenMultAdd = 0f; public float baseRegenAdd = 0f; public float baseMoveSpeedAdd = 0f; public float moveSpeedMultAdd = 0f; public float jumpPowerMultAdd = 0f; public float damageMultAdd = 0f; public float baseDamageAdd = 0f; public float baseAttackSpeedAdd = 0f; public float attackSpeedMultAdd = 0f; public float critAdd = 0f; public float armorAdd = 0f; } public delegate void StatHookEventHandler(CharacterBody sender, StatHookEventArgs args); [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_CBRecalcStats; } public override string Name => "StatHooks (from TILER2 originally)"; public static event StatHookEventHandler GetStatCoefficients; public override void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__IL_CBRecalcStats; if (obj == null) { Manipulator val = IL_CBRecalcStats; <>O.<0>__IL_CBRecalcStats = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; } internal static void IL_CBRecalcStats(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0a84: Unknown result type (might be due to invalid IL or missing references) //IL_0aa9: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); StatHookEventArgs statMods = null; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<CharacterBody>>((Action<CharacterBody>)delegate(CharacterBody cb) { statMods = new StatHookEventArgs(); StatHooks.GetStatCoefficients?.Invoke(cb, statMods); }); int locBaseHealthIndex = -1; int locHealthMultIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMaxHealth"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMaxHealth") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseHealthIndex) }) && val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseHealthIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locHealthMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseHealthIndex) })) { val.GotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMaxHealth") }); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseHealthIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origMaxHealth) => origMaxHealth + statMods.baseHealthAdd)); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locHealthMultIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origHealthMult) => origHealthMult + statMods.healthMultAdd)); } val.Index = 0; int locBaseShieldIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMaxShield"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMaxShield") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseShieldIndex) })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origBaseShield) => origBaseShield + statMods.baseShieldAdd)); } val.Index = 0; int locRegenMultIndex = -1; int locFinalRegenIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locFinalRegenIndex), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "set_regen") }) && val.TryGotoPrev(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locRegenMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locFinalRegenIndex) })) { val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locRegenMultIndex) }); val.EmitDelegate<Func<float>>((Func<float>)(() => statMods.baseRegenAdd)); val.Emit(OpCodes.Add); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchMul(x) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origRegenMult) => origRegenMult + statMods.regenMultAdd)); } val.Index = 0; int locBaseSpeedIndex = -1; int locSpeedMultIndex = -1; int locSpeedDivIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMoveSpeed"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMoveSpeed") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseSpeedIndex) }) && val.TryGotoNext(new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseSpeedIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locSpeedMultIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locSpeedDivIndex), (Instruction x) => ILPatternMatchingExt.MatchDiv(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseSpeedIndex) })) { val.GotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMoveSpeed") }); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseSpeedIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origBaseMoveSpeed) => origBaseMoveSpeed + statMods.baseMoveSpeedAdd)); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locSpeedMultIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origMoveSpeedMult) => origMoveSpeedMult + statMods.moveSpeedMultAdd)); } val.Index = 0; int num = default(int); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseJumpPower"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelJumpPower"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x) })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origJumpPower) => origJumpPower * (1f + statMods.jumpPowerMultAdd))); } val.Index = 0; int locBaseDamageIndex = -1; int locDamageMultIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseDamage"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelDamage") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseDamageIndex) }) && val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseDamageIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locDamageMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseDamageIndex) })) { val.GotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseDamage") }); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseDamageIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origDamage) => origDamage + statMods.baseDamageAdd)); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locDamageMultIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origDamageMult) => origDamageMult + statMods.damageMultAdd)); } val.Index = 0; int locBaseAttackSpeedIndex = -1; int locAttackSpeedMultIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseAttackSpeed"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelAttackSpeed") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locBaseAttackSpeedIndex) }) && val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseAttackSpeedIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locAttackSpeedMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseAttackSpeedIndex) })) { val.GotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseAttackSpeed") }); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseAttackSpeedIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origSpeed) => origSpeed + statMods.baseAttackSpeedAdd)); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locAttackSpeedMultIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origSpeedMult) => origSpeedMult + statMods.attackSpeedMultAdd)); } val.Index = 0; int locOrigCrit = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locOrigCrit), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "set_crit") })) { val.Emit(OpCodes.Ldloc, locOrigCrit); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origCrit) => origCrit + statMods.critAdd)); val.Emit(OpCodes.Stloc, locOrigCrit); } val.Index = 0; if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseArmor") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_armor") }) && val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_armor") })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float oldArmor) => oldArmor + statMods.armorAdd)); } } } } namespace DeltaruneMod.Neo { public class Neo { public static Color AffixNeoColor = new Color(1f, 64f / 85f, 0.79607844f); public static EquipmentDef AffixNeoEquipment; public static BuffDef AffixNeoBuff; public static EliteDef AffixNeoElite; public static float healthMult = 1f; public static float damageMult = 3f; public static float affixDropChance = 0.00025f; public static GameObject ItemModel = DeltarunePlugin.MainAssets.LoadAsset<GameObject>("neo_wings.prefab"); private static Texture2D eliteRamp = Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/ColorRamps/texRampMagmaWorm.png").WaitForCompletion(); private static Sprite eliteIcon = DeltarunePlugin.MainAssets.LoadAsset<Sprite>("swoon_effect_icon.png"); private int maxBuffs = 3; private List<BuffDef> allBuffs = new List<BuffDef>(); private List<BuffDef> currBuffs = new List<BuffDef>(); public Neo() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown AddLanguageTokens(); SetupBuff(); SetupEquipment(); SetupElite(); AddContent(); EliteRamp.AddRamp(AffixNeoElite, eliteRamp); ContentAddition.AddEquipmentDef(AffixNeoEquipment); CharacterBody.OnBuffFirstStackGained += new hook_OnBuffFirstStackGained(CharacterBody_OnBuffFirstStackGained); CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost); CombatDirector.Init += new hook_Init(CombatDirector_Init); } private void CombatDirector_Init(orig_Init orig) { orig.Invoke(); if (EliteAPI.VanillaEliteTiers.Length > 2) { EliteTierDef val = EliteAPI.VanillaEliteTiers[2]; List<EliteDef> list = val.eliteTypes.ToList(); AffixNeoElite.healthBoostCoefficient = 0.5f; AffixNeoElite.damageBoostCoefficient = 2f; list.Add(AffixNeoElite); val.eliteTypes = list.ToArray(); } if (EliteAPI.VanillaEliteTiers.Length > 1) { EliteTierDef val2 = EliteAPI.VanillaEliteTiers[1]; List<EliteDef> list2 = val2.eliteTypes.ToList(); AffixNeoElite.healthBoostCoefficient = 1f; AffixNeoElite.damageBoostCoefficient = 3f; list2.Add(AffixNeoElite); val2.eliteTypes = list2.ToArray(); } } private void CharacterBody_OnBuffFirstStackGained(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if (!((Object)(object)buffDef != (Object)(object)AffixNeoBuff)) { if (allBuffs.Count <= 0) { allBuffs = Helpers.GetBuffs(0); } for (int i = 0; i < maxBuffs; i++) { BuffDef val = allBuffs[Random.Range(0, allBuffs.Count)]; currBuffs.Add(val); self.AddBuff(val); } } } private void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if (!((Object)(object)buffDef != (Object)(object)AffixNeoBuff)) { for (int i = 0; i < currBuffs.Count; i++) { self.RemoveBuff(currBuffs[i]); } currBuffs.Clear(); } } private void AddContent() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ContentAddition.AddEliteDef(AffixNeoElite); ContentAddition.AddBuffDef(AffixNeoBuff); } private void SetupBuff() { //IL_0041: 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) AffixNeoBuff = ScriptableObject.CreateInstance<BuffDef>(); ((Object)AffixNeoBuff).name = "EliteNeoBuff"; AffixNeoBuff.canStack = false; AffixNeoBuff.isCooldown = false; AffixNeoBuff.isDebuff = false; AffixNeoBuff.buffColor = AffixNeoColor; AffixNeoBuff.iconSprite = eliteIcon; } private void SetupEquipment() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) AffixNeoEquipment = ScriptableObject.CreateInstance<EquipmentDef>(); AffixNeoEquipment.appearsInMultiPlayer = true; AffixNeoEquipment.appearsInSinglePlayer = true; AffixNeoEquipment.canBeRandomlyTriggered = false; AffixNeoEquipment.canDrop = false; AffixNeoEquipment.colorIndex = (ColorIndex)5; AffixNeoEquipment.cooldown = 0f; AffixNeoEquipment.isLunar = false; AffixNeoEquipment.isBoss = false; AffixNeoEquipment.passiveBuffDef = AffixNeoBuff; AffixNeoEquipment.dropOnDeathChance = affixDropChance; AffixNeoEquipment.enigmaCompatible = false; AffixNeoEquipment.pickupModelPrefab = ItemModel; AffixNeoEquipment.nameToken = "EQUIPMENT_AFFIX_NEO_NAME"; AffixNeoEquipment.descriptionToken = "EQUIPMENT_AFFIX_NEO_DESC"; AffixNeoEquipment.pickupToken = "EQUIPMENT_AFFIX_NEO_PICKUP"; AffixNeoEquipment.loreToken = "EQUIPMENT_AFFIX_NEO_LORE"; ((Object)AffixNeoEquipment).name = "AffixNeo"; } private void SetupElite() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) AffixNeoElite = ScriptableObject.CreateInstance<EliteDef>(); AffixNeoElite.color = Color32.op_Implicit(AffixNeoColor); AffixNeoElite.eliteEquipmentDef = AffixNeoEquipment; AffixNeoElite.modifierToken = "ELITE_MODIFIER_NEO"; ((Object)AffixNeoElite).name = "EliteNeo"; AffixNeoElite.healthBoostCoefficient = healthMult; AffixNeoElite.damageBoostCoefficient = damageMult; AffixNeoBuff.eliteDef = AffixNeoElite; } private void AddLanguageTokens() { LanguageAPI.Add("ELITE_MODIFIER_NEO", "Neo {0}"); LanguageAPI.Add("EQUIPMENT_AFFIX_NEO_NAME", "NEO Armor"); LanguageAPI.Add("EQUIPMENT_AFFIX_NEO_PICKUP", "Gain NEO armor."); LanguageAPI.Add("EQUIPMENT_AFFIX_NEO_DESC", "Gain NEO armor. Lower HP, higher damage, and 3 random buffs."); LanguageAPI.Add("EQUIPMENT_AFFIX_NEO_LORE", "I'LL ADMIT YOU'VE GOT SOME [Guts] KID!\nBUT IN A [1 for 1] BATTLE, NEO NEVER LOSES!!!\nIT'S TIME FOR A LITTLE [Bluelight Specil].\nDIDN'T YOU KNOW [Neo] IS FAMOUS FOR ITS HIGH DEFENSE!?\nNOW... ENJ0Y THE FIR3WORKS, KID!!!"); } } public class SusBeads : ItemBase<SusBeads> { public class BeadBehavior : ItemBehavior { private const float secondsPerProjectile = 1f; private const string projectilePath = "Prefabs/Projectiles/LunarSunProjectile"; private const int baseMaxProjectiles = 4; private const int maxProjectilesPerStack = 1; private const float baseOrbitDegreesPerSecond = 180f; private const float orbitDegreesPerSecondFalloff = 0.9f; private const float baseOrbitRadius = 2f; private const float orbitRadiusPerStack = 0.25f; private const float maxInclinationDegrees = 180f; private const float baseDamageCoefficient = 3.6f; private float projectileTimer; private GameObject projectilePrefab; private DeployableSlot maxOrbsSlot = (DeployableSlot)8; public event Action<BeadBehavior> onDisabled; public static int GetMaxProjectiles(Inventory inventory) { return 4 + inventory.GetItemCount(ItemBase<SusBeads>.instance.ItemDef); } public void InitializeOrbiter(ProjectileOwnerOrbiter orbiter, BeadProjectileController controller) { //IL_0065: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) BeadProjectileController controller2 = controller; float num = base.body.radius + 2f + Random.Range(0.25f, 0.25f * (float)base.stack); float num2 = num / 2f; num2 *= num2; float num3 = 180f * Mathf.Pow(0.9f, num2); Quaternion val = Quaternion.AngleAxis(Random.Range(0f, 180f), Vector3.forward); Quaternion val2 = Quaternion.AngleAxis(Random.Range(0f, 180f), Vector3.forward); Vector3 val3 = val * val2 * Vector3.up; float num4 = Random.Range(0f, 360f); orbiter.Initialize(val3, num, 0f, num4); onDisabled += DestroyOrbiter; void DestroyOrbiter(BeadBehavior beadBehavior) { if (Object.op_Implicit((Object)(object)controller2)) { controller2.Detonate(); } } } private void Awake() { ((Behaviour)this).enabled = false; GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/LunarSunProjectile"), "BeadProjectile", false); LunarSunProjectileController component = val.GetComponent<LunarSunProjectileController>(); if (Object.op_Implicit((Object)(object)component)) { Debug.Log((object)"Deleting old controller!"); Object.Destroy((Object)(object)val.GetComponent<LunarSunProjectileController>()); } val.AddComponent<BeadProjectileController>(); projectilePrefab = val; Object.Destroy((Object)(object)val); Helpers.GetAllComponentNames(projectilePrefab); } private void OnEnable() { } private void OnDisable() { this.onDisabled?.Invoke(this); this.onDisabled = null; } private void FixedUpdate() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) projectileTimer += Time.fixedDeltaTime; if (!base.body.master.IsDeployableLimited((DeployableSlot)16) && projectileTimer > 1f) { projectileTimer = 0f; Ray val = default(Ray); ((Ray)(ref val))..ctor(base.body.inputBank.aimOrigin, base.body.inputBank.aimDirection); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = projectilePrefab; val2.crit = base.body.RollCrit(); val2.damage = base.body.damage * 3.6f; val2.damageColorIndex = (DamageColorIndex)3; val2.force = 0f; val2.owner = ((Component)base.body).gameObject; val2.position = base.body.transform.position; val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction); FireProjectileInfo val3 = val2; ProjectileManager.instance.FireProjectile(val3); } } } [DisallowMultipleComponent] [RequireComponent(typeof(ProjectileOwnerOrbiter))] [RequireComponent(typeof(ProjectileController))] [RequireComponent(typeof(ProjectileImpactExplosion))] public class BeadProjectileController : MonoBehaviour { private ProjectileImpactExplosion explosion; public void OnEnable() { explosion = ((Component)this).GetComponent<ProjectileImpactExplosion>(); if (NetworkServer.active) { ProjectileController component = ((Component)this).GetComponent<ProjectileController>(); if (Object.op_Implicit((Object)(object)component.owner)) { AcquireOwner(component); } else { component.onInitialized += AcquireOwner; } } } private void AcquireOwner(ProjectileController controller) { controller.onInitialized -= AcquireOwner; CharacterBody component = controller.owner.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { ProjectileOwnerOrbiter component2 = ((Component)this).GetComponent<ProjectileOwnerOrbiter>(); ((Component)component).GetComponent<BeadBehavior>().InitializeOrbiter(component2, this); } } public void Detonate() { if (Object.op_Implicit((Object)(object)explosion)) { ((ProjectileExplosion)explosion).Detonate(); } } } public override string ItemName => "Bead Chain"; public override string ItemLangTokenName => "SUS_BEAD"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)2; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("ok.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset<Sprite>("ok.png"); public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(CharacterMaster_OnInventoryChanged); } private void CharacterMaster_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { orig.Invoke(self); int count = GetCount(self); CharacterBody body = self.GetBody(); if (!Object.op_Implicit((Object)(object)body)) { return; } BeadBehavior component = ((Component)body).GetComponent<BeadBehavior>(); if (count > 0) { if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)body).gameObject.AddComponent<BeadBehavior>(); ((ItemBehavior)component).body = body; ((Behaviour)component).enabled = true; } else if (Object.op_Implicit((Object)(object)component)) { ((ItemBehavior)component).stack = count; } } else if (count <= 0 && Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } public override void Init() { } } } namespace DeltaruneMod.Neo.NeoMithrix { public class NeoMithrixMain : ItemBase<NeoMithrixMain> { private bool StatsUpgraded = false; public override string ItemName => "NEO_MITHRIX_BASE_ITEM"; public override string ItemLangTokenName => "NEO_MITHRIX_BASE"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)10; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("combined_neo.prefab"); public override Sprite ItemIcon => null; public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (NetworkServer.active && Object.op_Implicit((Object)(object)sender.inventory) && GetCount(sender) > 0 && !StatsUpgraded) { sender.baseMaxHealth *= 4f; sender.baseDamage *= 3f; sender.baseRegen *= 2f; sender.baseMoveSpeed *= 1.5f; StatsUpgraded = true; } } public override void Init() { } } } namespace DeltaruneMod.Items { public abstract class ItemBase<T> : ItemBase where T : ItemBase<T> { public static T instance { get; private set; } public ItemBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ItemBase was instantiated twice"); } instance = this as T; } } public abstract class ItemBase { public ItemDef ItemDef; public abstract string ItemName { get; } public abstract string ItemLangTokenName { get; } public abstract string ItemPickupDesc { get; } public abstract string ItemFullDescription { get; } public abstract string ItemLore { get; } public abstract ItemTier Tier { get; } public virtual ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[0]; public abstract GameObject ItemModel { get; } public abstract Sprite ItemIcon { get; } public virtual string CorruptsItem { get; set; } = null; public virtual UnlockableDef ItemUnlockableDef { get; set; } = null; public virtual bool CanRemove { get; } = true; public virtual bool AIBlacklisted { get; set; } = false; public virtual bool PrinterBlacklisted { get; set; } = false; public virtual bool RequireUnlock { get; set; } = true; public abstract bool isChapter1 { get; } public abstract bool isChapter2 { get; } public abstract bool isChapter3 { get; } public abstract bool isChapter4 { get; } public string ConfigCategory => "Item: " + ItemLangTokenName; public abstract void Init(); protected void CreateLang() { LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_NAME", ItemName); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_PICKUP", ItemPickupDesc); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_DESCRIPTION", ItemFullDescription); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_LORE", ItemLore); } public abstract ItemDisplayRuleDict CreateItemDisplayRules(); protected void CreateItem() { //IL_0119: 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_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown if (AIBlacklisted) { ItemTags = new List<ItemTag>(ItemTags) { (ItemTag)4 }.ToArray(); } ItemDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)ItemDef).name = "ITEM_" + ItemLangTokenName; ItemDef.nameToken = "ITEM_" + ItemLangTokenName + "_NAME"; ItemDef.pickupToken = "ITEM_" + ItemLangTokenName + "_PICKUP"; ItemDef.descriptionToken = "ITEM_" + ItemLangTokenName + "_DESCRIPTION"; ItemDef.loreToken = "ITEM_" + ItemLangTokenName + "_LORE"; ItemDef.pickupModelPrefab = ItemModel; ItemDef.pickupIconSprite = ItemIcon; ItemDef.hidden = false; ItemDef.canRemove = CanRemove; ItemDef.deprecatedTier = Tier; if (ItemTags.Length != 0) { ItemDef.tags = ItemTags; } if (PrinterBlacklisted) { DeltarunePlugin.BlacklistedFromPrinter.Add(ItemDef); } if (Object.op_Implicit((Object)(object)ItemUnlockableDef)) { ItemDef.unlockableDef = ItemUnlockableDef; } ItemAPI.Add(new CustomItem(ItemDef, CreateItemDisplayRules())); } public abstract void Hooks(); public int GetCount(CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 0; } return body.inventory.GetItemCount(ItemDef); } public int GetCount(CharacterMaster master) { if (!Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)master.inventory)) { return 0; } return master.inventory.GetItemCount(ItemDef); } public static void BlacklistFromPrinter(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int listIndex = -1; int thisIndex = -1; ILLabel[] array = default(ILLabel[]); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchSwitch(x, ref array) }); bool flag = val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, ref thisIndex) }); bool flag2 = val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref listIndex) }); MethodReference val2 = default(MethodReference); val.GotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val2) }); if (!(flag && flag2)) { return; } val.Emit(OpCodes.Ldarg, thisIndex); val.Emit(OpCodes.Ldloc, listIndex); val.EmitDelegate<Action<ShopTerminalBehavior, List<PickupIndex>>>((Action<ShopTerminalBehavior, List<PickupIndex>>)delegate(ShopTerminalBehavior shopTerminalBehavior, List<PickupIndex> list) { if (Object.op_Implicit((Object)(object)shopTerminalBehavior) && ((Object)((Component)shopTerminalBehavior).gameObject).name.Contains("Duplicator")) { list.RemoveAll((PickupIndex x) => DeltarunePlugin.BlacklistedFromPrinter.Contains(ItemCatalog.GetItemDef(PickupCatalog.GetPickupDef(x).itemIndex))); } }); } } public class DroneHealingBoost : ItemBase<DroneHealingBoost> { public class DroneHealingBehavior : ItemBehavior { private float healTimer = 0f; private const float healInterval = 10f; private const float healFraction = 0.025f; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void FixedUpdate() { healTimer -= Time.fixedDeltaTime; if (healTimer <= 0f) { healTimer = 10f; FindAndHeal(base.body); } } private void OnDisable() { } private void FindAndHeal(CharacterBody drone) { //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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown TeamIndex teamIndex = drone.teamComponent.teamIndex; Ray aimRay = ((Component)drone).GetComponent<InputBankTest>().GetAimRay(); TeamMask none = TeamMask.none; ((TeamMask)(ref none)).AddTeam(drone.master.teamIndex); BullseyeSearch val = new BullseyeSearch { viewer = drone, filterByDistinctEntity = true, filterByLoS = false, minDistanceFilter = 0f, maxDistanceFilter = 100f, maxAngleFilter = 360f, searchDirection = ((Ray)(ref aimRay)).direction, searchOrigin = ((Ray)(ref aimRay)).origin, sortMode = (SortMode)1, queryTriggerInteraction = (QueryTriggerInteraction)0, teamMaskFilter = none }; val.RefreshCandidates(); val.FilterOutGameObject(((Component)drone).gameObject); foreach (HurtBox result in val.GetResults()) { CharacterBody val2 = result.healthComponent?.body; if (Object.op_Implicit((Object)(object)val2) && (Object)(object)val2 != (Object)(object)drone) { try { EffectData val3 = new EffectData { origin = val2.transform.position, scale = 1f }; EffectManager.SpawnEffect(HealEffectPrefab, val3, true); } catch { Debug.Log((object)"NRE, don't spawn effect."); } float num = val2.healthComponent.fullCombinedHealth * 0.025f; val2.healthComponent.Heal(num, default(ProcChainMask), true); Debug.Log((object)("Healed " + ((object)val2)?.ToString() + " for " + num + ".")); } } } } public static GameObject HealEffectPrefab; public override string ItemName => "DroneHealingBoost"; public override string ItemLangTokenName => "DRONE_HEAL_BOOST"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)10; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("guide_book.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset<Sprite>("guide_book_icon.png"); public override bool isChapter1 => true; public override bool isChapter2 => false; public override bool isChapter3 => false; public override bool isChapter4 => false; public override ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { if (GetCount(self) > 0) { self.AddItemBehavior<DroneHealingBehavior>(GetCount(self)); Debug.Log((object)("Gave " + ((object)self)?.ToString() + " " + ItemName + ".")); } orig.Invoke(self); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || sender.isPlayerControlled || !Object.op_Implicit((Object)(object)sender.inventory)) { return; } int count = GetCount(sender); DroneHealingBehavior droneHealingBehavior = ((Component)sender).gameObject.GetComponent<DroneHealingBehavior>(); if (count > 0) { if (((Enum)sender.bodyFlags).HasFlag((Enum)(object)(BodyFlags)1024)) { sender.inventory.RemoveItem(ItemDef, 1); if (Object.op_Implicit((Object)(object)droneHealingBehavior)) { ((Behaviour)droneHealingBehavior).enabled = false; } } else if (!Object.op_Implicit((Object)(object)droneHealingBehavior)) { droneHealingBehavior = ((Component)sender).gameObject.AddComponent<DroneHealingBehavior>(); ((ItemBehavior)droneHealingBehavior).body = sender; ((Behaviour)droneHealingBehavior).enabled = true; Debug.Log((object)("Gave " + ((object)sender)?.ToString() + " " + ItemName + ".")); } } if (count <= 0 && Object.op_Implicit((Object)(object)droneHealingBehavior)) { ((Behaviour)droneHealingBehavior).enabled = false; } } private static void CreateEffect() { HealEffectPrefab = PrefabAPI.InstantiateClone(DeltarunePlugin.MainAssets.LoadAsset<GameObject>("guide_book_heal.prefab"), "guidebook_heal", true); Helpers.CreateNetworkedEffectPrefab(HealEffectPrefab, isFollower: true); } public override void Init() { CreateItem(); CreateLang(); CreateEffect(); Hooks(); } } } namespace DeltaruneMod.Items.Yellow { public class MrPipis : ItemBase<MrPipis> { public class MrPipisTracker : MonoBehaviour { private List<BuffDef> allAffixes = Helpers.GetBuffs(2); public CharacterBody body; private void Awake() { ((Behaviour)this).enabled = false; } private void OnEnable() { } private void FixedUpdate() { foreach (BuffDef allAffix in allAffixes) { if (!body.HasBuff(allAffix) && (Object)(object)allAffix != (Object)(object)Buffs.AurelioniteBlessing) { body.AddBuff(allAffix); } } } private void OnDisable() { foreach (BuffDef allAffix in allAffixes) { if (body.HasBuff(allAffix)) { body.RemoveBuff(allAffix); } } } } public override string ItemName => "Mr. Pipis"; public override string ItemLangTokenName => "MR_PIPIS"; public override string ItemPickupDesc => "Gain [ALL] elite buffs!"; public override string ItemFullDescription => "Provides <style=cIsUtility>all elite buffs</style> <style=cStack>(excluding Aurelionite's blessing)</style>."; public override string ItemLore => "WOWZAS! You can't get THIS from an egg!"; public override ItemTier Tier => (ItemTier)4; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("mr_pipis.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset<Sprite>("mr_pipis_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override bool PrinterBlacklisted { get { return base.PrinterBlacklisted; } set { base.PrinterBlacklisted = true; } } public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => true; public override bool isChapter4 => false; public override void Init() { CreateLang(); CreateItem(); Hooks(); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0059: 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_0074: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: 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_017c: 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_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: 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_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: 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_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00426f, 0.28094f, -0.00592f), localAngles = new Vector3(353.7496f, 353.853f, 354.2567f), localScale = new Vector3(12.76023f, 16.23372f, 12.76023f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.00228f, 0.0628f, 0.03952f), localAngles = new Vector3(331.6837f, 17.06083f, 354.8333f), localScale = new Vector3(9.05695f, 12.89827f, 9.89628f) } }); val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.00012f, 0.14728f, -0.00827f), localAngles = new Vector3(4.90821f, 83.88029f, 318.1501f), localScale = new Vector3(8.60173f, 10.61426f, 7.68438f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.25753f, 2.58962f, 1.20786f), localAngles = new Vector3(303.5001f, 137.2872f, 340.3238f), localScale = new Vector3(71.05827f, 91.78291f, 71.05827f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "HeadCenter", localPos = new Vector3(-0.00976f, -0.16622f, 0.02857f), localAngles = new Vector3(339.7454f, 0.5669f, 354.8185f), localScale = new Vector3(12.66013f, 12.66013f, 15.70925f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00013f, 0.14606f, -0.09325f), localAngles = new Vector3(2.27543f, 348.6211f, 345.7619f), localScale = new Vector3(6.82893f, 7.70643f, 6.74123f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00885f, 0.20796f, 0.01862f), localAngles = new Vector3(359.5584f, 1.03469f, 353.8554f), localScale = new Vector3(8.35088f, 8.35088f, 8.35088f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "FlowerBase", localPos = new Vector3(-0.3344f, -0.04913f, 0.41831f), localAngles = new Vector3(13.48484f, 348.6151f, 346.5744f), localScale = new Vector3(8.67167f, 7.96958f, 6.45425f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00889f, 0.18897f, 0.0452f), localAngles = new Vector3(21.75747f, 6.04681f, 9.19641f), localScale = new Vector3(8.36439f, 8.36439f, 8.15949f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-151f / (180f * MathF.E), 0.19218f, 0.66591f), localAngles = new Vector3(295.8134f, 350.4054f, 174.2124f), localScale = new Vector3(87.16365f, 99.29857f, 103.8343f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(0.03626f, 0.17108f, -0.01637f), localAngles = new Vector3(336.6772f, 351.1885f, 337.5962f), localScale = new Vector3(9.64486f, 9.54612f, 9.64486f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "GunStock", localPos = new Vector3(0.01195f, -0.32039f, 0.02558f), localAngles = new Vector3(76.31502f, 226.8212f, 213.0602f), localScale = new Vector3(6.96663f, 6.19495f, 6.19495f) } }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.02832f, 0.07043f, 0.06621f), localAngles = new Vector3(328.4013f, 84.34533f, 35.42325f), localScale = new Vector3(8.81553f, 9.3033f, 7.34627f) } }); val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.71728f, -73f / (102f * MathF.PI), -0.04492f), localAngles = new Vector3(288.7068f, 247.8444f, 183.6162f), localScale = new Vector3(13.41672f, 12.80579f, 12.2074f) } }); val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Pack", localPos = new Vector3(-0.20928f, 0.1406f, -0.22238f), localAngles = new Vector3(335.5866f, 33.30312f, 20.72316f), localScale = new Vector3(9.48945f, 9.31357f, 8.43507f) } }); val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Chest", localPos = new Vector3(0.05703f, 0.27612f, 0.11341f), localAngles = new Vector3(293.5728f, 356.797f, 23.95159f), localScale = new Vector3(12.79138f, 17.81891f, 15.91274f) } }); val.Add("mdlRalsei", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "Head", localPos = new Vector3(-0.00018f, -0.00465f, 0.00218f), localAngles = new Vector3(318.1143f, 9.05731f, 355.9294f), localScale = new Vector3(0.45699f, 0.45699f, 0.45699f) } }); return val; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (!NetworkServer.active || !Object.op_Implicit((Object)(object)sender.inventory)) { return; } MrPipisTracker mrPipisTracker = ((Component)sender).GetComponent<MrPipisTracker>(); if (GetCount(sender) > 0) { if (!Object.op_Implicit((Object)(object)mrPipisTracker)) { mrPipisTracker = ((Component)sender).gameObject.AddComponent<MrPipisTracker>(); mrPipisTracker.body = sender; ((Behaviour)mrPipisTracker).enabled = true; } if (!((Behaviour)mrPipisTracker).enabled) { ((Behaviour)mrPipisTracker).enabled = true; } } else if (GetCount(sender) <= 0 && Object.op_Implicit((Object)(object)mrPipisTracker)) { ((Behaviour)mrPipisTracker).enabled = false; } } } public class Pipis : ItemBase<Pipis> { public override string ItemName => "Pipis"; public override string ItemLangTokenName => "PIPIS"; public override string ItemPickupDesc => "Increases ALL of your stats."; public override string ItemFullDescription => "Increases <style=cIsUtility>ALL stats</style> by <style=cIsUtility>5%</style>.\nPearl be damned my boy ballin'."; public override string ItemLore => "You can't get this from an egg!"; public override ItemTier Tier => (ItemTier)4; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("pipis.prefab"); public override Sprite ItemIcon => DeltarunePlugin.MainAssets.LoadAsset<Sprite>("pipis_icon.png"); public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)1 }; public override bool PrinterBlacklisted { get { return base.PrinterBlacklisted; } set { base.PrinterBlacklisted = true; } } public override bool isChapter1 => false; public override bool isChapter2 => true; public override bool isChapter3 => true; public override bool isChapter4 => false; public override void Init() { CreateLang(); CreateItem(); Hooks(); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0059: 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_0074: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0144: 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_017c: 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_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be d