Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of DeltaruneMod v2.0.9
DeltaruneMod.dll
Decompiled a day 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.Configuration; using BepInEx.Logging; using DeltaruneMod.Elite; using DeltaruneMod.Elites; using DeltaruneMod.Interactables; using DeltaruneMod.Interactables.SusExchange.TradingItems; using DeltaruneMod.Items; using DeltaruneMod.Items.Lunar; using DeltaruneMod.Items.Spamton; using DeltaruneMod.Items.Yellow; using DeltaruneMod.NeoMithrix; using DeltaruneMod.Util; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using On.RoR2.Orbs; using R2API; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.CharacterAI; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.UI; 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+998f7bb499ae8930294627173d458ccc6debafc5")] [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.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("AGU.DeltaruneMod", "DeltaruneMod", "2.0.7")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class DeltarunePlugin : BaseUnityPlugin { [CompilerGenerated] private sealed class <LoadSoundBankWhenReady>d__18 : 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__18(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 = "2.0.7"; 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 ConfigEntry<bool> useChapter1; public static ConfigEntry<bool> useChapter2; public static ConfigEntry<bool> useChapter3; public static ConfigEntry<bool> useChapter4; public static ConfigEntry<bool> antiFunMode; public static Material malachiteOverlayMat = new Material(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/ElitePoison/matElitePoisonOverlay.mat").WaitForCompletion()); public void Awake() { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Expected O, but got Unknown ModSettingsManager.SetModDescription("Adds various aspects to the game inspired by Deltarune."); useChapter1 = ((BaseUnityPlugin)this).Config.Bind<bool>("Chapter Settings", "Use Chapter 1 Features", true, "Enable or Disable Chapter 1"); useChapter2 = ((BaseUnityPlugin)this).Config.Bind<bool>("Chapter Settings", "Use Chapter 2 Features", true, "Enable or Disable Chapter 2"); useChapter3 = ((BaseUnityPlugin)this).Config.Bind<bool>("Chapter Settings", "Use Chapter 3 Features", true, "Enable or Disable Chapter 3"); useChapter4 = ((BaseUnityPlugin)this).Config.Bind<bool>("Chapter Settings", "Use Chapter 4 Features", true, "Enable or Disable Chapter 4"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useChapter1)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useChapter2)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useChapter3)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useChapter4)); 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!"); IEnumerable<Type> enumerable3 = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(EliteBase)) select type; foreach (Type item3 in enumerable3) { EliteBase eliteBase = (EliteBase)Activator.CreateInstance(item3); eliteBase.Init(); Debug.Log((object)("Elite: " + eliteBase.EliteName + " Initialized!")); } ((MonoBehaviour)this).StartCoroutine(LoadSoundBankWhenReady()); RemoveFromLootPool(); new NeoMithrixController(); new Hooks(); antiFunMode = ((BaseUnityPlugin)this).Config.Bind<bool>("Additional Settings", "(NOT RECOMMENDED!) Allow Suspicious Exchange items in Lootpool?", false, "(Use only with command, otherwise it just ruins the fun!)"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(antiFunMode)); antiFunMode.SettingChanged += ToggleItemsForCommand; Log.Debug("DeltaruneMod loaded successfully!"); } [IteratorStateMachine(typeof(<LoadSoundBankWhenReady>d__18))] private IEnumerator LoadSoundBankWhenReady() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LoadSoundBankWhenReady>d__18(0) { <>4__this = this }; } public bool ValidateItem(ItemBase item, List<ItemBase> itemList) { ItemBase item2 = item; ConfigEntry<bool> enabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Enable Item?", item2.ConfigCategory, true, "Should this item appear in runs?"); bool flag = item2.ItemTags.Contains((ItemTag)4); bool value = ((BaseUnityPlugin)this).Config.Bind<bool>(item2.ConfigCategory, "Blacklist Item from AI Use?", flag, "Should the AI not be able to obtain this item?").Value; bool value2 = ((BaseUnityPlugin)this).Config.Bind<bool>(item2.ConfigCategory, "Blacklist Item from Printers?", false, "Should the printers be able to print this item?").Value; useChapter1.SettingChanged += delegate { if (!useChapter1.Value && item2.isChapter1) { enabled.Value = false; } }; useChapter2.SettingChanged += delegate { if (!useChapter2.Value && item2.isChapter2) { enabled.Value = false; } }; useChapter3.SettingChanged += delegate { if (!useChapter3.Value && item2.isChapter3) { enabled.Value = false; } }; useChapter4.SettingChanged += delegate { if (!useChapter4.Value && item2.isChapter4) { enabled.Value = false; } }; if (enabled.Value) { itemList.Add(item2); if (value2) { item2.PrinterBlacklisted = true; } if (value) { item2.AIBlacklisted = true; } } return enabled.Value; } public bool ValidateInteractable(InteractableBase interactable, List<InteractableBase> interactableList) { InteractableBase interactable2 = interactable; ConfigEntry<bool> enabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Enable Interactable?", interactable2.ConfigCategory, true, "Should this interactable appear in runs?"); useChapter1.SettingChanged += delegate { if (!useChapter1.Value && interactable2.isChapter1) { enabled.Value = false; } }; useChapter2.SettingChanged += delegate { if (!useChapter2.Value && interactable2.isChapter2) { enabled.Value = false; } }; useChapter3.SettingChanged += delegate { if (!useChapter3.Value && interactable2.isChapter3) { enabled.Value = false; } }; useChapter4.SettingChanged += delegate { if (!useChapter4.Value && interactable2.isChapter4) { enabled.Value = false; } }; if (enabled.Value) { interactableList.Add(interactable2); } return enabled.Value; } public void ToggleItemsForCommand(object sender, EventArgs e) { List<ItemDef> toggleableItems = new List<ItemDef>(); toggleableItems.Add(ItemBase<BrokenHeart>.instance.ItemDef); toggleableItems.Add(ItemBase<CommRing>.instance.ItemDef); toggleableItems.Add(ItemBase<LightBulb>.instance.ItemDef); toggleableItems.Add(ItemBase<MalfunctiongCore>.instance.ItemDef); toggleableItems.Add(ItemBase<Pipis>.instance.ItemDef); toggleableItems.Add(ItemBase<MrPipis>.instance.ItemDef); Run.onRunSetRuleBookGlobal += delegate(Run run, RuleBook rulebook) { //IL_0033: 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) foreach (ItemDef item in toggleableItems) { if (antiFunMode.Value) { try { run.availableItems.Add(item.itemIndex); } catch { Debug.Log((object)(((object)item)?.ToString() + " is already disabled!")); } } else if (!antiFunMode.Value) { try { run.availableItems.Remove(item.itemIndex); } catch { Debug.Log((object)(((object)item)?.ToString() + " is already enabled!")); } } } }; } public void RemoveFromLootPool() { List<ItemDef> blacklistedItems = new List<ItemDef>(); blacklistedItems.Add(ItemBase<BrokenHeart>.instance.ItemDef); blacklistedItems.Add(ItemBase<CommRing>.instance.ItemDef); blacklistedItems.Add(ItemBase<LightBulb>.instance.ItemDef); blacklistedItems.Add(ItemBase<MalfunctiongCore>.instance.ItemDef); blacklistedItems.Add(ItemBase<Pipis>.instance.ItemDef); blacklistedItems.Add(ItemBase<MrPipis>.instance.ItemDef); blacklistedItems.Add(ItemBase<Kromer>.instance.ItemDef); blacklistedItems.Add(ItemBase<BrokenHeartTradingItem>.instance.ItemDef); blacklistedItems.Add(ItemBase<CommRingTradingItem>.instance.ItemDef); blacklistedItems.Add(ItemBase<LightBulbTradingItem>.instance.ItemDef); blacklistedItems.Add(ItemBase<MalfunctiongCoreTradingItem>.instance.ItemDef); blacklistedItems.Add(ItemBase<RandomTradingItem>.instance.ItemDef); blacklistedItems.Add(ItemBase<FinalForm>.instance.ItemDef); blacklistedItems.Add(ItemBase<ThornRing>.instance.ItemDef); blacklistedItems.Add(ItemBase<PipisTradingItem>.instance.ItemDef); blacklistedItems.Add(ItemBase<MrPipisTradingItem>.instance.ItemDef); Run.onRunSetRuleBookGlobal += delegate(Run run, RuleBook rulebook) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) foreach (ItemDef item in blacklistedItems) { try { run.availableItems.Remove(item.itemIndex); } catch { Debug.Log((object)(((object)item)?.ToString() + " is already disabled!")); } } PickupDropTable.RegenerateAll(run); }; } private void Update() { } } } 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 static 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 == 11) { list.Add(itemDef); } } return list; } public static List<ItemDef> GetAllPermenantItemsFromInventory(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.GetItemCountPermanent(val) > 0) { list.Add(itemDef); } } return list; } public static List<ItemDef> GetAllTempItemsFromInventory(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.GetItemCountTemp(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 CreateEffectPrefab(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)(((object)obj)?.ToString() + ": " + (object)val)); } } public static void GetAllTransformNames(GameObject obj) { Transform[] componentsInChildren = obj.GetComponentsInChildren<Transform>(); foreach (Transform val in componentsInChildren) { Debug.Log((object)(((Object)val.parent).name + ": " + ((Object)val).name)); } } public static void AddPersistentListener(this UnityEvent<MPButton, PickupDef> unityEvent, UnityAction<MPButton, PickupDef> action) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls; PersistentCall val = new PersistentCall(); ref Object target = ref val.m_Target; object? target2 = ((Delegate)(object)action).Target; target = (Object)((target2 is Object) ? target2 : null); val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName); val.m_MethodName = ((Delegate)(object)action).Method.Name; val.m_CallState = (UnityEventCallState)2; val.m_Mode = (PersistentListenerMode)0; persistentCalls.AddListener(val); } public static void AddPersistentListener(this UnityEvent<int> unityEvent, UnityAction<int> action) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls; PersistentCall val = new PersistentCall(); ref Object target = ref val.m_Target; object? target2 = ((Delegate)(object)action).Target; target = (Object)((target2 is Object) ? target2 : null); val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName); val.m_MethodName = ((Delegate)(object)action).Method.Name; val.m_CallState = (UnityEventCallState)2; val.m_Mode = (PersistentListenerMode)0; persistentCalls.AddListener(val); } public static void AddPersistentListener(this UnityEvent<Interactor> unityEvent, UnityAction<Interactor> action) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) PersistentCallGroup persistentCalls = ((UnityEventBase)unityEvent).m_PersistentCalls; PersistentCall val = new PersistentCall(); ref Object target = ref val.m_Target; object? target2 = ((Delegate)(object)action).Target; target = (Object)((target2 is Object) ? target2 : null); val.m_TargetAssemblyTypeName = UnityEventTools.TidyAssemblyTypeName(((Delegate)(object)action).Method.DeclaringType.AssemblyQualifiedName); val.m_MethodName = ((Delegate)(object)action).Method.Name; val.m_CallState = (UnityEventCallState)2; val.m_Mode = (PersistentListenerMode)0; persistentCalls.AddListener(val); } public static Texture2D CreateGradientTexture(Color32[] colors, int width, int height) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(width, height); ((Texture)val).wrapMode = (TextureWrapMode)1; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { float num = (float)j / (float)(width - 1); float num2 = num * (float)(colors.Length - 1); int num3 = Mathf.FloorToInt(num2); float t = num2 - (float)num3; if (num3 >= colors.Length - 1) { num3 = colors.Length - 2; t = 1f; } Color32 val2 = LerpColor32(colors[num3], colors[num3 + 1], t); val.SetPixel(j, i, Color32.op_Implicit(val2)); } } val.Apply(); DeltarunePlugin.malachiteOverlayMat.SetTexture("_RemapTex", (Texture)(object)val); return val; } public static Color32 LerpColor32(Color32 colorA, Color32 colorB, float t) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0066: Unknown result type (might be due to invalid IL or missing references) byte b = (byte)Mathf.Lerp((float)(int)colorA.r, (float)(int)colorB.r, t); byte b2 = (byte)Mathf.Lerp((float)(int)colorA.g, (float)(int)colorB.g, t); byte b3 = (byte)Mathf.Lerp((float)(int)colorA.b, (float)(int)colorB.b, t); byte b4 = (byte)Mathf.Lerp((float)(int)colorA.a, (float)(int)colorB.a, t); return new Color32(b, b2, b3, b4); } } public class Hooks { private int numOfEnemiesSpawned = 0; public Hooks() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); if (!body.isPlayerControlled && !body.isRemoteOp && !body.IsDrone) { numOfEnemiesSpawned++; if (numOfEnemiesSpawned % 150 == 0) { Debug.Log((object)"Spawning NEO Elite."); body.inventory.SetEquipmentIndex(EliteBase<NeoElite>.instance.EliteEquip.equipmentIndex, true); } } } } 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)); } } } internal class UnusedCode { } } namespace DeltaruneMod.Unlocks { public class NEOMithrixUnlock : BaseAchievement { } } namespace DeltaruneMod.NeoMithrix { public class NeoMithrixController { private static bool playerHadThornRing; public NeoMithrixController() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); if (body.isPlayerControlled && body.inventory.GetItemCount(ItemBase<ThornRing>.instance.ItemDef) > 0) { playerHadThornRing = true; Debug.Log((object)"Player had thorn ring."); } if (playerHadThornRing) { if (((Object)body).name == "BrotherBody(Clone)" && body.inventory.GetItemCountPermanent(ItemBase<NeoMithrixItem>.instance.ItemDef) <= 0) { self.inventory.GiveItemPermanent(ItemBase<NeoMithrixItem>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixLeftWing>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixRightWing>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixLimb>.instance.ItemDef, 1); self.inventory.SetEquipmentIndex(EliteBase<NeoElite>.instance.EliteEquip.equipmentIndex, true); Debug.Log((object)"Giving basic mithrix item."); } else if (((Object)body).name == "BrotherGlassBody(Clone)" && body.inventory.GetItemCountPermanent(ItemBase<NeoMithrixItem>.instance.ItemDef) <= 0) { self.inventory.GiveItemPermanent(ItemBase<NeoMithrixItem>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixLeftWing>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixRightWing>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixLimb>.instance.ItemDef, 1); self.inventory.SetEquipmentIndex(EliteBase<NeoElite>.instance.EliteEquip.equipmentIndex, true); Debug.Log((object)"Giving glass mithrix item."); } else if (((Object)body).name == "BrotherHurtBody(Clone)" && body.inventory.GetItemCountPermanent(ItemBase<NeoMithrixItem>.instance.ItemDef) <= 0) { self.inventory.GiveItemPermanent(ItemBase<NeoMithrixItem>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixLeftWing>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixRightWing>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixLimb>.instance.ItemDef, 1); self.inventory.SetEquipmentIndex(EliteBase<NeoElite>.instance.EliteEquip.equipmentIndex, true); Debug.Log((object)"Giving hurt mithrix item."); } else if (((Object)body).name == "ITBrotherBody(Clone)" && body.inventory.GetItemCountPermanent(ItemBase<NeoMithrixItem>.instance.ItemDef) <= 0) { self.inventory.GiveItemPermanent(ItemBase<NeoMithrixItem>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixLeftWing>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixRightWing>.instance.ItemDef, 1); self.inventory.GiveItemPermanent(ItemBase<NeoMithrixLimb>.instance.ItemDef, 1); self.inventory.SetEquipmentIndex(EliteBase<NeoElite>.instance.EliteEquip.equipmentIndex, true); Debug.Log((object)"Giving IT mithrix item."); } } } } public class NeoMithrixItem : ItemBase<NeoMithrixItem> { 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)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("neo_chestplate.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() { //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) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "chest", localPos = new Vector3(-0.02253f, -0.24776f, 0.26671f), localAngles = new Vector3(340.4726f, 7.2708f, 350.1845f), localScale = new Vector3(13.03703f, 14.24153f, 15.06375f) } }); 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) || GetCount(sender) <= 0) { return; } if (sender.GetBuffCount(ThornRing.frostbite) > 0) { for (int i = 0; i < sender.GetBuffCount(ThornRing.frostbite); i++) { sender.RemoveBuff(ThornRing.frostbite); Debug.Log((object)"Removing fortbite stacks!"); } } args.healthMultAdd += 8f; args.armorTotalMult += 0.5f; args.attackSpeedMultAdd += 2f; args.critDamageMultAdd += 2f; args.critAdd += 1.25f; args.regenMultAdd += 2f; args.damageMultAdd += 2f; } public override void Init() { CreateItem(); CreateLang(); Hooks(); } } public class NeoMithrixLeftWing : ItemBase<NeoMithrixLeftWing> { public override string ItemName => "NEO_MITHRIX_LEFT_WING_DISPLAY_ITEM"; public override string ItemLangTokenName => "NEO_MITHRIX_LEFT_WING_DISPLAY_ITEM"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("neo_left_wing.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() { //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) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "chest", localPos = new Vector3(-0.24608f, 0.298f, -0.2235f), localAngles = new Vector3(22.15644f, 326.9847f, 325.871f), localScale = new Vector3(32.06147f, 23.74224f, 9.22609f) } }); return val; } public override void Hooks() { } public override void Init() { CreateItem(); CreateLang(); } } public class NeoMithrixLimb : ItemBase<NeoMithrixLimb> { public override string ItemName => "NEO_MITHRIX_LIMB_DISPLAY_ITEM"; public override string ItemLangTokenName => "NEO_MITHRIX_LIMB_DISPLAY_ITEM"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("neo_limb.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() { //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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: 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_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[4] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmR", localPos = new Vector3(2.21972f, -0.3514f, 0.97877f), localAngles = new Vector3(359.5706f, 336.0472f, 355.0849f), localScale = new Vector3(50.67373f, 10.90218f, 37.61541f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfL", localPos = new Vector3(1.69327f, -0.87295f, -2.68867f), localAngles = new Vector3(357.1952f, 58.53083f, 350.397f), localScale = new Vector3(68.1146f, 14.93527f, 46.738f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "CalfR", localPos = new Vector3(2.03953f, 1.32916f, 2.46837f), localAngles = new Vector3(358.2022f, 130.2431f, 171.4975f), localScale = new Vector3(68.1146f, 14.93527f, 46.738f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "LowerArmL", localPos = new Vector3(2.66172f, 0.04324f, MathF.E * -147f / 292f), localAngles = new Vector3(8.13478f, 26.6752f, 5.05343f), localScale = new Vector3(60.19924f, 12.65326f, 39.0168f) } }); return val; } public override void Hooks() { } public override void Init() { CreateItem(); CreateLang(); } } public class NeoMithrixRightWing : ItemBase<NeoMithrixRightWing> { public override string ItemName => "NEO_MITHRIX_RIGHT_WING_DISPLAY_ITEM"; public override string ItemLangTokenName => "NEO_MITHRIX_RIGHT_WING_DISPLAY_ITEM"; public override string ItemPickupDesc => ""; public override string ItemFullDescription => ""; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)11; public override GameObject ItemModel => DeltarunePlugin.MainAssets.LoadAsset<GameObject>("neo_right_wing.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() { //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) ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemModel, childName = "chest", localPos = new Vector3(0.34145f, 0.30649f, -0.20338f), localAngles = new Vector3(349.2747f, 212.71f, 321.6776f), localScale = new Vector3(40.64867f, 23.74224f, 9.22609f) } }); return val; } public override void Hooks() { } public override void Init() { CreateItem(); CreateLang(); } } } 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)11; 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.CreateEffectPrefab(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.09