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 BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates.Croco; using EntityStates.Mage.Weapon; using LookingGlass.ItemStatsNameSpace; using Microsoft.CodeAnalysis; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.Navigation; using TsunamiItemCore.Compat; using TsunamiItemCore.Equipment; using TsunamiItemCore.Items; using TsunamiItemCore.Utils; using TsunamiItemCore.Utils.Components; using UnityEngine; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyCompany("TsunamiItemCore")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("TsunamiItemCore")] [assembly: AssemblyTitle("TsunamiItemCore")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 TsunamiItemCore { [BepInPlugin("com.Phreel.TsunamiItemsRevived", "TsunamiItems", "0.0.12")] [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.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin { public const string ModGuid = "com.Phreel.TsunamiItemsRevived"; public const string ModName = "TsunamiItemsRevived"; public const string ModVer = "0.0.12"; public static AssetBundle MainAssets; public List Items = new List(); public List Equipments = new List(); public static ManualLogSource ModLogger; private void Awake() { ModLogger = ((BaseUnityPlugin)this).Logger; using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TsunamiItemCore.tsunamiitemcoreassets")) { MainAssets = AssetBundle.LoadFromStream(stream); } foreach (Type item in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase)) select type) { ItemBase itemBase = (ItemBase)Activator.CreateInstance(item); if (ValidateItem(itemBase, Items)) { itemBase.Init(((BaseUnityPlugin)this).Config); } } foreach (Type item2 in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(EquipmentBase)) select type) { EquipmentBase equipmentBase = (EquipmentBase)Activator.CreateInstance(item2); if (ValidateEquipment(equipmentBase, Equipments)) { equipmentBase.Init(((BaseUnityPlugin)this).Config); } } bool value = ((BaseUnityPlugin)this).Config.Bind("Mod Compatibility: LookingGlass", "Enable Compatibility Patches?", true, "Add item stats to LookingGlass (if installed)?").Value; if (LookingGlassCompat.IsLookingGlassInstalled && value) { LookingGlassCompat.Init(Equipments); } } public bool ValidateItem(ItemBase item, List itemList) { bool value = ((BaseUnityPlugin)this).Config.Bind("Item: " + item.ItemName, "Enable Item?", true, "Should this item appear in runs?").Value; bool value2 = ((BaseUnityPlugin)this).Config.Bind("Item: " + item.ItemName, "Blacklist Item from AI Use?", false, "Should the AI not be able to obtain this item?").Value; if (value) { itemList.Add(item); if (value2) { item.AIBlacklisted = true; } } return value; } public bool ValidateEquipment(EquipmentBase equipment, List equipmentList) { if (((BaseUnityPlugin)this).Config.Bind("Equipment: " + equipment.EquipmentName, "Enable Equipment?", true, "Should this equipment appear in runs?").Value) { equipmentList.Add(equipment); return true; } return false; } } } namespace TsunamiItemCore.Compat { internal static class LookingGlassCompat { private struct Line { public string description; public ValueType valueType; public MeasurementUnits units; public Line(string description, ValueType valueType, MeasurementUnits units) { //IL_0008: 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) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) this.description = description; this.valueType = valueType; this.units = units; } } public const string GUID = "droppod.lookingglass"; private static List equipments; public static bool IsLookingGlassInstalled => Chainloader.PluginInfos.ContainsKey("droppod.lookingglass"); [MethodImpl(MethodImplOptions.NoInlining)] public static void Init(List enabledEquipments) { equipments = enabledEquipments; ((ResourceAvailability)(ref ItemCatalog.availability)).CallWhenAvailable((Action)RegisterItemStats); ((ResourceAvailability)(ref EquipmentCatalog.availability)).CallWhenAvailable((Action)RegisterEquipmentStats); } [MethodImpl(MethodImplOptions.NoInlining)] private static ItemStatsDef Create(Line[] lines) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_002c: 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) ItemStatsDef val = new ItemStatsDef(); for (int i = 0; i < lines.Length; i++) { Line line = lines[i]; val.descriptions.Add(line.description); val.valueTypes.Add(line.valueType); val.measurementUnits.Add(line.units); } return val; } [MethodImpl(MethodImplOptions.NoInlining)] private static void AddItem(ItemBase item, Func> values, params Line[] lines) { ItemStatsDef val = Create(lines); val.calculateValuesFlat = values; Register(item, val); } [MethodImpl(MethodImplOptions.NoInlining)] private static void AddChanceItem(ItemBase item, Func> values, params Line[] lines) { ItemStatsDef val = Create(lines); val.hasChance = true; val.calculateValuesNew = (float luck, int stackCount, float procChance) => values(luck, stackCount, procChance); Register(item, val); } [MethodImpl(MethodImplOptions.NoInlining)] private static void AddEquipment(EquipmentBase equipment, Func> values, params Line[] lines) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Invalid comparison between Unknown and I4 //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected I4, but got Unknown EquipmentDef val = equipment?.EquipmentDef; if (Object.op_Implicit((Object)(object)val) && (int)val.equipmentIndex != -1) { ItemStatsDef val2 = Create(lines); val2.calculateValuesFlat = (int _) => values(); ItemDefinitions.allEquipmentDefinitions[(int)val.equipmentIndex] = val2; } } [MethodImpl(MethodImplOptions.NoInlining)] private static void Register(ItemBase item, ItemStatsDef def) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected I4, but got Unknown ItemDef val = item?.ItemDef; if (Object.op_Implicit((Object)(object)val) && (int)val.itemIndex != -1) { ItemDefinitions.allItemDefinitions[(int)val.itemIndex] = def; } } private static float Stack(float initial, float additional, int count) { return initial + additional * (float)(count - 1); } private static float ChanceWithLuck(float chance, float luck) { chance = Math.Max(0f, Math.Min(chance, 1f)); int num = (int)Math.Ceiling(luck); if (num > 0) { return 1f - (float)Math.Pow(1f - chance, num + 1); } if (num < 0) { return (float)Math.Pow(chance, -num + 1); } return chance; } [MethodImpl(MethodImplOptions.NoInlining)] private static void RegisterItemStats() { try { RegisterTier1(); RegisterTier2(); RegisterTier3(); } catch (Exception ex) { Main.ModLogger.LogError((object)("Failed to register LookingGlass item stats: " + ex)); } } [MethodImpl(MethodImplOptions.NoInlining)] private static void RegisterTier1() { AddItem(ItemBase.instance, (int count) => new List { AntiqueShield.shieldArmor * (float)count }, new Line("Armor: ", (ValueType)17, (MeasurementUnits)4)); AddItem(ItemBase.instance, (int count) => new List { 0.1f * (float)count, 0.1f + 0.1f * (float)count, 0.1f + 0.1f * (float)count }, new Line("Frenzy Damage: ", (ValueType)1, (MeasurementUnits)1), new Line("Frenzy Attack Speed: ", (ValueType)1, (MeasurementUnits)1), new Line("Frenzy Movement Speed: ", (ValueType)2, (MeasurementUnits)1)); AddChanceItem(ItemBase.instance, (float luck, int count, float proc) => new List { ChanceWithLuck(0.1f * (float)count, luck) }, new Line("Critical Heal Chance: ", (ValueType)0, (MeasurementUnits)1)); AddItem(ItemBase.instance, (int count) => new List { 7f, Stack(3f, 1f, count) }, new Line("Regen Boost: ", (ValueType)0, (MeasurementUnits)1), new Line("Duration: ", (ValueType)2, (MeasurementUnits)6)); AddItem(ItemBase.instance, (int count) => new List { 0.3f, Stack(20f, 5f, count) }, new Line("Movement Speed: ", (ValueType)2, (MeasurementUnits)1), new Line("Duration: ", (ValueType)2, (MeasurementUnits)6)); AddItem(ItemBase.instance, (int count) => new List { 0.2f * (float)count }, new Line("Next Hit Damage: ", (ValueType)1, (MeasurementUnits)1)); } [MethodImpl(MethodImplOptions.NoInlining)] private static void RegisterTier2() { AddItem(ItemBase.instance, (int count) => new List { 4f * (float)count }, new Line("Healing Per Kill Stack: ", (ValueType)0, (MeasurementUnits)3)); AddChanceItem(ItemBase.instance, (float luck, int count, float proc) => new List { ChanceWithLuck(DeckofCards.chancePerStack * 0.01f * (float)count, luck), DeckofCards.durationPerStack * (float)count }, new Line("Buff Chance: ", (ValueType)2, (MeasurementUnits)1), new Line("Buff Duration: ", (ValueType)2, (MeasurementUnits)6)); AddChanceItem(ItemBase.instance, (float luck, int count, float proc) => new List { ChanceWithLuck(0.1f * (float)Math.Sqrt(proc), luck), proc * 3f + (float)count, Stack(0.2f, 0.1f, count) }, new Line("Ignite Chance: ", (ValueType)1, (MeasurementUnits)1), new Line("Burn Duration: ", (ValueType)1, (MeasurementUnits)6), new Line("Crit Chance vs Burning: ", (ValueType)1, (MeasurementUnits)1)); AddItem(ItemBase.instance, (int count) => new List { Stack(0.3f, 0.1f, count) }, new Line("Damage Below " + RedSkull.maxHealthThreshold * 100f + "% Health: ", (ValueType)1, (MeasurementUnits)1)); AddItem(ItemBase.instance, (int count) => new List { 0.45f, 0.45f, 5f, Stack(5f, 2.5f, count), Stack(10f, 5f, count) }, new Line("Damage: ", (ValueType)1, (MeasurementUnits)1), new Line("Movement Speed: ", (ValueType)2, (MeasurementUnits)1), new Line("Regen Boost: ", (ValueType)0, (MeasurementUnits)1), new Line("Elite Kill Duration: ", (ValueType)2, (MeasurementUnits)6), new Line("Boss Kill Duration: ", (ValueType)2, (MeasurementUnits)6)); } [MethodImpl(MethodImplOptions.NoInlining)] private static void RegisterTier3() { AddItem(ItemBase.instance, (int count) => new List { Stack(16f, 4f, count), 10f }, new Line("Explosion Damage: ", (ValueType)1, (MeasurementUnits)1), new Line("Skill Uses Per Explosion: ", (ValueType)2, (MeasurementUnits)4)); AddItem(ItemBase.instance, (int count) => new List { 0.5f * (float)count, 0.5f * (float)count, 0.1f * (float)count }, new Line("Attack Speed: ", (ValueType)1, (MeasurementUnits)1), new Line("Movement Speed: ", (ValueType)2, (MeasurementUnits)1), new Line("Sugar Rush Per Stack: ", (ValueType)2, (MeasurementUnits)1)); } [MethodImpl(MethodImplOptions.NoInlining)] private static void RegisterEquipmentStats() { try { AddEquipment(equipments.OfType().FirstOrDefault(), () => new List { 4f, 25f, 2f }, new Line("Damage: ", (ValueType)1, (MeasurementUnits)1), new Line("Radius: ", (ValueType)2, (MeasurementUnits)0), new Line("Freeze Duration: ", (ValueType)2, (MeasurementUnits)6)); AddEquipment(equipments.OfType().FirstOrDefault(), () => new List { 12.5f, 35f }, new Line("Damage Per Explosion: ", (ValueType)4, (MeasurementUnits)1), new Line("Max Radius: ", (ValueType)2, (MeasurementUnits)0)); AddEquipment(equipments.OfType().FirstOrDefault(), delegate { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); float? obj; if (firstLocalUser == null) { obj = null; } else { CharacterMaster cachedMaster = firstLocalUser.cachedMaster; obj = ((cachedMaster != null) ? new float?(cachedMaster.luck) : ((float?)null)); } float? num = obj; float valueOrDefault = num.GetValueOrDefault(); return new List { 1f - ChanceWithLuck((60f - (float)VoidClam.clamCounter) * 0.01f, valueOrDefault), 5f }; }, new Line("Fail Chance: ", (ValueType)11, (MeasurementUnits)1), new Line("Uncommon Items: ", (ValueType)0, (MeasurementUnits)4)); } catch (Exception ex) { Main.ModLogger.LogError((object)("Failed to register LookingGlass equipment stats: " + ex)); } } } } namespace TsunamiItemCore.Utils { public static class ItemHelpers { public static RendererInfo[] ItemDisplaySetup(GameObject obj, bool debugmode = false) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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) List list = new List(); MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren(); if (componentsInChildren.Length != 0) { list.AddRange((IEnumerable)(object)componentsInChildren); } SkinnedMeshRenderer[] componentsInChildren2 = obj.GetComponentsInChildren(); if (componentsInChildren2.Length != 0) { list.AddRange((IEnumerable)(object)componentsInChildren2); } RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[list.Count]; for (int i = 0; i < list.Count; i++) { if (debugmode) { ((Component)list[i]).gameObject.AddComponent().Renderer = list[i]; } array[i] = new RendererInfo { defaultMaterial = ((list[i] is SkinnedMeshRenderer) ? list[i].sharedMaterial : list[i].material), renderer = list[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } return array; } public static string OrderManifestLoreFormatter(string deviceName, string estimatedDelivery, string sentTo, string trackingNumber, string devicePickupDesc, string shippingMethod, string orderDetails) { string[] value = new string[19] { "Estimated Delivery:Sent To:", "" + estimatedDelivery + "" + sentTo + "", "\n", " Shipping Details:", "\n", "-Order: " + deviceName + "", "Tracking Number: " + trackingNumber + "", "\n", "-Order Description: " + devicePickupDesc + "", "\n", "-Shipping Method: " + shippingMethod + "", "\n", "\n", "\n", "-Order Details: " + orderDetails + "", "\n", "\n", "\n", "Delivery being brought to you by the brand new Orbital Drop-Crate System (TM). No refunds." }; return string.Join("\n", value); } public static void RefreshTimedBuffs(CharacterBody body, BuffDef buffDef, float duration) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)body) || body.GetBuffCount(buffDef) <= 0) { return; } foreach (TimedBuff timedBuff in body.timedBuffs) { if (buffDef.buffIndex == timedBuff.buffIndex) { timedBuff.timer = duration; } } } public static void RefreshTimedBuffs(CharacterBody body, BuffDef buffDef, float taperStart, float taperDuration) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0031: 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) if (!Object.op_Implicit((Object)body) || body.GetBuffCount(buffDef) <= 0) { return; } int num = 0; foreach (TimedBuff timedBuff in body.timedBuffs) { if (buffDef.buffIndex == timedBuff.buffIndex) { timedBuff.timer = taperStart + (float)num * taperDuration; num++; } } } public static DotIndex FindAssociatedDotForBuff(BuffDef buff) { return (DotIndex)Array.FindIndex(DotController.dotDefs, (DotDef dotDef) => (Object)(object)dotDef.associatedBuff == (Object)(object)buff); } } public static class MathHelpers { public static string FloatToPercentageString(float number, float numberBase = 100f) { return (number * numberBase).ToString("##0") + "%"; } public static Vector3 ClosestPointOnSphereToPoint(Vector3 origin, float radius, Vector3 targetPosition) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) Vector3 val = targetPosition - origin; val = Vector3.Normalize(val); val *= radius; return origin + val; } public static List DistributePointsEvenlyAroundSphere(int points, float radius, Vector3 origin) { //IL_005f: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) List list = new List(); double num = Math.PI * (3.0 - Math.Sqrt(5.0)); for (int i = 0; i < points; i++) { int num2 = 1 - i / (points - 1) * 2; double num3 = Math.Sqrt(1 - num2 * num2); double num4 = num * (double)i; float num5 = (float)(Math.Cos(num4) * num3); float num6 = (float)(Math.Sin(num4) * num3); Vector3 val = origin + new Vector3(num5, (float)num2, num6); list.Add(val * radius); } return list; } public static List DistributePointsEvenlyAroundCircle(int points, float radius, Vector3 origin, float angleOffset = 0f) { //IL_0028: 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_0040: 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) List list = new List(); Vector3 item = default(Vector3); for (int i = 0; i < points; i++) { double num = Math.PI * 2.0 / (double)points * (double)i + (double)angleOffset; ((Vector3)(ref item))..ctor((float)((double)radius * Math.Cos(num) + (double)origin.x), origin.y, (float)((double)radius * Math.Sin(num) + (double)origin.z)); list.Add(item); } return list; } public static Vector3 GetPointOnUnitSphereCap(Quaternion targetDirection, float angle) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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: 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_0045: 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) float num = Random.Range(0f, angle) * (MathF.PI / 180f); Vector2 insideUnitCircle = Random.insideUnitCircle; Vector2 val = ((Vector2)(ref insideUnitCircle)).normalized * Mathf.Sin(num); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(val.x, val.y, Mathf.Cos(num)); return targetDirection * val2; } public static Vector3 GetPointOnUnitSphereCap(Vector3 targetDirection, float angle) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return GetPointOnUnitSphereCap(Quaternion.LookRotation(targetDirection), angle); } public static Vector3 RandomPointOnCircle(Vector3 origin, float radius, Xoroshiro128Plus random) { //IL_0011: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) float num = random.RangeFloat(0f, MathF.PI * 2f); return origin + new Vector3(Mathf.Cos(num), 0f, Mathf.Sin(num)) * radius; } public static float InverseHyperbolicScaling(float baseValue, float additionalValue, float maxValue, int itemCount) { return baseValue + (maxValue - baseValue) * (1f - 1f / (1f + additionalValue * (float)(itemCount - 1))); } } public static class MiscUtils { public static Vector3? RaycastToDirection(Vector3 position, float maxDistance, Vector3 direction, int layer) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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) RaycastHit val = default(RaycastHit); if (Physics.Raycast(new Ray(position, direction), ref val, maxDistance, layer, (QueryTriggerInteraction)1)) { return ((RaycastHit)(ref val)).point; } return null; } public static IEnumerable Shuffle(this IEnumerable toShuffle, Xoroshiro128Plus random) { List list = new List(); foreach (T item in toShuffle) { list.Insert(random.RangeInt(0, list.Count + 1), item); } return list; } public static Vector3 FindClosestNodeToPosition(Vector3 position, HullClassification hullClassification, bool checkAirNodes = false) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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) //IL_0027: 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_0029: 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_005b: 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_003f: Unknown result type (might be due to invalid IL or missing references) NodeGraph val = (checkAirNodes ? SceneInfo.instance.airNodes : SceneInfo.instance.groundNodes); NodeIndex val2 = val.FindClosestNode(position, hullClassification, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { Vector3 result = default(Vector3); val.GetNodePosition(val2, ref result); return result; } Main.ModLogger.LogInfo((object)$"No closest node to be found for XYZ: {position}, returning 0,0,0"); return Vector3.zero; } public static bool TeleportBody(CharacterBody characterBody, GameObject target, GameObject teleportEffect, HullClassification hullClassification, Xoroshiro128Plus rng, float minDistance = 20f, float maxDistance = 45f, bool teleportAir = false) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0089: 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) if (!Object.op_Implicit((Object)characterBody)) { return false; } SpawnCard val = ScriptableObject.CreateInstance(); val.hullSize = hullClassification; val.nodeGraphType = (GraphType)(teleportAir ? 1 : 0); val.prefab = LegacyResourcesAPI.Load("SpawnCards/HelperPrefab"); GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)1, position = target.transform.position, minDistance = minDistance, maxDistance = maxDistance }, rng)); if (Object.op_Implicit((Object)(object)val2)) { TeleportHelper.TeleportBody(characterBody, val2.transform.position); if (Object.op_Implicit((Object)(object)teleportEffect)) { EffectManager.SimpleEffect(teleportEffect, val2.transform.position, Quaternion.identity, true); } Object.Destroy((Object)(object)val2); Object.Destroy((Object)(object)val); return true; } Object.Destroy((Object)(object)val); return false; } public static Vector3? AboveTargetVectorFromDamageInfo(DamageInfo damageInfo, float distanceAboveTarget) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0117: 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_0124: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) if (damageInfo.rejected || !Object.op_Implicit((Object)(object)damageInfo.attacker)) { return null; } CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)component)) { TeamMask enemyTeams = TeamMask.GetEnemyTeams(component.teamComponent.teamIndex); HurtBox val = new SphereSearch { radius = 1f, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = damageInfo.position }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(enemyTeams).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes() .FirstOrDefault(); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)val.healthComponent) && Object.op_Implicit((Object)val.healthComponent.body)) { CharacterBody body = val.healthComponent.body; Vector3 val2 = body.mainHurtBox.collider.ClosestPointOnBounds(body.transform.position + new Vector3(0f, 10000f, 0f)); Vector3? val3 = RaycastToDirection(val2, distanceAboveTarget, Vector3.up, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)); if (val3.HasValue) { return val3.Value; } return val2 + Vector3.up * distanceAboveTarget; } } return null; } public static Vector3? AboveTargetBody(CharacterBody body, float distanceAbove) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_007e: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)body)) { return null; } Vector3 val = body.mainHurtBox.collider.ClosestPointOnBounds(body.transform.position + new Vector3(0f, 10000f, 0f)); Vector3? val2 = RaycastToDirection(val, distanceAbove, Vector3.up, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)); if (val2.HasValue) { return val2.Value; } return val + Vector3.up * distanceAbove; } public static Dictionary GetAimSurfaceAlignmentInfo(Ray ray, int layerMask, float distance) { //IL_0006: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0059: Unknown result type (might be due to invalid IL or missing references) //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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) Dictionary dictionary = new Dictionary(); RaycastHit val = default(RaycastHit); if (!Physics.Raycast(ray, ref val, distance, layerMask, (QueryTriggerInteraction)1)) { Main.ModLogger.LogInfo((object)$"GetAimSurfaceAlignmentInfo did not hit anything in the aim direction on the specified layer ({layerMask})."); return null; } Vector3 point = ((RaycastHit)(ref val)).point; Vector3 val2 = Vector3.Cross(((Ray)(ref ray)).direction, Vector3.up); Vector3 val3 = Vector3.ProjectOnPlane(((RaycastHit)(ref val)).normal, val2); Vector3 value = Vector3.Cross(val2, val3); dictionary.Add("Position", point); dictionary.Add("Right", val2); dictionary.Add("Forward", value); dictionary.Add("Up", val3); return dictionary; } } public static class NetworkingHelpers { public static T GetObjectFromNetIdValue(uint netIdValue) { //IL_0026: 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) NetworkInstanceId key = default(NetworkInstanceId); ((NetworkInstanceId)(ref key))..ctor(netIdValue); NetworkIdentity value = null; if (NetworkServer.active) { NetworkServer.objects.TryGetValue(key, out value); } else { ClientScene.objects.TryGetValue(key, out value); } if (Object.op_Implicit((Object)(object)value)) { T component = ((Component)value).GetComponent(); if (component != null) { return component; } } return default(T); } } } namespace TsunamiItemCore.Utils.Components { public class MaterialControllerComponents { public class HGControllerFinder : MonoBehaviour { public Renderer Renderer; public Material Material; public void Start() { if (Object.op_Implicit((Object)(object)Renderer)) { Material = Renderer.materials[0]; if (Object.op_Implicit((Object)(object)Material)) { switch (((Object)Material.shader).name) { case "Hopoo Games/Deferred/Standard": { HGStandardController hGStandardController = ((Component)this).gameObject.AddComponent(); hGStandardController.Material = Material; hGStandardController.Renderer = Renderer; break; } case "Hopoo Games/FX/Cloud Remap": { HGCloudRemapController hGCloudRemapController = ((Component)this).gameObject.AddComponent(); hGCloudRemapController.Material = Material; hGCloudRemapController.Renderer = Renderer; break; } case "Hopoo Games/FX/Cloud Intersection Remap": { HGIntersectionController hGIntersectionController = ((Component)this).gameObject.AddComponent(); hGIntersectionController.Material = Material; hGIntersectionController.Renderer = Renderer; break; } } } } Object.Destroy((Object)(object)this); } } public class HGStandardController : MonoBehaviour { public enum _RampInfoEnum { TwoTone = 0, SmoothedTwoTone = 1, Unlitish = 3, Subsurface = 4, Grass = 5 } public enum _DecalLayerEnum { Default, Environment, Character, Misc } public enum _CullEnum { Off, Front, Back } public enum _PrintDirectionEnum { BottomUp = 0, TopDown = 1, BackToFront = 3 } public Material Material; public Renderer Renderer; public string MaterialName; public bool _EnableCutout; public Color _Color; public Texture _MainTex; public Vector2 _MainTexScale; public Vector2 _MainTexOffset; [Range(0f, 5f)] public float _NormalStrength; public Texture _NormalTex; public Vector2 _NormalTexScale; public Vector2 _NormalTexOffset; public Color _EmColor; public Texture _EmTex; [Range(0f, 10f)] public float _EmPower; [Range(0f, 1f)] public float _Smoothness; public bool _IgnoreDiffuseAlphaForSpeculars; public _RampInfoEnum _RampChoice; public _DecalLayerEnum _DecalLayer; [Range(0f, 1f)] public float _SpecularStrength; [Range(0.1f, 20f)] public float _SpecularExponent; public _CullEnum _Cull_Mode; public bool _EnableDither; [Range(0f, 1f)] public float _FadeBias; public bool _EnableFresnelEmission; public Texture _FresnelRamp; [Range(0.1f, 20f)] public float _FresnelPower; public Texture _FresnelMask; [Range(0f, 20f)] public float _FresnelBoost; public bool _EnablePrinting; [Range(-25f, 25f)] public float _SliceHeight; [Range(0f, 10f)] public float _PrintBandHeight; [Range(0f, 1f)] public float _PrintAlphaDepth; public Texture _PrintAlphaTexture; public Vector2 _PrintAlphaTextureScale; public Vector2 _PrintAlphaTextureOffset; [Range(0f, 10f)] public float _PrintColorBoost; [Range(0f, 4f)] public float _PrintAlphaBias; [Range(0f, 1f)] public float _PrintEmissionToAlbedoLerp; public _PrintDirectionEnum _PrintDirection; public Texture _PrintRamp; [Range(-10f, 10f)] public float _EliteBrightnessMin; [Range(-10f, 10f)] public float _EliteBrightnessMax; public bool _EnableSplatmap; public bool _UseVertexColorsInstead; [Range(0f, 1f)] public float _BlendDepth; public Texture _SplatmapTex; public Vector2 _SplatmapTexScale; public Vector2 _SplatmapTexOffset; [Range(0f, 20f)] public float _SplatmapTileScale; public Texture _GreenChannelTex; public Texture _GreenChannelNormalTex; [Range(0f, 1f)] public float _GreenChannelSmoothness; [Range(-2f, 5f)] public float _GreenChannelBias; public Texture _BlueChannelTex; public Texture _BlueChannelNormalTex; [Range(0f, 1f)] public float _BlueChannelSmoothness; [Range(-2f, 5f)] public float _BlueChannelBias; public bool _EnableFlowmap; public Texture _FlowTexture; public Texture _FlowHeightmap; public Vector2 _FlowHeightmapScale; public Vector2 _FlowHeightmapOffset; public Texture _FlowHeightRamp; public Vector2 _FlowHeightRampScale; public Vector2 _FlowHeightRampOffset; [Range(-1f, 1f)] public float _FlowHeightBias; [Range(0.1f, 20f)] public float _FlowHeightPower; [Range(0.1f, 20f)] public float _FlowEmissionStrength; [Range(0f, 15f)] public float _FlowSpeed; [Range(0f, 5f)] public float _MaskFlowStrength; [Range(0f, 5f)] public float _NormalFlowStrength; [Range(0f, 10f)] public float _FlowTextureScaleFactor; public bool _EnableLimbRemoval; public void Start() { GrabMaterialValues(); } public void GrabMaterialValues() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0563: 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_0579: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Material)) { _EnableCutout = Material.IsKeywordEnabled("CUTOUT"); _Color = Material.GetColor("_Color"); _MainTex = Material.GetTexture("_MainTex"); _MainTexScale = Material.GetTextureScale("_MainTex"); _MainTexOffset = Material.GetTextureOffset("_MainTex"); _NormalStrength = Material.GetFloat("_NormalStrength"); _NormalTex = Material.GetTexture("_NormalTex"); _NormalTexScale = Material.GetTextureScale("_NormalTex"); _NormalTexOffset = Material.GetTextureOffset("_NormalTex"); _EmColor = Material.GetColor("_EmColor"); _EmTex = Material.GetTexture("_EmTex"); _EmPower = Material.GetFloat("_EmPower"); _Smoothness = Material.GetFloat("_Smoothness"); _IgnoreDiffuseAlphaForSpeculars = Material.IsKeywordEnabled("FORCE_SPEC"); _RampChoice = (_RampInfoEnum)Material.GetFloat("_RampInfo"); _DecalLayer = (_DecalLayerEnum)Material.GetFloat("_DecalLayer"); _SpecularStrength = Material.GetFloat("_SpecularStrength"); _SpecularExponent = Material.GetFloat("_SpecularExponent"); _Cull_Mode = (_CullEnum)Material.GetFloat("_Cull"); _EnableDither = Material.IsKeywordEnabled("DITHER"); _FadeBias = Material.GetFloat("_FadeBias"); _EnableFresnelEmission = Material.IsKeywordEnabled("FRESNEL_EMISSION"); _FresnelRamp = Material.GetTexture("_FresnelRamp"); _FresnelPower = Material.GetFloat("_FresnelPower"); _FresnelMask = Material.GetTexture("_FresnelMask"); _FresnelBoost = Material.GetFloat("_FresnelBoost"); _EnablePrinting = Material.IsKeywordEnabled("PRINT_CUTOFF"); _SliceHeight = Material.GetFloat("_SliceHeight"); _PrintBandHeight = Material.GetFloat("_SliceBandHeight"); _PrintAlphaDepth = Material.GetFloat("_SliceAlphaDepth"); _PrintAlphaTexture = Material.GetTexture("_SliceAlphaTex"); _PrintAlphaTextureScale = Material.GetTextureScale("_SliceAlphaTex"); _PrintAlphaTextureOffset = Material.GetTextureOffset("_SliceAlphaTex"); _PrintColorBoost = Material.GetFloat("_PrintBoost"); _PrintAlphaBias = Material.GetFloat("_PrintBias"); _PrintEmissionToAlbedoLerp = Material.GetFloat("_PrintEmissionToAlbedoLerp"); _PrintDirection = (_PrintDirectionEnum)Material.GetFloat("_PrintDirection"); _PrintRamp = Material.GetTexture("_PrintRamp"); _EliteBrightnessMin = Material.GetFloat("_EliteBrightnessMin"); _EliteBrightnessMax = Material.GetFloat("_EliteBrightnessMax"); _EnableSplatmap = Material.IsKeywordEnabled("SPLATMAP"); _UseVertexColorsInstead = Material.IsKeywordEnabled("USE_VERTEX_COLORS"); _BlendDepth = Material.GetFloat("_Depth"); _SplatmapTex = Material.GetTexture("_SplatmapTex"); _SplatmapTexScale = Material.GetTextureScale("_SplatmapTex"); _SplatmapTexOffset = Material.GetTextureOffset("_SplatmapTex"); _SplatmapTileScale = Material.GetFloat("_SplatmapTileScale"); _GreenChannelTex = Material.GetTexture("_GreenChannelTex"); _GreenChannelNormalTex = Material.GetTexture("_GreenChannelNormalTex"); _GreenChannelSmoothness = Material.GetFloat("_GreenChannelSmoothness"); _GreenChannelBias = Material.GetFloat("_GreenChannelBias"); _BlueChannelTex = Material.GetTexture("_BlueChannelTex"); _BlueChannelNormalTex = Material.GetTexture("_BlueChannelNormalTex"); _BlueChannelSmoothness = Material.GetFloat("_BlueChannelSmoothness"); _BlueChannelBias = Material.GetFloat("_BlueChannelBias"); _EnableFlowmap = Material.IsKeywordEnabled("FLOWMAP"); _FlowTexture = Material.GetTexture("_FlowTex"); _FlowHeightmap = Material.GetTexture("_FlowHeightmap"); _FlowHeightmapScale = Material.GetTextureScale("_FlowHeightmap"); _FlowHeightmapOffset = Material.GetTextureOffset("_FlowHeightmap"); _FlowHeightRamp = Material.GetTexture("_FlowHeightRamp"); _FlowHeightRampScale = Material.GetTextureScale("_FlowHeightRamp"); _FlowHeightRampOffset = Material.GetTextureOffset("_FlowHeightRamp"); _FlowHeightBias = Material.GetFloat("_FlowHeightBias"); _FlowHeightPower = Material.GetFloat("_FlowHeightPower"); _FlowEmissionStrength = Material.GetFloat("_FlowEmissionStrength"); _FlowSpeed = Material.GetFloat("_FlowSpeed"); _MaskFlowStrength = Material.GetFloat("_FlowMaskStrength"); _NormalFlowStrength = Material.GetFloat("_FlowNormalStrength"); _FlowTextureScaleFactor = Material.GetFloat("_FlowTextureScaleFactor"); _EnableLimbRemoval = Material.IsKeywordEnabled("LIMBREMOVAL"); MaterialName = ((Object)Material).name; } } public void Update() { //IL_006e: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0729: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Material)) { if (((Object)Material).name != MaterialName && Object.op_Implicit((Object)(object)Renderer)) { GrabMaterialValues(); PutMaterialIntoMeshRenderer(Renderer, Material); } SetShaderKeywordBasedOnBool(_EnableCutout, Material, "CUTOUT"); Material.SetColor("_Color", _Color); if (Object.op_Implicit((Object)(object)_MainTex)) { Material.SetTexture("_MainTex", _MainTex); Material.SetTextureScale("_MainTex", _MainTexScale); Material.SetTextureOffset("_MainTex", _MainTexOffset); } else { Material.SetTexture("_MainTex", (Texture)null); } Material.SetFloat("_NormalStrength", _NormalStrength); if (Object.op_Implicit((Object)(object)_NormalTex)) { Material.SetTexture("_NormalTex", _NormalTex); Material.SetTextureScale("_NormalTex", _NormalTexScale); Material.SetTextureOffset("_NormalTex", _NormalTexOffset); } else { Material.SetTexture("_NormalTex", (Texture)null); } Material.SetColor("_EmColor", _EmColor); if (Object.op_Implicit((Object)(object)_EmTex)) { Material.SetTexture("_EmTex", _EmTex); } else { Material.SetTexture("_EmTex", (Texture)null); } Material.SetFloat("_EmPower", _EmPower); Material.SetFloat("_Smoothness", _Smoothness); SetShaderKeywordBasedOnBool(_IgnoreDiffuseAlphaForSpeculars, Material, "FORCE_SPEC"); Material.SetFloat("_RampInfo", Convert.ToSingle(_RampChoice)); Material.SetFloat("_DecalLayer", Convert.ToSingle(_DecalLayer)); Material.SetFloat("_SpecularStrength", _SpecularStrength); Material.SetFloat("_SpecularExponent", _SpecularExponent); Material.SetFloat("_Cull", Convert.ToSingle(_Cull_Mode)); SetShaderKeywordBasedOnBool(_EnableDither, Material, "DITHER"); Material.SetFloat("_FadeBias", _FadeBias); SetShaderKeywordBasedOnBool(_EnableFresnelEmission, Material, "FRESNEL_EMISSION"); if (Object.op_Implicit((Object)(object)_FresnelRamp)) { Material.SetTexture("_FresnelRamp", _FresnelRamp); } else { Material.SetTexture("_FresnelRamp", (Texture)null); } Material.SetFloat("_FresnelPower", _FresnelPower); if (Object.op_Implicit((Object)(object)_FresnelMask)) { Material.SetTexture("_FresnelMask", _FresnelMask); } else { Material.SetTexture("_FresnelMask", (Texture)null); } Material.SetFloat("_FresnelBoost", _FresnelBoost); SetShaderKeywordBasedOnBool(_EnablePrinting, Material, "PRINT_CUTOFF"); Material.SetFloat("_SliceHeight", _SliceHeight); Material.SetFloat("_SliceBandHeight", _PrintBandHeight); Material.SetFloat("_SliceAlphaDepth", _PrintAlphaDepth); if (Object.op_Implicit((Object)(object)_PrintAlphaTexture)) { Material.SetTexture("_SliceAlphaTex", _PrintAlphaTexture); Material.SetTextureScale("_SliceAlphaTex", _PrintAlphaTextureScale); Material.SetTextureOffset("_SliceAlphaTex", _PrintAlphaTextureOffset); } else { Material.SetTexture("_SliceAlphaTex", (Texture)null); } Material.SetFloat("_PrintBoost", _PrintColorBoost); Material.SetFloat("_PrintBias", _PrintAlphaBias); Material.SetFloat("_PrintEmissionToAlbedoLerp", _PrintEmissionToAlbedoLerp); Material.SetFloat("_PrintDirection", Convert.ToSingle(_PrintDirection)); if (Object.op_Implicit((Object)(object)_PrintRamp)) { Material.SetTexture("_PrintRamp", _PrintRamp); } else { Material.SetTexture("_PrintRamp", (Texture)null); } Material.SetFloat("_EliteBrightnessMin", _EliteBrightnessMin); Material.SetFloat("_EliteBrightnessMax", _EliteBrightnessMax); SetShaderKeywordBasedOnBool(_EnableSplatmap, Material, "SPLATMAP"); SetShaderKeywordBasedOnBool(_UseVertexColorsInstead, Material, "USE_VERTEX_COLORS"); Material.SetFloat("_Depth", _BlendDepth); if (Object.op_Implicit((Object)(object)_SplatmapTex)) { Material.SetTexture("_SplatmapTex", _SplatmapTex); Material.SetTextureScale("_SplatmapTex", _SplatmapTexScale); Material.SetTextureOffset("_SplatmapTex", _SplatmapTexOffset); } else { Material.SetTexture("_SplatmapTex", (Texture)null); } Material.SetFloat("_SplatmapTileScale", _SplatmapTileScale); if (Object.op_Implicit((Object)(object)_GreenChannelTex)) { Material.SetTexture("_GreenChannelTex", _GreenChannelTex); } else { Material.SetTexture("_GreenChannelTex", (Texture)null); } if (Object.op_Implicit((Object)(object)_GreenChannelNormalTex)) { Material.SetTexture("_GreenChannelNormalTex", _GreenChannelNormalTex); } else { Material.SetTexture("_GreenChannelNormalTex", (Texture)null); } Material.SetFloat("_GreenChannelSmoothness", _GreenChannelSmoothness); Material.SetFloat("_GreenChannelBias", _GreenChannelBias); if (Object.op_Implicit((Object)(object)_BlueChannelTex)) { Material.SetTexture("_BlueChannelTex", _BlueChannelTex); } else { Material.SetTexture("_BlueChannelTex", (Texture)null); } if (Object.op_Implicit((Object)(object)_BlueChannelNormalTex)) { Material.SetTexture("_BlueChannelNormalTex", _BlueChannelNormalTex); } else { Material.SetTexture("_BlueChannelNormalTex", (Texture)null); } Material.SetFloat("_BlueChannelSmoothness", _BlueChannelSmoothness); Material.SetFloat("_BlueChannelBias", _BlueChannelBias); SetShaderKeywordBasedOnBool(_EnableFlowmap, Material, "FLOWMAP"); if (Object.op_Implicit((Object)(object)_FlowTexture)) { Material.SetTexture("_FlowTex", _FlowTexture); } else { Material.SetTexture("_FlowTex", (Texture)null); } if (Object.op_Implicit((Object)(object)_FlowHeightmap)) { Material.SetTexture("_FlowHeightmap", _FlowHeightmap); Material.SetTextureScale("_FlowHeightmap", _FlowHeightmapScale); Material.SetTextureOffset("_FlowHeightmap", _FlowHeightmapOffset); } else { Material.SetTexture("_FlowHeightmap", (Texture)null); } if (Object.op_Implicit((Object)(object)_FlowHeightRamp)) { Material.SetTexture("_FlowHeightRamp", _FlowHeightRamp); Material.SetTextureScale("_FlowHeightRamp", _FlowHeightRampScale); Material.SetTextureOffset("_FlowHeightRamp", _FlowHeightRampOffset); } else { Material.SetTexture("_FlowHeightRamp", (Texture)null); } Material.SetFloat("_FlowHeightBias", _FlowHeightBias); Material.SetFloat("_FlowHeightPower", _FlowHeightPower); Material.SetFloat("_FlowEmissionStrength", _FlowEmissionStrength); Material.SetFloat("_FlowSpeed", _FlowSpeed); Material.SetFloat("_FlowMaskStrength", _MaskFlowStrength); Material.SetFloat("_FlowNormalStrength", _NormalFlowStrength); Material.SetFloat("_FlowTextureScaleFactor", _FlowTextureScaleFactor); SetShaderKeywordBasedOnBool(_EnableLimbRemoval, Material, "LIMBREMOVAL"); } } } public class HGCloudRemapController : MonoBehaviour { public enum _SrcBlendFloatEnum { Zero, One, DstColor, SrcColor, OneMinusDstColor, SrcAlpha, OneMinusSrcColor, DstAlpha, OneMinusDstAlpha, SrcAlphaSaturate, OneMinusSrcAlpha } public enum _DstBlendFloatEnum { Zero, One, DstColor, SrcColor, OneMinusDstColor, SrcAlpha, OneMinusSrcColor, DstAlpha, OneMinusDstAlpha, SrcAlphaSaturate, OneMinusSrcAlpha } public enum _CullEnum { Off, Front, Back } public enum _ZTestEnum { Disabled, Never, Less, Equal, LessEqual, Greater, NotEqual, GreaterEqual, Always } public Material Material; public Renderer Renderer; public string MaterialName; public _SrcBlendFloatEnum _Source_Blend_Mode; public _DstBlendFloatEnum _Destination_Blend_Mode; public int _InternalSimpleBlendMode; public Color _Tint; public bool _DisableRemapping; public Texture _MainTex; public Vector2 _MainTexScale; public Vector2 _MainTexOffset; public Texture _RemapTex; public Vector2 _RemapTexScale; public Vector2 _RemapTexOffset; [Range(0f, 2f)] public float _SoftFactor; [Range(1f, 20f)] public float _BrightnessBoost; [Range(0f, 20f)] public float _AlphaBoost; [Range(0f, 1f)] public float _AlphaBias; public bool _UseUV1; public bool _FadeWhenNearCamera; [Range(0f, 1f)] public float _FadeCloseDistance; public _CullEnum _Cull_Mode; public _ZTestEnum _ZTest_Mode; [Range(-10f, 10f)] public float _DepthOffset; public bool _CloudRemapping; public bool _DistortionClouds; [Range(-2f, 2f)] public float _DistortionStrength; public Texture _Cloud1Tex; public Vector2 _Cloud1TexScale; public Vector2 _Cloud1TexOffset; public Texture _Cloud2Tex; public Vector2 _Cloud2TexScale; public Vector2 _Cloud2TexOffset; public Vector4 _CutoffScroll; public bool _VertexColors; public bool _LuminanceForVertexAlpha; public bool _LuminanceForTextureAlpha; public bool _VertexOffset; public bool _FresnelFade; public bool _SkyboxOnly; [Range(-20f, 20f)] public float _FresnelPower; [Range(0f, 3f)] public float _VertexOffsetAmount; public void Start() { GrabMaterialValues(); } public void GrabMaterialValues() { //IL_0061: 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_00a3: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Material)) { _Source_Blend_Mode = (_SrcBlendFloatEnum)Material.GetFloat("_SrcBlend"); _Destination_Blend_Mode = (_DstBlendFloatEnum)Material.GetFloat("_DstBlend"); _InternalSimpleBlendMode = (int)Material.GetFloat("_InternalSimpleBlendMode"); _Tint = Material.GetColor("_TintColor"); _DisableRemapping = Material.IsKeywordEnabled("DISABLEREMAP"); _MainTex = Material.GetTexture("_MainTex"); _MainTexScale = Material.GetTextureScale("_MainTex"); _MainTexOffset = Material.GetTextureOffset("_MainTex"); _RemapTex = Material.GetTexture("_RemapTex"); _RemapTexScale = Material.GetTextureScale("_RemapTex"); _RemapTexOffset = Material.GetTextureOffset("_RemapTex"); _SoftFactor = Material.GetFloat("_InvFade"); _BrightnessBoost = Material.GetFloat("_Boost"); _AlphaBoost = Material.GetFloat("_AlphaBoost"); _AlphaBias = Material.GetFloat("_AlphaBias"); _UseUV1 = Material.IsKeywordEnabled("USE_UV1"); _FadeWhenNearCamera = Material.IsKeywordEnabled("FADECLOSE"); _FadeCloseDistance = Material.GetFloat("_FadeCloseDistance"); _Cull_Mode = (_CullEnum)Material.GetFloat("_Cull"); _ZTest_Mode = (_ZTestEnum)Material.GetFloat("_ZTest"); _DepthOffset = Material.GetFloat("_DepthOffset"); _CloudRemapping = Material.IsKeywordEnabled("USE_CLOUDS"); _DistortionClouds = Material.IsKeywordEnabled("CLOUDOFFSET"); _DistortionStrength = Material.GetFloat("_DistortionStrength"); _Cloud1Tex = Material.GetTexture("_Cloud1Tex"); _Cloud1TexScale = Material.GetTextureScale("_Cloud1Tex"); _Cloud1TexOffset = Material.GetTextureOffset("_Cloud1Tex"); _Cloud2Tex = Material.GetTexture("_Cloud2Tex"); _Cloud2TexScale = Material.GetTextureScale("_Cloud2Tex"); _Cloud2TexOffset = Material.GetTextureOffset("_Cloud2Tex"); _CutoffScroll = Material.GetVector("_CutoffScroll"); _VertexColors = Material.IsKeywordEnabled("VERTEXCOLOR"); _LuminanceForVertexAlpha = Material.IsKeywordEnabled("VERTEXALPHA"); _LuminanceForTextureAlpha = Material.IsKeywordEnabled("CALCTEXTUREALPHA"); _VertexOffset = Material.IsKeywordEnabled("VERTEXOFFSET"); _FresnelFade = Material.IsKeywordEnabled("FRESNEL"); _SkyboxOnly = Material.IsKeywordEnabled("SKYBOX_ONLY"); _FresnelPower = Material.GetFloat("_FresnelPower"); _VertexOffsetAmount = Material.GetFloat("_OffsetAmount"); MaterialName = ((Object)Material).name; } } public void Update() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Material)) { if (((Object)Material).name != MaterialName && Object.op_Implicit((Object)(object)Renderer)) { GrabMaterialValues(); PutMaterialIntoMeshRenderer(Renderer, Material); } Material.SetFloat("_SrcBlend", Convert.ToSingle(_Source_Blend_Mode)); Material.SetFloat("_DstBlend", Convert.ToSingle(_Destination_Blend_Mode)); Material.SetFloat("_InternalSimpleBlendMode", (float)_InternalSimpleBlendMode); Material.SetColor("_TintColor", _Tint); SetShaderKeywordBasedOnBool(_DisableRemapping, Material, "DISABLEREMAP"); if (Object.op_Implicit((Object)(object)_MainTex)) { Material.SetTexture("_MainTex", _MainTex); Material.SetTextureScale("_MainTex", _MainTexScale); Material.SetTextureOffset("_MainTex", _MainTexOffset); } else { Material.SetTexture("_MainTex", (Texture)null); } if (Object.op_Implicit((Object)(object)_RemapTex)) { Material.SetTexture("_RemapTex", _RemapTex); Material.SetTextureScale("_RemapTex", _RemapTexScale); Material.SetTextureOffset("_RemapTex", _RemapTexOffset); } else { Material.SetTexture("_RemapTex", (Texture)null); } Material.SetFloat("_InvFade", _SoftFactor); Material.SetFloat("_Boost", _BrightnessBoost); Material.SetFloat("_AlphaBoost", _AlphaBoost); Material.SetFloat("_AlphaBias", _AlphaBias); SetShaderKeywordBasedOnBool(_UseUV1, Material, "USE_UV1"); SetShaderKeywordBasedOnBool(_FadeWhenNearCamera, Material, "FADECLOSE"); Material.SetFloat("_FadeCloseDistance", _FadeCloseDistance); Material.SetFloat("_Cull", Convert.ToSingle(_Cull_Mode)); Material.SetFloat("_ZTest", Convert.ToSingle(_ZTest_Mode)); Material.SetFloat("_DepthOffset", _DepthOffset); SetShaderKeywordBasedOnBool(_CloudRemapping, Material, "USE_CLOUDS"); SetShaderKeywordBasedOnBool(_DistortionClouds, Material, "CLOUDOFFSET"); Material.SetFloat("_DistortionStrength", _DistortionStrength); if (Object.op_Implicit((Object)(object)_Cloud1Tex)) { Material.SetTexture("_Cloud1Tex", _Cloud1Tex); Material.SetTextureScale("_Cloud1Tex", _Cloud1TexScale); Material.SetTextureOffset("_Cloud1Tex", _Cloud1TexOffset); } else { Material.SetTexture("_Cloud1Tex", (Texture)null); } if (Object.op_Implicit((Object)(object)_Cloud2Tex)) { Material.SetTexture("_Cloud2Tex", _Cloud2Tex); Material.SetTextureScale("_Cloud2Tex", _Cloud2TexScale); Material.SetTextureOffset("_Cloud2Tex", _Cloud2TexOffset); } else { Material.SetTexture("_Cloud2Tex", (Texture)null); } Material.SetVector("_CutoffScroll", _CutoffScroll); SetShaderKeywordBasedOnBool(_VertexColors, Material, "VERTEXCOLOR"); SetShaderKeywordBasedOnBool(_LuminanceForVertexAlpha, Material, "VERTEXALPHA"); SetShaderKeywordBasedOnBool(_LuminanceForTextureAlpha, Material, "CALCTEXTUREALPHA"); SetShaderKeywordBasedOnBool(_VertexOffset, Material, "VERTEXOFFSET"); SetShaderKeywordBasedOnBool(_FresnelFade, Material, "FRESNEL"); SetShaderKeywordBasedOnBool(_SkyboxOnly, Material, "SKYBOX_ONLY"); Material.SetFloat("_FresnelPower", _FresnelPower); Material.SetFloat("_OffsetAmount", _VertexOffsetAmount); } } } public class HGIntersectionController : MonoBehaviour { public enum _SrcBlendFloatEnum { Zero, One, DstColor, SrcColor, OneMinusDstColor, SrcAlpha, OneMinusSrcColor, DstAlpha, OneMinusDstAlpha, SrcAlphaSaturate, OneMinusSrcAlpha } public enum _DstBlendFloatEnum { Zero, One, DstColor, SrcColor, OneMinusDstColor, SrcAlpha, OneMinusSrcColor, DstAlpha, OneMinusDstAlpha, SrcAlphaSaturate, OneMinusSrcAlpha } public enum _CullEnum { Off, Front, Back } public Material Material; public Renderer Renderer; public string MaterialName; public _SrcBlendFloatEnum _Source_Blend_Mode; public _DstBlendFloatEnum _Destination_Blend_Mode; public Color _Tint; public Texture _MainTex; public Vector2 _MainTexScale; public Vector2 _MainTexOffset; public Texture _Cloud1Tex; public Vector2 _Cloud1TexScale; public Vector2 _Cloud1TexOffset; public Texture _Cloud2Tex; public Vector2 _Cloud2TexScale; public Vector2 _Cloud2TexOffset; public Texture _RemapTex; public Vector2 _RemapTexScale; public Vector2 _RemapTexOffset; public Vector4 _CutoffScroll; [Range(0f, 30f)] public float _SoftFactor; [Range(0.1f, 20f)] public float _SoftPower; [Range(0f, 5f)] public float _BrightnessBoost; [Range(0.1f, 20f)] public float _RimPower; [Range(0f, 5f)] public float _RimStrength; [Range(0f, 20f)] public float _AlphaBoost; [Range(0f, 20f)] public float _IntersectionStrength; public _CullEnum _Cull_Mode; public bool _FadeFromVertexColorsOn; public bool _EnableTriplanarProjectionsForClouds; public void Start() { GrabMaterialValues(); } public void GrabMaterialValues() { //IL_004a: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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_00ff: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Material)) { _Source_Blend_Mode = (_SrcBlendFloatEnum)Material.GetFloat("_SrcBlendFloat"); _Destination_Blend_Mode = (_DstBlendFloatEnum)Material.GetFloat("_DstBlendFloat"); _Tint = Material.GetColor("_TintColor"); _MainTex = Material.GetTexture("_MainTex"); _MainTexScale = Material.GetTextureScale("_MainTex"); _MainTexOffset = Material.GetTextureOffset("_MainTex"); _Cloud1Tex = Material.GetTexture("_Cloud1Tex"); _Cloud1TexScale = Material.GetTextureScale("_Cloud1Tex"); _Cloud1TexOffset = Material.GetTextureOffset("_Cloud1Tex"); _Cloud2Tex = Material.GetTexture("_Cloud2Tex"); _Cloud2TexScale = Material.GetTextureScale("_Cloud2Tex"); _Cloud2TexOffset = Material.GetTextureOffset("_Cloud2Tex"); _RemapTex = Material.GetTexture("_RemapTex"); _RemapTexScale = Material.GetTextureScale("_RemapTex"); _RemapTexOffset = Material.GetTextureOffset("_RemapTex"); _CutoffScroll = Material.GetVector("_CutoffScroll"); _SoftFactor = Material.GetFloat("_InvFade"); _SoftPower = Material.GetFloat("_SoftPower"); _BrightnessBoost = Material.GetFloat("_Boost"); _RimPower = Material.GetFloat("_RimPower"); _RimStrength = Material.GetFloat("_RimStrength"); _AlphaBoost = Material.GetFloat("_AlphaBoost"); _IntersectionStrength = Material.GetFloat("_IntersectionStrength"); _Cull_Mode = (_CullEnum)Material.GetFloat("_Cull"); _FadeFromVertexColorsOn = Material.IsKeywordEnabled("FADE_FROM_VERTEX_COLORS"); _EnableTriplanarProjectionsForClouds = Material.IsKeywordEnabled("TRIPLANAR"); MaterialName = ((Object)Material).name; } } public void Update() { //IL_0098: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Material)) { if (((Object)Material).name != MaterialName && Object.op_Implicit((Object)(object)Renderer)) { GrabMaterialValues(); PutMaterialIntoMeshRenderer(Renderer, Material); } Material.SetFloat("_SrcBlendFloat", Convert.ToSingle(_Source_Blend_Mode)); Material.SetFloat("_DstBlendFloat", Convert.ToSingle(_Destination_Blend_Mode)); Material.SetColor("_TintColor", _Tint); if (Object.op_Implicit((Object)(object)_MainTex)) { Material.SetTexture("_MainTex", _MainTex); Material.SetTextureScale("_MainTex", _MainTexScale); Material.SetTextureOffset("_MainTex", _MainTexOffset); } else { Material.SetTexture("_MainTex", (Texture)null); } if (Object.op_Implicit((Object)(object)_Cloud1Tex)) { Material.SetTexture("_Cloud1Tex", _Cloud1Tex); Material.SetTextureScale("_Cloud1Tex", _Cloud1TexScale); Material.SetTextureOffset("_Cloud1Tex", _Cloud1TexOffset); } else { Material.SetTexture("_Cloud1Tex", (Texture)null); } if (Object.op_Implicit((Object)(object)_Cloud2Tex)) { Material.SetTexture("_Cloud2Tex", _Cloud2Tex); Material.SetTextureScale("_Cloud2Tex", _Cloud2TexScale); Material.SetTextureOffset("_Cloud2Tex", _Cloud2TexOffset); } else { Material.SetTexture("_Cloud2Tex", (Texture)null); } if (Object.op_Implicit((Object)(object)_RemapTex)) { Material.SetTexture("_RemapTex", _RemapTex); Material.SetTextureScale("_RemapTex", _RemapTexScale); Material.SetTextureOffset("_RemapTex", _RemapTexOffset); } else { Material.SetTexture("_RemapTex", (Texture)null); } Material.SetVector("_CutoffScroll", _CutoffScroll); Material.SetFloat("_InvFade", _SoftFactor); Material.SetFloat("_SoftPower", _SoftPower); Material.SetFloat("_Boost", _BrightnessBoost); Material.SetFloat("_RimPower", _RimPower); Material.SetFloat("_RimStrength", _RimStrength); Material.SetFloat("_AlphaBoost", _AlphaBoost); Material.SetFloat("_IntersectionStrength", _IntersectionStrength); Material.SetFloat("_Cull", Convert.ToSingle(_Cull_Mode)); SetShaderKeywordBasedOnBool(_FadeFromVertexColorsOn, Material, "FADE_FROM_VERTEX_COLORS"); SetShaderKeywordBasedOnBool(_EnableTriplanarProjectionsForClouds, Material, "TRIPLANAR"); } } } public static void SetShaderKeywordBasedOnBool(bool enabled, Material material, string keyword) { if (!Object.op_Implicit((Object)(object)material)) { return; } if (enabled) { if (!material.IsKeywordEnabled(keyword)) { material.EnableKeyword(keyword); } } else if (material.IsKeywordEnabled(keyword)) { material.DisableKeyword(keyword); } } public static void PutMaterialIntoMeshRenderer(Renderer renderer, Material material) { if (Object.op_Implicit((Object)(object)material) && Object.op_Implicit((Object)(object)renderer)) { renderer.materials[0] = material; } } } } namespace TsunamiItemCore.Items { public class AntiqueShield : ItemBase { public static float shieldArmor; public override string ItemName => "Antique Shield"; public override string ItemLangTokenName => "TSUNAMI_ANTIQUE_SHIELD"; public override string ItemPickupDesc => "Gain extra armor."; public override string ItemFullDescription => "Gain an extra 5 armor (+5 per stack)."; public override string ItemLore => "Man, this work is backbreaking.\nYou could say that again, pal. I mean what the hell are we doing out here? We’ve barely found anything even remotely interesting!\nWhat about this old shield?\nHuh? What shield? Lemme take a look.\n... \nThat's... suspicious.\nWhat do you mean? How is it suspicious? It’s just a shield, man.\nI don’t know, it’s just… it just is. I can’t help but be filled with this overwhelming sense in my mind that it’s fully and absolutely suspicious, and have this strong urge to make it known.\nYou feeling alright man? You get a good sleep last night?\nGet rid of it.\nWhat?\nThat shield, it’s dangerous. It was left here for a reason. We need to destroy it.\nDude calm the hell down, it’s just a shield."; public override ItemTier Tier => (ItemTier)0; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("AntiqueShieldDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("AntiqueShieldIcon.png"); public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { shieldArmor = config.Bind("Item: " + ItemName, "Armor Per Shield", 5f, "armor added per shield.").Value; } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); int count = GetCount(self); self.armor += (float)count * shieldArmor; } } public class AshSandwich : ItemBase { public override string ItemName => "Sandwich For Ash"; public override string ItemLangTokenName => "TSUNAMI_ASH_SANDWICH"; public override string ItemPickupDesc => "Killing enemies grant a stacking heal consumed by using Special."; public override string ItemFullDescription => "Killing an enemy will grant you a stacking buff. Upon using your Special, heal for 4 (+4 per stack) health multiplied by every stack of the buff you have."; public override string ItemLore => "Sounds of keys clacking and occasional groans can be heard outside of the door. A man enters the room and speaks to the diligent woman on the computer.\n''Hey Ash, whatcha doing?''\n''Coding.''\n''Coding…?''\n''Coding... something.''\n''Uh, right. Well...''\n\nThe sound of a plate being slid onto her desk can be heard. A rather filled sandwich is located on the plate.\n\n''Here. Keep up the good work.''\n''Oh, nice! Thanks man, I was getting a little peckish.''\n\nThe sounds of clacking has been temporarily replaced with the sound of Ash scarfing the sandwich down.\n\n''Yeah no problem, might as well return the favor.''\n''Oh, for that little thing I did for you back then? It was only a kind gesture.''\n''And for that, you get a sandwich! Good luck on your nerd stuff, and thanks for your work.''\n\nThe man gives a quick thumbs up before exiting the room."; public override ItemTier Tier => (ItemTier)1; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("SandwichForAshDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("SandwichForAshIcon.png"); public BuffDef SandwichBuff { get; private set; } public BuffIndex SandwichBuffIndex { get; private set; } private void CreateBuff() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) SandwichBuff = ScriptableObject.CreateInstance(); ((Object)SandwichBuff).name = "SandwichHealBuff"; SandwichBuff.buffColor = new Color(0f, 0.5f, 0f); SandwichBuff.canStack = true; SandwichBuff.isDebuff = false; SandwichBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/AttackSpeedOnCrit").iconSprite; SandwichBuff.buffIndex = SandwichBuffIndex; ContentAddition.AddBuffDef(SandwichBuff); } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuff(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(OnKillStuff); CharacterBody.OnSkillActivated += new hook_OnSkillActivated(DoSandwichTask); } private void OnKillStuff(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); CharacterBody victimBody = damageReport.victimBody; CharacterBody attackerBody = damageReport.attackerBody; if (Object.op_Implicit((Object)(object)victimBody) && Object.op_Implicit((Object)(object)attackerBody) && GetCount(attackerBody) > 0) { ItemHelpers.RefreshTimedBuffs(attackerBody, SandwichBuff, 60f); attackerBody.AddTimedBuffAuthority(SandwichBuff.buffIndex, 60f); ItemHelpers.RefreshTimedBuffs(attackerBody, SandwichBuff, 60f); } } private void DoSandwichTask(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0060: 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) orig.Invoke(self, skill); int count = GetCount(self); bool flag; if (count > 0) { SkillLocator skillLocator = self.skillLocator; flag = (Object)(object)(((Object)skillLocator != (Object)null) ? skillLocator.special : null) == (Object)(object)skill; } else { flag = false; } if (flag) { if (NetworkServer.active) { self.healthComponent.Heal((float)(4 * self.GetBuffCount(SandwichBuff) * count), default(ProcChainMask), true); self.ClearTimedBuffs(SandwichBuff); } self.ClearTimedBuffs(SandwichBuff); } } } public class BerserkersKneepad : ItemBase { public override string ItemName => "Berzerker’s Kneepad"; public override string ItemLangTokenName => "TSUNAMI_BERZERKERS_KNEEPAD"; public override string ItemPickupDesc => "Go berserk upon entering combat."; public override string ItemFullDescription => "Upon entering combat, enter a battle frenzy for 3 seconds, dealing 10% (+10% per stack) more damage, moving 20% (+10% per stack) faster, and attacking 20% (+10% per stack) faster. Recharges every 13 seconds."; public override string ItemLore => "THEY GON RUMBLE\nTHEY GON TAKE YO FACE OFF\nIT'S ABOUT RICE, IT'S ABOUT FLOUR\nYOU STAY HUNGRY, I DEVOUR"; public override ItemTier Tier => (ItemTier)0; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("BerzerkersKneepadDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("BerserkersKneepad.png"); public BuffDef BerserkBuff { get; private set; } public BuffDef BerserkDebuff { get; private set; } public BuffIndex BerserkDebuffIndex { get; private set; } public BuffIndex BerserkBuffIndex { get; private set; } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuffs(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } private void CreateBuffs() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) BerserkBuff = ScriptableObject.CreateInstance(); ((Object)BerserkBuff).name = "Berserk Buff"; BerserkBuff.buffColor = new Color(0.5f, 0f, 0f); BerserkBuff.canStack = false; BerserkBuff.isDebuff = false; BerserkBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/Cripple").iconSprite; BerserkBuff.buffIndex = BerserkBuffIndex; ContentAddition.AddBuffDef(BerserkBuff); BerserkDebuff = ScriptableObject.CreateInstance(); ((Object)BerserkDebuff).name = "Berserk Cooldown"; BerserkDebuff.buffColor = Color.gray; BerserkDebuff.canStack = false; BerserkDebuff.isDebuff = false; BerserkDebuff.isCooldown = true; BerserkDebuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/Cripple").iconSprite; BerserkDebuff.buffIndex = BerserkDebuffIndex; ContentAddition.AddBuffDef(BerserkDebuff); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown CharacterBody.OnSkillActivated += new hook_OnSkillActivated(GoBananas); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddBananasBuff); } private void GoBananas(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill) { orig.Invoke(self, skill); if (NetworkServer.active && GetCount(self) > 0 && !self.HasBuff(BerserkDebuff)) { self.AddTimedBuff(BerserkDebuff, 13f); self.AddTimedBuff(BerserkBuff, 3f); } } private void AddBananasBuff(CharacterBody sender, StatHookEventArgs args) { int count = GetCount(sender); if (sender.HasBuff(BerserkBuff)) { args.damageMultAdd += 0.1f * (float)count; args.attackSpeedMultAdd += 0.1f + 0.1f * (float)count; args.moveSpeedMultAdd += 0.1f + 0.1f * (float)count; } } } public class DeckofCards : ItemBase { public static float chancePerStack; public static float durationPerStack; public static string extraBlacklist; public static bool logBuffPool; private static BuffDef[] buffPool = Array.Empty(); private static Xoroshiro128Plus rng; public override string ItemName => "Deck of Cards"; public override string ItemLangTokenName => "TSUNAMI_CARD_DECK"; public override string ItemPickupDesc => "Gain a chance to get a random base game buff on killing an enemy."; public override string ItemFullDescription => "Upon killing an enemy, you have a 5% (+5% per stack) chance to gain a random buff for 3 (+3 per stack) seconds."; public override string ItemLore => "You know, I've heard some... interesting things about those cards of yours.\n\nThe younger player shuffled his deck around idly, almost completely brushing off the words of the older player.\n\nYeah, so what? My cards are awesome! Never lost me a game. Now are we playing or what?\n\nThe older man begin to chuckle oddly at him. He would get up slowly approach him.\n\nOh, they are quite... awesome, as you'd describe them.\nBut you see, I know your secret... you didn't even make this deck.\n\nThe younger would recoil in obvious shock, as no one he had played against knew his secret.\n\nT-the hell?! Who even are you?\n\nOh, you see... I'm the original holder of those very special cards. I made them with my...friends. And I want them back. Now. hand them over. The young man hopped out of his chair and began to run away.\nYou can have them back if you can catch me! Good luck with that, coffin dodger!\n\nThe old man began to take out a very ornate looking camera.\nA fast one. You'll make a nice addition...\n\n\n...An echoing click rang out through the ship."; public override ItemTier Tier => (ItemTier)1; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("DeckOfCardsDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("DeckOfCardsIcon.png"); public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { chancePerStack = config.Bind("Item: " + ItemName, "Chance Per Stack", 5f, "Chance (in percent) per stack to gain a buff on kill.").Value; durationPerStack = config.Bind("Item: " + ItemName, "Duration Per Stack", 3f, "Buff duration in seconds per stack.").Value; extraBlacklist = config.Bind("Item: " + ItemName, "Blacklisted Buffs", "", "Comma separated list of internal buff names (e.g. bdImmune) that Deck of Cards should never grant. Enable 'Log Buff Pool' to see the names.").Value; logBuffPool = config.Bind("Item: " + ItemName, "Log Buff Pool", false, "Print every buff Deck of Cards can grant to the BepInEx log on startup.").Value; } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(BuildBuffPool)); Run.onRunStartGlobal += delegate(Run run) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown rng = new Xoroshiro128Plus(run.seed ^ 0xDEC0FCA5DL); }; GlobalEventManager.onCharacterDeathServer += OnCharacterDeath; } private void BuildBuffPool() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Invalid comparison between Unknown and I4 //IL_009c: Unknown result type (might be due to invalid IL or missing references) HashSet blacklist = new HashSet { Buffs.SojournVehicle, Buffs.FreeUnlocks, Buffs.TeleportOnLowHealthActive, Buffs.CookingChopped, Buffs.CookingOiled, Buffs.CookingRoasted, Buffs.KnockBackActiveWindow }; string[] array = extraBlacklist.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string text in array) { BuffIndex val = BuffCatalog.FindBuffIndex(text.Trim()); if ((int)val != -1) { blacklist.Add(BuffCatalog.GetBuffDef(val)); } else { Main.ModLogger.LogWarning((object)("Deck of Cards: unknown blacklisted buff '" + text.Trim() + "'")); } } HashSet dotBuffs = new HashSet(from dot in DotController.dotDefs where dot != null select dot.associatedBuff); buffPool = BuffCatalog.buffDefs.Where((BuffDef buff) => Object.op_Implicit((Object)(object)buff) && !buff.isDebuff && !buff.isCooldown && !buff.isHidden && !buff.ignoreGrowthNectar && !Object.op_Implicit((Object)(object)buff.eliteDef) && Object.op_Implicit((Object)(object)buff.iconSprite) && !dotBuffs.Contains(buff) && !blacklist.Contains(buff)).ToArray(); Main.ModLogger.LogInfo((object)("Deck of Cards: " + buffPool.Length + " buffs in pool.")); if (logBuffPool) { BuffDef[] array2 = buffPool; foreach (BuffDef val2 in array2) { Main.ModLogger.LogInfo((object)("Deck of Cards pool: " + ((Object)val2).name)); } } } private void OnCharacterDeath(DamageReport damageReport) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown if (!NetworkServer.active || buffPool.Length == 0) { return; } CharacterBody attackerBody = damageReport.attackerBody; int count = GetCount(attackerBody); if (count > 0 && Util.CheckRoll(chancePerStack * (float)count, attackerBody.master)) { if (rng == null) { rng = new Xoroshiro128Plus(RoR2Application.rng.nextUlong); } BuffDef val = buffPool[rng.RangeInt(0, buffPool.Length)]; attackerBody.AddTimedBuff(val, durationPerStack * (float)count, 1); } } } public class DoctorsBag : ItemBase { public override string ItemName => "Doctor’s Bag"; public override string ItemLangTokenName => "TSUNAMI_DOCTORS_BAG"; public override string ItemPickupDesc => "Gain a chance to double incoming healing."; public override string ItemFullDescription => "Gain a 10% (+10% per stack) to 'Critically Heal', doubling your healing received."; public override string ItemLore => "Gunfire rains heavy as the man lets out a cry of pain.\n''I'm hurt bad out here!''\nThe well armored man hastily retreated back into the vault, with his LMG hanging loosely off his back.\n''Damn it- how many bags do we got left?''\nWet spots are starting to appear on the masked man’s armor.\n''Got enough for another man, get over here Daryl!''\nThe last few needles and bandages clinked inside the case, whilst the symphony of gunfire rings outside the bank vault.\nThe man takes the entire case, and starts to frantically use everything that was left. Bandaging, methadone, everything.\nSoon after, he feels his vigor returning, his will to keep going, to finish off this disaster of a heist.\n''…''\n''Much better.''"; public override ItemTier Tier => (ItemTier)0; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("DoctorsBagDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("DoctorsBagIcon.png"); public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown HealthComponent.Heal += new hook_Heal(HealthComponent_Heal); } private float HealthComponent_Heal(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) int count = GetCount(self.body); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && Object.op_Implicit((Object)(object)self.body.inventory) && GetCount(self.body) > 0 && Util.CheckRoll(10f * (float)count, self.body.master)) { amount *= 2f; } return orig.Invoke(self, amount, procChainMask, nonRegen); } } public class ForeignFlower : ItemBase { public override string ItemName => "Foreign Flower"; public override string ItemLangTokenName => "TSUNAMI_FOREIGN_FLOWER"; public override string ItemPickupDesc => "Regenerate upon using your equipment."; public override string ItemFullDescription => "Upon using your equipment, increase your regen heavily for 3 (+1 per stack) seconds."; public override string ItemLore => "A Nutapple's bloom may not be as nutritious as it's fully grown fruit form, but it's unique herbal flavor and lighter properties still lead it to have it's own vague yet distinct flavor. Among Titan's other natural trees including the Delliux, Bezacon, Lexaquill, and the Aacororo, the Xelphum Tree is easily the most popular.\n\n- Dietary Sciences Digest"; public override ItemTier Tier => (ItemTier)0; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("ForeignFlowerDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("ForeignFlowerIcon.png"); public BuffDef FlowerBuff { get; private set; } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuff(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } private void CreateBuff() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) FlowerBuff = ScriptableObject.CreateInstance(); ((Object)FlowerBuff).name = "FlowerRegenBuff"; FlowerBuff.buffColor = Color.green; FlowerBuff.canStack = false; FlowerBuff.isDebuff = false; FlowerBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/Fruiting").iconSprite; ContentAddition.AddBuffDef(FlowerBuff); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown EquipmentSlot.PerformEquipmentAction += new hook_PerformEquipmentAction(EquipmentSlot_PerformEquipmentAction); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddFlowerBuff); } private bool EquipmentSlot_PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) bool num = orig.Invoke(self, equipmentDef); if (num && Object.op_Implicit((Object)self)) { CharacterBody characterBody = self.characterBody; if (Object.op_Implicit((Object)characterBody)) { int count = GetCount(characterBody); if (count > 0) { characterBody.AddTimedBuff(FlowerBuff.buffIndex, 3f + 1f * (float)(count - 1)); } } } return num; } private void AddFlowerBuff(CharacterBody sender, StatHookEventArgs args) { GetCount(sender); if (sender.HasBuff(FlowerBuff)) { args.regenMultAdd += 7f * (float)sender.GetBuffCount(FlowerBuff); } } } public class GeigerCounter : ItemBase { public class GeigerCharge : MonoBehaviour { public int attackCounter; } private static int geigerExplosionCharge = 10; public static GameObject geigerExplosionEffectPrefab = LegacyResourcesAPI.Load("Prefabs/Effects/ImpactEffects/CrocoLeapExplosion"); public override string ItemName => "Geiger Counter"; public override string ItemLangTokenName => "TSUNAMI_GEIGER_COUNTER"; public override string ItemPickupDesc => "Every 10 skill uses causes a blighted explosion."; public override string ItemFullDescription => "Every 10 non-primary skill uses cause you to explode for 1600% (+400% damage per stack) damage, applying Blight to enemies."; public override string ItemLore => "Hello, sir. I'm assuming you're one of the hired prospectors?\nNo time to talk, I have some very important cargo on board and I need to get this to the grand prospector ASAP.\n...very well, please allow me to scan your luggage for contraband and other miscellaneous hazards.\nMake it quick lady, I don't got all day.\n\n[KRRRRRKRRKZZRRRKRRRRRR]\n\nExcuse me sir, it appears that you have radioactive hazards located somewhere on your ship. Please allow our automated search drones to inspect your ship.\n*sigh* Yeah yeah, alright. Hurry up with it already!\n\n. . .\n\nIt's been 20 damn minutes lady, hurry this up!\nIt appears that our scanners are having trouble detecting the hazard. This may take a bit longer than expected.\nGrrrrrr...\n\n. . .\n\nOh my! we seem to have found the problem! The hazard is not on your ship, but rather... on you.\nWhat the hell are you talking about, lady?! Quit spouting bull and open up the damn port!\nSorry sir! I don't make the rules, I simply work here. I do recommend that next time you want to smuggle a deadly nuclear weapon somewhere, you don't put it so close to yourself."; public override ItemTier Tier => (ItemTier)2; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("GeigerCounterDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("GeigerCounterIcon.png"); public BuffDef GeigerBuff { get; private set; } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuff(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } private void CreateBuff() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) GeigerBuff = ScriptableObject.CreateInstance(); ((Object)GeigerBuff).name = "GeigerBuff"; GeigerBuff.buffColor = Color.green; GeigerBuff.canStack = true; GeigerBuff.isDebuff = false; GeigerBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/HealingDisabled").iconSprite; ContentAddition.AddBuffDef(GeigerBuff); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown CharacterBody.OnSkillActivated += new hook_OnSkillActivated(DoGeigerTask); } private void DoGeigerTask(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_00e1: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, skill); int count = GetCount(self); if (count <= 0 || !Object.op_Implicit((Object)(object)self.skillLocator) || (Object)(object)self.skillLocator.primary == (Object)(object)skill) { return; } GeigerCharge geigerCharge = ((Component)self).GetComponent(); if (!Object.op_Implicit((Object)(object)geigerCharge)) { geigerCharge = ((Component)self).gameObject.AddComponent(); } geigerCharge.attackCounter++; if (geigerCharge.attackCounter >= geigerExplosionCharge) { geigerCharge.attackCounter = 0; Util.PlayAttackSpeedSound(BaseLeap.leapSoundString, ((Component)self).gameObject, self.attackSpeed); if (NetworkServer.active) { float baseDamage = self.damage * (16f + 4f * (float)(count - 1)); float num = 25f; EffectManager.SpawnEffect(geigerExplosionEffectPrefab, new EffectData { origin = self.transform.position, scale = num }, true); new BlastAttack { baseDamage = baseDamage, radius = num, procCoefficient = 1f, position = self.transform.position, attacker = ((Component)self).gameObject, crit = Util.CheckRoll(self.crit, self.master), falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)1048576), teamIndex = TeamComponent.GetObjectTeam(((Component)self).gameObject) }.Fire(); } } } } public class IonicCola : ItemBase { public override string ItemName => "Ionic Cola"; public override string ItemLangTokenName => "TSUNAMI_IONIC_COLA"; public override string ItemPickupDesc => "Increase attack speed and movement speed. Kills grant a stacking attack speed and movement speed boost."; public override string ItemFullDescription => "Increase movement and attack speed by 50% (+50% per stack). Killing an enemy will give you a stack of Sugar Rush, which temporarily increases attack speed and movement speed by 10% (+10% per stack)."; public override string ItemLore => "HOW MUCH!?\nThe showroom around them quieted. The two businessmen stood just off the center of the room, one delivering the most dumbfounded gaze of his life, the other simply standing, their hands folded together. Around them, the buzz of the room dimmed, distant conversation and networking becoming ambience. The other one held their hand out, and signaled him over to walk. Breaking from his trance, the man stepped alongside him, with the waves of chatter returning to the floor as they left.\nClarification: 25 Credits\nLet me get this straight. You want to sell this, ungodly concoction of jetfuel, energy drinks, PLURAL, and nuclear fissile material, for 25 credits a pop!?\nSuch Materials Are Highly Subsidized By Several UES Departments\nI know, I know, but, god, listen. You and I both know how things work around here. Regulations are more like suggestions, laws are more like guidelines, blah blah. But who in their right mind is going to BUY this crap? Engineers? This stuff is so radically impure and mixed to hell that no being, organic or otherwise, could consume it without having their component parts break down in mere hours!\nEnergizing Colas Are Highly Popular These Days, You Know\nI KNOW, THEY'RE POPULAR. Everyone knows this, I know you're just in on the cash grab, but come ON, this has to be the lowest form of cash grab ever conceived! This isn't just snake oil, it's Ifrit blood! This has no right to exist, and you're selling liquified death for the same price of a standard storage container! I ask again, who in their right, sane mind would EVER use this?\nHuman, You Do Not Understand\nWhat?! What could I possibly be misunderstanding about the fact you want to sell the most energy efficient poison on the planet?!\nRequesting Position In Conversation For Elaboration\n*Sigh,* granted.\nAll Worlds Needs Energy, Human. You Require It As Much As I. The Universe Is A Desperate Place\nAnd When Desperate People Need To Survive, They Need Energy. Clarification: High Quantities Of Energy\nDesperate People [Found, Created, Fabricated, Otherwise] Designate All Protocols To Locate What They Require And Utilize It\nI Give People What They Need, And In Exchange The Conglomerate Receives 25 Credits. Clarification: Relative Average Price Given Current Market Circumstances\nSimple Transaction. We Are Both Programmed For Business, You Should Understand Now\n...I wasn't programmed, I studied, and I'm sure as hell didn't need any of *that* garbage to get my degree.\nUnsubstantiated Claim. Clarification: UES Policy Fails To Distinct Between The Processes Of Programming And The Human Activity Of Studyi-\nOh shove it up your nuts and bolts."; public override ItemTier Tier => (ItemTier)2; public override ItemTag[] ItemTags { get; set; } public override GameObject ItemModel => Main.MainAssets.LoadAsset("IonicColaDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("IonicColaIcon.png"); public BuffDef ColaBuff { get; private set; } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuff(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } private void CreateBuff() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) ColaBuff = ScriptableObject.CreateInstance(); ((Object)ColaBuff).name = "ColaBoostBuff"; ColaBuff.buffColor = Color.cyan; ColaBuff.canStack = true; ColaBuff.isDebuff = false; ColaBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/Bleeding").iconSprite; ContentAddition.AddBuffDef(ColaBuff); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddColaBuff); GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(OnKillStuff); } private void OnKillStuff(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); CharacterBody victimBody = damageReport.victimBody; CharacterBody attackerBody = damageReport.attackerBody; if (Object.op_Implicit((Object)(object)victimBody) && Object.op_Implicit((Object)(object)attackerBody) && GetCount(attackerBody) > 0) { ItemHelpers.RefreshTimedBuffs(attackerBody, ColaBuff, 3.5f); attackerBody.AddTimedBuffAuthority(ColaBuff.buffIndex, 3.5f); ItemHelpers.RefreshTimedBuffs(attackerBody, ColaBuff, 3.5f); } } private void AddColaBuff(CharacterBody sender, StatHookEventArgs args) { int count = GetCount(sender); args.attackSpeedMultAdd += 0.5f * (float)count; args.moveSpeedMultAdd += 0.5f * (float)count; if (sender.HasBuff(ColaBuff)) { args.attackSpeedMultAdd += 0.1f * (float)sender.GetBuffCount(ColaBuff) + 0.1f * (float)sender.GetBuffCount(ColaBuff) * (float)(count - 1); args.moveSpeedMultAdd += 0.1f * (float)sender.GetBuffCount(ColaBuff) + 0.1f * (float)sender.GetBuffCount(ColaBuff) * (float)(count - 1); } } public IonicCola() { ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ItemTags = (ItemTag[])(object)array; base..ctor(); } } public abstract class ItemBase : ItemBase where T : ItemBase { public static T instance { get; private set; } public ItemBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ItemBase was instantiated twice"); } instance = this as T; } } public abstract class ItemBase { public ItemDef ItemDef; public virtual string Name { get; } public abstract string ItemName { get; } public abstract string ItemLangTokenName { get; } public abstract string ItemPickupDesc { get; } public abstract string ItemFullDescription { get; } public abstract string ItemLore { get; } public abstract ItemTier Tier { get; } public virtual ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[0]; public abstract GameObject ItemModel { get; } public abstract Sprite ItemIcon { get; } public virtual bool CanRemove { get; } = true; public virtual bool AIBlacklisted { get; set; } public abstract void Init(ConfigFile config); public virtual void CreateConfig(ConfigFile config) { } protected virtual void CreateLang() { LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_NAME", ItemName); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_PICKUP", ItemPickupDesc); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_DESCRIPTION", ItemFullDescription); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_LORE", ItemLore); } public abstract ItemDisplayRuleDict CreateItemDisplayRules(); protected void CreateItem() { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown if (AIBlacklisted) { ItemTags = new List(ItemTags) { (ItemTag)4 }.ToArray(); } ItemDef = ScriptableObject.CreateInstance(); ((Object)ItemDef).name = "ITEM_" + ItemLangTokenName; ItemDef.nameToken = "ITEM_" + ItemLangTokenName + "_NAME"; ItemDef.pickupToken = "ITEM_" + ItemLangTokenName + "_PICKUP"; ItemDef.descriptionToken = "ITEM_" + ItemLangTokenName + "_DESCRIPTION"; ItemDef.loreToken = "ITEM_" + ItemLangTokenName + "_LORE"; ItemDef.pickupModelPrefab = ItemModel; ItemDef.pickupIconSprite = ItemIcon; ItemDef.hidden = false; ItemDef.canRemove = CanRemove; ItemDef.deprecatedTier = Tier; if (ItemTags.Length != 0) { ItemDef.tags = ItemTags; } ItemAPI.Add(new CustomItem(ItemDef, CreateItemDisplayRules())); } public virtual void Hooks() { } public int GetCount(CharacterBody body) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (!Object.op_Implicit((Object)body) || !Object.op_Implicit((Object)body.inventory)) { return 0; } return body.inventory.GetItemCountEffective(ItemDef); } public int GetCount(CharacterMaster master) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (!Object.op_Implicit((Object)master) || !Object.op_Implicit((Object)master.inventory)) { return 0; } return master.inventory.GetItemCountEffective(ItemDef); } public int GetCountSpecific(CharacterBody body, ItemDef itemDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (!Object.op_Implicit((Object)body) || !Object.op_Implicit((Object)body.inventory)) { return 0; } return body.inventory.GetItemCountEffective(itemDef); } } public class ManualBehavior : ItemBehavior { private void FixedUpdate() { bool num = base.body.HasBuff(ItemBase.instance.TacticianBuff); bool flag = base.body.HasBuff(ItemBase.instance.TacticianDebuff); if (!num && !flag) { base.body.AddBuff(ItemBase.instance.TacticianBuff); } if (num && flag) { base.body.RemoveBuff(ItemBase.instance.TacticianBuff); } } } public class ObsidianFragment : ItemBase { public override string ItemName => "Obsidian Fragment"; public override string ItemLangTokenName => "TSUNAMI_OBSIDIAN_FRAGMENT"; public override string ItemPickupDesc => "Gain a chance to burn enemies. Attacks against burning enemies increase crit chance."; public override string ItemFullDescription => "Gain a 10% chance to ignite enemies on hit for 4 (+1 per stack) seconds. Attacks against ignited enemies give you a buff that increases your critical chance by 20% (+10% per stack)."; public override string ItemLore => "Order: Unexplainable Volcanic Fragment\nTracking Number: 119**\nEstimated Delivery: 9/24/2056\nShipping Method: Fragile\nShipping Address: High Court Research Institute, Tranquility Base, Sunstorm Quadrant\nShipping Details:\n\nOur guys found a whole bunch of these about 20 kilometers under Olympus Mons. Real pretty glowing chunks of obsidian. We tried cracking them open to see what gave 'em their glow, expecting to find magma inside or… something. We really can't figure these out - the heat they're putting off doesn't seem to die out at all. We even tried dipping a few in hydrogen, and while they cooled temporarily, they reheated within the hour.\n\nCould potentially revolutionize energy generation. This is just a small bit of what we've found of 'em this far; overall we've dug up about two to three tons of these, and are estimating it's just the tip of the iceberg. Thanks for the help. Keep pushing humanity forward."; public override ItemTier Tier => (ItemTier)1; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("ObsidianShardDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("ObsidianShardIcon.png"); public BuffDef ObsidianBuff { get; private set; } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuff(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } private void CreateBuff() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) ObsidianBuff = ScriptableObject.CreateInstance(); ((Object)ObsidianBuff).name = "ObsidianCritBuff"; ObsidianBuff.buffColor = new Color(0.25f, 0f, 0.25f); ObsidianBuff.canStack = false; ObsidianBuff.isDebuff = false; ObsidianBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/OnFire").iconSprite; ContentAddition.AddBuffDef(ObsidianBuff); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddObsidianBuff); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(BurnOnHit); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(CritBurnOnHit); } private void BurnOnHit(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); if (!Object.op_Implicit((Object)(object)damageInfo.attacker) || !(damageInfo.procCoefficient > 0f)) { return; } CharacterBody component = damageInfo.attacker.GetComponent(); CharacterBody val = (Object.op_Implicit((Object)(object)victim) ? victim.GetComponent() : null); if (!Object.op_Implicit((Object)component) || !Object.op_Implicit((Object)val)) { return; } int count = GetCount(component); if (count > 0) { InflictDotInfo val2 = new InflictDotInfo { attackerObject = ((Component)component).gameObject, victimObject = ((Component)val).gameObject, dotIndex = (DotIndex)1, duration = damageInfo.procCoefficient * 3f + (float)count, damageMultiplier = (float)count * 1f }; float num = 10f; float num2 = Mathf.Sqrt(damageInfo.procCoefficient); int num3 = Mathf.FloorToInt(num * num2 / 100f); for (int i = 0; i < num3; i++) { StrengthenBurnUtils.CheckDotForUpgrade(component.inventory, ref val2); DotController.InflictDot(ref val2); } if (Util.CheckRoll(num * num2 - (float)(num3 * 100), component.master)) { StrengthenBurnUtils.CheckDotForUpgrade(component.inventory, ref val2); DotController.InflictDot(ref val2); } } } private void CritBurnOnHit(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown GameObject attacker = damageInfo.attacker; if (Object.op_Implicit((Object)(object)attacker) && Object.op_Implicit((Object)(object)victim)) { CharacterBody component = attacker.GetComponent(); CharacterBody component2 = victim.GetComponent(); if (Object.op_Implicit((Object)component) && Object.op_Implicit((Object)component2) && GetCount(component) > 0 && component2.HasBuff(Buffs.OnFire)) { component.AddTimedBuff(ObsidianBuff, 2.5f); } } orig.Invoke(self, damageInfo, victim); } private void AddObsidianBuff(CharacterBody sender, StatHookEventArgs args) { int count = GetCount(sender); if (sender.HasBuff(ObsidianBuff)) { args.critAdd += 20f + 10f * (float)(count - 1); } } } public class RedSkull : ItemBase { internal static float maxHealthThreshold = 0.5f; public override string ItemName => "Red Skull"; public override string ItemLangTokenName => "TSUNAMI_RED_SKULL"; public override string ItemPickupDesc => "Gain extra damage at half health."; public override string ItemFullDescription => "While under 50% health, deal 30% (+10% per stack) more damage."; public override string ItemLore => "Nothing is more exhilarating then being backed into the corner like a wild animal. It’s the most terrifying thing you’ll ever feel, but at the same time, it’s freeing. There’s nothing else to do, nowhere to run. Your enemy has made themselves the path of least resistance.\n\nThese words pounded in Je-ton’s mind as he fought for his freedom.\nThey stripped him of everything he had: his dignity, his pride, even the clothes off his back. However, no matter how hard they beat him, no matter how long they worked him, no matter how brutally they treated him, they would not take his mind. And when they finally got him on the ropes, cornered, he stood tall.\nHe had won.\nFor they were the path of least resistance."; public override ItemTier Tier => (ItemTier)1; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("RedSkullDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("RedSkullIcon.png"); public BuffDef SkullBuff { get; private set; } public BuffIndex SkullBuffIndex { get; private set; } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuff(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } private void CreateBuff() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) SkullBuff = ScriptableObject.CreateInstance(); ((Object)SkullBuff).name = "SkullBuff"; SkullBuff.buffColor = new Color(0.75f, 0f, 0f); SkullBuff.canStack = false; SkullBuff.isDebuff = false; SkullBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/BanditSkull").iconSprite; SkullBuff.buffIndex = SkullBuffIndex; ContentAddition.AddBuffDef(SkullBuff); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (GetCount(sender) > 0) { HealthComponent component = ((Component)sender).GetComponent(); _ = component.fullHealth / 2f; _ = component.combinedHealth; if ((sender.healthComponent.health + sender.healthComponent.shield) / sender.healthComponent.fullCombinedHealth < maxHealthThreshold) { args.damageMultAdd += 0.3f + (float)(GetCount(sender) - 1) * 0.1f; } } } } public class ScoutsRifle : ItemBase { public override string ItemName => "Scout’s Rifle"; public override string ItemLangTokenName => "TSUNAMI_SCOUT_RIFLE"; public override string ItemPickupDesc => "Gain a speed boost upon entering a stage."; public override string ItemFullDescription => "Entering a new stage will boost your speed by 30% for 20 (+5 per stack) seconds."; public override string ItemLore => "I'm not even winded!"; public override ItemTier Tier => (ItemTier)0; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("ScoutsRifleDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("ScoutsRifleIcon.png"); public BuffDef ScoutBuff { get; private set; } private void CreateBuff() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) ScoutBuff = ScriptableObject.CreateInstance(); ((Object)ScoutBuff).name = "ScoutSpeedBuff"; ScoutBuff.buffColor = new Color(0.5f, 0f, 0.7f); ScoutBuff.canStack = false; ScoutBuff.isDebuff = false; ScoutBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/CloakSpeed").iconSprite; ContentAddition.AddBuffDef(ScoutBuff); } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuff(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown CharacterBody.Start += new hook_Start(ScoutStart); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddScoutBuff); } public void ScoutStart(orig_Start orig, CharacterBody self) { orig.Invoke(self); int count = GetCount(self); if (NetworkServer.active && count > 0) { self.AddTimedBuff(ScoutBuff, 20f + 5f * (float)(count - 1)); } } private void AddScoutBuff(CharacterBody sender, StatHookEventArgs args) { GetCount(sender); if (sender.HasBuff(ScoutBuff)) { args.moveSpeedMultAdd += 0.3f; } } } public class Suppressor : ItemBase { public override string ItemName => "Suppressor"; public override string ItemLangTokenName => "TSUNAMI_SUPPRESSOR"; public override string ItemPickupDesc => "Killing an elite or boss grants a temporary speed, damage, and regen boost."; public override string ItemFullDescription => "Upon killing an elite or boss, increase movement speed and damage by 45% and regen by 500% for 5 (+2.5 per stack) seconds for elites and 10 (+5 per stack) seconds for bosses."; public override string ItemLore => "It’ll be fine, it should be quick, quiet, and clean.\nYou do realize that there’s more to stealth than not being audible, correct?\nLook man, have some faith in me, you know my quality of work! You know how I roll.\nYes, but you do know who you’re going up against here. You are absolutely mentally damaged if if you think this will be as simple and easy as you appear to.\nListen, putting more doubt in myself is the last thing I need right now. I know I’m probably gonna have some complications here, that’s a given, I’m not stupid.\nThen why agree to it if you understand the risk?\nHave you SEEN how much they’re paying me for this one job? You know how rough it’s been for me, I don’t know when I’ll next have an opportunity like this. I've got one shot at this, and if I don't take it, you know i'll never forgive myself for it.\nMoney. Hm. That’s just like you.\nI don’t need you judging me, I know it’s worth the risk.\n...Please stay safe out there. And a word of advice, stay on full alert at all times. That... rather ugly little thing may muffle the sound of your gun but it will not keep you from being seen."; public override ItemTier Tier => (ItemTier)1; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("SuppressorDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("SuppressorIcon.png"); public BuffDef SuppressorBuff { get; private set; } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateBuff(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } private void CreateBuff() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) SuppressorBuff = ScriptableObject.CreateInstance(); ((Object)SuppressorBuff).name = "SuppressorBoostBuff"; SuppressorBuff.buffColor = Color.black; SuppressorBuff.canStack = false; SuppressorBuff.isDebuff = false; SuppressorBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/Cloak").iconSprite; ContentAddition.AddBuffDef(SuppressorBuff); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddSuppressorBuff); GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(OnKillStuff); GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(OnKillStuff2); } private void OnKillStuff(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); int count = GetCount(damageReport.attackerBody); CharacterBody victimBody = damageReport.victimBody; CharacterBody attackerBody = damageReport.attackerBody; CharacterMaster attackerMaster = damageReport.attackerMaster; if (count > 0 && Object.op_Implicit((Object)(object)victimBody) && victimBody.isElite && Object.op_Implicit((Object)attackerBody) && Object.op_Implicit((Object)attackerMaster)) { ItemHelpers.RefreshTimedBuffs(attackerBody, SuppressorBuff, 5f + 2.5f * (float)(count - 1)); attackerBody.AddTimedBuffAuthority(SuppressorBuff.buffIndex, 5f + 2.5f * (float)(count - 1)); ItemHelpers.RefreshTimedBuffs(attackerBody, SuppressorBuff, 5f + 2.5f * (float)(count - 1)); } } private void OnKillStuff2(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); int count = GetCount(damageReport.attackerBody); CharacterBody victimBody = damageReport.victimBody; CharacterBody attackerBody = damageReport.attackerBody; CharacterMaster attackerMaster = damageReport.attackerMaster; if (count > 0 && Object.op_Implicit((Object)(object)victimBody) && victimBody.isChampion && Object.op_Implicit((Object)attackerBody) && Object.op_Implicit((Object)attackerMaster)) { ItemHelpers.RefreshTimedBuffs(attackerBody, SuppressorBuff, 10f + 5f * (float)(count - 1)); attackerBody.AddTimedBuffAuthority(SuppressorBuff.buffIndex, 10f + 5f * (float)(count - 1)); ItemHelpers.RefreshTimedBuffs(attackerBody, SuppressorBuff, 10f + 5f * (float)(count - 1)); } } private void AddSuppressorBuff(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(SuppressorBuff)) { args.damageMultAdd += 0.45f * (float)sender.GetBuffCount(SuppressorBuff); args.moveSpeedMultAdd += 0.45f * (float)sender.GetBuffCount(SuppressorBuff); args.regenMultAdd += 5f * (float)sender.GetBuffCount(SuppressorBuff); } } } public class TacticiansManual : ItemBase { public override string ItemName => "Tactician’s Manual"; public override string ItemLangTokenName => "TSUNAMI_TACTICIANS_MANUAL"; public override string ItemPickupDesc => "Empower your next strike."; public override string ItemFullDescription => "Your next strike deals 20% (+20% per stack) more damage. Has a cooldown of 10 seconds."; public override string ItemLore => "[Excerpt from Chapter 7, page 105]\n\n\n\n...So when you have a huge cluster of guys in your way, you wanna try and blow them up in a way where the explosion’s right about in the middle, or, centered on the most dangerous target. That way you can get the most bang for your buck. Make sure that upon detonation, you have anything you’d like to stay clean out of the splash zone. If you do it right, you should be left with nothing but red rain and a few bodies, it’s as simple as that.\n\nAnd for the record, just so you know I’m not pulling your leg, I can name several times I’ve even used the environment to my advantage. For example, there was the time I was on this planet that was practically coated in ice, so I blew a hole in the ice under these creatures and they fell in and drowned, simple as that!\n\nThere was also that time I blew an entire chunk off of a mountain and caused an avalanche made of these chumps.\n\nThe sky’s the limit when it comes to explosives, so make sure you get creative with how you blow stuff up. And make sure to have some fun with it!\n\n- Elizabeth Richard's Tactician's Manual"; public override ItemTier Tier => (ItemTier)0; public override ItemTag[] ItemTags { get; set; } = (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)31 }; public override GameObject ItemModel => Main.MainAssets.LoadAsset("TacticiansManualDisplay.prefab"); public override Sprite ItemIcon => Main.MainAssets.LoadAsset("TacticiansManualIcon.png"); public BuffDef TacticianBuff { get; private set; } public BuffDef TacticianDebuff { get; private set; } public override void Init(ConfigFile config) { CreateConfig(config); CreateBuffs(); CreateLang(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { } private void CreateBuffs() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) TacticianBuff = ScriptableObject.CreateInstance(); ((Object)TacticianBuff).name = "ManualReadyBuff"; TacticianBuff.buffColor = Color.red; TacticianBuff.canStack = false; TacticianBuff.isDebuff = false; TacticianBuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/FullCrit").iconSprite; ContentAddition.AddBuffDef(TacticianBuff); TacticianDebuff = ScriptableObject.CreateInstance(); ((Object)TacticianDebuff).name = "ManualCooldownDebuff"; TacticianDebuff.buffColor = Color.black; TacticianDebuff.canStack = false; TacticianDebuff.isDebuff = false; TacticianDebuff.isCooldown = true; TacticianDebuff.iconSprite = LegacyResourcesAPI.Load("BuffDefs/FullCrit").iconSprite; ContentAddition.AddBuffDef(TacticianDebuff); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddItemBehavior); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddManualBuff); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(TacticianCheck); } private void AddItemBehavior(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (NetworkServer.active) { self.AddItemBehavior(GetCount(self)); } } private void TacticianCheck(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown GameObject attacker = damageInfo.attacker; if (Object.op_Implicit((Object)(object)attacker) && Object.op_Implicit((Object)(object)victim)) { CharacterBody component = attacker.GetComponent(); CharacterBody component2 = victim.GetComponent(); if (Object.op_Implicit((Object)component) && Object.op_Implicit((Object)component2) && GetCount(component) > 0 && component.HasBuff(TacticianBuff)) { component.AddTimedBuff(TacticianDebuff, 10f); } } orig.Invoke(self, damageInfo, victim); } private void AddManualBuff(CharacterBody sender, StatHookEventArgs args) { int count = GetCount(sender); if (sender.HasBuff(TacticianBuff)) { args.damageMultAdd += 0.2f * (float)count; } } } } namespace TsunamiItemCore.Equipment { public class CryoCanister : EquipmentBase { public static GameObject cryoCanisterEffectPrefab = LegacyResourcesAPI.Load("Prefabs/Effects/ImpactEffects/AffixWhiteExplosion"); public override string EquipmentName => "Cryo Canister"; public override string EquipmentLangTokenName => "TSUNAMI_CRYO_CANISTER"; public override string EquipmentPickupDesc => "Release a freezing wave."; public override string EquipmentFullDescription => "Release a shockwave of frost, dealing 400% damage and freezing enemies hit by it for 2 seconds."; public override string EquipmentLore => "Report #22A796\nDescription: Police were called about a noise complaint from a nearby frat house at Jimbuson College. Once authorities arrived at the scene, many people were seen drinking alcohol. Additionally, marijuana was being smoked by multiple of the attendees. During a search of the house, authorities found a strange device in a cooler. The device felt extremely cold to the touch, and gloves were needed to retrieve it.\nInterview Transcript #22A796-A: Hello Michael. Now, I’m not going to beat around the bush here. You’re in some hot water, with all the underage drinking and possession of marijuana. However, we’ve received a call from the National Guard, saying that if you stated how you got the canister, they would drop all charges.\nCanister? What do you mean man?\nThe canister was about a foot tall, and it was extremely cold to the touch.\nOH! That thing? We found it on the side of the road when we were heading back to the house. We checked it out and it was super cold, so we decided to use it to cool our drinks without having to spend money on ice.\n…\nSomething wrong, officer?\nNo, Michael. I’m just a bit confused on how you were able to even grab it, as our team had to get insulated gloves to carry it.\nOh! Bill, James, Brad, and I took off our shirts and made little shirt gloves to protect our hands. Still was colder than ice though.\nHrm. Okay, I think we’re done here."; public override float Cooldown => 20f; public override GameObject EquipmentModel => Main.MainAssets.LoadAsset("CryoCanisterDisplay.prefab"); public override Sprite EquipmentIcon => Main.MainAssets.LoadAsset("CryoCanisterIcon.png"); public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateEquipment(); Hooks(); } protected override void CreateConfig(ConfigFile config) { } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { } protected override bool ActivateEquipment(EquipmentSlot slot) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) Util.PlayAttackSpeedSound(IceNova.attackString, ((Component)slot.characterBody).gameObject, slot.characterBody.attackSpeed); if (NetworkServer.active) { float baseDamage = slot.characterBody.damage * 4f; float num = 25f; EffectManager.SpawnEffect(cryoCanisterEffectPrefab, new EffectData { origin = slot.characterBody.transform.position, scale = num }, true); new BlastAttack { baseDamage = baseDamage, radius = num, procCoefficient = 1f, position = slot.characterBody.transform.position, attacker = ((Component)slot.characterBody).gameObject, crit = Util.CheckRoll(slot.characterBody.crit, slot.characterBody.master), falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)256), teamIndex = TeamComponent.GetObjectTeam(((Component)slot.characterBody).gameObject) }.Fire(); } return true; } } public abstract class EquipmentBase : EquipmentBase where T : EquipmentBase { public static T instance { get; private set; } public EquipmentBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting EquipmentBoilerplate/Equipment was instantiated twice"); } instance = this as T; } } public abstract class EquipmentBase { public enum TargetingType { Enemies, Friendlies } public class TargetingControllerComponent : MonoBehaviour { public GameObject TargetObject; public GameObject VisualizerPrefab; public Indicator Indicator; public BullseyeSearch TargetFinder; public Action AdditionalBullseyeFunctionality = delegate { }; public void Awake() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Indicator = new Indicator(((Component)this).gameObject, (GameObject)null); } public void OnDestroy() { Invalidate(); } public void Invalidate() { TargetObject = null; Indicator.targetTransform = null; } public void ConfigureTargetFinderBase(EquipmentSlot self) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown if (TargetFinder == null) { TargetFinder = new BullseyeSearch(); } TargetFinder.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref TargetFinder.teamMaskFilter)).RemoveTeam(self.characterBody.teamComponent.teamIndex); TargetFinder.sortMode = (SortMode)2; TargetFinder.filterByLoS = true; float num = default(float); Ray val = CameraRigController.ModifyAimRayIfApplicable(self.GetAimRay(), ((Component)self).gameObject, ref num); TargetFinder.searchOrigin = ((Ray)(ref val)).origin; TargetFinder.searchDirection = ((Ray)(ref val)).direction; TargetFinder.maxAngleFilter = 10f; TargetFinder.viewer = self.characterBody; } public void ConfigureTargetFinderForEnemies(EquipmentSlot self) { //IL_0018: 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) //IL_0039: Unknown result type (might be due to invalid IL or missing references) ConfigureTargetFinderBase(self); TargetFinder.teamMaskFilter = TeamMask.GetUnprotectedTeams(self.characterBody.teamComponent.teamIndex); TargetFinder.RefreshCandidates(); TargetFinder.FilterOutGameObject(((Component)self).gameObject); AdditionalBullseyeFunctionality(TargetFinder); PlaceTargetingIndicator(TargetFinder.GetResults()); } public void ConfigureTargetFinderForFriendlies(EquipmentSlot self) { //IL_000d: 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_002d: 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) ConfigureTargetFinderBase(self); TargetFinder.teamMaskFilter = TeamMask.none; ((TeamMask)(ref TargetFinder.teamMaskFilter)).AddTeam(self.characterBody.teamComponent.teamIndex); TargetFinder.RefreshCandidates(); TargetFinder.FilterOutGameObject(((Component)self).gameObject); AdditionalBullseyeFunctionality(TargetFinder); PlaceTargetingIndicator(TargetFinder.GetResults()); } public void PlaceTargetingIndicator(IEnumerable TargetFinderResults) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) HurtBox val = (TargetFinderResults.Any() ? TargetFinderResults.First() : null); if (Object.op_Implicit((Object)(object)val)) { TargetObject = ((Component)val.healthComponent).gameObject; Indicator.visualizerPrefab = VisualizerPrefab; Indicator.targetTransform = ((Component)val).transform; } else { Invalidate(); } Indicator.active = Object.op_Implicit((Object)(object)val); } } public EquipmentDef EquipmentDef; public GameObject TargetingIndicatorPrefabBase; public abstract string EquipmentName { get; } public abstract string EquipmentLangTokenName { get; } public abstract string EquipmentPickupDesc { get; } public abstract string EquipmentFullDescription { get; } public abstract string EquipmentLore { get; } public abstract GameObject EquipmentModel { get; } public abstract Sprite EquipmentIcon { get; } public virtual bool AppearsInSinglePlayer { get; } = true; public virtual bool AppearsInMultiPlayer { get; } = true; public virtual bool CanDrop { get; } = true; public virtual float Cooldown { get; } = 60f; public virtual bool EnigmaCompatible { get; } = true; public virtual bool IsBoss { get; } public virtual bool IsLunar { get; } public virtual bool UseTargeting { get; } public virtual TargetingType TargetingTypeEnum { get; } public abstract ItemDisplayRuleDict CreateItemDisplayRules(); public abstract void Init(ConfigFile config); protected virtual void CreateConfig(ConfigFile config) { } protected virtual void CreateLang() { LanguageAPI.Add("EQUIPMENT_" + EquipmentLangTokenName + "_NAME", EquipmentName); LanguageAPI.Add("EQUIPMENT_" + EquipmentLangTokenName + "_PICKUP", EquipmentPickupDesc); LanguageAPI.Add("EQUIPMENT_" + EquipmentLangTokenName + "_DESCRIPTION", EquipmentFullDescription); LanguageAPI.Add("EQUIPMENT_" + EquipmentLangTokenName + "_LORE", EquipmentLore); } protected void CreateEquipment() { //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown EquipmentDef = ScriptableObject.CreateInstance(); ((Object)EquipmentDef).name = "EQUIPMENT_" + EquipmentLangTokenName; EquipmentDef.nameToken = "EQUIPMENT_" + EquipmentLangTokenName + "_NAME"; EquipmentDef.pickupToken = "EQUIPMENT_" + EquipmentLangTokenName + "_PICKUP"; EquipmentDef.descriptionToken = "EQUIPMENT_" + EquipmentLangTokenName + "_DESCRIPTION"; EquipmentDef.loreToken = "EQUIPMENT_" + EquipmentLangTokenName + "_LORE"; EquipmentDef.pickupModelPrefab = EquipmentModel; EquipmentDef.pickupIconSprite = EquipmentIcon; EquipmentDef.appearsInSinglePlayer = AppearsInSinglePlayer; EquipmentDef.appearsInMultiPlayer = AppearsInMultiPlayer; EquipmentDef.canDrop = CanDrop; EquipmentDef.cooldown = Cooldown; EquipmentDef.enigmaCompatible = EnigmaCompatible; EquipmentDef.isBoss = IsBoss; EquipmentDef.isLunar = IsLunar; ItemAPI.Add(new CustomEquipment(EquipmentDef, CreateItemDisplayRules())); EquipmentSlot.PerformEquipmentAction += new hook_PerformEquipmentAction(PerformEquipmentAction); } private bool PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef) { if ((Object)(object)equipmentDef == (Object)(object)EquipmentDef) { return ActivateEquipment(self); } return orig.Invoke(self, equipmentDef); } protected abstract bool ActivateEquipment(EquipmentSlot slot); public virtual void Hooks() { } protected void UpdateTargeting(orig_Update orig, EquipmentSlot self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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) orig.Invoke(self); if (self.equipmentIndex != EquipmentDef.equipmentIndex) { return; } TargetingControllerComponent targetingControllerComponent = ((Component)self).GetComponent(); if (!Object.op_Implicit((Object)(object)targetingControllerComponent)) { targetingControllerComponent = ((Component)self).gameObject.AddComponent(); targetingControllerComponent.VisualizerPrefab = TargetingIndicatorPrefabBase; } if (self.stock > 0) { switch (TargetingTypeEnum) { case TargetingType.Enemies: targetingControllerComponent.ConfigureTargetFinderForEnemies(self); break; case TargetingType.Friendlies: targetingControllerComponent.ConfigureTargetFinderForFriendlies(self); break; } } else { targetingControllerComponent.Invalidate(); targetingControllerComponent.Indicator.active = false; } } } public class ExperimentalVoidStrikeDevice : EquipmentBase { public static GameObject voidFuckEffectPrefab = LegacyResourcesAPI.Load("Prefabs/Effects/NullifierDeathExplosion"); private float stopwatch; private int riskyCounter; public override string EquipmentName => "Experimental Void Strike Device"; public override string EquipmentLangTokenName => "TSUNAMI_EVSD"; public override string EquipmentPickupDesc => "Fire off 3 explosions, dealing heavy damage. May summon Void Reavers."; public override string EquipmentFullDescription => "Create three small Void Reaver explosions, dealing 1250% damage to enemies caught inside them… BUT, each use has an increasing chance to summon Void Reavers to your location."; public override string EquipmentLore => "dark samus isn't real im sorry"; public override float Cooldown => 40f; public override bool IsLunar => true; public override GameObject EquipmentModel => Main.MainAssets.LoadAsset("ExperimentalVoidStrikeDeviceDisplay.prefab"); public override Sprite EquipmentIcon => Main.MainAssets.LoadAsset("ExperimentalVoidStrikeDeviceIcon.png"); public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateEquipment(); Hooks(); } protected override void CreateConfig(ConfigFile config) { } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { } protected override bool ActivateEquipment(EquipmentSlot slot) { //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_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_03b4: 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_03da: Expected O, but got Unknown //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0140: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Expected O, but got Unknown //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Expected O, but got Unknown //IL_0388: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { if (Util.CheckRoll(75f - (float)riskyCounter, slot.characterBody.master)) { riskyCounter++; riskyCounter++; riskyCounter++; riskyCounter++; riskyCounter++; BlastAttack val = new BlastAttack { baseDamage = 12.5f * slot.characterBody.damage, radius = 15f, procCoefficient = 1f, position = slot.characterBody.transform.position, attacker = ((Component)slot.characterBody).gameObject, crit = Util.CheckRoll(slot.characterBody.crit, slot.characterBody.master), falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)32768), teamIndex = TeamComponent.GetObjectTeam(((Component)slot.characterBody).gameObject) }; BlastAttack val2 = new BlastAttack { baseDamage = 12.5f * slot.characterBody.damage, radius = 25f, procCoefficient = 1f, position = slot.characterBody.transform.position, attacker = ((Component)slot.characterBody).gameObject, crit = Util.CheckRoll(slot.characterBody.crit, slot.characterBody.master), falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)32768), teamIndex = TeamComponent.GetObjectTeam(((Component)slot.characterBody).gameObject) }; BlastAttack val3 = new BlastAttack { baseDamage = 12.5f * slot.characterBody.damage, radius = 35f, procCoefficient = 1f, position = slot.characterBody.transform.position, attacker = ((Component)slot.characterBody).gameObject, crit = Util.CheckRoll(slot.characterBody.crit, slot.characterBody.master), falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)32768), teamIndex = TeamComponent.GetObjectTeam(((Component)slot.characterBody).gameObject) }; Util.PlayAttackSpeedSound("Play_nullifier_death", ((Component)slot.characterBody).gameObject, 1.5f); EffectManager.SpawnEffect(voidFuckEffectPrefab, new EffectData { origin = slot.characterBody.transform.position, scale = 15f }, true); val.Fire(); Util.PlayAttackSpeedSound("Play_nullifier_death", ((Component)slot.characterBody).gameObject, 1f); EffectManager.SpawnEffect(voidFuckEffectPrefab, new EffectData { origin = slot.characterBody.transform.position, scale = 25f }, true); val2.Fire(); Util.PlayAttackSpeedSound("Play_nullifier_death", ((Component)slot.characterBody).gameObject, 0.5f); EffectManager.SpawnEffect(voidFuckEffectPrefab, new EffectData { origin = slot.characterBody.transform.position, scale = 35f }, true); val3.Fire(); } else { DirectorSpawnRequest val4 = new DirectorSpawnRequest(LegacyResourcesAPI.Load("SpawnCards/CharacterSpawnCards/cscNullifier"), new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 2f, maxDistance = 20f, spawnOnTarget = slot.characterBody.transform }, RoR2Application.rng); val4.teamIndexOverride = (TeamIndex)2; val4.onSpawnedServer = (Action)Delegate.Combine(val4.onSpawnedServer, (Action)delegate { }); DirectorCore instance = DirectorCore.instance; if (!Object.op_Implicit((Object)(object)instance)) { return true; } instance.TrySpawnObject(val4); instance.TrySpawnObject(val4); instance.TrySpawnObject(val4); riskyCounter = 0; } } return true; } } public class VoidClam : EquipmentBase { public static GameObject voidFuckEffectPrefab = LegacyResourcesAPI.Load("Prefabs/Effects/NullifierDeathExplosion"); internal static int clamCounter; private static Xoroshiro128Plus rng; private static readonly HashSet pendingRemoval = new HashSet(); public override string EquipmentName => "Void Clam"; public override string EquipmentLangTokenName => "TSUNAMI_VOID_CLAM"; public override string EquipmentPickupDesc => "Attempt to break into a Void Clam. Failing may have serious consequences..."; public override string EquipmentFullDescription => "Upon use, you have a 40% chance to be detained. If you survive, obtain 5 random Uncommon items and an Irradiant Pearl. This equipment can only be used ONCE. If found again, the chance to fail will increase by 10%."; public override string EquipmentLore => "Two void reavers come across a strange organism. A clam, seemingly native to the void itself.\nIt points to its partner, and then at the clam.\nThe partner backs away, hastily.\nThe reaver gestures to its partner again, with more intensity. It then points back at the clam.\nThe reaver's partner shakes its head.\nA pause between the two occurs.\n\n\nThe reaver strides confidently towards the clam, and wrenches its jaws open.\n\n\n\n\nThe partner is alone."; public override float Cooldown => 0f; public override bool IsLunar => true; public override GameObject EquipmentModel => Main.MainAssets.LoadAsset("VoidClamDisplay.prefab"); public override Sprite EquipmentIcon => Main.MainAssets.LoadAsset("VoidClamIcon.png"); public override bool EnigmaCompatible => false; public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateEquipment(); Hooks(); } protected override void CreateConfig(ConfigFile config) { } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Hooks() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown Run.onRunStartGlobal += delegate(Run run) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown clamCounter = 0; rng = new Xoroshiro128Plus(run.seed ^ 0xC1A4C1A4u); pendingRemoval.Clear(); }; EquipmentSlot.OnEquipmentExecuted += new hook_OnEquipmentExecuted(EquipmentSlot_OnEquipmentExecuted); } private void EquipmentSlot_OnEquipmentExecuted(orig_OnEquipmentExecuted orig, EquipmentSlot self) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (pendingRemoval.Remove(self) && Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory)) { Inventory inventory = self.inventory; EquipmentLocation activeEquipmentLocation = self.activeEquipmentLocation; inventory.SetEquipment(ref EquipmentState.empty, ref activeEquipmentLocation); } } private static void DropPickup(PickupIndex pickupIndex, Vector3 position, Vector3 velocity) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0017: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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) //IL_002b: Unknown result type (might be due to invalid IL or missing references) CreatePickupInfo val = default(CreatePickupInfo); ((CreatePickupInfo)(ref val)).pickup = new UniquePickup(pickupIndex); val.position = position; val.rotation = Quaternion.identity; PickupDropletController.CreatePickupDroplet(val, position, velocity); } protected override bool ActivateEquipment(EquipmentSlot slot) { //IL_0017: 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) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: 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_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) CharacterBody characterBody = slot.characterBody; if (!NetworkServer.active || !Object.op_Implicit((Object)(object)characterBody) || slot.equipmentIndex != EquipmentDef.equipmentIndex) { return false; } if (rng == null) { rng = new Xoroshiro128Plus(RoR2Application.rng.nextUlong); } if (Util.CheckRoll(60f - (float)clamCounter, characterBody.master)) { clamCounter += 10; List availableTier2DropList = Run.instance.availableTier2DropList; if (availableTier2DropList.Count > 0) { for (int i = 0; i < 5; i++) { Vector3 velocity = Quaternion.AngleAxis(72f * (float)i, Vector3.up) * new Vector3(0f, 20f, 5f); DropPickup(availableTier2DropList[rng.RangeInt(0, availableTier2DropList.Count)], characterBody.transform.position, velocity); } } DropPickup(PickupCatalog.FindPickupIndex(Items.ShinyPearl.itemIndex), characterBody.transform.position, new Vector3(0f, 25f, 0f)); } else { Util.PlayAttackSpeedSound("Play_nullifier_death", ((Component)characterBody).gameObject, 0.65f); EffectManager.SpawnEffect(voidFuckEffectPrefab, new EffectData { origin = characterBody.transform.position, scale = 65f }, true); new BlastAttack { baseDamage = 1E+30f, radius = 65f, procCoefficient = 0f, position = characterBody.transform.position, attacker = ((Component)characterBody).gameObject, crit = false, falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)65536), teamIndex = (TeamIndex)(-1) }.Fire(); characterBody.healthComponent.Suicide((GameObject)null, (GameObject)null, DamageTypeCombo.op_Implicit((DamageType)65536)); } pendingRemoval.Add(slot); return true; } } }