Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of Crocs Inspired Risk of Rain Experience v1.2.0
CrocsItems.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using CrocsItems.Equipment; using CrocsItems.Interactables; using CrocsItems.Items; using CrocsItems.Items.Greens; using CrocsItems.Items.Jibbitz; using CrocsItems.Items.Reds; using HG.Reflection; using HarmonyLib; using Microsoft.CodeAnalysis; using On.RoR2; using R2API; using RoR2; using RoR2.Navigation; using RoR2.Networking; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("CrocsItems")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+44b53d07775aa52b31d46eec9e76447a538b1121")] [assembly: AssemblyProduct("CrocsItems")] [assembly: AssemblyTitle("CrocsItems")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace CrocsItems { [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)] public class ConfigFieldAttribute : SearchableAttribute { public string name; public string desc; public object defaultValue; public ConfigFieldAttribute(string name, string desc, object defaultValue) { this.name = name; this.desc = desc; this.defaultValue = defaultValue; } } [AttributeUsage(AttributeTargets.Class)] public class ConfigSectionAttribute : Attribute { public string name; public ConfigSectionAttribute(string name) { this.name = name; } } public class ConfigManager { internal static bool ConfigChanged; internal static bool VersionChanged; public static void HandleConfigAttributes(Assembly assembly, ConfigFile config) { //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown Type[] types = assembly.GetTypes(); foreach (Type type in types) { TypeInfo typeInfo = type.GetTypeInfo(); ConfigSectionAttribute customAttribute = typeInfo.GetCustomAttribute<ConfigSectionAttribute>(); if (customAttribute == null) { continue; } FieldInfo[] fields = typeInfo.GetFields(); foreach (FieldInfo fieldInfo in fields) { if (!fieldInfo.IsStatic) { continue; } Type fieldType = fieldInfo.FieldType; ConfigFieldAttribute customAttribute2 = ((MemberInfo)fieldInfo).GetCustomAttribute<ConfigFieldAttribute>(); if (customAttribute2 != null) { MethodInfo methodInfo = (from x in typeof(ConfigFile).GetMethods() where x.Name == "Bind" select x).First(); methodInfo = methodInfo.MakeGenericMethod(fieldType); ConfigEntryBase val = (ConfigEntryBase)methodInfo.Invoke(config, new object[3] { (object)new ConfigDefinition(customAttribute.name, customAttribute2.name), customAttribute2.defaultValue, (object)new ConfigDescription(customAttribute2.desc, (AcceptableValueBase)null, Array.Empty<object>()) }); ConfigEntryBase val2 = (ConfigEntryBase)methodInfo.Invoke(Main.backupConfig, new object[3] { (object)new ConfigDefinition(Regex.Replace(config.ConfigFilePath, "\\W", "") + " : " + customAttribute.name, customAttribute2.name), val.DefaultValue, (object)new ConfigDescription(customAttribute2.desc, (AcceptableValueBase)null, Array.Empty<object>()) }); if (!ConfigEqual(val2.DefaultValue, val2.BoxedValue) && VersionChanged) { val.BoxedValue = val.DefaultValue; val2.BoxedValue = val2.DefaultValue; } if (!ConfigEqual(val.DefaultValue, val.BoxedValue)) { ConfigChanged = true; } fieldInfo.SetValue(null, val.BoxedValue); } } } } private static bool ConfigEqual(object a, object b) { if (a.Equals(b)) { return true; } if (float.TryParse(a.ToString(), out var result) && float.TryParse(b.ToString(), out var result2) && (double)Mathf.Abs(result - result2) < 0.0001) { return true; } return false; } } [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] internal sealed class AutoRunAttribute : Attribute { } internal sealed class AutoRunCollector { public static void HandleAutoRun() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); List<Type> list = types.ToList(); list.RemoveAll(asdf); types = list.ToArray(); Type[] array = types; foreach (Type type in array) { if (!type.FullName.Contains("CustomEmotesAPI")) { continue; } TypeInfo typeInfo = type.GetTypeInfo(); MethodInfo[] methods = typeInfo.GetMethods((BindingFlags)(-1)); foreach (MethodInfo methodInfo in methods) { AutoRunAttribute customAttribute = methodInfo.GetCustomAttribute<AutoRunAttribute>(); if (customAttribute != null && methodInfo.IsStatic) { methodInfo.Invoke(null, null); } } } } private static bool asdf(Type s) { return s.FullName.Contains("CustomEmotesAPI"); } } public class JibbitzDropBehavior { [CompilerGenerated] private static class <>O { public static hook_BaseItemDrop <0>__OnChestItemDrop; } public static List<PickupDropTable> acceptableDropTables = new List<PickupDropTable>(); public static void Init() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__OnChestItemDrop; if (obj == null) { hook_BaseItemDrop val = OnChestItemDrop; <>O.<0>__OnChestItemDrop = val; obj = (object)val; } ChestBehavior.BaseItemDrop += (hook_BaseItemDrop)obj; acceptableDropTables.Add((PickupDropTable)(object)Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"944f7e92dae9bac4d96e05635dcff090").WaitForCompletion()); acceptableDropTables.Add((PickupDropTable)(object)Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"7a61dd0f9e87dab4d9828371f75bf253").WaitForCompletion()); acceptableDropTables.Add((PickupDropTable)(object)Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"abd505260a23e9b449202c055554b77b").WaitForCompletion()); } private static void OnChestItemDrop(orig_BaseItemDrop orig, ChestBehavior self) { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!NetworkServer.active || !Util.CheckRoll(10f, 0f, (CharacterMaster)null) || !acceptableDropTables.Contains(self.dropTable)) { return; } bool flag = false; for (int i = 0; i < CharacterBody.readOnlyInstancesList.Count; i++) { CharacterBody body = CharacterBody.readOnlyInstancesList[i]; if (Main.HasAnyCrocs(body) || Main.HasAnyCrocsEquipment(body)) { flag = true; break; } } if (Object.op_Implicit((Object)(object)Run.instance) && flag) { ItemDef val = Main.jibbitzList[Run.instance.stageRng.RangeInt(0, Main.jibbitzList.Count)]; PickupIndex pickupIndex = PickupCatalog.FindPickupIndex(val.itemIndex); Vector3 val2 = self.dropTransform.position + Vector3.up * 1.5f; Vector3 val3 = Vector3.up * self.dropUpVelocityStrength + self.dropTransform.forward * self.dropForwardVelocityStrength; CreatePickupInfo val4 = default(CreatePickupInfo); val4.rotation = Quaternion.identity; ((CreatePickupInfo)(ref val4)).pickupIndex = pickupIndex; val4.position = val2; PickupDropletController.CreatePickupDroplet(val4, val2, val3); } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("HIFU.CrocsItems", "CrocsItems", "1.2.0")] public class Main : BaseUnityPlugin { public const string PluginGUID = "HIFU.CrocsItems"; public const string PluginAuthor = "HIFU"; public const string PluginName = "CrocsItems"; public const string PluginVersion = "1.2.0"; public static ManualLogSource ModLogger; public static AssetBundle bundle; public static Main Instance; public static ConfigFile config; public static ConfigFile backupConfig; public static Texture2D texRampTritone; public static Texture2D texRampTritone2; public static List<ItemDef> jibbitzList = new List<ItemDef>(); public static List<EquipmentDef> jibbitzListEquipment = new List<EquipmentDef>(); public static List<ItemDef> crocsList = new List<ItemDef>(); public static List<EquipmentDef> crocsListEquipment = new List<EquipmentDef>(); public static Dictionary<ItemIndex, ItemIndex> crocItemToJibbitzPair = new Dictionary<ItemIndex, ItemIndex>(); public static Dictionary<EquipmentIndex, ItemIndex> crocEquipmentToJibbitzPair = new Dictionary<EquipmentIndex, ItemIndex>(); public static ConfigEntry<bool> enableLogging { get; set; } public ConfigEntry<bool> enableAutoConfig { get; private set; } public ConfigEntry<string> latestVersion { get; private set; } public void Awake() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown Instance = this; ModLogger = ((BaseUnityPlugin)this).Logger; SetUpConfig(); SetUpAssets(); SetUpContent(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); CharacterModel.UpdateItemDisplay += new hook_UpdateItemDisplay(OnUpdateItemDisplay); CharacterModel.SetEquipmentDisplay += new hook_SetEquipmentDisplay(OnSetEquipmentDisplay); } private void OnSetEquipmentDisplay(orig_SetEquipmentDisplay orig, CharacterModel self, EquipmentIndex newEquipmentIndex) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_004c: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, newEquipmentIndex); foreach (KeyValuePair<EquipmentIndex, ItemIndex> item in crocEquipmentToJibbitzPair) { EquipmentIndex key = item.Key; ItemIndex value = item.Value; if (newEquipmentIndex != key || self.currentEquipmentDisplayIndex != key) { self.DisableItemDisplay(value); } } } private void OnLoad() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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) if (ItemBase.DefaultEnabledCallback(ItemBase<CrocsSandals>.instance) && ItemBase.DefaultEnabledCallback(ItemBase<SweetTreat>.instance)) { crocItemToJibbitzPair.Add(ItemBase<CrocsSandals>.instance.ItemDef.itemIndex, ItemBase<SweetTreat>.instance.ItemDef.itemIndex); } if (ItemBase.DefaultEnabledCallback(ItemBase<CrocsEchoWave>.instance) && ItemBase.DefaultEnabledCallback(ItemBase<SquishyGlitterStar>.instance)) { crocItemToJibbitzPair.Add(ItemBase<CrocsEchoWave>.instance.ItemDef.itemIndex, ItemBase<SquishyGlitterStar>.instance.ItemDef.itemIndex); } if (EquipmentBase.DefaultEnabledCallback(EquipmentBase<CrocsClassic>.instance) && ItemBase.DefaultEnabledCallback(ItemBase<BlackHeart>.instance)) { crocEquipmentToJibbitzPair.Add(EquipmentBase<CrocsClassic>.instance.EquipmentDef.equipmentIndex, ItemBase<BlackHeart>.instance.ItemDef.itemIndex); } } private void OnUpdateItemDisplay(orig_UpdateItemDisplay orig, CharacterModel self, Inventory inventory) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, inventory); foreach (KeyValuePair<ItemIndex, ItemIndex> item in crocItemToJibbitzPair) { ItemIndex key = item.Key; ItemIndex value = item.Value; if (inventory.GetItemCountEffective(key) <= 0) { self.DisableItemDisplay(value); } } } public void SetUpConfig() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown config = ((BaseUnityPlugin)this).Config; backupConfig = new ConfigFile(Paths.ConfigPath + "\\com.HIFU.CrocsItems.Backup.cfg", true); backupConfig.Bind<string>(": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :"); enableAutoConfig = config.Bind<bool>("Config", "Enable Auto Config Sync", true, "Disabling this would stop CrocsItems from syncing config whenever a new version is found."); bool flag = !((Dictionary<ConfigDefinition, string>)AccessTools.DeclaredPropertyGetter(typeof(ConfigFile), "OrphanedEntries").Invoke(config, null)).Keys.Any((ConfigDefinition x) => x.Key == "Latest Version"); latestVersion = config.Bind<string>("Config", "Latest Version", "1.2.0", "DO NOT CHANGE THIS"); if (enableAutoConfig.Value && (flag || latestVersion.Value != "1.2.0")) { latestVersion.Value = "1.2.0"; ConfigManager.VersionChanged = true; ModLogger.LogInfo((object)"Config Autosync Enabled."); } AutoRunCollector.HandleAutoRun(); ConfigManager.HandleConfigAttributes(Assembly.GetExecutingAssembly(), ((BaseUnityPlugin)this).Config); } public void SetUpAssets() { //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) Shader shader = Addressables.LoadAssetAsync<Shader>((object)"48dca5b99d113b8d11006bab44295342").WaitForCompletion(); bundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)Instance).Info.Location), "crocsitems")); Material[] array = bundle.LoadAllAssets<Material>(); Material[] array2 = array; foreach (Material val in array2) { string name = ((Object)val.shader).name; string text = name; if (text == "StubbedRoR2/Base/Shaders/HGStandard") { val.shader = shader; } } } public void SetUpContent() { //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) texRampTritone = Addressables.LoadAssetAsync<Texture2D>((object)"c2d2c5f1046510242bc50084ffaefe55").WaitForCompletion(); texRampTritone2 = Addressables.LoadAssetAsync<Texture2D>((object)"b2ddb2fde000ae84d957416e656c6d67").WaitForCompletion(); IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(EquipmentBase)) select type; foreach (Type item in enumerable) { EquipmentBase equipmentBase = (EquipmentBase)Activator.CreateInstance(item); if (LoadEquipment(equipmentBase)) { equipmentBase.Init(); } } IEnumerable<Type> enumerable2 = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase)) select type; foreach (Type item2 in enumerable2) { ItemBase itemBase = (ItemBase)Activator.CreateInstance(item2); if (LoadItem(itemBase)) { itemBase.Init(); } } ScanTypes(delegate(InteractableBase x) { if (LoadInteractable(x)) { x.Init(); } }); JibbitzDropBehavior.Init(); } public bool LoadEquipment(EquipmentBase equipment) { return EquipmentBase.DefaultEnabledCallback(equipment); } public bool LoadItem(ItemBase item) { return ItemBase.DefaultEnabledCallback(item); } public bool LoadInteractable(InteractableBase interactable) { return InteractableBase.DefaultEnabledCallback(interactable); } internal static void ScanTypes<T>(Action<T> action) { IEnumerable<Type> enumerable = from x in Assembly.GetExecutingAssembly().GetTypes() where !x.IsAbstract && x.IsSubclassOf(typeof(T)) select x; foreach (Type item in enumerable) { T obj = (T)Activator.CreateInstance(item); action(obj); } } public bool HasAnyJibbit(CharacterBody body) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) bool result = false; Inventory inventory = body.inventory; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)inventory)) { return result; } for (int i = 0; i < jibbitzList.Count; i++) { ItemDef val = jibbitzList[i]; if (inventory.GetItemCount(val.itemIndex) > 0) { result = true; break; } } return result; } public static bool HasAnyCrocs(CharacterBody body) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) bool result = false; Inventory inventory = body.inventory; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)inventory)) { return result; } for (int i = 0; i < crocsList.Count; i++) { ItemDef val = crocsList[i]; if (inventory.GetItemCount(val.itemIndex) > 0) { result = true; break; } } return result; } public static bool HasAnyCrocsEquipment(CharacterBody body) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) bool result = false; EquipmentSlot equipmentSlot = body.equipmentSlot; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)equipmentSlot)) { return result; } for (int i = 0; i < crocsListEquipment.Count; i++) { EquipmentDef val = crocsListEquipment[i]; if (val.equipmentIndex == equipmentSlot.equipmentIndex) { result = true; break; } } return result; } } public class VFXUtils { public static void RecolorMaterialsAndLights(GameObject gameObject, Color32 primaryColor, Color32 emissionAndLightColor, bool convertRampsToGrayscale, bool emissionColorToPrimaryColor = false) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) RecolorMaterialsAndLightsInternal(gameObject, primaryColor, emissionAndLightColor, convertRampsToGrayscale, emissionColorToPrimaryColor); Transform[] componentsInChildren = ((Component)gameObject.transform).GetComponentsInChildren<Transform>(); foreach (Transform val in componentsInChildren) { RecolorMaterialsAndLightsInternal(((Component)val).gameObject, primaryColor, emissionAndLightColor, convertRampsToGrayscale, emissionColorToPrimaryColor); } } private static void RecolorMaterialsAndLightsInternal(GameObject gameObject, Color32 primaryColor, Color32 emissionAndLightColor, bool convertRampsToGrayscale, bool emissionColorToPrimaryColor = false) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0254: 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_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_0286: 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_01b2: 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_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) ParticleSystem[] components = gameObject.GetComponents<ParticleSystem>(); foreach (ParticleSystem val in components) { MainModule main = val.main; MinMaxGradient startColor = ((MainModule)(ref main)).startColor; ((MinMaxGradient)(ref startColor)).mode = (ParticleSystemGradientMode)0; ((MinMaxGradient)(ref startColor)).color = Color32.op_Implicit(primaryColor); ColorOverLifetimeModule colorOverLifetime = val.colorOverLifetime; MinMaxGradient color = ((ColorOverLifetimeModule)(ref colorOverLifetime)).color; if (((MinMaxGradient)(ref color)).gradient != null) { color = ((ColorOverLifetimeModule)(ref colorOverLifetime)).color; if (((MinMaxGradient)(ref color)).gradient.colorKeys.Length != 0) { GradientColorKey[] array = (GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(Color.white, 0f), new GradientColorKey(Color.white, 1f) }; GradientAlphaKey[] array2 = (GradientAlphaKey[])(object)new GradientAlphaKey[2]; array2[0] = new GradientAlphaKey(1f, 0f); array2[0] = new GradientAlphaKey(0f, 1f); color = ((ColorOverLifetimeModule)(ref colorOverLifetime)).color; ((MinMaxGradient)(ref color)).gradient.SetKeys(array, array2); } } } Renderer[] components2 = gameObject.GetComponents<Renderer>(); foreach (Renderer val2 in components2) { Material[] materials = val2.materials; foreach (Material val3 in materials) { switch (((Object)val3.shader).name) { case "Hopoo Games/FX/Cloud Remap": case "Hopoo Games/FX/Opaque Cloud Remap": case "Hopoo Games/FX/Cloud Intersection Remap": val3.SetColor("_TintColor", Color32.op_Implicit(primaryColor)); val3.SetColor("_EmissionColor", Color32.op_Implicit(emissionColorToPrimaryColor ? primaryColor : emissionAndLightColor)); if (convertRampsToGrayscale) { val3.SetTexture("_RemapTex", (Texture)(object)Main.texRampTritone); } break; case "Hopoo Games/Deferred/Standard": val3.SetColor("_Color", Color32.op_Implicit(primaryColor)); val3.SetColor("_EmColor", Color32.op_Implicit(emissionColorToPrimaryColor ? primaryColor : emissionAndLightColor)); break; } } } LineRenderer[] components3 = gameObject.GetComponents<LineRenderer>(); foreach (LineRenderer val4 in components3) { val4.startColor = Color32.op_Implicit(primaryColor); val4.endColor = Color32.op_Implicit(emissionAndLightColor); } Light[] components4 = gameObject.GetComponents<Light>(); foreach (Light val5 in components4) { val5.color = Color32.op_Implicit(emissionAndLightColor); } } public static void MultiplyDuration(GameObject gameObject, float durationMultiplier, float maximumDuration = -999f) { MultiplyDurationInternal(gameObject, durationMultiplier, maximumDuration); Transform[] componentsInChildren = ((Component)gameObject.transform).GetComponentsInChildren<Transform>(); foreach (Transform val in componentsInChildren) { MultiplyDurationInternal(((Component)val).gameObject, durationMultiplier, maximumDuration); } } private static void MultiplyDurationInternal(GameObject gameObject, float durationMultiplier, float maximumDuration = -999f) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 ParticleSystem[] components = gameObject.GetComponents<ParticleSystem>(); foreach (ParticleSystem val in components) { MainModule main = val.main; MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime; float num = ((MinMaxCurve)(ref startLifetime)).constant; if ((int)((MinMaxCurve)(ref startLifetime)).mode == 3) { num = (((MinMaxCurve)(ref startLifetime)).constantMin + ((MinMaxCurve)(ref startLifetime)).constantMax) / 2f; } ((MinMaxCurve)(ref startLifetime)).mode = (ParticleSystemCurveMode)0; ((MinMaxCurve)(ref startLifetime)).constant = num * durationMultiplier; } DestroyOnTimer[] components2 = gameObject.GetComponents<DestroyOnTimer>(); foreach (DestroyOnTimer val2 in components2) { val2.duration *= durationMultiplier; } AnimateShaderAlpha[] components3 = gameObject.GetComponents<AnimateShaderAlpha>(); foreach (AnimateShaderAlpha val3 in components3) { val3.timeMax *= durationMultiplier; if ((Object)(object)((Component)val3).GetComponent<DestroyOnTimer>() != (Object)null) { val3.timeMax = Mathf.Min(val3.timeMax, ((Component)val3).GetComponent<DestroyOnTimer>().duration); } if (maximumDuration > 0f) { val3.timeMax = Mathf.Min(val3.timeMax, maximumDuration); } } PostProcessDuration[] components4 = gameObject.GetComponents<PostProcessDuration>(); foreach (PostProcessDuration val4 in components4) { val4.maxDuration *= durationMultiplier; } ObjectScaleCurve[] components5 = gameObject.GetComponents<ObjectScaleCurve>(); foreach (ObjectScaleCurve val5 in components5) { val5.timeMax *= durationMultiplier; } AnimateUIAlpha[] components6 = gameObject.GetComponents<AnimateUIAlpha>(); foreach (AnimateUIAlpha val6 in components6) { val6.timeMax *= durationMultiplier; } AnimateImageAlpha[] components7 = gameObject.GetComponents<AnimateImageAlpha>(); foreach (AnimateImageAlpha val7 in components7) { val7.timeMax *= durationMultiplier; } LightIntensityCurve[] components8 = gameObject.GetComponents<LightIntensityCurve>(); foreach (LightIntensityCurve val8 in components8) { val8.timeMax *= durationMultiplier; } } public static Light AddLight(GameObject gameObject, Color32 color, float intensity, float range, float fadeOutTime) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown Light val = gameObject.AddComponent<Light>(); val.type = (LightType)2; val.color = Color32.op_Implicit(color); val.intensity = intensity; val.range = range; LightIntensityCurve val2 = gameObject.AddComponent<LightIntensityCurve>(); val2.timeMax = fadeOutTime; val2.curve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 1f), new Keyframe(1f, 0f) }); val2.light = val; return val; } public static Light AddLight(GameObject gameObject, Color32 color, float intensity, float range) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) Light val = gameObject.AddComponent<Light>(); val.type = (LightType)2; val.color = Color32.op_Implicit(color); val.intensity = intensity; val.range = range; return val; } public static void ScaleToHierarchy(GameObject gameObject) { ScaleToHierarchyInternal(gameObject); Transform[] componentsInChildren = ((Component)gameObject.transform).GetComponentsInChildren<Transform>(); foreach (Transform val in componentsInChildren) { ScaleToHierarchyInternal(((Component)val).gameObject); } } private static void ScaleToHierarchyInternal(GameObject gameObject) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) ParticleSystem component = gameObject.GetComponent<ParticleSystem>(); if (Object.op_Implicit((Object)(object)component)) { MainModule main = component.main; ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0; } } } } namespace CrocsItems.Items { public abstract class ItemBase<T> : ItemBase where T : ItemBase<T> { public static T instance { get; private set; } public ItemBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inherting ItemBase was instantiated twice"); } instance = this as T; } } public abstract class ItemBase { public ItemDef ItemDef; public abstract string ItemName { get; } public abstract string ItemLangTokenName { get; } public abstract string ItemPickupDesc { get; } public abstract string ItemFullDescription { get; } public abstract string ItemLore { get; } public abstract ItemTier Tier { get; } public abstract ItemTag[] ItemTags { get; } public abstract GameObject ItemModel { get; } public abstract Sprite ItemIcon { get; } public abstract bool IsCroc { get; } public virtual bool CanRemove { get; } = true; public virtual bool IsJibbit { get; } = false; public virtual float modelPanelParametersMinDistance { get; } = 2f; public virtual float modelPanelParametersMaxDistance { get; } = 6f; public static bool DefaultEnabledCallback(ItemBase self) { ConfigSectionAttribute customAttribute = self.GetType().GetCustomAttribute<ConfigSectionAttribute>(); if (customAttribute != null) { if (Main.config.Bind<bool>(customAttribute.name, "Enabled", true, "Allow this item to appear in runs?").Value) { return true; } return false; } return true; } public virtual void Init() { CreateItem(); Hooks(); } public virtual void Hooks() { } protected void CreateItem() { //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown ItemDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)ItemDef).name = "ITEM_CROCSITEMS_" + ItemLangTokenName; ItemDef.nameToken = "ITEM_CROCSITEMS_" + ItemLangTokenName + "_NAME"; ItemDef.pickupToken = "ITEM_CROCSITEMS_" + ItemLangTokenName + "_PICKUP"; ItemDef.descriptionToken = "ITEM_CROCSITEMS_" + ItemLangTokenName + "_DESCRIPTION"; ItemDef.loreToken = "ITEM_CROCSITEMS_" + ItemLangTokenName + "_LORE"; ItemDef.pickupModelPrefab = ItemModel ?? null; ItemDef.pickupIconSprite = ItemIcon ?? null; ItemDef.hidden = false; ItemDef.canRemove = CanRemove; ItemDef.deprecatedTier = Tier; if (ItemTags.Length != 0) { ItemDef.tags = ItemTags; } LanguageAPI.Add("ITEM_CROCSITEMS_" + ItemLangTokenName + "_NAME", ItemName); LanguageAPI.Add("ITEM_CROCSITEMS_" + ItemLangTokenName + "_PICKUP", ItemPickupDesc); LanguageAPI.Add("ITEM_CROCSITEMS_" + ItemLangTokenName + "_DESCRIPTION", ItemFullDescription); LanguageAPI.Add("ITEM_CROCSITEMS_" + ItemLangTokenName + "_LORE", ItemLore); if ((Object)(object)ItemModel != (Object)null) { CreateModelPanelParameters(ItemModel); } ItemAPI.Add(new CustomItem(ItemDef, CreateItemDisplayRules())); if (IsJibbit) { Main.jibbitzList.Add(ItemDef); } if (IsCroc) { Main.crocsList.Add(ItemDef); } } private void CreateModelPanelParameters(GameObject itemModel) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)itemModel.GetComponent<ModelPanelParameters>() != (Object)null)) { GameObject val = PrefabAPI.InstantiateClone(itemModel, ((Object)itemModel).name + "-fixed", false); GameObject val2 = new GameObject("Focus"); GameObject val3 = new GameObject("Camera"); MeshRenderer val4 = val.GetComponentsInChildren<MeshRenderer>().ToList().OrderByDescending(delegate(MeshRenderer x) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) Bounds bounds2 = ((Renderer)x).bounds; return ToFloat(((Bounds)(ref bounds2)).size); }) .First(); Bounds bounds = ((Renderer)val4).bounds; float num = ToFloat(((Bounds)(ref bounds)).size) / 3f; float minDistance = num; float num2 = 3f * num; val2.transform.parent = val.transform; val3.transform.parent = val.transform; Transform transform = val2.transform; bounds = ((Renderer)val4).bounds; transform.position = ((Bounds)(ref bounds)).center; val3.transform.localPosition = val2.transform.position + val.transform.forward * num2; ModelPanelParameters val5 = val.AddComponent<ModelPanelParameters>(); val5.focusPointTransform = val2.transform; val5.cameraPositionTransform = val3.transform; val5.minDistance = minDistance; val5.maxDistance = num2; ItemDef.pickupModelPrefab = val; } } public static float ToFloat(Vector3 vec) { //IL_0003: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) vec.x = Mathf.Abs(vec.x); vec.y = Mathf.Abs(vec.y); vec.z = Mathf.Abs(vec.z); return vec.x + vec.y + vec.z; } public int GetCount(CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 0; } return body.inventory.GetItemCount(ItemDef); } public int GetCountEffective(CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 0; } return body.inventory.GetItemCountEffective(ItemDef); } public string GetConfName() { ConfigSectionAttribute customAttribute = GetType().GetCustomAttribute<ConfigSectionAttribute>(); if (customAttribute != null) { return customAttribute.name; } return "Items :: " + ItemName; } public abstract ItemDisplayRuleDict CreateItemDisplayRules(); } } namespace CrocsItems.Items.Reds { [ConfigSection("Items :: Crocs Echo Wave")] public class CrocsEchoWave : ItemBase<CrocsEchoWave> { public static BuffDef speedBuff; public static GameObject passiveParticles; public static GameObject impactParticles; public static GameObject impactExplosion; [ConfigField("Buff Change Interval", "How quickly buffs get added or removed.", 0.15f)] public static float buffChangeInterval; [ConfigField("Buff Count To Add", "1 Buff = 1% Movement Speed. The amount of buffs to add per Buff Change Interval. Time to reach maximum movement speed from zero = Maximum Buff Count * Buff Change Interval / Buff Count To Add.", 2)] public static int buffCountToAdd; [ConfigField("Buff Count To Remove", "1 Buff = 1% Movement Speed. The amount of buffs to remove per Buff Change Interval. Time to lose all movement speed from maximum = Maximum Buff Count * Buff Change Interval / Buff Count To Remove.", 4)] public static int buffCountToRemove; [ConfigField("Maximum Buff Count", "1 Buff = 1% Movement Speed. Also dictates the maximum movement speed", 100)] public static int maximumBuffCount; [ConfigField("Minimum Buff Count For Impact", "1 Buff = 1% Movement Speed. Not a percentage. Enables ramming into enemies once this buff amount threshold is reached.", 100)] public static int minimumBuffCountForImpact; [ConfigField("Buff Count After Impact", "1 Buff = 1% Movement Speed. Not a percentage. Percent movement speed increase after impact = Buff Count After Impact / Maximum Buff Count * 100.", 25)] public static int buffCountAfterImpact; [ConfigField("Base Minimum Damage", "Decimal.", 10f)] public static float baseMinimumDamage; [ConfigField("Stack Minimum Damage", "Decimal.", 10f)] public static float stackMinimumDamage; [ConfigField("Base Maximum Damage", "Decimal.", 30f)] public static float baseMaximumDamage; [ConfigField("Stack Maximum Damage", "Decimal.", 30f)] public static float stackMaximumDamage; [ConfigField("Movement Speed Scalar", "The value that controls the movement speed required to reach maximum damage. Impact damage = Minimum Damage + ((Current Movement Speed, capped at 10.15 * Movement Speed Scalar) - 10.15) / ((10.15 * Movement Speed Scalar) - 10.15) * (Maximum Damage - Minimum Damage)\nNote: 10.15 is hardcoded here.", 4f)] public static float movementSpeedScalar; [ConfigField("Proc Coefficient", "", 1f)] public static float procCoefficient; public override string ItemName => "Crocs Echo Wave"; public override string ItemLangTokenName => "CROCS_ECHO_WAVE"; public override string ItemPickupDesc => "Sprinting builds up movement speed that can be discharged for massive impact damage."; public override string ItemFullDescription => $"Sprinting builds up to <style=cIsUtility>{maximumBuffCount}% movement speed</style>. <style=cIsDamage>Ramming</style> into an enemy while sprinting deals up to <style=cIsDamage>{baseMaximumDamage * 100f}%</style> <style=cStack>(+{stackMaximumDamage * 100f}% per stack)</style> <style=cIsDamage>damage</style> based on movement speed."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)2; public override ItemTag[] ItemTags { get { ItemTag[] array = new ItemTag[5]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); return (ItemTag[])(object)array; } } public override GameObject ItemModel => Main.bundle.LoadAsset<GameObject>("CrocsEchoWaveHolder.prefab"); public override Sprite ItemIcon => Main.bundle.LoadAsset<Sprite>("texCrocsEchoWave.png"); public override bool IsCroc => true; public override void Init() { base.Init(); SetUpVFX(); SetUpBuff(); } public void SetUpBuff() { //IL_003c: 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) //IL_0046: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) speedBuff = ScriptableObject.CreateInstance<BuffDef>(); speedBuff.isHidden = false; speedBuff.isDebuff = false; speedBuff.canStack = true; speedBuff.buffColor = Color32.op_Implicit(new Color32((byte)36, (byte)47, (byte)82, byte.MaxValue)); speedBuff.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"3e432d63b7c55a544a0f383de7b1f474").WaitForCompletion(); speedBuff.flags = (Flags)1; speedBuff.ignoreGrowthNectar = false; speedBuff.isDOT = false; speedBuff.isCooldown = false; ContentAddition.AddBuffDef(speedBuff); } public void SetUpVFX() { //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_0044: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: 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_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) passiveParticles = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"56e965f822208a1438744bae84358e1d").WaitForCompletion(), "Crocs Echo Wave Passive Particles VFX", false); passiveParticles.GetComponent<EffectComponent>().applyScale = true; VFXUtils.ScaleToHierarchy(passiveParticles); VFXUtils.RecolorMaterialsAndLights(passiveParticles, Color32.op_Implicit(Color.yellow), Color32.op_Implicit(Color.yellow), convertRampsToGrayscale: true, emissionColorToPrimaryColor: true); Transform val = passiveParticles.transform.Find("Core"); val.localScale = Vector3.one / 12f; val.localPosition = Vector3.zero; Transform val2 = val.Find("Sparks"); ParticleSystem component = ((Component)val2).GetComponent<ParticleSystem>(); MainModule main = component.main; ((MainModule)(ref main)).maxParticles = 200; EmissionModule emission = component.emission; Burst val3 = default(Burst); ((Burst)(ref val3))..ctor(0f, (short)200, (short)200, 1, 0.01f); ((Burst)(ref val3)).probability = 1f; ((EmissionModule)(ref emission)).SetBurst(0, val3); ParticleSystemRenderer component2 = ((Component)val2).GetComponent<ParticleSystemRenderer>(); ((Renderer)component2).material.SetTexture("_MainTex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"8d0972db888e4df42814eb4b6178f0e2").WaitForCompletion()); ((Component)val.Find("Smoke, Edge Circle")).gameObject.SetActive(false); ((Component)val.Find("Dust, CenterSphere")).gameObject.SetActive(false); ((Component)val.Find("Dust, CenterTube")).gameObject.SetActive(false); ((Component)val.Find("Point Light")).gameObject.SetActive(false); ContentAddition.AddEffect(passiveParticles); impactParticles = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"56e965f822208a1438744bae84358e1d").WaitForCompletion(), "Crocs Echo Wave Impact Particles VFX", false); impactParticles.GetComponent<EffectComponent>().applyScale = true; VFXUtils.ScaleToHierarchy(impactParticles); VFXUtils.RecolorMaterialsAndLights(impactParticles, Color32.op_Implicit(Color.yellow), Color32.op_Implicit(Color.yellow), convertRampsToGrayscale: true, emissionColorToPrimaryColor: true); Transform val4 = impactParticles.transform.Find("Core"); val4.localScale = Vector3.one / 12f; val4.localPosition = Vector3.zero; Transform val5 = val4.Find("Sparks"); ParticleSystem component3 = ((Component)val5).GetComponent<ParticleSystem>(); MainModule main2 = component3.main; ((MainModule)(ref main2)).maxParticles = 100; EmissionModule emission2 = component3.emission; Burst val6 = default(Burst); ((Burst)(ref val6))..ctor(0f, (short)100, (short)100, 1, 0.01f); ((Burst)(ref val6)).probability = 1f; ((EmissionModule)(ref emission2)).SetBurst(0, val6); ParticleSystemRenderer component4 = ((Component)val5).GetComponent<ParticleSystemRenderer>(); ((Renderer)component4).material.SetTexture("_MainTex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"8d0972db888e4df42814eb4b6178f0e2").WaitForCompletion()); ((Component)val4.Find("Dust, CenterSphere")).gameObject.SetActive(false); ((Component)val4.Find("Dust, CenterTube")).gameObject.SetActive(false); Transform val7 = val4.Find("Point Light"); Light component5 = ((Component)val7).GetComponent<Light>(); component5.intensity = 15f; component5.range = 16f; ContentAddition.AddEffect(impactParticles); VFXUtils.MultiplyDuration(impactParticles, 4f); impactExplosion = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"26e8d4483ccf1484b98777af3c44ecbb").WaitForCompletion(), "Crocs Echo Wave Impact VFX", false); EffectComponent component6 = impactExplosion.GetComponent<EffectComponent>(); component6.applyScale = true; component6.soundName = ""; ((Component)impactExplosion.transform.Find("RuneRings")).gameObject.SetActive(false); ((Component)impactExplosion.transform.Find("IceMesh")).GetComponent<ParticleSystemRenderer>().mesh = Addressables.LoadAssetAsync<Mesh>((object)"a66159248c42bad478cf4ce0379ba1ee").WaitForCompletion(); VFXUtils.RecolorMaterialsAndLights(impactExplosion, Color32.op_Implicit(Color.yellow), Color32.op_Implicit(Color.yellow), convertRampsToGrayscale: true); VFXUtils.MultiplyDuration(impactExplosion, 2.5f); VFXUtils.ScaleToHierarchy(impactExplosion); ContentAddition.AddEffect(impactExplosion); } public override void Hooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown base.Hooks(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(CalcSpeedBoost); CharacterBody.onBodyInventoryChangedGlobal += OnInventoryChangedGlobal; } private void OnInventoryChangedGlobal(CharacterBody body) { if (NetworkServer.active) { body.AddItemBehavior<CrocsEchoWaveController>(GetCountEffective(body)); } } private void CalcSpeedBoost(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender)) { int buffCount = sender.GetBuffCount(speedBuff); args.moveSpeedMultAdd += (float)buffCount * 0.01f; } } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0120: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_0161: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Expected O, but got Unknown //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0252: 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_026d: 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_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Expected O, but got Unknown //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0316: 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_0331: 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_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Expected O, but got Unknown //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Expected O, but got Unknown //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0422: 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_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0483: 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_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Expected O, but got Unknown //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: 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_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0541: 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_0557: Expected O, but got Unknown //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_0600: Expected O, but got Unknown //IL_0600: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06a9: Expected O, but got Unknown //IL_06a9: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_073c: Unknown result type (might be due to invalid IL or missing references) //IL_0748: Unknown result type (might be due to invalid IL or missing references) //IL_0752: Expected O, but got Unknown //IL_0752: Unknown result type (might be due to invalid IL or missing references) //IL_0754: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_079f: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07ba: Unknown result type (might be due to invalid IL or missing references) //IL_07d0: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_07e5: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_07fb: Expected O, but got Unknown //IL_07fb: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0879: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_088e: Unknown result type (might be due to invalid IL or missing references) //IL_089a: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Expected O, but got Unknown //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08a6: Unknown result type (might be due to invalid IL or missing references) //IL_08c1: Unknown result type (might be due to invalid IL or missing references) //IL_08ca: Unknown result type (might be due to invalid IL or missing references) //IL_08ec: Unknown result type (might be due to invalid IL or missing references) //IL_08f1: Unknown result type (might be due to invalid IL or missing references) //IL_0907: Unknown result type (might be due to invalid IL or missing references) //IL_090c: Unknown result type (might be due to invalid IL or missing references) //IL_0922: Unknown result type (might be due to invalid IL or missing references) //IL_0927: Unknown result type (might be due to invalid IL or missing references) //IL_0937: Unknown result type (might be due to invalid IL or missing references) //IL_0943: Unknown result type (might be due to invalid IL or missing references) //IL_094d: Expected O, but got Unknown //IL_094d: Unknown result type (might be due to invalid IL or missing references) //IL_094f: Unknown result type (might be due to invalid IL or missing references) //IL_096a: Unknown result type (might be due to invalid IL or missing references) //IL_0973: Unknown result type (might be due to invalid IL or missing references) //IL_0995: Unknown result type (might be due to invalid IL or missing references) //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_09b0: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09d0: Unknown result type (might be due to invalid IL or missing references) //IL_09e0: Unknown result type (might be due to invalid IL or missing references) //IL_09ec: Unknown result type (might be due to invalid IL or missing references) //IL_09f6: Expected O, but got Unknown //IL_09f6: Unknown result type (might be due to invalid IL or missing references) //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_0a13: Unknown result type (might be due to invalid IL or missing references) //IL_0a1c: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a59: Unknown result type (might be due to invalid IL or missing references) //IL_0a5e: Unknown result type (might be due to invalid IL or missing references) //IL_0a74: Unknown result type (might be due to invalid IL or missing references) //IL_0a79: Unknown result type (might be due to invalid IL or missing references) //IL_0a89: Unknown result type (might be due to invalid IL or missing references) //IL_0a95: Unknown result type (might be due to invalid IL or missing references) //IL_0a9f: Expected O, but got Unknown //IL_0a9f: Unknown result type (might be due to invalid IL or missing references) //IL_0aa1: Unknown result type (might be due to invalid IL or missing references) //IL_0abc: Unknown result type (might be due to invalid IL or missing references) //IL_0ac5: Unknown result type (might be due to invalid IL or missing references) //IL_0ae7: Unknown result type (might be due to invalid IL or missing references) //IL_0aec: Unknown result type (might be due to invalid IL or missing references) //IL_0b02: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0b1d: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b32: 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_0b48: Expected O, but got Unknown //IL_0b48: Unknown result type (might be due to invalid IL or missing references) //IL_0b4a: Unknown result type (might be due to invalid IL or missing references) //IL_0b65: Unknown result type (might be due to invalid IL or missing references) //IL_0b6e: Unknown result type (might be due to invalid IL or missing references) //IL_0b90: Unknown result type (might be due to invalid IL or missing references) //IL_0b95: Unknown result type (might be due to invalid IL or missing references) //IL_0bab: Unknown result type (might be due to invalid IL or missing references) //IL_0bb0: Unknown result type (might be due to invalid IL or missing references) //IL_0bc6: Unknown result type (might be due to invalid IL or missing references) //IL_0bcb: Unknown result type (might be due to invalid IL or missing references) //IL_0bdb: Unknown result type (might be due to invalid IL or missing references) //IL_0be7: Unknown result type (might be due to invalid IL or missing references) //IL_0bf1: Expected O, but got Unknown //IL_0bf1: Unknown result type (might be due to invalid IL or missing references) //IL_0bf3: Unknown result type (might be due to invalid IL or missing references) //IL_0c0e: Unknown result type (might be due to invalid IL or missing references) //IL_0c17: Unknown result type (might be due to invalid IL or missing references) //IL_0c39: Unknown result type (might be due to invalid IL or missing references) //IL_0c3e: Unknown result type (might be due to invalid IL or missing references) //IL_0c54: Unknown result type (might be due to invalid IL or missing references) //IL_0c59: Unknown result type (might be due to invalid IL or missing references) //IL_0c6f: Unknown result type (might be due to invalid IL or missing references) //IL_0c74: Unknown result type (might be due to invalid IL or missing references) //IL_0c84: Unknown result type (might be due to invalid IL or missing references) //IL_0c90: Unknown result type (might be due to invalid IL or missing references) //IL_0c9a: Expected O, but got Unknown //IL_0c9a: Unknown result type (might be due to invalid IL or missing references) //IL_0c9c: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Main.bundle.LoadAsset<GameObject>("CrocsEchoWaveHolder.prefab"), "CrocsEchoWaveIDRS", false); ItemDisplay val2 = val.AddComponent<ItemDisplay>(); List<Renderer> list = val.GetComponentsInChildren<Renderer>().ToList(); Array.Resize(ref val2.rendererInfos, list.Count); for (int i = 0; i < list.Count; i++) { Renderer val3 = list[i]; Material material = val3.material; val2.rendererInfos[i] = new RendererInfo { renderer = val3, defaultMaterial = material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false, hideOnDeath = false, ignoresMaterialOverrides = false }; } ItemDisplayRuleDict val4 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val4.Add("CommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(-0.00387f, 0.11857f, 0.01629f), localAngles = new Vector3(84.61184f, 220.3867f, 47.41245f), localScale = new Vector3(0.14531f, 0.14659f, 0.14531f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("HuntressBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(-0.01041f, 0.08162f, -0.00924f), localAngles = new Vector3(85.0407f, 197.8464f, 22.78797f), localScale = new Vector3(0.12683f, 0.11843f, 0.11843f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("Bandit2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(-0.00708f, 0.15599f, -0.01433f), localAngles = new Vector3(56.54497f, 15.6954f, 175.5474f), localScale = new Vector3(0.16627f, 0.16627f, 0.16627f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("ToolbotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "MainWheelR", localPos = new Vector3(-0.18462f, -0.25801f, 1.3921f), localAngles = new Vector3(35.12162f, 178.6449f, 15.10357f), localScale = new Vector3(2.15099f, 2.15099f, 2.15099f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("EngiBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(-0.00137f, 0.18647f, -0.01936f), localAngles = new Vector3(80.48362f, 131.4032f, 305.733f), localScale = new Vector3(0.26569f, 0.26125f, 0.24179f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("MageBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(-0.0208f, 0.17038f, 0.00367f), localAngles = new Vector3(50.80023f, 10.96024f, 198.6825f), localScale = new Vector3(0.16578f, 0.16718f, 0.16578f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("MercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(0.00942f, 0.12823f, 0.00514f), localAngles = new Vector3(58.85978f, 356.114f, 183.1814f), localScale = new Vector3(0.15804f, 0.16791f, 0.15804f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("TreebotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootFrontR", localPos = new Vector3(-0.23328f, 1.42811f, -0.26013f), localAngles = new Vector3(354.3248f, 47.10957f, 177.3136f), localScale = new Vector3(0.43013f, 0.43013f, 0.43013f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("LoaderBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(-0.01876f, 0.17012f, -0.04231f), localAngles = new Vector3(41.75632f, 13.00825f, 191.4296f), localScale = new Vector3(0.20217f, 0.20217f, 0.20217f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("CrocoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(0.09182f, 0.8062f, -1.41886f), localAngles = new Vector3(15.25191f, 3.42294f, 179.4088f), localScale = new Vector3(2.44813f, 2.00045f, 1.90371f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("CaptainBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(0.00953f, 0.17557f, -0.12688f), localAngles = new Vector3(9.75157f, 0.82062f, 180.4495f), localScale = new Vector3(0.23233f, 0.20145f, 0.20145f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("RailgunnerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(0.00226f, 0.23116f, -0.08208f), localAngles = new Vector3(41.55166f, 2.0483f, 180.5456f), localScale = new Vector3(0.32904f, 0.28836f, 0.29128f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("VoidSurvivorBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(-0.027f, 0.16392f, -0.01953f), localAngles = new Vector3(56.78973f, 79.39018f, 167.5546f), localScale = new Vector3(0.1866f, 0.1866f, 0.1866f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("SeekerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(0.02031f, 0.12695f, 0.00215f), localAngles = new Vector3(54.21278f, 280.0642f, 187.6502f), localScale = new Vector3(0.16319f, 0.16319f, 0.16319f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("ChefBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "Wheel", localPos = new Vector3(-0.72718f, -0.28572f, -0.0641f), localAngles = new Vector3(276.9898f, 27.48667f, 240.6015f), localScale = new Vector3(0.26742f, 0.26742f, 0.26742f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("FalseSonBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(0.03697f, 0.18287f, 0.00018f), localAngles = new Vector3(49.35352f, 277.774f, 195.4307f), localScale = new Vector3(0.25144f, 0.25144f, 0.25144f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("DroneTechBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(0.16496f, 0.03804f, -0.00802f), localAngles = new Vector3(322.1032f, 272.5129f, 199.1968f), localScale = new Vector3(0.16452f, 0.16657f, 0.14635f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); val4.Add("DrifterBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, childName = "FootR", localPos = new Vector3(-0.10567f, 0.10285f, 0.00067f), localAngles = new Vector3(85.09835f, 14.48507f, 284.095f), localScale = new Vector3(0.17322f, 0.16604f, 0.16604f), followerPrefab = val, limbMask = (LimbFlags)0, followerPrefabAddress = new AssetReferenceGameObject("") } }); return val4; } } public class CrocsEchoWaveController : ItemBehavior { public float timer; public float buffChangeInterval = CrocsEchoWave.buffChangeInterval; public int buffCountToAdd = CrocsEchoWave.buffCountToAdd; public int buffCountToRemove = CrocsEchoWave.buffCountToRemove; public int maxBuffCount = CrocsEchoWave.maximumBuffCount; public int minBuffCountForImpactCheck = CrocsEchoWave.minimumBuffCountForImpact; public int buffCountAfterImpact = CrocsEchoWave.buffCountAfterImpact; public int buffCount; public OverlapAttack attackerOverlap; public ModelLocator modelLocator; public Transform modelTransform; public GameObject hitBoxObject; public HitBoxGroup hitBoxGroup; public HitBox hitBox; public bool successfullyHit = false; public List<HurtBox> lastHitHurtBoxes = new List<HurtBox>(); public void Start() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) modelLocator = ((Component)this).GetComponent<ModelLocator>(); ModelLocator obj = modelLocator; modelTransform = ((obj != null) ? obj.modelTransform : null); if (Object.op_Implicit((Object)(object)modelTransform) && (Object)(object)hitBoxObject == (Object)null) { hitBoxObject = new GameObject("Crocs Echo Wave HitBox") { layer = LayerIndex.defaultLayer.intVal }; hitBoxObject.transform.localScale = new Vector3(4f, 8f, 4f); hitBox = hitBoxObject.AddComponent<HitBox>(); hitBoxGroup = hitBoxObject.AddComponent<HitBoxGroup>(); hitBoxGroup.groupName = "CrocEchoWavesHitBox"; hitBoxGroup.hitBoxes = (HitBox[])(object)new HitBox[1] { hitBox }; } } public void FixedUpdate() { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) timer += Time.fixedDeltaTime; if (!(timer >= buffChangeInterval)) { return; } if (base.body.isSprinting) { buffCount += buffCountToAdd; buffCount = Mathf.Min(buffCount, maxBuffCount); if (buffCount >= minBuffCountForImpactCheck) { CheckImpact(); } } else { buffCount -= buffCountToRemove; buffCount = Mathf.Max(0, buffCount); } base.body.SetBuffCount(CrocsEchoWave.speedBuff.buffIndex, buffCount); timer = 0f; } public void CheckImpact() { //IL_005b: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) float num = 10.150001f; float num2 = Mathf.Min(num * CrocsEchoWave.movementSpeedScalar, base.body.moveSpeed); float num3 = Util.Remap(num2, num, num * CrocsEchoWave.movementSpeedScalar, CrocsEchoWave.baseMinimumDamage + CrocsEchoWave.stackMinimumDamage * (float)(base.stack - 1), CrocsEchoWave.baseMaximumDamage + CrocsEchoWave.stackMaximumDamage * (float)(base.stack - 1)); float num4 = num3; attackerOverlap = new OverlapAttack { attacker = ((Component)this).gameObject, inflictor = ((Component)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((Component)this).gameObject), damage = base.body.damage * num4, forceVector = Vector3.zero, pushAwayForce = 4000f, attackerFiltering = (AttackerFiltering)2, procCoefficient = CrocsEchoWave.procCoefficient, isCrit = base.body.RollCrit(), hitBoxGroup = hitBoxObject.GetComponent<HitBoxGroup>() }; hitBoxObject.transform.forward = base.body.inputBank.moveVector; hitBoxObject.transform.position = modelTransform.position; successfullyHit = attackerOverlap.Fire(lastHitHurtBoxes); if (successfullyHit) { buffCount = buffCountAfterImpact; base.body.SetBuffCount(CrocsEchoWave.speedBuff.buffIndex, buffCountAfterImpact); SpawnVFX(lastHitHurtBoxes); } } public void SpawnVFX(List<HurtBox> lastHitHurtBoxes) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00fd: 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_011d: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("Play_grandParent_attack1_boulderSmall_impact", ((Component)this).gameObject); Util.PlaySound("Play_vulture_attack1_impact", ((Component)this).gameObject); Util.PlaySound("Play_vulture_attack1_impact", ((Component)this).gameObject); Util.PlaySound("Play_env_desert_wind_gust", ((Component)this).gameObject); Util.PlaySound("Play_mage_m2_zap", ((Component)this).gameObject); EffectData val = new EffectData(); val.scale = 16f + base.body.radius; val.origin = base.body.footPosition; EffectManager.SpawnEffect(CrocsEchoWave.impactParticles, val, true); for (int i = 0; i < lastHitHurtBoxes.Count; i++) { HurtBox val2 = lastHitHurtBoxes[i]; HealthComponent healthComponent = val2.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { CharacterBody body = healthComponent.body; if (Object.op_Implicit((Object)(object)body)) { EffectData val3 = new EffectData(); val3.scale = Mathf.Sqrt(body.radius * 2f); val3.origin = body.corePosition; EffectManager.SpawnEffect(CrocsEchoWave.impactExplosion, val3, true); EffectData val4 = new EffectData(); val4.scale = 8f + body.radius; val4.origin = body.footPosition; EffectManager.SpawnEffect(CrocsEchoWave.impactParticles, val4, true); } } } lastHitHurtBoxes.Clear(); } public void OnDisable() { RemoveBuff(); } public void OnDestroy() { RemoveBuff(); } public void RemoveBuff() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) base.body.SetBuffCount(CrocsEchoWave.speedBuff.buffIndex, 0); } } } namespace CrocsItems.Items.Jibbitz { [ConfigSection("Items :: Black Heart")] public class BlackHeart : ItemBase<BlackHeart> { [ConfigField("Base Percent Health Regeneration Of Maximum Health", "Decimal.", 0.01f)] public static float basePercentHealthRegenerationOfMaximumHealth; [ConfigField("Stack Percent Health Regeneration Of Maximum Health", "Decimal.", 0.01f)] public static float stackPercentHealthRegenerationOfMaximumHealth; [ConfigField("Base Maximum Health", "", 125f)] public static float baseMaximumHealth; [ConfigField("Stack Maximum Health", "", 125f)] public static float stackMaximumHealth; public override string ItemName => "Black Heart"; public override string ItemLangTokenName => "BLACK_HEART"; public override string ItemPickupDesc => "While you have a Crocs item, increase health regeneration and maximum health."; public override string ItemFullDescription => $"While you have a <style=cIsUtility>Crocs</style> item, increase <style=cIsHealing>health regeneration</style> by <style=cIsHealing>{basePercentHealthRegenerationOfMaximumHealth * 100f}%</style> <style=cStack>(+{stackPercentHealthRegenerationOfMaximumHealth * 100f}% per stack)</style> of your <style=cIsHealing>maximum health</style> and <style=cIsHealing>maximum health</style> by <style=cIsHealing>{baseMaximumHealth}</style> <style=cStack>(+{stackMaximumHealth} per stack)</style>."; public override string ItemLore => ""; public override ItemTier Tier => (ItemTier)0; public override ItemTag[] ItemTags { get { ItemTag[] array = new ItemTag[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); return (ItemTag[])(object)array; } } public override GameObject ItemModel => Main.bundle.LoadAsset<GameObject>("BlackHeartHolder.prefab"); public override Sprite ItemIcon => Main.bundle.LoadAsset<Sprite>("texBlackHeart.png"); public override bool CanRemove => true; public override bool IsCroc => false; public override bool IsJibbit => true; public override void Init() { base.Init(); } public override void Hooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown base.Hooks(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddStats); } private void AddStats(CharacterBody sender, StatHookEventArgs args) { int count = GetCount(sender); bool flag = Main.HasAnyCrocs(sender) || Main.HasAnyCrocsEquipment(sender); if (count > 0 && flag) { args.baseHealthAdd += baseMaximumHealth + stackMaximumHealth * (float)(count - 1); args.baseRegenAdd += (basePercentHealthRegenerationOfMaximumHealth + stackPercentHealthRegenerationOfMaximumHealth * (float)(count - 1)) * sender.maxHealth; } } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0120: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_0161: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Expected O, but got Unknown //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0252: 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_026d: 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_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Expected O, but got Unknown //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL