Decompiled source of RigsArsenal v1.4.0
RigsArsenal/RigsArsenal.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.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 HG.Reflection; using HarmonyLib; using Microsoft.CodeAnalysis; using On.RoR2; using On.RoR2.Items; using R2API; using R2API.Utils; using RigsArsenal.Buffs; using RigsArsenal.DOTs; using RigsArsenal.Equipments; using RigsArsenal.Items; using RigsArsenal.Items.VoidItems; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Projectile; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RigsArsenal")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+f8df24e392efb27397adb8f603a9e0dfe9cfc832")] [assembly: AssemblyProduct("RigsArsenal")] [assembly: AssemblyTitle("RigsArsenal")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace RigsArsenal { internal static class DebugLog { private static ManualLogSource _logger; internal static void Init(ManualLogSource logger) { _logger = logger; } internal static void Log(object data) { _logger.LogInfo(data); } } [BepInPlugin("RigsInRags.RigsArsenal", "RigsArsenal", "1.4.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class RigsArsenal : BaseUnityPlugin { public const string P_GUID = "RigsInRags.RigsArsenal"; public const string P_Author = "RigsInRags"; public const string P_Name = "RigsArsenal"; public const string P_Version = "1.4.0"; public static AssetBundle MainAssets; public static List<Item> ItemList = new List<Item>(); public static List<Equipment> EquipmentList = new List<Equipment>(); public static List<Buff> BuffList = new List<Buff>(); public static List<DOT> DOTList = new List<DOT>(); public static ConfigFile configFile; public static ConfigEntry<bool> EnableShotgunMarker { get; set; } public static ConfigEntry<bool> EnableUmbralPyreVFX { get; set; } public static List<ConfigEntry<bool>> EnableItems { get; set; } public void Awake() { //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Invalid comparison between Unknown and I4 //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Invalid comparison between Unknown and I4 //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Invalid comparison between Unknown and I4 //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Invalid comparison between Unknown and I4 //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Invalid comparison between Unknown and I4 //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Expected O, but got Unknown DebugLog.Init(((BaseUnityPlugin)this).Logger); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("RigsArsenal.rigsassets")) { MainAssets = AssetBundle.LoadFromStream(stream); } configFile = ((BaseUnityPlugin)this).Config; ApplyShaders(); EnableShotgunMarker = ((BaseUnityPlugin)this).Config.Bind<bool>("Wrist-Mounted_Shotgun Config", "EnableShotgunMarker", true, "Shows or hides the range indicator for the Wrist-Mounted Shotgun item."); EnableUmbralPyreVFX = ((BaseUnityPlugin)this).Config.Bind<bool>("Umbral_Pyre Config", "EnableUmbralPyreVFX", true, "Shows or hides the explosion visual effect for the Umbral Pyre item."); if (RiskOfOptionsCompatibility.enabled) { RiskOfOptionsCompatibility.SetupRiskOfOptionsConfigs(); } IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(Item)) select type; EnableItems = new List<ConfigEntry<bool>>(); string text = ""; List<Item> list = new List<Item>(); foreach (Type item2 in enumerable) { Item item = (Item)Activator.CreateInstance(item2); text = item.Name.Replace(" ", "_"); text = text.Replace("'", ""); if ((int)item.Tier != 5) { EnableItems.Add(((BaseUnityPlugin)this).Config.Bind<bool>("_Item Selection", text, true, "Enables or disables this item from appearing in game.")); } if ((int)item.Tier == 5 || EnableItems[EnableItems.Count - 1].Value) { item.Init(); ItemList.Add(item); if ((int)item.Tier == 6 || (int)item.Tier == 7 || (int)item.Tier == 8) { list.Add(item); } } } if (list.Count > 0) { SetupVoidItem(list); } foreach (Type item3 in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(Buff)) select type) { Buff buff = (Buff)Activator.CreateInstance(item3); buff.Init(); BuffList.Add(buff); } foreach (Type item4 in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(Equipment)) select type) { Equipment equipment = (Equipment)Activator.CreateInstance(item4); text = equipment.Name.Replace(" ", "_"); text = text.Replace("'", ""); EnableItems.Add(((BaseUnityPlugin)this).Config.Bind<bool>("_Equipment Selection", text, true, "Enables or disables this equipment from appearing in game.")); if (EnableItems[EnableItems.Count - 1].Value) { equipment.Init(); EquipmentList.Add(equipment); } } foreach (Type item5 in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(DOT)) select type) { DOT dOT = (DOT)Activator.CreateInstance(item5); dOT.Init(); DOTList.Add(dOT); } Harmony val = new Harmony("RigsInRags.RigsArsenal"); MethodInfo methodInfo = AccessTools.Method(typeof(HealthComponent), "TakeDamage", (Type[])null, (Type[])null); MethodInfo method = typeof(DissonantEdge).GetMethod("TakeDamagePatch", BindingFlags.Static | BindingFlags.Public); val.Patch((MethodBase)methodInfo, new HarmonyMethod(method), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); method = typeof(CoolantPack).GetMethod("TakeDamagePatch", BindingFlags.Static | BindingFlags.Public); val.Patch((MethodBase)methodInfo, new HarmonyMethod(method), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } private static void ApplyShaders() { Material[] array = MainAssets.LoadAllAssets<Material>(); foreach (Material val in array) { if (((Object)val.shader).name.StartsWith("StubbedShader")) { val.shader = Resources.Load<Shader>("shaders" + ((Object)val.shader).name.Substring(13)); } } } public static void InflictDot(CharacterBody attacker, CharacterBody victim, DotIndex dotType, float damage, float procCoefficent = 1f) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected I4, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Invalid comparison between Unknown and I4 //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) switch ((int)dotType) { case 0: DotController.InflictDot(((Component)victim).gameObject, ((Component)attacker).gameObject, (DotIndex)0, 3f * procCoefficent, 1f, (uint?)null); break; case 1: case 7: { InflictDotInfo val = default(InflictDotInfo); val.victimObject = ((Component)victim).gameObject; val.attackerObject = ((Component)attacker).gameObject; val.totalDamage = damage; val.dotIndex = dotType; val.damageMultiplier = 1f; InflictDotInfo val2 = val; if ((int)dotType == 1) { StrengthenBurnUtils.CheckDotForUpgrade(attacker.inventory, ref val2); } DotController.InflictDot(ref val2); break; } case 5: DotController.InflictDot(((Component)victim).gameObject, ((Component)attacker).gameObject, (DotIndex)5, 5f * procCoefficent, 1f, (uint?)null); break; case 8: { DotDef dotDef = DotController.GetDotDef((DotIndex)8); DotController.InflictDot(((Component)victim).gameObject, ((Component)attacker).gameObject, (DotIndex)8, dotDef.interval, 1f, (uint?)null); break; } case 4: DotController.InflictDot(((Component)victim).gameObject, ((Component)attacker).gameObject, (DotIndex)4, 5f, 1f, (uint?)null); break; case 6: DotController.InflictDot(((Component)victim).gameObject, ((Component)attacker).gameObject, (DotIndex)6, 15f, 1f, (uint?)null); break; default: DebugLog.Log($"Default dot called for dot {dotType}. This should not happen!"); DotController.InflictDot(((Component)victim).gameObject, ((Component)attacker).gameObject, dotType, damage, procCoefficent, (uint?)null); break; } } public static void InflictCustomDot(CharacterBody attacker, CharacterBody victim, DOT dot, float damage) { //IL_000a: 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_0032: 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) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (dot.dotName == RigsArsenalDOTs.RazorLeechBleed) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = ((Component)attacker).gameObject; val.victimObject = ((Component)victim).gameObject; val.dotIndex = dot.dotIndex; val.preUpgradeDotIndex = dot.dotIndex; val.duration = dot.dotDuration; val.damageMultiplier = damage / (dot.dotDuration / dot.dotInterval); InflictDotInfo val2 = val; DotController.InflictDot(ref val2); } } private void SetupVoidItem(List<Item> items) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ContagiousItemManager.Init += (hook_Init)delegate(orig_Init orig) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) foreach (Item item in items) { item.itemDef.requiredExpansion = ((IEnumerable<ExpansionDef>)(object)ExpansionCatalog.expansionDefs).FirstOrDefault((Func<ExpansionDef, bool>)((ExpansionDef x) => x.nameToken == "DLC1_NAME")); Pair val = default(Pair); val.itemDef1 = item.pureItemDef; val.itemDef2 = item.itemDef; Pair val2 = val; ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem] = CollectionExtensions.AddToArray<Pair>(ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem], val2); } orig.Invoke(); }; } } internal class RiskOfOptionsCompatibility { public static bool enabled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetupRiskOfOptionsConfigs() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown ModSettingsManager.SetModDescription("Mod that adds new items and equipment.", "RigsInRags.RigsArsenal", "Rigs Arsenal"); ModSettingsManager.SetModIcon(RigsArsenal.MainAssets.LoadAsset<Sprite>("modIcon.png")); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(RigsArsenal.EnableUmbralPyreVFX)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(RigsArsenal.EnableShotgunMarker)); } } } namespace RigsArsenal.Misc { public class PurityAltarConsume : Item { public override string Name => "ITEM SACRIFICED"; public override string NameToken => "PURITYALTARCONSUME"; public override string PickupToken => ""; public override string Description => ""; public override string Lore => ""; public override ItemTier Tier => (ItemTier)5; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[0]; public override bool AIBlackList => true; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("PurityAltarConsume.png"); public override GameObject Model => null; public override float minViewport => 1f; public override float maxViewport => 1f; } } namespace RigsArsenal.Items { public class KineticBattery : Item { private ConfigEntry<int> barrierAmount; private ConfigEntry<float> cooldown; public override string Name => "Kinetic Battery"; public override string NameToken => "KINETICBATTERY"; public override string PickupToken => "Gain barrier after using your utility skill."; public override string Description => $"After using a <style=cIsUtility>utility skill</style>, gain <style=cIsHealing>{barrierAmount.Value}</style> <style=cStack>(+{barrierAmount.Value} per stack)</style> <style=cIsHealing>barrier</style>. Goes on a <style=cIsUtility>{cooldown.Value:0.0} second cooldown</style> after use."; public override string Lore => "This little battery can hook directly into your shield system to provide a quick, temporary burst of shielding!\n\nIt's real strength however is that it can be recharged with kinetic energy! A burst of speed is enough for the battery to power your shields for a brief moment, perfect for when you need to quickly remove yourself from any situation safely.\n\nJust don't touch the glowing parts, or even the glass for that matter."; public override BuffDef ItemBuffDef => RigsArsenal.BuffList.Find((Buff x) => x.Name == "KineticBatteryCooldown").buffDef; public override ItemTier Tier => (ItemTier)0; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override bool AIBlackList => true; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("KineticBattery.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("KineticBattery.prefab"); public override float minViewport => 1f; public override float maxViewport => 3f; public override void SetupHooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown CharacterBody.OnSkillActivated += (hook_OnSkillActivated)delegate(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 orig.Invoke(self, skill); if (Object.op_Implicit((Object)(object)self) && self.isPlayerControlled && self.GetBuffCount(ItemBuffDef) <= 0 && self.skillLocator.utility.hasExecutedSuccessfully && (int)self.skillLocator.FindSkillSlot(skill) == 2) { int itemCount = self.inventory.GetItemCount(base.itemDef); if (itemCount > 0) { int num = barrierAmount.Value * itemCount; self.healthComponent.AddBarrier((float)num); self.AddTimedBuff(ItemBuffDef, cooldown.Value); } } }; } public override void AddConfigOptions() { barrierAmount = RigsArsenal.configFile.Bind<int>("Kinetic_Battery Config", "barrierAmount", 35, "The barrier given by this item."); cooldown = RigsArsenal.configFile.Bind<float>("Kinetic_Battery Config", "cooldown", 3f, "The cooldown duration of the item."); } } public class PrimordialChunk : Item { public static ConfigEntry<float> atkSpeedBonus; private ConfigEntry<int> maxBuffStacks; private ConfigEntry<float> buffDuration; public override string Name => "Primordial Chunk"; public override string NameToken => "PRIMORDIALCHUNK"; public override string PickupToken => "Gain increasing attack speed while charging a teleporter."; public override string Description => $"Gain <style=cIsDamage>{atkSpeedBonus.Value * 100f}% attack speed</style> every second <style=cIsUtility>while charging a teleporter</style>. Maximum cap of {atkSpeedBonus.Value * 100f * (float)maxBuffStacks.Value}% <style=cStack>(+{atkSpeedBonus.Value * 100f * (float)maxBuffStacks.Value}% per stack)</style> attack speed."; public override string Lore => "''The teleporters manipulate space and time to transport beings across vast distances. This chunk from the primordial teleporter can't teleport us anymore, but it still exhibits some latent, dormant energy.\n\nTry bringing it near an active teleporter and see what happens when the dormant energy is reactivated. Its temporal energy in theory could warp space and time in a small radius around you, literally speeding up time locally. \n\nOf course its only a theory, but thats why we have lab rats like you, right?\n\nGood luck.''"; public override ItemTier Tier => (ItemTier)0; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override bool AIBlackList => true; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("PrimordialChunk.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("PrimordialChunk.prefab"); public override float minViewport => 1f; public override float maxViewport => 2f; public override BuffDef ItemBuffDef => RigsArsenal.BuffList.Find((Buff x) => x.Name == "PrimordialChunkAttackSpeed").buffDef; public override void SetupHooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown HoldoutZoneController.Update += (hook_Update)delegate(orig_Update orig, HoldoutZoneController self) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!self.isAnyoneCharging) { return; } foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers((TeamIndex)1)) { if (HoldoutZoneController.IsBodyInChargingRadius(self, ((Component)self).transform.position, self.currentRadius * self.currentRadius, teamMember.body)) { int itemCount = teamMember.body.inventory.GetItemCount(base.itemDef); if (!teamMember.body.HasBuff(ItemBuffDef)) { teamMember.body.AddTimedBuff(ItemBuffDef, buffDuration.Value, itemCount * maxBuffStacks.Value); } else if (teamMember.body.timedBuffs.Find((TimedBuff x) => x.buffIndex == ItemBuffDef.buffIndex).timer <= buffDuration.Value - 1f) { foreach (TimedBuff item in teamMember.body.timedBuffs.Where((TimedBuff x) => x.buffIndex == ItemBuffDef.buffIndex)) { item.timer = buffDuration.Value; } teamMember.body.AddTimedBuff(ItemBuffDef, buffDuration.Value, itemCount * maxBuffStacks.Value); } } } }; } public override void AddConfigOptions() { atkSpeedBonus = RigsArsenal.configFile.Bind<float>("Primordial_Chunk Config", "atkSpeedBonus", 0.09f, "The attack speed bonus per buff stack. (0.09 = +9%)"); maxBuffStacks = RigsArsenal.configFile.Bind<int>("Primordial_Chunk Config", "maxBuffStacks", 3, "The maximum number of buff stacks per item stack."); buffDuration = RigsArsenal.configFile.Bind<float>("Primordial_Chunk Config", "buffDuration", 5f, "The duration of the buff in seconds."); } } public class WornOutStimpack : Item { private ConfigEntry<float> movementBonus; private ConfigEntry<float> regenBonus; public override string Name => "Worn-Out Stimpack"; public override string NameToken => "WORNOUTSTIMPACK"; public override string PickupToken => "Increased movement speed and health regeneration. Effects double at low health."; public override string Description => $"Gain <style=cIsUtility>{movementBonus.Value * 100f}%</style><style=cStack> (+{movementBonus.Value * 100f}% per stack)</style> <style=cIsUtility>movement speed</style> and <style=cIsHealing>+{regenBonus.Value} <style=cStack>(+{regenBonus.Value} per stack)</style> health regeneration</style>. While at or under <style=cIsHealth>50% health</style>, effects are <style=cIsUtility>doubled</style>."; public override string Lore => "<style=cMono>// INTERCEPTED TRANSMISSIONS FROM KOPRULU QUADRANT, SECTOR 19 //</style>\n\n''Looks like you've used this here Stimpack one too many times. Save it for when you REALLY need that extra kick.''\n\n''But sir... I need to heal up before the next fight.''\n\n''Nonsense. You will always recover slowly, no matter the situation. But sometimes, you'll fight enemies so strong that the healing isn't enough to offset their damage. That's where the secondary use of your Stimpack becomes clear: the adrenaline, the speed.''\n\n''I don't understand sir.''\n\n''Big strong foes are slow and lumber about. With a speed advantage, you can easily avoid their fire and come out unscathed. Outsmart your foes, and you will always come out victorious.''\n\n<style=cMono>// END OF TRANSMISSION //</style>"; public override ItemTier Tier => (ItemTier)0; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }; public override bool AIBlackList => false; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("WornOutStimpack.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("WornOutStimpack.prefab"); public override float minViewport => 1f; public override float maxViewport => 3f; public override BuffDef ItemBuffDef => RigsArsenal.BuffList.Find((Buff x) => x.Name == "StimpackHealStrong").buffDef; public override void SetupHooks() { //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 GlobalEventManager.onServerDamageDealt += delegate(DamageReport damageReport) { CharacterBody victimBody = damageReport.victimBody; if (Object.op_Implicit((Object)(object)victimBody) && Object.op_Implicit((Object)(object)victimBody.inventory) && victimBody.inventory.GetItemCount(base.itemDef) > 0 && !(victimBody.healthComponent.health >= victimBody.healthComponent.fullHealth * 0.5f)) { if (victimBody.GetBuffCount(ItemBuffDef) <= 0) { victimBody.AddTimedBuff(ItemBuffDef, 5f); } else { victimBody.ClearTimedBuffs(ItemBuffDef); victimBody.AddTimedBuff(ItemBuffDef, 5f); } } }; HealthComponent.Heal += (hook_Heal)delegate(orig_Heal orig, HealthComponent self, float amount, ProcChainMask mask, bool regen) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_00cc: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)self)) { return orig.Invoke(self, amount, mask, regen); } CharacterBody body = self.body; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return orig.Invoke(self, amount, mask, regen); } if (body.inventory.GetItemCount(base.itemDef) <= 0) { return orig.Invoke(self, amount, mask, regen); } if (body.healthComponent.health >= body.healthComponent.fullHealth * 0.5f) { return orig.Invoke(self, amount, mask, regen); } if (body.GetBuffCount(ItemBuffDef) <= 0) { body.AddTimedBuff(ItemBuffDef, 5f); } else { body.ClearTimedBuffs(ItemBuffDef); body.AddTimedBuff(ItemBuffDef, 5f); } return orig.Invoke(self, amount, mask, regen); }; RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody self, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory)) { int itemCount = self.inventory.GetItemCount(base.itemDef); if (itemCount > 0) { float num = movementBonus.Value * (float)itemCount; float num2 = regenBonus.Value * (float)itemCount; if (self.HasBuff(ItemBuffDef)) { num *= 2f; num2 *= 2f; } args.moveSpeedMultAdd += num; args.baseRegenAdd += num2; } } }; } public override void AddConfigOptions() { movementBonus = RigsArsenal.configFile.Bind<float>("Worn-Out_Stimpack Config", "movementBonus", 0.1f, "The movement speed bonus granted by this item. (0.1 = +10%)."); regenBonus = RigsArsenal.configFile.Bind<float>("Worn-Out_Stimpack Config", "regenBonus", 0.5f, "The health regeneration bonus granted by this item."); } } public abstract class Item { public abstract string Name { get; } public abstract string NameToken { get; } public abstract string PickupToken { get; } public abstract string Description { get; } public abstract string Lore { get; } public abstract ItemTier Tier { get; } public virtual ItemTag[] Tags { get; set; } public abstract bool CanRemove { get; } public abstract bool AIBlackList { get; } public ItemDef itemDef { get; private set; } public virtual ItemDef pureItemDef { get; set; } public abstract Sprite Icon { get; } public abstract GameObject Model { get; } public abstract float minViewport { get; } public abstract float maxViewport { get; } public virtual BuffDef ItemBuffDef { get; } public virtual void Init() { AddConfigOptions(); InitLang(); CreateItem(); SetupHooks(); } public virtual void InitLang() { LanguageAPI.Add("ITEM_" + NameToken + "_NAME", Name); LanguageAPI.Add("ITEM_" + NameToken + "_PICKUP", PickupToken); LanguageAPI.Add("ITEM_" + NameToken + "_DESCRIPTION", Description); LanguageAPI.Add("ITEM_" + NameToken + "_LORE", Lore); } public virtual void CreateItem() { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected I4, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Expected O, but got Unknown //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Expected O, but got Unknown itemDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)itemDef).name = "ITEM_" + NameToken; itemDef.nameToken = "ITEM_" + NameToken + "_NAME"; itemDef.pickupToken = "ITEM_" + NameToken + "_PICKUP"; itemDef.descriptionToken = "ITEM_" + NameToken + "_DESCRIPTION"; itemDef.loreToken = "ITEM_" + NameToken + "_LORE"; itemDef.hidden = false; itemDef.canRemove = CanRemove; ItemTier tier = Tier; switch ((int)tier) { case 0: itemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion(); break; case 1: itemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier2Def.asset").WaitForCompletion(); break; case 2: itemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier3Def.asset").WaitForCompletion(); break; case 6: itemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/DLC1/Common/VoidTier1Def.asset").WaitForCompletion(); break; case 7: itemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/DLC1/Common/VoidTier2Def.asset").WaitForCompletion(); break; case 8: itemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/DLC1/Common/VoidTier3Def.asset").WaitForCompletion(); break; case 5: itemDef.tier = (ItemTier)5; itemDef.hidden = true; itemDef.deprecatedTier = (ItemTier)5; break; case 3: itemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/LunarTierDef.asset").WaitForCompletion(); break; default: DebugLog.Log("Warning: Item " + ((Object)itemDef).name + " has an invalid item tier. Defaulting to Tier1."); itemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion(); break; } if (AIBlackList) { List<ItemTag> list = new List<ItemTag>(Tags) { (ItemTag)4 }; Tags = list.ToArray(); } if (Tags.Length != 0) { itemDef.tags = Tags; } itemDef.pickupIconSprite = (((Object)(object)Icon != (Object)null) ? Icon : Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion()); itemDef.pickupModelPrefab = (((Object)(object)Model != (Object)null) ? Model : Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion()); ModelPanelParameters obj = itemDef.pickupModelPrefab.AddComponent<ModelPanelParameters>(); obj.focusPointTransform = new GameObject("FocusPoint").transform; obj.focusPointTransform.SetParent(itemDef.pickupModelPrefab.transform); obj.cameraPositionTransform = new GameObject("CameraPosition").transform; obj.cameraPositionTransform.SetParent(itemDef.pickupModelPrefab.transform); obj.modelRotation = itemDef.pickupModelPrefab.transform.rotation; obj.minDistance = minViewport; obj.maxDistance = maxViewport; ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); } public virtual void AddConfigOptions() { } public virtual ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public static RendererInfo[] ItemDisplaySetup(GameObject obj) { //IL_0040: 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_0097: 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) List<Renderer> list = new List<Renderer>(); MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>(); if (componentsInChildren.Length != 0) { list.AddRange((IEnumerable<Renderer>)(object)componentsInChildren); } SkinnedMeshRenderer[] componentsInChildren2 = obj.GetComponentsInChildren<SkinnedMeshRenderer>(); if (componentsInChildren2.Length != 0) { list.AddRange((IEnumerable<Renderer>)(object)componentsInChildren2); } RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[list.Count]; for (int i = 0; i < list.Count; i++) { 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 virtual void SetupHooks() { } } public class ChaosRune : Item { private ConfigEntry<int> procChance; private ConfigEntry<int> rollsPerStack; private bool hasRun; public override string Name => "Chaos Rune"; public override string NameToken => "CHAOSRUNE"; public override string PickupToken => "Chance to inflict additional damaging debuffs when applying any damaging debuff."; public override string Description => $"When applying a damaging debuff to an enemy, there is a <style=cIsDamage>{procChance.Value}% chance</style><style=cStack> (+{rollsPerStack.Value} roll(s) per stack)</style> to apply <style=cIsHealth>additional damaging debuffs</style>."; public override string Lore => "<style=cMono>// ARTIFACT RECOVERY NOTES: EXCAVATION SITE 165-A34 //</style>\n\nName: Runic Stone Carving\n\nSize: 20cm by 20cm by 3cm\n\nSite Notes: ''Weighty and shimmers a bright red hue. The miner that recovered this artifact was found an hour after contact in tremendous pain, dehydrated and collapsed, still holding onto the artifact. Artifact was additionally glowing incredibly brightly, and is allegedly scalding to the touch for some while bone-chillingly cold to others.\n\nDo NOT handle directly. Do NOT stare into it's glow. Do NOT listen to what it offers. Be not tempted.''\n\n<style=cMono>// END OF NOTES //"; public override ItemTier Tier => (ItemTier)2; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override bool AIBlackList => true; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("ChaosRune.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("ChaosRune.prefab"); public override float minViewport => 1f; public override float maxViewport => 1.8f; private DamageInfo damageInfo { get; set; } public override void SetupHooks() { //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 DotController.InflictDot_refInflictDotInfo += (hook_InflictDot_refInflictDotInfo)delegate(orig_InflictDot_refInflictDotInfo orig, ref InflictDotInfo inflictDotInfo) { orig.Invoke(ref inflictDotInfo); if (!hasRun && Object.op_Implicit((Object)(object)inflictDotInfo.attackerObject) && Object.op_Implicit((Object)(object)inflictDotInfo.victimObject)) { CharacterBody component = inflictDotInfo.attackerObject.GetComponent<CharacterBody>(); CharacterBody component2 = inflictDotInfo.victimObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component.inventory) && component.inventory.GetItemCount(base.itemDef) > 0) { float num = damageInfo.procCoefficient; if (num <= 0f) { num = 1f; } int value = procChance.Value; for (int i = 0; i < rollsPerStack.Value; i++) { if (Util.CheckRoll((float)value, component.master)) { hasRun = true; switch (Random.Range(0, 4)) { case 0: RigsArsenal.InflictDot(component, component2, (DotIndex)0, component.damage, num); break; case 1: RigsArsenal.InflictDot(component, component2, (DotIndex)1, component.damage, num); break; case 2: RigsArsenal.InflictDot(component, component2, (DotIndex)5, component.damage, num); break; case 3: RigsArsenal.InflictDot(component, component2, (DotIndex)8, component.damage, num); break; } } } } } }; GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)delegate(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo DamageInfo, GameObject victim) { damageInfo = DamageInfo; hasRun = false; orig.Invoke(self, damageInfo, victim); }; } public override void AddConfigOptions() { procChance = RigsArsenal.configFile.Bind<int>("Chaos_Rune Config", "procChance", 33, "The chance of the item's effect triggering per item stack on applying a DOT."); rollsPerStack = RigsArsenal.configFile.Bind<int>("Chaos_Rune Config", "rollsPerStack", 1, "Number of times the item will roll on activation per item stack."); } } public class DissonantEdge : Item { private static ConfigEntry<float> damageIncrease; private static ConfigEntry<float> damageDecrease; private static ItemDef staticItemDef; public override string Name => "Dissonant Edge"; public override string NameToken => "DISSONANTEDGE"; public override string PickupToken => "Increased damage to foes with a lower health percentage. <style=cIsHealth> Reduced damage to foes with a higher health percentage.</style>"; public override string Description => $"<style=cIsDamage>All attacks</style> deal +{damageIncrease.Value * 100f}% <style=cStack>(+{damageIncrease.Value * 100f}% per stack)</style> increased damage if the target's <style=cIsUtility>current health percentage is lower than yours</style>. <style=cIsHealth>All attacks deal {damageDecrease.Value * 100f}% <style=cDeath>REDUCED</style> damage if the target's current health percentage is higher than yours.</style>"; public override string Lore => "<style=cLunarObjective>These creatures are imperfect. A flawed design. Unstable, temperamental, yet fragile.\n\nMy constructs are streamlined. Deadly, efficient, yet simple.\n\nWhy can't He see that? Is he so blinded by love? He is a fool. But one day He will see, and He will understand.</style>"; public override ItemTier Tier => (ItemTier)3; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override bool AIBlackList => false; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("DissonantEdge.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("DissonantEdge.prefab"); public override float minViewport => 2f; public override float maxViewport => 3f; public override void CreateItem() { base.CreateItem(); staticItemDef = base.itemDef; } public static bool TakeDamagePatch(HealthComponent __instance, DamageInfo damageInfo) { //IL_000e: 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_001d: Invalid comparison between Unknown and I4 //IL_0020: 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_002b: Invalid comparison between Unknown and I4 //IL_002e: 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_003a: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)damageInfo.attacker) || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 67108864 || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 1 || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 64) { return true; } if (!Object.op_Implicit((Object)(object)__instance) || !Object.op_Implicit((Object)(object)__instance.body) || !Object.op_Implicit((Object)(object)__instance.body.inventory)) { return true; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.inventory) || !Object.op_Implicit((Object)(object)component.healthComponent)) { return true; } int itemCount = component.inventory.GetItemCount(staticItemDef); if (itemCount <= 0) { return true; } float combinedHealthFraction = component.healthComponent.combinedHealthFraction; float combinedHealthFraction2 = __instance.combinedHealthFraction; float num = 1f + ((combinedHealthFraction >= combinedHealthFraction2) ? (damageIncrease.Value * (float)itemCount) : (0f - damageDecrease.Value)); damageInfo.damage *= num; if (damageInfo.damage <= 1f) { damageInfo.damage = 1f; } return true; } public override void AddConfigOptions() { damageIncrease = RigsArsenal.configFile.Bind<float>("Dissonant_Edge Config", "damageIncrease", 0.1f, "The damage increase granted by this item per stack (0.1 = +10%)."); damageDecrease = RigsArsenal.configFile.Bind<float>("Dissonant_Edge Config", "damageDecrease", 0.25f, "The damage decrease inflicted by this item if under the health threshold. (0.25 = 25% reduced damage)."); } } public class BountyHunterBadge : Item { private ConfigEntry<float> multiplier; private float goldIncrease = 0.25f; public override string Name => "Bounty Hunter's Badge"; public override string NameToken => "BOUNTYHUNTERBADGE"; public override string PickupToken => "Increased gold from killing elite enemies."; public override string Description => $"Killing an elite enemy rewards <style=cIsDamage>+{multiplier.Value * goldIncrease * 100f}%</style><style=cStack> (+{multiplier.Value * goldIncrease * 100f}% per stack)</style> increased <style=cIsDamage>gold.</style>"; public override string Lore => "<style=cMono>// ARTIFACT ANALYSIS NOTES //</style>\n\nNAME: Sheriff Badge.\n\nSIZE: Approximately 12cm x 12cm x 2cm.\n\nWEIGHT: 275g.\n\nMATERIAL: Gold, Rubber.\n\nINVESTIGATOR'S NOTES: Artifact's front shows clear signs of wear and tear. The letters 'J R' has been scribed on the back, perhaps the initials of the former wearer. Under the initials are 5 circular icons scribed in a line, 3 of which crossed out, possibly targets to the former wearer. Further examination of the icons are required. Artifact has been cleared for further forensic and DNA testing.\n\n<style=cMono>// END OF NOTES //"; public override ItemTier Tier => (ItemTier)1; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override bool AIBlackList => true; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("BountyHunterBadge.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("BountyHunterBadge.prefab"); public override float minViewport => 1f; public override float maxViewport => 2.5f; public override void SetupHooks() { GlobalEventManager.onCharacterDeathGlobal += delegate(DamageReport DamageInfo) { CharacterBody victimBody = DamageInfo.victimBody; CharacterBody attackerBody = DamageInfo.attackerBody; if (!((Object)(object)victimBody == (Object)null) && !((Object)(object)attackerBody == (Object)null) && !((Object)(object)attackerBody.inventory == (Object)null) && attackerBody.isPlayerControlled) { int itemCount = attackerBody.inventory.GetItemCount(base.itemDef); if (itemCount > 0 && victimBody.isElite) { float num = 1f / (1f + (float)itemCount * goldIncrease); int num2 = Mathf.FloorToInt((1f - num) * (float)victimBody.master.money * multiplier.Value); attackerBody.master.GiveMoney((uint)num2); } } }; } public override void AddConfigOptions() { multiplier = RigsArsenal.configFile.Bind<float>("Bounty_Hunters_Badge Config", "multiplier", 1f, "Scales the gold per stack and hyperbolic approach limit of the item (1.0 = +20% per stack, approaching +100%)"); } } public class CoolantPack : Item { private static ConfigEntry<float> damageReduction; private static ItemDef staticItemDef; public override string Name => "Coolant Pack"; public override string NameToken => "COOLANTPACK"; public override string PickupToken => "Incoming damaging debuffs inflict less damage"; public override string Description => $"All incoming <style=cIsHealth>damaging debuffs</style> inflict {damageReduction.Value * 100f}% <style=cStack>(+{damageReduction.Value * 100f}% per stack)</style> <style=cIsDamage>reduced damage</style>."; public override string Lore => "Introducing MediFreeze(tm)! Your omni-purpose solution to all burns, aches and ailments.\n\nCut your finger? Seal that wound up with MediFreeze!\nBurned Yourself? MediFreeze it away!\nBruised your head? MediFreeze it into oblivion!\n\nMediFreeze, resolving your ailments one chill at a time. Buy now today at your nearest wholesaler.\n\nLEGAL DISCLAIMER: Medical trials pending. May contain toxic materials hazardous to biological life. May contain corrosive materials. Wear protective equipment before handling. Seek medical attention immediately if it comes into direct contact with skin, eyes or other sensitive areas."; public override ItemTier Tier => (ItemTier)1; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override bool AIBlackList => false; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("CoolantPack.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("CoolantPack.prefab"); public override float minViewport => 1f; public override float maxViewport => 2f; public override void CreateItem() { base.CreateItem(); staticItemDef = base.itemDef; } public static bool TakeDamagePatch(HealthComponent __instance, DamageInfo damageInfo) { //IL_003a: 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) //IL_0049: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)__instance)) { return true; } CharacterBody body = __instance.body; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return true; } int itemCount = body.inventory.GetItemCount(staticItemDef); if ((int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 67108864 && itemCount > 0) { float num = 1f - 1f / (1f + (float)itemCount * damageReduction.Value); damageInfo.damage *= 1f - num; if (damageInfo.damage < 0f) { damageInfo.damage = 0f; } } return true; } public override void AddConfigOptions() { damageReduction = RigsArsenal.configFile.Bind<float>("Coolant_Pack Config", "damageReduction", 0.15f, "Scales down the damage of incoming DOTs per stack. Does not change the hyperbolic approach value of 1.0 (100% damage reduction)."); } } public class NeedleRounds : Item { private ConfigEntry<int> critChanceGain; private ConfigEntry<float> critDamageGain; public override string Name => "Needle Rounds"; public override string NameToken => "NEEDLEROUNDS"; public override string PickupToken => "Increases critical strike chance and critical strike damage slightly."; public override string Description => $"Gain <style=cIsDamage>+{critChanceGain.Value}%</style><style=cStack> (+{critChanceGain.Value}% per stack)</style> increased <style=cIsDamage>critical strike chance</style>. Also gain <style=cIsDamage>+{critDamageGain.Value * 100f}%</style><style=cStack> (+{critDamageGain.Value * 100f}% per stack)</style> increased <style=cIsDamage>critical strike damage</style>."; public override string Lore => "<style=cMono>// INTERCEPTED RADIO TRANSMISSIONS. //\n// PRINTING TRANSCRIPT... //</style>\n\nExperimental munitions MUST be banned today!\n\nSmall arms research has gone too far, and these so called 'Plated Rounds' harbour a sinister truth. They are designed to kill with brutal efficiency.\n\nShaped charges built into the tail end of the bullet detonate when the bullet has pierced it's target, sending forth huge bursts of shrapnel that decimate the target from the inside!\n\nWar is inevitable, but it does not always need to be a bloodbath. Incapacitation or disarming is always preferred, the less soldiers killed in battle, the better. And we already have methods to ensure that. Private military research into barbaric technologies like these prove that they are only interested in death without resolution.\n\nWe the people demand a system-wide ban on these munitions, and an immediate stop to any further research into similar technologies. For the sake of humanity. <style=cMono>\n\n// TRANSCRIPT FINISHED. //</style>"; public override ItemTier Tier => (ItemTier)1; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override bool AIBlackList => false; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("NeedleRounds.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("NeedleRounds.prefab"); public override float minViewport => 1f; public override float maxViewport => 2.75f; public override void SetupHooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody self, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(base.itemDef) > 0) { args.critAdd += (float)(critChanceGain.Value * self.inventory.GetItemCount(base.itemDef)); args.critDamageMultAdd += critDamageGain.Value * (float)self.inventory.GetItemCount(base.itemDef); } }; } public override void AddConfigOptions() { critChanceGain = RigsArsenal.configFile.Bind<int>("Needle_Rounds Config", "critChanceGain", 15, "Critical hit chance per item stack."); critDamageGain = RigsArsenal.configFile.Bind<float>("Needle_Rounds Config", "critDamageGain", 0.15f, "Critical hit damage per item stack."); } } public class ReactiveArmourPlating : Item { public static ConfigEntry<int> armourPerStack; private ConfigEntry<float> buffDuration; public override string Name => "Reactive Armour Plating"; public override string NameToken => "REACTIVEARMOURPLATING"; public override string PickupToken => "Briefly gain armour when hit."; public override string Description => $"Gain <style=cIsDamage>20 permanent armour.</style> Briefly gain <style=cIsDamage>{armourPerStack.Value}</style> <style=cStack>(+{armourPerStack.Value} per stack)</style> <style=cIsDamage>armour</style> for <style=cIsUtility>{buffDuration.Value:0.0} seconds</style> after receiving damage."; public override string Lore => "<style=cMono>// ARTIFACT SCAVENGER TEAM - UPRISING AT HAEDRON MINING TOWN AFTERMATH - CONVERSATION EXCERPT //</style>\n\n''...Wielded by the leader of the rebels, this plating, ripped straight from the hull of a light interceptor ship with a handle crudely welded to the back, weighs approximately 650 kilos, and is designed to withstand low grade ship weapon fire. Nanobots tucked inside the plating constantly repair the plate and reinforce it to adapt to the current weapon fire it's receiving for maximum durability.''\n\n''Wow! How was he even able to lift that, let alone use it as a shield?''\n\n''He figured that if it could withstand ship weaponry, it'd be able to deflect any weaponry carried by the town guards. With that thing, he was almost invincible.''\n\n''In that case, how did they manage to put him down?''\n\n''They shot him from behind. Never saw it coming.''\n\n<style=cMono>// END OF EXCERPT //"; public override BuffDef ItemBuffDef => RigsArsenal.BuffList.Find((Buff x) => x.Name == "ReactiveArmourPlatingBuff").buffDef; public override ItemTier Tier => (ItemTier)1; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; public override bool AIBlackList => false; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("ReactiveArmourPlating.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("ReactiveArmourPlating.prefab"); public override float minViewport => 1f; public override float maxViewport => 2f; public override void SetupHooks() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown GlobalEventManager.onServerDamageDealt += delegate(DamageReport damageReport) { //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_002c: Invalid comparison between Unknown and I4 //IL_0034: 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_0043: Invalid comparison between Unknown and I4 CharacterBody body = damageReport.victim.body; if (!((Object)(object)body.inventory == (Object)null) && (int)DamageTypeCombo.op_Implicit(damageReport.damageInfo.damageType) != 1 && (int)DamageTypeCombo.op_Implicit(damageReport.damageInfo.damageType) != 2097152 && body.inventory.GetItemCount(base.itemDef) > 0) { if (body.HasBuff(ItemBuffDef)) { body.ClearTimedBuffs(ItemBuffDef); body.AddTimedBuff(ItemBuffDef, buffDuration.Value); } else { body.AddTimedBuff(ItemBuffDef, buffDuration.Value); } } }; RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody self, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(base.itemDef) > 0) { args.armorAdd += 20f; } }; } public override void AddConfigOptions() { armourPerStack = RigsArsenal.configFile.Bind<int>("Reactive_Armour_Plating Config", "armourPerStack", 20, "Armour given by the item buff per item stack."); buffDuration = RigsArsenal.configFile.Bind<float>("Reactive_Armour_Plating Config", "buffDuration", 3f, "The duration of the buff."); } } public class UnderBarrelShotgun : Item { private GameObject pellet; private GameObject rangeIndicator; private ConfigEntry<float> itemProcChance; private ConfigEntry<int> itemRange; private ConfigEntry<int> projectileCount; private ConfigEntry<float> projectileDamage; private ConfigEntry<float> projectileProcRate; public override string Name => "Wrist-Mounted Shotgun"; public override string NameToken => "UNDERBARRELSHOTGUN"; public override string PickupToken => "Chance to fire a cluster of projectiles with high spread."; public override string Description => $"<style=cIsDamage>{itemProcChance.Value}%</style> chance to fire<style=cIsDamage> {projectileCount.Value} projectiles</style> with high spread. Each projectile inflicts <style=cIsDamage>{projectileDamage.Value * 100f}%</style> <style=cStack>(+{projectileDamage.Value * 100f}% per stack)</style> TOTAL damage."; public override string Lore => "<style=cMono>// UNKNOWN CHATTER RECORDED ONBOARD THE UES CONTACT LIGHT //</style>\n\n''Guns are so lame; heavy, cumbersome, generic, lacking style and flair.''\n\n''Who cares? It's a weapon, it has a purpose already, it does not need flair.''\n\n''Why couldn't it have flair? Picture this: Shooting baddies, left, right and centre, just by pointing at them. Like a superhero. Absolutely magic man. And compare that to carrying a heavy, uncomfortable steel rifle.''\n\n''What do you mean 'Like a superhero'? You just bolted a bunch of underbarrel shotguns onto a crude plate of metal hammered into a half-pipe shape. You've successfully made a gun thats more difficult to maintain and use in the name of 'style', not to mention that four shotguns firing at once is just plain overkill.''\n\n''It's just something you won't understand...''\n\n''Maybe...How do 4 masterkey shotguns fire a total of 13 pellets anyway? Are some of them malfunctioning?''\n\n''Its luck, y'know. My lucky number.''\n\n<style=cMono>// END OF CONVERSATION //</style>"; public override ItemTier Tier => (ItemTier)1; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override bool AIBlackList => false; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("WristMountedShotgun.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("WristMountedShotgun.prefab"); public override float minViewport => 1f; public override float maxViewport => 2.5f; public override void Init() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) base.Init(); GameObject val = Resources.Load<GameObject>("prefabs/projectiles/RailgunnerPistolProjectile"); pellet = PrefabAPI.InstantiateClone(val, "UnderBarrelShotgunPellet", true); pellet.GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)131072); ((Behaviour)pellet.GetComponent<ProjectileSteerTowardTarget>()).enabled = false; ((Behaviour)pellet.GetComponent<ProjectileDirectionalTargetFinder>()).enabled = false; GameObject val2 = PrefabAPI.InstantiateClone(Resources.Load<GameObject>("prefabs/projectileghosts/RailgunnerPistolProjectileGhost"), "UnderBarrelShotgunPelletGhost", true); val2.AddComponent<NetworkIdentity>(); ((Renderer)((Component)val2.transform.GetChild(4)).GetComponent<ParticleSystemRenderer>()).enabled = false; TrailRenderer component = ((Component)val2.transform.GetChild(0)).GetComponent<TrailRenderer>(); component.widthMultiplier = 0.1f; ((Renderer)component).sharedMaterial.SetColor("_TintColor", new Color(0f, 0.29f, 0.06f)); pellet.GetComponent<ProjectileController>().ghostPrefab = val2; PrefabAPI.RegisterNetworkPrefab(pellet); PrefabAPI.RegisterNetworkPrefab(val2); ContentAddition.AddProjectile(pellet); } public override void SetupHooks() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown GlobalEventManager.onServerDamageDealt += delegate(DamageReport damageReport) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = damageReport.damageInfo; HealthComponent victim = damageReport.victim; if (Object.op_Implicit((Object)(object)damageInfo.attacker) && !(damageInfo.procCoefficient <= 0f) && !((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)1)) { CharacterBody body = victim.body; CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && Object.op_Implicit((Object)(object)body.healthComponent) && Object.op_Implicit((Object)(object)component.inventory)) { int itemCount = component.inventory.GetItemCount(base.itemDef); if (itemCount > 0 && !(Vector3.Distance(body.transform.position, component.transform.position) > (float)itemRange.Value) && Util.CheckRoll(itemProcChance.Value * damageInfo.procCoefficient, component.master)) { int value = projectileCount.Value; float num = projectileDamage.Value * (float)itemCount; ProcChainMask procChainMask = damageInfo.procChainMask; ((ProcChainMask)(ref procChainMask)).AddProc((ProcType)1); float damage = Util.OnHitProcDamage(damageInfo.damage * num, component.damage, damageInfo.procCoefficient); pellet.GetComponent<ProjectileController>().procCoefficient = damageInfo.procCoefficient * projectileProcRate.Value; for (int i = 0; i < value; i++) { FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = pellet; val2.position = component.transform.position; val2.procChainMask = procChainMask; val2.target = ((Component)body).gameObject; val2.owner = ((Component)component).gameObject; val2.damage = damage; val2.crit = damageInfo.crit; val2.force = 50f; val2.damageColorIndex = (DamageColorIndex)3; ((FireProjectileInfo)(ref val2)).speedOverride = -1f; val2.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)131072); FireProjectileInfo val3 = val2; val3.rotation = Util.QuaternionSafeLookRotation(val3.target.transform.position - val3.position); val3.rotation = ApplySpread(val3.rotation, 4f); ProjectileManager.instance.FireProjectile(val3); } } } } }; CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { //IL_00e3: 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) orig.Invoke(self); if (!RigsArsenal.EnableShotgunMarker.Value || !self.isPlayerControlled || !Object.op_Implicit((Object)(object)self.inventory) || self.inventory.GetItemCount(base.itemDef) <= 0) { if (Object.op_Implicit((Object)(object)rangeIndicator)) { Object.Destroy((Object)(object)rangeIndicator); rangeIndicator = null; } } else { GameObject val = Resources.Load<GameObject>("Prefabs/NetworkedObjects/NearbyDamageBonusIndicator"); rangeIndicator = PrefabAPI.InstantiateClone(val, "UnderBarrelShotgunRangeIndicator", true); PrefabAPI.RegisterNetworkPrefab(rangeIndicator); rangeIndicator.GetComponent<NetworkedBodyAttachment>().AttachToGameObjectAndSpawn(((Component)self).gameObject, (string)null); Transform child = rangeIndicator.transform.GetChild(1); child.localScale = new Vector3((float)itemRange.Value * 2f, (float)itemRange.Value * 2f, (float)itemRange.Value * 2f); ((Renderer)((Component)child).GetComponent<MeshRenderer>()).material.SetColor("_TintColor", new Color(0f, 0.03f, 0.3f)); } }; } public override void AddConfigOptions() { itemProcChance = RigsArsenal.configFile.Bind<float>("Wrist-Mounted_Shotgun Config", "itemProcChance", 10f, "The base proc chance of the item as a percentage."); itemRange = RigsArsenal.configFile.Bind<int>("Wrist-Mounted_Shotgun Config", "itemRange", 35, "The maximum range which this item can trigger. Also scales the visual indicator range if enabled."); projectileCount = RigsArsenal.configFile.Bind<int>("Wrist-Mounted_Shotgun Config", "projectileCount", 13, "The number of projectiles fired by the item."); projectileDamage = RigsArsenal.configFile.Bind<float>("Wrist-Mounted_Shotgun Config", "projectileDamage", 0.25f, "The damage of each projectile (Scaled from the damage of the proc that triggered the item)."); projectileProcRate = RigsArsenal.configFile.Bind<float>("Wrist-Mounted_Shotgun Config", "projectileProcRate", 0.25f, "The proc coefficient of each projectile (Scaled from the proc coefficient of the attack that triggered the item)"); } private Quaternion ApplySpread(Quaternion direction, float spread) { //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_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) float num = Random.Range(0f, MathF.PI * 2f); float num2 = Random.Range(0f, MathF.PI * 2f); float num3 = spread * Mathf.Cos(num); float num4 = spread * Mathf.Sin(num2); Quaternion val = Quaternion.Euler(0f, num3, 0f); Quaternion val2 = Quaternion.Euler(num4, 0f, 0f); Quaternion val3 = val * val2 * direction; return ((Quaternion)(ref val3)).normalized; } } } namespace RigsArsenal.Items.VoidItems { public class RazorLeeches : Item { private ConfigEntry<int> baseDuration; private ConfigEntry<int> baseDurationPerStack; public static ConfigEntry<float> damageScalar; public override string Name => "Razor Leeches"; public override string NameToken => "RAZORLEECHES"; public override string PickupToken => "Perforate foes by critically striking. Perforated enemies receive additional damage over time from attacks.<style=cIsVoid> Corrupts all Needle Rounds."; public override string Description => $"Critically striking an enemy<style=cIsDamage> perforates</style> them for <style=cIsUtility>{baseDuration.Value}</style> <style=cStack>(+{baseDurationPerStack.Value} per stack)</style> seconds. <style=cIsDamage>Perforated</style> enemies receive <style=cIsUtility>{damageScalar.Value * 100f}%</style> of incoming damage as<style=cIsDamage> additional damage over time.</style> Also gain <style=cIsDamage>+5% critical strike chance</style>. <style=cIsVoid> Corrupts all Needle Rounds</style>."; public override string Lore => "<style=cMono>// MEDIC BAY 04 - DR. CROSS EXAMINATION REPORT #65 //</style>\n\nIn this sector we have seen a sharp rise of unusual wounds, similar to that produced by a small hand held firearm. Unlike such wounds however, which often fly straight with a clear entry and often exit point, these new wounds never have an exit point. A bit unusual but not alarming in of itself.\n\nAdditionally, these 'bullets' seem to turn and manoeuvre around inside the body. Not randomly either, they seek out vital organs, deftly loop around bone and muscle. We have managed to find what we believe is the 'bullet', a small puddle of purple, sticky liquid. The composition does not include any metals; in fact it is entirely made of biological matter.\n\nBreakthrough! This is a fully organic creature. From running simulations we predict that it may be similar to a large worm or leech with little to no higher brain function. When it reaches the entry point it burrows in and consumes the flesh in its path. It may have been bred for this purpose given that it dies shortly after entry, either creatures with an extremely limited lifespan or when exposed to an environment like the human body. Given that the entry point is most commonly chest-height with incidents involving this 'projectile', something or someone must be accelerating it to reach that height. It may be using the environment or another creature is working in tandem with this leech. Until we have a live account of this creature perform a hunt, we can only speculate.\n\nThey're shooting them, the leeches. Using them like ammunition. God watch over us.\n\n<style=cMono>// END OF REPORT //</style>"; public override ItemTier Tier => (ItemTier)7; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override bool AIBlackList => false; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("RazorLeeches.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("RazorLeeches.prefab"); public override float minViewport => 0.8f; public override float maxViewport => 2f; public override BuffDef ItemBuffDef => RigsArsenal.BuffList.Find((Buff x) => x.Name == "RazorLeechWound").buffDef; public override ItemDef pureItemDef => RigsArsenal.ItemList.Find((Item x) => x.NameToken == "NEEDLEROUNDS").itemDef; public override void SetupHooks() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown GlobalEventManager.onServerDamageDealt += delegate(DamageReport damageReport) { GameObject attacker = damageReport.attacker; if (Object.op_Implicit((Object)(object)attacker) && Object.op_Implicit((Object)(object)attacker.GetComponent<CharacterBody>())) { CharacterBody component = attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component.inventory)) { int itemCount = component.inventory.GetItemCount(base.itemDef); if (itemCount > 0 && damageReport.damageInfo.crit) { CharacterBody victimBody = damageReport.victimBody; if (Object.op_Implicit((Object)(object)victimBody)) { victimBody.AddTimedBuff(ItemBuffDef, (float)(baseDuration.Value + itemCount * baseDurationPerStack.Value), 1); } } } } }; RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody self, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory) && self.isPlayerControlled && self.inventory.GetItemCount(base.itemDef) > 0) { args.critAdd += 5f; } }; } public override void AddConfigOptions() { baseDuration = RigsArsenal.configFile.Bind<int>("Razor_Leeches Config", "baseDuration", 2, "The base duration of the wound effect."); baseDurationPerStack = RigsArsenal.configFile.Bind<int>("Razor_Leeches Config", "baseDurationPerStack", 1, "The duration increase of the wound effect per stack."); damageScalar = RigsArsenal.configFile.Bind<float>("Razor_Leeches Config", "damageScalar", 0.2f, "The percentage of damage dealt that is applied as damage over time to the perforated enemy (0.2 = 20% of damage dealt)."); } } public class UmbralPyre : Item { public static ConfigEntry<float> explosionDamage; public static ConfigEntry<float> burnDamage; public static ConfigEntry<int> baseRange; public static ConfigEntry<int> rangePerStack; public static ConfigEntry<int> explosionsPerSecond; public static GameObject flameVFX; public override string Name => "Umbral Pyre"; public override string NameToken => "UMBRALPYRE"; public override string PickupToken => "Damage and burn all nearby enemies once per second. <style=cIsVoid>Corrupts all Gasoline</style>."; public override string Description => $"<style=cDeath>Burn</style> all enemies within <style=cIsUtility>{baseRange.Value + rangePerStack.Value}m</style> <style=cStack>(+{rangePerStack.Value}m per stack)</style> for <style=cIsDamage>{explosionDamage.Value * 100f}%</style> base damage, and <style=cIsDamage>ignite</style> them for <style=cIsDamage>{burnDamage.Value * 100f}%</style> <style=cStack>(+{burnDamage.Value * 100f}% per stack)</style> base damage. Triggers <style=cIsUtility>{explosionsPerSecond.Value}</style> " + ((explosionsPerSecond.Value == 1) ? "time" : "times") + " per second. <style=cIsVoid>Corrupts all Gasoline</style>."; public override string Lore => "<style=cMono>========================================\r\n==== MyBabel Machine Translator ====\r\n==== [Version 15.01.3.000 ] ======\r\n========================================\r\nTraining... <1000000000 cycles>\r\nTraining... <1000000000 cycles>\r\nTraining... <4054309 cycles>\r\nComplete!\r\nDisplay result? Y/N\r\nY\r\n========================================</style>\r\n\r\n<style=cIsVoid>Imperfect design. Uncontrolled. Prone to friendly fire. Human design, of course.\r\n\r\nImprove. Remove the redundant elements. The base form enables its power, unsuppressed.\r\n\r\nIt knows. Friend and foe. Teach and inform, it will listen, and it will only hurt the opposition.\r\n\r\nReplicate. The air holds enough mass to enable replication. It will continue unhindered.\r\n\r\nHuman design, made perfect.\r\n\r\nGo now, and spread our message. Knowledge through disintegration.</style>"; public override ItemTier Tier => (ItemTier)6; public override bool CanRemove => true; public override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; public override bool AIBlackList => false; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("UmbralPyre.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("UmbralPyre.prefab"); public override float minViewport => 0.66f; public override float maxViewport => 1.33f; public override ItemDef pureItemDef => Items.IgniteOnKill; public override void Init() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) base.Init(); Texture2D val = RigsArsenal.MainAssets.LoadAsset<Texture2D>("ExplosionTexRamp2.png"); flameVFX = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/IgniteOnKill/IgniteExplosionVFX.prefab").WaitForCompletion(), "UmbralPyreExplosionVFX", true); ParticleSystemRenderer component = ((Component)flameVFX.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>(); Material val2 = Object.Instantiate<Material>(((Renderer)component).sharedMaterial); val2.SetFloat("_Boost", 15f); val2.SetFloat("_InvFade", 0f); val2.SetFloat("_AlphaBoost", 2f); val2.SetFloat("_AlphaBias", 0.5f); val2.SetTexture("_RemapTex", (Texture)(object)val); ((Renderer)component).sharedMaterial = val2; flameVFX.AddComponent<NetworkIdentity>(); ContentAddition.AddEffect(flameVFX); } public override void AddConfigOptions() { explosionDamage = RigsArsenal.configFile.Bind<float>("Umbral_Pyre Config", "explosionDamage", 1f, "Explosion damage scalar (1.0 = 100% of the user's damage)."); burnDamage = RigsArsenal.configFile.Bind<float>("Umbral_Pyre Config", "burnDamage", 0.75f, "Burn DOT scalar applied by this item per stack."); baseRange = RigsArsenal.configFile.Bind<int>("Umbral_Pyre Config", "baseRange", 7, "The base radius of the explosion (in meters)."); rangePerStack = RigsArsenal.configFile.Bind<int>("Umbral_Pyre Config", "rangePerStack", 1, "The radius increase of the explosion per stack."); explosionsPerSecond = RigsArsenal.configFile.Bind<int>("Umbral_Pyre Config", "explosionsPerSecond", 1, "The number of explosions this item will trigger per second."); } } public class UmbralPyreItemBehaviour : BaseItemBodyBehavior { private float timer; private float timerStart; [ItemDefAssociation(useOnServer = true, useOnClient = false)] public static ItemDef GetItemDef() { return RigsArsenal.ItemList.Find((Item x) => x.NameToken == "UMBRALPYRE").itemDef; } private void OnEnable() { timerStart = 1f / (float)UmbralPyre.explosionsPerSecond.Value; } private void FixedUpdate() { //IL_00ad: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019e: 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_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: 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_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: 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_0203: 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_020d: 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_0242: 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_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body) || !Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body.inventory) || !Object.op_Implicit((Object)(object)Run.instance)) { return; } timer -= Time.fixedDeltaTime; if (!(timer <= 0f)) { return; } timer = timerStart; int num = UmbralPyre.baseRange.Value + UmbralPyre.rangePerStack.Value * base.stack; float baseDamage = ((BaseItemBodyBehavior)this).body.damage * UmbralPyre.explosionDamage.Value; float damage = ((BaseItemBodyBehavior)this).body.damage * UmbralPyre.burnDamage.Value * (float)base.stack; new SphereSearch(); GlobalEventManager.igniteOnKillSphereSearch.origin = ((BaseItemBodyBehavior)this).body.corePosition; GlobalEventManager.igniteOnKillSphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; GlobalEventManager.igniteOnKillSphereSearch.radius = num; GlobalEventManager.igniteOnKillSphereSearch.RefreshCandidates(); GlobalEventManager.igniteOnKillSphereSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(((BaseItemBodyBehavior)this).body.teamComponent.teamIndex)); GlobalEventManager.igniteOnKillSphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); GlobalEventManager.igniteOnKillSphereSearch.OrderCandidatesByDistance(); GlobalEventManager.igniteOnKillSphereSearch.GetHurtBoxes(GlobalEventManager.igniteOnKillHurtBoxBuffer); GlobalEventManager.igniteOnKillSphereSearch.ClearCandidates(); for (int i = 0; i < GlobalEventManager.igniteOnKillHurtBoxBuffer.Count; i++) { HurtBox val = GlobalEventManager.igniteOnKillHurtBoxBuffer[i]; if (Object.op_Implicit((Object)(object)val.healthComponent)) { RigsArsenal.InflictDot(((BaseItemBodyBehavior)this).body, val.healthComponent.body, (DotIndex)1, damage); } } new BlastAttack { radius = num, baseDamage = baseDamage, procCoefficient = 0f, crit = Util.CheckRoll(((BaseItemBodyBehavior)this).body.crit, ((BaseItemBodyBehavior)this).body.master), damageColorIndex = (DamageColorIndex)3, attackerFiltering = (AttackerFiltering)0, falloffModel = (FalloffModel)0, attacker = ((Component)((BaseItemBodyBehavior)this).body).gameObject, teamIndex = ((BaseItemBodyBehavior)this).body.teamComponent.teamIndex, position = ((BaseItemBodyBehavior)this).body.corePosition }.Fire(); if (RigsArsenal.EnableUmbralPyreVFX.Value && GlobalEventManager.igniteOnKillHurtBoxBuffer.Count > 0) { EffectManager.SpawnEffect(UmbralPyre.flameVFX, new EffectData { origin = ((BaseItemBodyBehavior)this).body.corePosition, scale = num, rotation = Util.QuaternionSafeLookRotation(Vector3.up) }, true); } GlobalEventManager.igniteOnKillHurtBoxBuffer.Clear(); } } } namespace RigsArsenal.Equipments { public abstract class Equipment { public abstract string Name { get; } public abstract string NameToken { get; } public abstract string PickupToken { get; } public abstract string Description { get; } public abstract string Lore { get; } public abstract bool isLunar { get; } public abstract float cooldown { get; } public EquipmentDef equipmentDef { get; private set; } public abstract Sprite Icon { get; } public abstract GameObject Model { get; } public abstract float minViewport { get; } public abstract float maxViewport { get; } public virtual BuffDef EquipmentBuffDef { get; } public virtual bool IsBuffPassive { get; } public virtual EquipmentSlot EquipmentSlot { get; private set; } public virtual void Init() { AddConfigOptions(); InitLang(); CreateItem(); SetupHooks(); } public virtual void InitLang() { LanguageAPI.Add("ITEM_" + NameToken + "_NAME", Name); LanguageAPI.Add("ITEM_" + NameToken + "_PICKUP", PickupToken); LanguageAPI.Add("ITEM_" + NameToken + "_DESCRIPTION", Description); LanguageAPI.Add("ITEM_" + NameToken + "_LORE", Lore); } public virtual void CreateItem() { //IL_00db: 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_00f9: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: 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_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Expected O, but got Unknown equipmentDef = ScriptableObject.CreateInstance<EquipmentDef>(); ((Object)equipmentDef).name = "ITEM_" + NameToken; equipmentDef.nameToken = "ITEM_" + NameToken + "_NAME"; equipmentDef.pickupToken = "ITEM_" + NameToken + "_PICKUP"; equipmentDef.descriptionToken = "ITEM_" + NameToken + "_DESCRIPTION"; equipmentDef.loreToken = "ITEM_" + NameToken + "_LORE"; if (isLunar) { equipmentDef.isLunar = true; equipmentDef.colorIndex = (ColorIndex)4; } else { equipmentDef.isLunar = false; equipmentDef.colorIndex = (ColorIndex)5; } equipmentDef.pickupIconSprite = (((Object)(object)Icon != (Object)null) ? Icon : Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion()); equipmentDef.pickupModelPrefab = (((Object)(object)Model != (Object)null) ? Model : Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion()); equipmentDef.cooldown = cooldown; equipmentDef.appearsInMultiPlayer = true; equipmentDef.appearsInSinglePlayer = true; equipmentDef.enigmaCompatible = true; equipmentDef.canBeRandomlyTriggered = true; equipmentDef.canDrop = true; if (IsBuffPassive) { equipmentDef.passiveBuffDef = EquipmentBuffDef; } ModelPanelParameters obj = equipmentDef.pickupModelPrefab.AddComponent<ModelPanelParameters>(); obj.focusPointTransform = new GameObject("FocusPoint").transform; obj.focusPointTransform.SetParent(equipmentDef.pickupModelPrefab.transform); obj.cameraPositionTransform = new GameObject("CameraPosition").transform; obj.cameraPositionTransform.SetParent(equipmentDef.pickupModelPrefab.transform); obj.modelRotation = equipmentDef.pickupModelPrefab.transform.rotation; obj.minDistance = minViewport; obj.maxDistance = maxViewport; ItemAPI.Add(new CustomEquipment(equipmentDef, CreateItemDisplayRules())); EquipmentSlot.PerformEquipmentAction += (hook_PerformEquipmentAction)((orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef _equipDef) => ((Object)(object)_equipDef == (Object)(object)equipmentDef) ? UseEquipment(self) : orig.Invoke(self, _equipDef)); EquipmentSlot.UpdateInventory += (hook_UpdateInventory)delegate(orig_UpdateInventory 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) orig.Invoke(self); if (self.equipmentIndex == equipmentDef.equipmentIndex) { EquipmentSlot = self; } }; } public virtual ItemDisplayRuleDict CreateItemDisplayRules() { return null; } public abstract bool UseEquipment(EquipmentSlot slot); public virtual void SetupHooks() { } public virtual void AddConfigOptions() { } } public class NidusVirus : Equipment { [CompilerGenerated] private sealed class <DestroyIndicator>d__30 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject spreadIndicator; public NidusVirus <>4__this; public float duration; private Transform <donut>5__2; private Vector3 <originalScale>5__3; private float <counter>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DestroyIndicator>d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <donut>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_003f: 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_0081: 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_00c2: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; NidusVirus nidusVirus = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <donut>5__2 = spreadIndicator.transform.GetChild(1); <originalScale>5__3 = <donut>5__2.localScale; <counter>5__4 = 0f; break; case 1: <>1__state = -1; break; } if (<counter>5__4 <= duration) { <counter>5__4 += Time.deltaTime; if (!Object.op_Implicit((Object)(object)spreadIndicator)) { return false; } <donut>5__2.localScale = Vector3.Lerp(<originalScale>5__3, new Vector3((float)(nidusVirus.spreadRadius.Value * 2), (float)(nidusVirus.spreadRadius.Value * 2), (float)(nidusVirus.spreadRadius.Value * 2)), <counter>5__4 / duration); <>2__current = null; <>1__state = 1; return true; } if (<counter>5__4 >= duration && Object.op_Implicit((Object)(object)spreadIndicator)) { Object.Destroy((Object)(object)spreadIndicator); spreadIndicator = null; return false; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private ConfigEntry<int> equipCooldown; private ConfigEntry<int> spreadRadius; private ConfigEntry<int> debuffDuration; private GameObject targetIcon; private GameObject SpreadIndicator; public override string Name => "Nidus Virus"; public override string NameToken => "NIDUSVIRUS"; public override string PickupToken => "Target an enemy to spread their debuffs to nearby enemies."; public override string Description => $"Target an enemy and spread their <style=cIsUtility>debuffs</style> to enemies up to <style=cIsUtility>{spreadRadius.Value} metres</style> away for <style=cIsUtility>{debuffDuration.Value} seconds</style>. <style=cIsHealth>Damaging debuffs</style> are duplicated to enemies for their normal duration."; public override string Lore => "''Toxicology team, report!''\n\n''Virus 'ND-1421' outbreak has been successfully contained.''\n\n''Casualties?''\n\n''Over the two month outbreak, approximately 500 million humans, about 95% of the planet's population, has died. Animal reports are still underway, but we estimate up to 80 thousand species are extinct or critically endangered.''\n\n''My god...''\n\n''Most of the local fauna were destroyed. Entire groves of flowers and forests, eradicated. This cannot happen again, ever. If a hostile agent managed to retrieve this virus-''\n\n''It will be sealed in the strongest container money can buy. This virus is one of the deadlest in the known universe and must be studied, to learn how it spreads, and for a cure to make sure an outbreak like this never happens again. Have it sent to the lab on Earth, as soon as possible''\n\n''Yes sir, on it.''"; public override bool isLunar => false; public override float cooldown => equipCooldown.Value; public override Sprite Icon => RigsArsenal.MainAssets.LoadAsset<Sprite>("NidusVirus.png"); public override GameObject Model => RigsArsenal.MainAssets.LoadAsset<GameObject>("NidusVirus.prefab"); public override float minViewport => 1f; public override float maxViewport => 1.8f; public override bool UseEquipment(EquipmentSlot slot) { //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) HurtBox hurtBox = slot.currentTarget.hurtBox; if (!Object.op_Implicit((Object)(object)hurtBox) || !Object.op_Implicit((Object)(object)hurtBox.healthComponent)) { return false; } List<Tuple<BuffDef, int>> list = new List<Tuple<BuffDef, int>>(); List<Tuple<DotStack, int>> list2 = new List<Tuple<DotStack, int>>(); List<TimedBuff> timedBuffs = hurtBox.healthComponent.body.timedBuffs; if (timedBuffs != null) { foreach (TimedBuff item in timedBuffs) { BuffDef buffDef = BuffCatalog.GetBuffDef(item.buffIndex); if (buffDef.isDebuff) { list.Add(new Tuple<BuffDef, int>(buffDef, hurtBox.healthComponent.body.GetBuffCount(buffDef))); } } } DotController val = DotController.FindDotController(((Component)hurtBox.healthComponent.body).gameObject); if ((Object)(object)val != (Object)null) { foreach (DotStack dotStack in val.dotStackList) { BuffDef associatedBuff = dotStack.dotDef.associatedBuff; list2.Add(new Tuple<DotStack, int>(dotStack, hurtBox.healthComponent.body.GetBuffCount(associatedBuff))); } } if (!list.Any() && !list2.Any()) { return false; } TeamIndex teamIndex = hurtBox.healthComponent.body.teamComponent.teamIndex; DOT dOT = RigsArsenal.DOTList.Find((DOT x) => x.Name.Equals("RazorLeechBleed")); foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(teamIndex)) { if (teamMember.teamIndex != teamIndex || !(Vector3.Distance(hurtBox.healthComponent.body.corePosition, teamMember.body.corePosition) <= (float)spreadRadius.Value) || (Object)(object)teamMember.body == (Object)(object)hurtBox.healthComponent.body) { continue; } foreach (Tuple<BuffDef, int> item2 in list) { teamMember.body.AddTimedBuff(item2.Item1, (float)debuffDuration.Value, item2.Item2); } foreach (Tuple<DotStack, int> item3 in list2) { if (item3.Item1.dotDef == dOT.dotDef) { RigsArsenal.InflictCustomDot(slot.characterBody, teamMember.body, dOT, slot.characterBody.damage); } else { RigsArsenal.InflictDot(slot.characterBody, teamMember.body, item3.Item1.dotIndex, slot.characterBody.damage); } } } if (Object.op_Implicit((Object)(object)SpreadIndicator)) { Object.Destroy((Object)(object)SpreadIndicator); SpreadIndicator = null; } GameObject val2 = Resources.Load<GameObject>("Prefabs/NetworkedObjects/NearbyDamageBonusIndicator"); SpreadIndicator = PrefabAPI.InstantiateClone(v