Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of RobItems v1.3.1
RobItems.dll
Decompiled 2 days 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.Collections.ObjectModel; 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.Bootstrap; using BepInEx.Configuration; using EntityStates; using HarmonyLib; using IL.RoR2; using KinematicCharacterController; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.RoR2; using On.RoR2.Items; using On.RoR2.UI.MainMenu; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired.ComponentControls.Effects; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.ContentManagement; using RoR2.EntityLogic; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.UI; using RoR2.UI.MainMenu; using RobItems.Components; using RobItems.Content; using RobItems.Modules; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; [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("RobItems")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("RobItems")] [assembly: AssemblyTitle("RobItems")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace RobItems { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.rob.RobItems", "RobItems", "1.3.1")] [R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "DirectorAPI", "LoadoutAPI", "UnlockableAPI", "NetworkingAPI", "RecalculateStatsAPI" })] public class Plugin : BaseUnityPlugin { public const string MODUID = "com.rob.RobItems"; public List<ItemBase> Items = new List<ItemBase>(); public static HashSet<ItemDef> BlacklistedFromPrinter = new HashSet<ItemDef>(); public static ExpansionDef RobItemsExpansionDef = ScriptableObject.CreateInstance<ExpansionDef>(); public static Dictionary<ItemBase, bool> ItemStatusDictionary = new Dictionary<ItemBase, bool>(); public static Action onFinishScanning; public static bool rooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public static bool ancientWispInstalled => Chainloader.PluginInfos.ContainsKey("com.Moffein.AncientWisp"); private void Awake() { //IL_00a2: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown Config.myConfig = ((BaseUnityPlugin)this).Config; RobAssets.PopulateAssets(); Config.Init(); 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(((BaseUnityPlugin)this).Config); } } Helpers.NewCraftableDef(Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/IncreaseHealing/IncreaseHealing.asset").WaitForCompletion(), Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/DeathMark/DeathMark.asset").WaitForCompletion(), Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/NovaOnHeal/NovaOnHeal.asset").WaitForCompletion()); Helpers.NewCraftableDef(Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/NovaOnHeal/NovaOnHeal.asset").WaitForCompletion(), Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/TPHealingNova/TPHealingNova.asset").WaitForCompletion(), Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/IncreaseHealing/IncreaseHealing.asset").WaitForCompletion()); ShopTerminalBehavior.GenerateNewPickupServer_bool += new Manipulator(ItemBase.BlacklistFromPrinter); ContagiousItemManager.Init += new hook_Init(ItemBase.RegisterVoidPairings); onFinishScanning?.Invoke(); new ContentPacks().Initialize(); } public bool ValidateItem(ItemBase item, List<ItemBase> itemList) { bool value = Config.ItemEnableConfig("Item: " + item.ItemInternalName).Value; bool value2 = Config.BindAndOptions("Item: " + item.ItemInternalName, "Blacklist Item from AI Use?", defaultValue: false, "Should the AI not be able to obtain this item?").Value; bool value3 = Config.BindAndOptions("Item: " + item.ItemInternalName, "Blacklist Item from Printers?", defaultValue: false, "Should the printers be able to print this item?").Value; ItemStatusDictionary.Add(item, value); if (value) { itemList.Add(item); if (value2) { item.AIBlacklisted = true; } if (value3) { item.PrinterBlacklisted = true; } } return value; } public void GenerateExpansionDef() { LanguageAPI.Add("ROBITEMS_EXPANSION_DEF_NAME", "RobItems"); LanguageAPI.Add("ROBITEMS_EXPANSION_DEF_DESCRIPTION", "A whole world of weird items, equipment, elites, and interactables await you."); RobItemsExpansionDef.descriptionToken = "ROBITEMS_EXPANSION_DEF_DESCRIPTION"; RobItemsExpansionDef.nameToken = "ROBITEMS_EXPANSION_DEF_NAME"; RobItemsExpansionDef.iconSprite = null; RobItemsExpansionDef.disabledIconSprite = null; ContentAddition.AddExpansionDef(RobItemsExpansionDef); } } } namespace RobItems.Modules { internal static class Buffs { internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isHidden = false) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance<BuffDef>(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isHidden = isHidden; ContentAddition.AddBuffDef(val); return val; } } internal static class Config { public static ConfigFile myConfig; public static ConfigEntry<bool> enableAncientWispCompat; public static void Init() { InitROO(RobAssets.mainAssetBundle.LoadAsset<Sprite>("texChipIcon"), "sup."); enableAncientWispCompat = BindAndOptions("01 - General", "Enable Ancient Wisp Compat", defaultValue: true, "If true, Legendary Spark will be boss tier and drop from Moffein's Ancient Wisp if that mod is installed. Otherwise it will be a standard red item.", restartRequired: true); } public static void InitROO(Sprite modSprite, string modDescription) { if (Plugin.rooInstalled) { _InitROO(modSprite, modDescription); } } public static void _InitROO(Sprite modSprite, string modDescription) { ModSettingsManager.SetModIcon(modSprite); ModSettingsManager.SetModDescription(modDescription); } public static ConfigEntry<T> BindAndOptions<T>(string section, string name, T defaultValue, string description = "", bool restartRequired = false) { if (string.IsNullOrEmpty(description)) { description = name; } if (restartRequired) { description += " (restart required)"; } ConfigEntry<T> val = myConfig.Bind<T>(section, name, defaultValue, description); if (Plugin.rooInstalled) { TryRegisterOption<T>(val, restartRequired); } return val; } public static ConfigEntry<float> BindAndOptionsSlider(string section, string name, float defaultValue, string description = "", float min = 0f, float max = 20f, bool restartRequired = false) { if (string.IsNullOrEmpty(description)) { description = name; } description = description + " (Default: " + defaultValue + ")"; if (restartRequired) { description += " (restart required)"; } ConfigEntry<float> val = myConfig.Bind<float>(section, name, defaultValue, description); if (Plugin.rooInstalled) { TryRegisterOptionSlider(val, min, max, restartRequired); } return val; } public static ConfigEntry<int> BindAndOptionsSlider(string section, string name, int defaultValue, string description = "", int min = 0, int max = 20, bool restartRequired = false) { if (string.IsNullOrEmpty(description)) { description = name; } description = description + " (Default: " + defaultValue + ")"; if (restartRequired) { description += " (restart required)"; } ConfigEntry<int> val = myConfig.Bind<int>(section, name, defaultValue, description); if (Plugin.rooInstalled) { TryRegisterOptionSlider(val, min, max, restartRequired); } return val; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void TryRegisterOption<T>(ConfigEntry<T> entry, bool restartRequired) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown if (entry is ConfigEntry<float>) { ModSettingsManager.AddOption((BaseOption)new SliderOption(entry as ConfigEntry<float>, new SliderConfig { min = 0f, max = 20f, formatString = "{0:0.00}", restartRequired = restartRequired })); } if (entry is ConfigEntry<int>) { ModSettingsManager.AddOption((BaseOption)new IntSliderOption(entry as ConfigEntry<int>, restartRequired)); } if (entry is ConfigEntry<bool>) { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(entry as ConfigEntry<bool>, restartRequired)); } if (entry is ConfigEntry<string>) { ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(entry as ConfigEntry<string>, restartRequired)); } if (entry is ConfigEntry<KeyboardShortcut>) { ModSettingsManager.AddOption((BaseOption)new KeyBindOption(entry as ConfigEntry<KeyboardShortcut>, restartRequired)); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void TryRegisterOptionSlider(ConfigEntry<int> entry, int min, int max, bool restartRequired) { //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) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown ModSettingsManager.AddOption((BaseOption)new IntSliderOption(entry, new IntSliderConfig { min = min, max = max, formatString = "{0:0.00}", restartRequired = restartRequired })); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void TryRegisterOptionSlider(ConfigEntry<float> entry, float min, float max, bool restartRequired) { //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) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown ModSettingsManager.AddOption((BaseOption)new SliderOption(entry, new SliderConfig { min = min, max = max, formatString = "{0:0.00}", restartRequired = restartRequired })); } internal static ConfigEntry<bool> ItemEnableConfig(string itemName) { return BindAndOptions(itemName, "Enabled", defaultValue: true, "Set to false to disable this item and all its functionality", restartRequired: true); } } internal class ContentPacks : IContentPackProvider { [CompilerGenerated] private sealed class <FinalizeAsync>d__7 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FinalizeAsyncArgs args; public ContentPacks <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <FinalizeAsync>d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GenerateContentPackAsync>d__6 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GetContentPackAsyncArgs args; public ContentPacks <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GenerateContentPackAsync>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; ContentPack.Copy(<>4__this.contentPack, args.output); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <LoadStaticContentAsync>d__5 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LoadStaticContentAsyncArgs args; public ContentPacks <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LoadStaticContentAsync>d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.contentPack.identifier = <>4__this.identifier; <>4__this.contentPack.craftableDefs.Add(RobAssets.craftableDefs.ToArray()); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal ContentPack contentPack = new ContentPack(); public string identifier => "com.rob.RobItems"; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } [IteratorStateMachine(typeof(<LoadStaticContentAsync>d__5))] public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LoadStaticContentAsync>d__5(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(<GenerateContentPackAsync>d__6))] public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GenerateContentPackAsync>d__6(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(<FinalizeAsync>d__7))] public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <FinalizeAsync>d__7(0) { <>4__this = this, args = args }; } } internal static class Helpers { internal static CraftableDef NewCraftableDef(ItemDef item1, ItemDef item2, ItemDef itemResult, int amount = 1) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //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_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)item1) || !Object.op_Implicit((Object)(object)item2) || !Object.op_Implicit((Object)(object)itemResult)) { return null; } CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>(); val.pickup = (Object)(object)itemResult; Recipe[] array = new Recipe[1]; Recipe val2 = new Recipe(); val2.amountToDrop = amount; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (Object)(object)item1 }, new RecipeIngredient { pickup = (Object)(object)item2 } }; array[0] = val2; val.recipes = (Recipe[])(object)array; ((Object)val).name = "cd" + ((Object)item1).name + "To" + ((Object)item2).name; RobAssets.craftableDefs.Add(val); return val; } internal static CraftableDef NewCraftableDef(ItemDef item1, ItemDef item2, EquipmentDef itemResult, int amount = 1) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //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_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)item1) || !Object.op_Implicit((Object)(object)item2) || !Object.op_Implicit((Object)(object)itemResult)) { return null; } CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>(); val.pickup = (Object)(object)itemResult; Recipe[] array = new Recipe[1]; Recipe val2 = new Recipe(); val2.amountToDrop = amount; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (Object)(object)item1 }, new RecipeIngredient { pickup = (Object)(object)item2 } }; array[0] = val2; val.recipes = (Recipe[])(object)array; ((Object)val).name = "cd" + ((Object)item1).name + "To" + ((Object)item2).name; RobAssets.craftableDefs.Add(val); return val; } internal static CraftableDef NewCraftableDef(ItemDef item1, EquipmentDef item2, ItemDef itemResult, int amount = 1) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //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_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)item1) || !Object.op_Implicit((Object)(object)item2) || !Object.op_Implicit((Object)(object)itemResult)) { return null; } CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>(); val.pickup = (Object)(object)itemResult; Recipe[] array = new Recipe[1]; Recipe val2 = new Recipe(); val2.amountToDrop = amount; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (Object)(object)item1 }, new RecipeIngredient { pickup = (Object)(object)item2 } }; array[0] = val2; val.recipes = (Recipe[])(object)array; ((Object)val).name = "cd" + ((Object)item1).name + "To" + ((Object)item2).name; RobAssets.craftableDefs.Add(val); return val; } internal static CraftableDef NewCraftableDef(ItemDef item1, EquipmentDef item2, EquipmentDef itemResult, int amount = 1) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //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_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)item1) || !Object.op_Implicit((Object)(object)item2) || !Object.op_Implicit((Object)(object)itemResult)) { return null; } CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>(); val.pickup = (Object)(object)itemResult; Recipe[] array = new Recipe[1]; Recipe val2 = new Recipe(); val2.amountToDrop = amount; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (Object)(object)item1 }, new RecipeIngredient { pickup = (Object)(object)item2 } }; array[0] = val2; val.recipes = (Recipe[])(object)array; ((Object)val).name = "cd" + ((Object)item1).name + "To" + ((Object)item2).name; RobAssets.craftableDefs.Add(val); return val; } internal static CraftableDef NewCraftableDef(EquipmentDef item1, ItemDef item2, EquipmentDef itemResult, int amount = 1) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //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_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)item1) || !Object.op_Implicit((Object)(object)item2) || !Object.op_Implicit((Object)(object)itemResult)) { return null; } CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>(); val.pickup = (Object)(object)itemResult; Recipe[] array = new Recipe[1]; Recipe val2 = new Recipe(); val2.amountToDrop = amount; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (Object)(object)item1 }, new RecipeIngredient { pickup = (Object)(object)item2 } }; array[0] = val2; val.recipes = (Recipe[])(object)array; ((Object)val).name = "cd" + ((Object)item1).name + "To" + ((Object)item2).name; RobAssets.craftableDefs.Add(val); return val; } internal static CraftableDef NewCraftableDef(EquipmentDef item1, ItemDef item2, ItemDef itemResult, int amount = 1) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //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_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)item1) || !Object.op_Implicit((Object)(object)item2) || !Object.op_Implicit((Object)(object)itemResult)) { return null; } CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>(); val.pickup = (Object)(object)itemResult; Recipe[] array = new Recipe[1]; Recipe val2 = new Recipe(); val2.amountToDrop = amount; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (Object)(object)item1 }, new RecipeIngredient { pickup = (Object)(object)item2 } }; array[0] = val2; val.recipes = (Recipe[])(object)array; ((Object)val).name = "cd" + ((Object)item1).name + "To" + ((Object)item2).name; RobAssets.craftableDefs.Add(val); return val; } } internal static class RobAssets { internal static AssetBundle mainAssetBundle; internal static Shader hotpoo = Resources.Load<Shader>("Shaders/Deferred/HGStandard"); internal static Material commandoMat; public static List<CraftableDef> craftableDefs = new List<CraftableDef>(); public static TMP_FontAsset hgFont; internal static void PopulateAssets() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("RobItems.robitems"); mainAssetBundle = AssetBundle.LoadFromStream(stream); } using (Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("RobItems.RobItemsBank.bnk")) { byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } hgFont = Addressables.LoadAssetAsync<TMP_FontAsset>((object)"RoR2/Base/Common/Fonts/Bombardier/tmpBombDropshadow.asset").WaitForCompletion(); } internal static NetworkSoundEventDef CreateNetworkSoundEventDef(string eventName) { NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>(); val.akId = AkSoundEngine.GetIDFromString(eventName); val.eventName = eventName; ContentAddition.AddNetworkSoundEventDef(val); return val; } internal static void ConvertAllRenderersToHopooShader(GameObject objectToConvert) { //IL_019e: Unknown result type (might be due to invalid IL or missing references) Renderer[] componentsInChildren = objectToConvert.GetComponentsInChildren<Renderer>(); foreach (Renderer val in componentsInChildren) { if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.material) && Object.op_Implicit((Object)(object)val.material.shader) && (Object)(object)val.material.shader != (Object)(object)hotpoo && !Object.op_Implicit((Object)(object)((Component)val).GetComponent<LineRenderer>()) && !((Object)((Component)val).gameObject).name.Contains("meshVial")) { Texture val2 = null; if (val.material.HasProperty("_BumpMap")) { val2 = val.material.GetTexture("_BumpMap"); } Texture val3 = null; float num = 0f; if (val.material.HasProperty("_EmissionMap")) { val3 = val.material.GetTexture("_EmissionMap"); num = 1f; } val.material.shader = hotpoo; if ((Object)(object)val2 != (Object)null) { val.material.SetTexture("_NormalTex", val2); val.material.SetFloat("_NormalStrength", 1f); } if ((Object)(object)val3 != (Object)null) { val.material.SetTexture("_EmTex", val3); val.material.SetFloat("_NormalStrength", 1f); val.material.SetFloat("_EmPower", num); val.material.SetColor("_EmColor", Color.white); } } } } internal static RendererInfo[] SetupRendererInfos(GameObject obj) { //IL_001a: 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) //IL_0049: 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) MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length]; for (int i = 0; i < componentsInChildren.Length; i++) { array[i] = new RendererInfo { defaultMaterial = ((Renderer)componentsInChildren[i]).material, renderer = (Renderer)(object)componentsInChildren[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } return array; } public static GameObject LoadSurvivorModel(string modelName) { GameObject val = mainAssetBundle.LoadAsset<GameObject>(modelName); if ((Object)(object)val == (Object)null) { return null; } return PrefabAPI.InstantiateClone(val, ((Object)val).name, false); } internal static Texture LoadCharacterIcon(string characterName) { return mainAssetBundle.LoadAsset<Texture>("tex" + characterName + "Icon"); } internal static GameObject LoadCrosshair(string crosshairName) { return Resources.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair"); } private static GameObject LoadEffect(string resourceName) { return LoadEffect(resourceName, "", parentToTransform: false); } private static GameObject LoadEffect(string resourceName, string soundName) { return LoadEffect(resourceName, soundName, parentToTransform: false); } private static GameObject LoadEffect(string resourceName, bool parentToTransform) { return LoadEffect(resourceName, "", parentToTransform); } private static GameObject LoadEffect(string resourceName, string soundName, bool parentToTransform) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) GameObject val = mainAssetBundle.LoadAsset<GameObject>(resourceName); val.AddComponent<DestroyOnTimer>().duration = 12f; val.AddComponent<NetworkIdentity>(); val.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2; EffectComponent val2 = val.AddComponent<EffectComponent>(); val2.applyScale = false; val2.effectIndex = (EffectIndex)(-1); val2.parentToReferencedTransform = parentToTransform; val2.positionAtReferencedTransform = true; val2.soundName = soundName; AddNewEffectDef(val, soundName); return val; } internal static void AddNewEffectDef(GameObject effectPrefab) { AddNewEffectDef(effectPrefab, ""); } internal static void AddNewEffectDef(GameObject effectPrefab, string soundName) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown EffectDef val = new EffectDef(); val.prefab = effectPrefab; val.prefabEffectComponent = effectPrefab.GetComponent<EffectComponent>(); val.prefabEffectComponent.soundName = soundName; val.prefabName = ((Object)effectPrefab).name; val.prefabVfxAttributes = effectPrefab.GetComponent<VFXAttributes>(); val.spawnSoundEventName = soundName; ContentAddition.AddEffect(effectPrefab); } public static Material CreateMaterial(string materialName, float emission, Color emissionColor, float normalStrength) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)commandoMat)) { commandoMat = Resources.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponentInChildren<CharacterModel>().baseRendererInfos[0].defaultMaterial; } Material val = Object.Instantiate<Material>(commandoMat); Material val2 = mainAssetBundle.LoadAsset<Material>(materialName); if (!Object.op_Implicit((Object)(object)val2)) { return commandoMat; } ((Object)val).name = materialName; val.SetColor("_Color", val2.GetColor("_Color")); val.SetTexture("_MainTex", val2.GetTexture("_MainTex")); val.SetColor("_EmColor", emissionColor); val.SetFloat("_EmPower", emission); val.SetTexture("_EmTex", val2.GetTexture("_EmissionMap")); val.SetFloat("_NormalStrength", normalStrength); return val; } public static Material CreateMaterial(string materialName) { return CreateMaterial(materialName, 0f); } public static Material CreateMaterial(string materialName, float emission) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return CreateMaterial(materialName, emission, Color.black); } public static Material CreateMaterial(string materialName, float emission, Color emissionColor) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return CreateMaterial(materialName, emission, emissionColor, 0f); } } internal class Utils { public static RendererInfo[] ItemDisplaySetup(GameObject obj, bool debugmode = false) { //IL_008c: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) RobAssets.ConvertAllRenderersToHopooShader(obj); List<Renderer> list = new List<Renderer>(); MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>(); if (componentsInChildren.Length != 0) { list.AddRange((IEnumerable<Renderer>)(object)componentsInChildren); } SkinnedMeshRenderer[] componentsInChildren2 = obj.GetComponentsInChildren<SkinnedMeshRenderer>(); if (componentsInChildren2.Length != 0) { list.AddRange((IEnumerable<Renderer>)(object)componentsInChildren2); } RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[list.Count]; for (int i = 0; i < list.Count; i++) { if (debugmode) { MaterialControllerComponents.HGControllerFinder hGControllerFinder = ((Component)list[i]).gameObject.AddComponent<MaterialControllerComponents.HGControllerFinder>(); hGControllerFinder.Renderer = list[i]; } array[i] = new RendererInfo { defaultMaterial = ((list[i] is SkinnedMeshRenderer) ? list[i].sharedMaterial : list[i].material), renderer = list[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } return array; } public static string OrderManifestLoreFormatter(string deviceName, string estimatedDelivery, string sentTo, string trackingNumber, string devicePickupDesc, string shippingMethod, string orderDetails) { string[] value = new string[19] { "<align=left>Estimated Delivery:<indent=70%>Sent To:</indent></align>", "<align=left>" + estimatedDelivery + "<indent=70%>" + sentTo + "</indent></align>", "", "<indent=1%><style=cIsDamage><size=125%><u> Shipping Details:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0</u></size></style></indent>", "", "<indent=2%>-Order: <style=cIsUtility>" + deviceName + "</style></indent>", "<indent=4%><style=cStack>Tracking Number: " + trackingNumber + "</style></indent>", "", "<indent=2%>-Order Description: " + devicePickupDesc + "</indent>", "", "<indent=2%>-Shipping Method: <style=cIsHealth>" + shippingMethod + "</style></indent>", "", "", "", "<indent=2%>-Order Details: " + orderDetails + "</indent>", "", "", "", "<style=cStack>Delivery being brought to you by the brand new </style><style=cIsUtility>Orbital Drop-Crate System (TM)</style>. <style=cStack><u>No refunds.</u></style>" }; return string.Join("\n", value); } public static void RefreshTimedBuffs(CharacterBody body, BuffDef buffDef, float duration) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body) || body.GetBuffCount(buffDef) <= 0) { return; } foreach (TimedBuff timedBuff in body.timedBuffs) { if (buffDef.buffIndex == timedBuff.buffIndex) { timedBuff.timer = duration; } } } public static void RefreshTimedBuffs(CharacterBody body, BuffDef buffDef, float taperStart, float taperDuration) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body) || body.GetBuffCount(buffDef) <= 0) { return; } int num = 0; foreach (TimedBuff timedBuff in body.timedBuffs) { if (buffDef.buffIndex == timedBuff.buffIndex) { timedBuff.timer = taperStart + (float)num * taperDuration; num++; } } } } } namespace RobItems.Content { public class AwesomePie : ItemBase<AwesomePie> { public static GameObject ItemBodyModelPrefab; public static GameObject pieProjectile; public static GameObject pieProjectileImpactEffect; public override string ItemName => "Freshly-Baked Pie"; public override string ItemInternalName => "AwesomePie"; public override string ItemLangTokenName => "PIE"; public override string ItemPickupDesc => "Chance to throw fresh pies."; public override string ItemFullDescription => "<style=cIsDamage>10%</style> chance to throw a pie that deals <style=cIsDamage>400%</style> <style=cStack>(+400% per stack)</style> TOTAL damage."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)1; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override string CorruptsItem => ""; public override GameObject ItemModel => RobAssets.mainAssetBundle.LoadAsset<GameObject>("mdlPie"); public override Sprite ItemIcon => RobAssets.mainAssetBundle.LoadAsset<Sprite>("texPieIcon"); public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateItem(); CreateProjectile(); Hooks(); } private void CreateProjectile() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: 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_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) pieProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(), "RobPieProjectile", true); pieProjectile.AddComponent<RocketRotation>(); pieProjectile.AddComponent<DelayedGravity>(); ProjectileController component = pieProjectile.GetComponent<ProjectileController>(); ProjectileDamage component2 = pieProjectile.GetComponent<ProjectileDamage>(); ProjectileSimple component3 = pieProjectile.GetComponent<ProjectileSimple>(); ProjectileImpactExplosion component4 = pieProjectile.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component4).blastRadius = 5f; pieProjectileImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Treebot/OmniExplosionVFXTreebotSeedPodMortar.prefab").WaitForCompletion(), "RobPieImpact", true); if (!Object.op_Implicit((Object)(object)pieProjectileImpactEffect.GetComponent<NetworkIdentity>())) { pieProjectileImpactEffect.AddComponent<NetworkIdentity>(); } pieProjectileImpactEffect.GetComponent<EffectComponent>().soundName = "sfx_rob_pie_impact"; Material val = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Loader/matOmniHitspark1Loader.mat").WaitForCompletion()); val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/ColorRamps/texRampParent.png").WaitForCompletion()); ((Renderer)((Component)pieProjectileImpactEffect.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>()).material = val; ((Renderer)((Component)pieProjectileImpactEffect.transform.GetChild(1)).GetComponent<ParticleSystemRenderer>()).material = val; ((Renderer)((Component)pieProjectileImpactEffect.transform.GetChild(5)).GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matOmniRing2.mat").WaitForCompletion(); ((Component)pieProjectileImpactEffect.transform.GetChild(7)).gameObject.SetActive(false); ((Component)pieProjectileImpactEffect.transform.GetChild(9)).gameObject.SetActive(false); ((Component)pieProjectileImpactEffect.transform.GetChild(12)).gameObject.SetActive(false); pieProjectileImpactEffect.GetComponentInChildren<Light>().color = new Color(1f, 41f / 51f, 0f, 1f); val = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matOpaqueDustLight.mat").WaitForCompletion()); val.SetColor("_TintColor", new Color(0.7647059f, 0f, 1f, 1f)); val.SetColor("_EmissionColor", new Color(0.5019608f, 0.09019608f, 28f / 51f, 1f)); ((Renderer)((Component)pieProjectileImpactEffect.transform.GetChild(2)).GetComponent<ParticleSystemRenderer>()).material = val; pieProjectileImpactEffect.transform.GetChild(2).localScale = Vector3.one * 1.5f; Object.Destroy((Object)(object)pieProjectileImpactEffect.GetComponent<OmniEffect>()); ((Component)pieProjectileImpactEffect.transform.GetChild(0)).gameObject.SetActive(true); ((Component)pieProjectileImpactEffect.transform.GetChild(1)).gameObject.SetActive(true); ((Component)pieProjectileImpactEffect.transform.GetChild(2)).gameObject.SetActive(true); ((Component)pieProjectileImpactEffect.transform.GetChild(3)).gameObject.SetActive(true); ((Component)pieProjectileImpactEffect.transform.GetChild(4)).gameObject.SetActive(true); ((Component)pieProjectileImpactEffect.transform.GetChild(5)).gameObject.SetActive(true); ((Component)pieProjectileImpactEffect.transform.GetChild(8)).gameObject.SetActive(false); ((Component)pieProjectileImpactEffect.transform.GetChild(10)).gameObject.SetActive(true); ((Component)pieProjectileImpactEffect.transform.GetChild(11)).gameObject.SetActive(true); GameObject val2 = PrefabAPI.InstantiateClone(RobAssets.mainAssetBundle.LoadAsset<GameObject>("PieGhost"), "RobPieGhost", false); val2.AddComponent<ProjectileGhostController>(); val2.AddComponent<EnableOneRandomChild>(); RobAssets.ConvertAllRenderersToHopooShader(val2); component.ghostPrefab = val2; ContentAddition.AddEffect(pieProjectileImpactEffect); component4.lifetimeExpiredSound = RobAssets.CreateNetworkSoundEventDef("sfx_rob_pie_throw"); component4.offsetForLifetimeExpiredSound = 0.1f; component4.destroyOnEnemy = false; component4.destroyOnWorld = false; component4.timerAfterImpact = true; ((ProjectileExplosion)component4).falloffModel = (FalloffModel)1; component4.lifetime = 12f; component4.lifetimeAfterImpact = 0f; component4.lifetimeRandomOffset = 0f; ((ProjectileExplosion)component4).blastDamageCoefficient = 1f; ((ProjectileExplosion)component4).blastProcCoefficient = 0f; ((ProjectileExplosion)component4).fireChildren = false; ((ProjectileExplosion)component4).childrenCount = 0; ((ProjectileExplosion)component4).childrenProjectilePrefab = null; ((ProjectileExplosion)component4).childrenDamageCoefficient = 0f; component4.impactEffect = pieProjectileImpactEffect; component.startSound = ""; component.procCoefficient = 0f; component2.crit = false; component2.damage = 0f; component2.damageColorIndex = (DamageColorIndex)0; component2.force = 0f; ContentAddition.AddProjectile(pieProjectile); } private void CreateConfig(ConfigFile config) { } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_0116: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: 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_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0398: 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_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: 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_05ce: 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_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_0641: Unknown result type (might be due to invalid IL or missing references) //IL_0646: 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_0661: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_067c: 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_0682: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06d9: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0714: 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_0730: Unknown result type (might be due to invalid IL or missing references) //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_076c: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07a2: Unknown result type (might be due to invalid IL or missing references) //IL_07a7: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Unknown result type (might be due to invalid IL or missing references) //IL_07c3: Unknown result type (might be due to invalid IL or missing references) //IL_07cc: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_07ff: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_081a: Unknown result type (might be due to invalid IL or missing references) //IL_0830: Unknown result type (might be due to invalid IL or missing references) //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_083a: Unknown result type (might be due to invalid IL or missing references) //IL_083b: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Unknown result type (might be due to invalid IL or missing references) //IL_085f: Unknown result type (might be due to invalid IL or missing references) //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_08a8: 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_08c3: 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_08cd: Unknown result type (might be due to invalid IL or missing references) //IL_08ce: Unknown result type (might be due to invalid IL or missing references) //IL_08e9: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: 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_0925: 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_0956: Unknown result type (might be due to invalid IL or missing references) //IL_095b: Unknown result type (might be due to invalid IL or missing references) //IL_0960: Unknown result type (might be due to invalid IL or missing references) //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_097c: Unknown result type (might be due to invalid IL or missing references) //IL_0985: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09b8: Unknown result type (might be due to invalid IL or missing references) //IL_09ce: Unknown result type (might be due to invalid IL or missing references) //IL_09d3: Unknown result type (might be due to invalid IL or missing references) //IL_09e9: Unknown result type (might be due to invalid IL or missing references) //IL_09ee: Unknown result type (might be due to invalid IL or missing references) //IL_09f3: Unknown result type (might be due to invalid IL or missing references) //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) //IL_0a18: Unknown result type (might be due to invalid IL or missing references) //IL_0a46: Unknown result type (might be due to invalid IL or missing references) //IL_0a4b: Unknown result type (might be due to invalid IL or missing references) //IL_0a61: Unknown result type (might be due to invalid IL or missing references) //IL_0a66: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0a81: Unknown result type (might be due to invalid IL or missing references) //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a87: Unknown result type (might be due to invalid IL or missing references) //IL_0aa2: Unknown result type (might be due to invalid IL or missing references) //IL_0aab: Unknown result type (might be due to invalid IL or missing references) //IL_0ad9: Unknown result type (might be due to invalid IL or missing references) //IL_0ade: Unknown result type (might be due to invalid IL or missing references) //IL_0af4: Unknown result type (might be due to invalid IL or missing references) //IL_0af9: Unknown result type (might be due to invalid IL or missing references) //IL_0b0f: Unknown result type (might be due to invalid IL or missing references) //IL_0b14: Unknown result type (might be due to invalid IL or missing references) //IL_0b19: Unknown result type (might be due to invalid IL or missing references) //IL_0b1a: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0b3e: Unknown result type (might be due to invalid IL or missing references) //IL_0b6c: Unknown result type (might be due to invalid IL or missing references) //IL_0b71: Unknown result type (might be due to invalid IL or missing references) //IL_0b87: Unknown result type (might be due to invalid IL or missing references) //IL_0b8c: Unknown result type (might be due to invalid IL or missing references) //IL_0ba2: Unknown result type (might be due to invalid IL or missing references) //IL_0ba7: Unknown result type (might be due to invalid IL or missing references) //IL_0bac: Unknown result type (might be due to invalid IL or missing references) //IL_0bad: Unknown result type (might be due to invalid IL or missing references) //IL_0bc8: Unknown result type (might be due to invalid IL or missing references) //IL_0bd1: Unknown result type (might be due to invalid IL or missing references) //IL_0bff: Unknown result type (might be due to invalid IL or missing references) //IL_0c04: Unknown result type (might be due to invalid IL or missing references) //IL_0c1a: Unknown result type (might be due to invalid IL or missing references) //IL_0c1f: Unknown result type (might be due to invalid IL or missing references) //IL_0c35: Unknown result type (might be due to invalid IL or missing references) //IL_0c3a: Unknown result type (might be due to invalid IL or missing references) //IL_0c3f: Unknown result type (might be due to invalid IL or missing references) //IL_0c40: Unknown result type (might be due to invalid IL or missing references) ItemBodyModelPrefab = RobAssets.mainAssetBundle.LoadAsset<GameObject>("DisplayPie"); ItemDisplay val = ItemBodyModelPrefab.AddComponent<ItemDisplay>(); val.rendererInfos = Utils.ItemDisplaySetup(ItemBodyModelPrefab); ItemDisplayRuleDict val2 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val2.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Head", localPos = new Vector3(0f, 0.37828f, -1E-05f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.07975f, 0.07975f, 0.07975f) } }); val2.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "ThighR", localPos = new Vector3(-0.10419f, 0.14945f, 0.07268f), localAngles = new Vector3(4.05035f, 30.11378f, 100.932f), localScale = new Vector3(0.05912f, 0.05912f, 0.05912f) } }); val2.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Hip", localPos = new Vector3(-0.59383f, 0.38539f, 1.48411f), localAngles = new Vector3(354.2642f, 351.2072f, 147.1327f), localScale = new Vector3(0.63697f, 0.63697f, 0.63697f) } }); val2.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "CannonHeadR", localPos = new Vector3(0f, 0.01861f, 0.0931f), localAngles = new Vector3(74.52697f, 180f, 180f), localScale = new Vector3(0.09299f, 0.09299f, 0.09299f) } }); val2.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Chest", localPos = new Vector3(-0.08007f, 0.29128f, -0.03731f), localAngles = new Vector3(17.90203f, 335.5591f, 25.53785f), localScale = new Vector3(0.04496f, 0.04496f, 0.04496f) } }); val2.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "ClavicleR", localPos = new Vector3(0.07168f, 0.10448f, -0.10009f), localAngles = new Vector3(279.2579f, 1E-05f, 332.1362f), localScale = new Vector3(0.07689f, 0.07689f, 0.07689f) } }); val2.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "FlowerBase", localPos = new Vector3(-0.52454f, 0.5604f, 0f), localAngles = new Vector3(0f, 0f, 348.033f), localScale = new Vector3(0.26775f, 0.26775f, 0.26775f) } }); val2.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "MechHandR", localPos = new Vector3(0f, 0.08609f, 0.02985f), localAngles = new Vector3(0.16855f, 0f, 0f), localScale = new Vector3(0.20373f, 0.29487f, 0.20373f) } }); val2.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "UpperArmR", localPos = new Vector3(0.80725f, 2.26472f, 0.31656f), localAngles = new Vector3(10.6713f, 329.1888f, 287.2493f), localScale = new Vector3(1.01134f, 1.01134f, 1.01134f) } }); val2.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "ThighL", localPos = new Vector3(0.08273f, 0.33643f, 0.02572f), localAngles = new Vector3(332.3598f, 337.3707f, 282.9324f), localScale = new Vector3(0.11047f, 0.11047f, 0.11047f) } }); val2.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Pelvis", localPos = new Vector3(0.08643f, -0.00976f, -0.17556f), localAngles = new Vector3(312.4219f, 177.7703f, 175.3371f), localScale = new Vector3(0.04879f, 0.04879f, 0.04879f) } }); val2.Add("RobDriverBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Pelvis", localPos = new Vector3(0.18012f, 0.05259f, -0.03364f), localAngles = new Vector3(359.1773f, 191.7485f, 106.2844f), localScale = new Vector3(0.04879f, 0.04879f, 0.04879f) } }); val2.Add("RobRavagerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Sword", localPos = new Vector3(1E-05f, -0.15967f, -0.04171f), localAngles = new Vector3(282.4446f, 336.3754f, 21.10846f), localScale = new Vector3(0.04879f, 0.04879f, 0.04879f) } }); val2.Add("RobHunkBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Chest", localPos = new Vector3(14.87735f, 10.22004f, -7.63679f), localAngles = new Vector3(4.76658f, 53.92681f, 282.4793f), localScale = new Vector3(7.21967f, 7.21967f, 7.21967f) } }); val2.Add("RobBelmontBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Pelvis", localPos = new Vector3(0.23021f, -0.07659f, -0.0993f), localAngles = new Vector3(359.1773f, 191.7485f, 124.6783f), localScale = new Vector3(0.06185f, 0.06185f, 0.06185f) } }); val2.Add("RobDanteBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Pelvis", localPos = new Vector3(0.23021f, -0.07659f, -0.0993f), localAngles = new Vector3(359.1773f, 191.7485f, 124.6783f), localScale = new Vector3(0.06185f, 0.06185f, 0.06185f) } }); val2.Add("RocketRacBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Muzzle", localPos = new Vector3(0.22959f, -0.01084f, -0.10252f), localAngles = new Vector3(7.26587f, 181.5724f, 90.93324f), localScale = new Vector3(0.06185f, 0.06185f, 0.06185f) } }); val2.Add("Executioner2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Gun", localPos = new Vector3(0.06176f, 0.27819f, 0f), localAngles = new Vector3(0f, 0f, 49.03857f), localScale = new Vector3(0.06952f, 0.06952f, 0.06952f) } }); val2.Add("NemCommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Chest", localPos = new Vector3(0f, 1.81438f, -1.01009f), localAngles = new Vector3(332.5974f, 0f, 0f), localScale = new Vector3(0.41388f, 0.41388f, 0.41388f) } }); val2.Add("ChirrBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Chest", localPos = new Vector3(0.10636f, 0.6198f, 0.36443f), localAngles = new Vector3(3.05622f, 142.962f, 70.08968f), localScale = new Vector3(0.25959f, 0.25959f, 0.25959f) } }); val2.Add("NemMercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Pelvis", localPos = new Vector3(-0.18609f, 0.06135f, -0.06585f), localAngles = new Vector3(15.82456f, 180f, 209.9806f), localScale = new Vector3(0.05858f, 0.05858f, 0.05858f) } }); return val2; } 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 HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo); if (!Object.op_Implicit((Object)(object)damageInfo.attacker)) { return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && Object.op_Implicit((Object)(object)component.master)) { int itemCount = component.inventory.GetItemCount(ItemBase<AwesomePie>.instance.ItemDef); if (itemCount > 0 && damageInfo.damage > 0f && Util.CheckRoll(10f * damageInfo.procCoefficient, component.master)) { ProjectileManager obj = ProjectileManager.instance; FireProjectileInfo val = new FireProjectileInfo { crit = Util.CheckRoll(component.crit, 0f, (CharacterMaster)null), damage = damageInfo.damage * 4f * (float)itemCount, damageColorIndex = (DamageColorIndex)0, force = 20f, owner = ((Component)component).gameObject, position = component.aimOrigin, procChainMask = default(ProcChainMask), projectilePrefab = pieProjectile, rotation = Util.QuaternionSafeLookRotation(component.inputBank.aimDirection) }; ((FireProjectileInfo)(ref val)).speedOverride = 60f; val._speedOverride = 60f; val.useFuseOverride = false; val.useSpeedOverride = true; obj.FireProjectileServer(val, (NetworkConnection)null, (ushort)0, 0.0); } } } } public class Bident : ItemBase<Bident> { public static GameObject ItemBodyModelPrefab; public static GameObject bidentProjectile; public static GameObject bidentProjectileImpactEffect; public static GameObject bidentHellfire; public static GameObject bidentReturnEffect; public static BuffDef bidentReadyBuff; public static GameObject orbEffect; public static ConfigEntry<bool> enableLightningEffect; public static ConfigEntry<string> impactSoundString; public override string ItemName => "Accursed Bident"; public override string ItemInternalName => "Bident"; public override string ItemLangTokenName => "BIDENT"; public override string ItemPickupDesc => "Activating your Primary skill throws a Bident that strikes with savage hellfire and then returns to you. <style=cIsVoid>Corrupts all Tridents of Retribution.</style>"; public override string ItemFullDescription => "Activating your <style=cIsUtility>Primary</style> skill throws a Bident that deals <style=cIsDamage>4x100%</style> <style=cStack>(+100% per stack)</style> base damage. Can't be thrown again until it returns to you. <style=cIsVoid>Corrupts all Tridents of Retribution.</style>"; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)8; public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override string CorruptsItem => "TRIDENT"; public override GameObject ItemModel => RobAssets.mainAssetBundle.LoadAsset<GameObject>("mdlBident"); public override Sprite ItemIcon => RobAssets.mainAssetBundle.LoadAsset<Sprite>("texBidentIcon"); public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuffs(); CreateItem(); CreateProjectile(); CreateVisuals(); Hooks(); } private void CreateVisuals() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //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_00c6: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0267: 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_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) orbEffect = PrefabAPI.InstantiateClone(Resources.Load<GameObject>("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), "RobBidentOrbEffect", true); if (!Object.op_Implicit((Object)(object)orbEffect.GetComponent<NetworkIdentity>())) { orbEffect.AddComponent<NetworkIdentity>(); } TrailRenderer component = ((Component)orbEffect.transform.Find("TrailParent").Find("Trail")).GetComponent<TrailRenderer>(); component.widthMultiplier = 0.35f; ((Renderer)component).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/MagmaWorm/matMagmaWormFireballTrail.mat").WaitForCompletion(); Material val = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Loader/matOmniRing2Loader.mat").WaitForCompletion()); val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/ColorRamps/texRampHelfire.png").WaitForCompletion()); val.SetColor("_TintColor", Color.white); Material val2 = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Grandparent/matGrandParentSunGlow.mat").WaitForCompletion()); val2.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/ColorRamps/texRampHuntressSoft2.png").WaitForCompletion()); val2.SetColor("_TintColor", Color.white); ((Renderer)((Component)orbEffect.transform.Find("VFX").Find("Core")).GetComponent<ParticleSystemRenderer>()).material = val; orbEffect.transform.Find("VFX").localScale = Vector3.one * 0.5f; orbEffect.transform.Find("VFX").Find("Core").localScale = Vector3.one * 3f; ((Renderer)((Component)orbEffect.transform.Find("VFX").Find("PulseGlow")).GetComponent<ParticleSystemRenderer>()).material = val2; orbEffect.transform.Find("VFX").Find("PulseGlow").localScale = Vector3.one * 0.5f; orbEffect.GetComponent<OrbEffect>().endEffect = bidentReturnEffect; GameObject val3 = Object.Instantiate<GameObject>(ItemBodyModelPrefab); val3.transform.parent = orbEffect.transform; val3.transform.localPosition = new Vector3(0f, 0f, -1.5f); val3.transform.localRotation = Quaternion.Euler(new Vector3(0f, 0f, 90f)); val3.transform.localScale = Vector3.one * 4f; RobAssets.AddNewEffectDef(orbEffect); } private void CreateBuffs() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) bidentReadyBuff = Buffs.AddNewBuff("buffRobBidentReady", null, Color.red, canStack: false, isDebuff: false, isHidden: true); } private void CreateProjectile() { //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_0111: 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_013f: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0192: 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_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) if (enableLightningEffect.Value) { bidentProjectileImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lightning/LightningStrikeImpact.prefab").WaitForCompletion(), "RobBidentImpact"); ((Component)bidentProjectileImpactEffect.transform.Find("PostProcess")).gameObject.SetActive(false); ((Component)bidentProjectileImpactEffect.transform.Find("LightningRibbon")).GetComponent<ParticleSystemRenderer>().trailMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/MagmaWorm/matMagmaWormFireballTrail.mat").WaitForCompletion(); ((Component)bidentProjectileImpactEffect.transform.Find("LightningRibbon")).transform.localScale = new Vector3(0.75f, 0.3f, 0.75f); ((Component)bidentProjectileImpactEffect.transform.Find("Flash Lines")).gameObject.SetActive(false); ((Component)bidentProjectileImpactEffect.transform.Find("Ring")).gameObject.SetActive(false); Transform obj = bidentProjectileImpactEffect.transform.Find("Flash"); obj.localScale *= 0.15f; ((Component)bidentProjectileImpactEffect.transform.Find("Point light")).GetComponent<Light>().color = Color.red; Transform obj2 = bidentProjectileImpactEffect.transform.Find("Sphere"); obj2.localScale *= 0.5f; ((Renderer)((Component)bidentProjectileImpactEffect.transform.Find("Sphere")).GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidSurvivor/matVoidSuvivorEnterCorruptionSphere2.mat").WaitForCompletion(); Light componentInChildren = bidentProjectileImpactEffect.GetComponentInChildren<Light>(); componentInChildren.range *= 0.25f; bidentProjectileImpactEffect.GetComponent<ShakeEmitter>().wave.amplitude *= 0.1f; RobAssets.AddNewEffectDef(bidentProjectileImpactEffect, "sfx_rob_bident_lightning"); } else { bidentProjectileImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/OmniImpactVFXLoaderLightning.prefab").WaitForCompletion(), "RobBridentImpact"); bidentProjectileImpactEffect.AddComponent<PlaySoundOnAwake>().soundString = impactSoundString.Value; RobAssets.AddNewEffectDef(bidentProjectileImpactEffect, impactSoundString.Value); } bidentReturnEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercExposeConsumeEffect.prefab").WaitForCompletion(), "RobBidentReturnEffect"); Material val = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Merc/matMercExposed.mat").WaitForCompletion()); val.SetColor("_TintColor", Color.red); val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/ColorRamps/texRampGolem.png").WaitForCompletion()); ((Renderer)((Component)bidentReturnEffect.transform.Find("Visual, Consumed/PulseEffect, Ring (1)")).gameObject.GetComponent<ParticleSystemRenderer>()).material = val; ((Component)bidentReturnEffect.transform.Find("Visual, Consumed/PulseEffect, Backdrop")).gameObject.SetActive(false); ((Component)bidentReturnEffect.transform.Find("Visual, Consumed/PulseEffect, Slash")).gameObject.SetActive(false); RobAssets.AddNewEffectDef(bidentReturnEffect); bidentHellfire = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/LoaderZapCone.prefab").WaitForCompletion(), "RobBidentHellfire", true); Object.Destroy((Object)(object)bidentHellfire.GetComponent<ProjectileProximityBeamController>()); Object.Destroy((Object)(object)bidentHellfire.GetComponent<DelayedEvent>()); Object.Destroy((Object)(object)bidentHellfire.GetComponent<StartEvent>()); bidentHellfire.AddComponent<Hellfire>(); bidentProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(), "RobBidentProjectile", true); bidentProjectile.AddComponent<RocketRotation>(); bidentProjectile.AddComponent<DelayedGravity>(); bidentProjectile.AddComponent<BidentReturn>(); ProjectileController component = bidentProjectile.GetComponent<ProjectileController>(); ProjectileDamage component2 = bidentProjectile.GetComponent<ProjectileDamage>(); ProjectileImpactExplosion component3 = bidentProjectile.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component3).blastRadius = 2f; GameObject val2 = PrefabAPI.InstantiateClone(RobAssets.mainAssetBundle.LoadAsset<GameObject>("BidentGhost"), "RobBidentGhost", false); val2.AddComponent<ProjectileGhostController>(); val2.AddComponent<PlaySoundOnAwake>().soundString = "sfx_rob_trident_throw"; RobAssets.ConvertAllRenderersToHopooShader(val2); component.ghostPrefab = val2; Material material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/MagmaWorm/matMagmaWormFireballTrail.mat").WaitForCompletion(); TrailRenderer[] componentsInChildren = val2.GetComponentsInChildren<TrailRenderer>(); foreach (TrailRenderer val3 in componentsInChildren) { if (Object.op_Implicit((Object)(object)val3)) { ((Renderer)val3).material = material; } } component3.lifetimeExpiredSound = null; component3.offsetForLifetimeExpiredSound = 0.1f; component3.destroyOnEnemy = false; component3.destroyOnWorld = false; component3.timerAfterImpact = true; ((ProjectileExplosion)component3).falloffModel = (FalloffModel)1; component3.lifetime = 50f; component3.lifetimeAfterImpact = 0f; component3.lifetimeRandomOffset = 0f; ((ProjectileExplosion)component3).blastDamageCoefficient = 1f; ((ProjectileExplosion)component3).blastProcCoefficient = 1f; ((ProjectileExplosion)component3).fireChildren = true; ((ProjectileExplosion)component3).childrenCount = 1; ((ProjectileExplosion)component3).childrenProjectilePrefab = bidentHellfire; ((ProjectileExplosion)component3).childrenDamageCoefficient = 1f; component3.impactEffect = bidentProjectileImpactEffect; component.startSound = ""; component.procCoefficient = 1f; component2.crit = false; component2.damage = 0f; component2.damageColorIndex = (DamageColorIndex)0; component2.damageType = DamageTypeCombo.op_Implicit((DamageType)16777216); component2.force = 0f; ContentAddition.AddProjectile(bidentProjectile); ContentAddition.AddProjectile(bidentHellfire); } private void CreateConfig(ConfigFile config) { enableLightningEffect = Config.BindAndOptions("Item: Bident", "Enable Lightning Effect", defaultValue: true, "Set to false to remove the lightning VFX on impact", restartRequired: true); impactSoundString = Config.BindAndOptions("Item: Bident", "Impact Sound String", "sfx_rob_trident_impact", "The sound that plays when the Bident hits something. Leave blank for no sound at all.", restartRequired: true); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: 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_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0267: 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_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: 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_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_045c: 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_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid