Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of VanillaItemTweaks v1.2.0
VanillaItemTweaks.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Commando.CommandoWeapon; using EntityStates.MeridianEvent; using EntityStates.Missions.BrotherEncounter; using EntityStates.SolusWing; using EntityStates.TeleporterHealNovaController; using HG.Reflection; using IL.EntityStates; using IL.EntityStates.TeleporterHealNovaController; using IL.RoR2; using IL.RoR2.Items; using IL.RoR2.Orbs; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.Commando.CommandoWeapon; using On.EntityStates.MeridianEvent; using On.EntityStates.Missions.BrotherEncounter; using On.EntityStates.SolusWing; using On.EntityStates.TeleporterHealNovaController; using On.RoR2; using R2API; using RoR2; using RoR2.Items; using RoR2.Orbs; using RoR2.Projectile; using UnityEngine; using UnityEngine.Networking; using VanillaItemTweaks.Boss; using VanillaItemTweaks.Common; using VanillaItemTweaks.Legendary; using VanillaItemTweaks.Lunar; using VanillaItemTweaks.Uncommon; using VanillaItemTweaks.Void; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("VanillaItemTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+fd40b5fd7d2f3448b9ed0dc55366b88a1359c94f")] [assembly: AssemblyProduct("VanillaItemTweaks")] [assembly: AssemblyTitle("VanillaItemTweaks")] [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 VanillaItemTweaks { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void LogDebug(object data) { _logSource.LogDebug(data); } internal static void LogError(object data) { _logSource.LogError(data); } internal static void LogFatal(object data) { _logSource.LogFatal(data); } internal static void LogInfo(object data) { _logSource.LogInfo(data); } internal static void LogMessage(object data) { _logSource.LogMessage(data); } internal static void LogWarning(object data) { _logSource.LogWarning(data); } internal static void LogInstrNotFound(ILContext il) { LogError("GoToNext instructions not found at method: " + (object)il.Method); } } [BepInPlugin("OakPrime.VanillaItemTweaks", "VanillaItemTweaks", "1.2.0")] public class VanillaItemTweaks : BaseUnityPlugin { public const string PluginGUID = "OakPrime.VanillaItemTweaks"; public const string PluginAuthor = "OakPrime"; public const string PluginName = "VanillaItemTweaks"; public const string PluginVersion = "1.2.0"; public static ManualLogSource logger; public void Awake() { logger = ((BaseUnityPlugin)this).Logger; Log.Init(logger); try { Init(); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ConfigFile configFile = new ConfigFile(Paths.ConfigPath + "\\OakPrime.VanillaItemTweaks.cfg", true); BustlingFungusBuff.TryInit(configFile); WarbannerBuff.TryInit(configFile); MochaRework.TryInit(configFile); StickyBombBuff.TryInit(configFile); BoxOfDynamiteBuff.TryInit(configFile); DeathMarkChoice.TryInit(configFile); HuntersHarpoonChoice.TryInit(configFile); LeechingSeedBuff.TryInit(configFile); LeptonDaisyChoice.TryInit(configFile); RedWhipBuff.TryInit(configFile); OldGuillotineBuff.TryInit(configFile); RegeneratingScrapBuff.TryInit(configFile); SquidPolypBuff.TryInit(configFile); HappiestMaskRework.TryInit(configFile); LaserScopeBuff.TryInit(configFile); KnurlBuff.TryInit(configFile); PolyluteNerf.TryInit(configFile); GestureNerf.TryInit(configFile); TranscendenceNerf.TryInit(configFile); } } } namespace VanillaItemTweaks.Void { public static class PolyluteNerf { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__1_1; public static Func<Instruction, bool> <>9__1_2; public static Func<Instruction, bool> <>9__1_3; public static Func<Instruction, bool> <>9__1_4; public static Func<Instruction, bool> <>9__1_5; public static Func<int, int> <>9__1_6; public static Manipulator <>9__1_0; internal void <Init>b__1_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); int num3 = default(int); int num2 = default(int); int num = default(int); val.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStfld<VoidLightningOrb>(x, "totalStrikes") }); val.Index += 4; val.EmitDelegate<Func<int, int>>((Func<int, int>)((int totalStrikes) => totalStrikes * 2 / 3)); } internal bool <Init>b__1_1(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool <Init>b__1_2(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool <Init>b__1_3(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool <Init>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <Init>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchStfld<VoidLightningOrb>(x, "totalStrikes"); } internal int <Init>b__1_6(int totalStrikes) { return totalStrikes * 2 / 3; } } public static void TryInit(ConfigFile configFile) { if (configFile.Bind<bool>("Polylute Nerf", "Enable Polylute Nerf", true, "Reduces Polylute strikes from 3 to 2.").Value) { Init(); } } public static void Init() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown try { object obj = <>c.<>9__1_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); int num3 = default(int); int num2 = default(int); int num = default(int); val2.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStfld<VoidLightningOrb>(x, "totalStrikes") }); val2.Index += 4; val2.EmitDelegate<Func<int, int>>((Func<int, int>)((int totalStrikes) => totalStrikes * 2 / 3)); }; <>c.<>9__1_0 = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; ReplaceText(); Log.LogInfo("Added Polylute Nerf"); } catch (Exception ex) { VanillaItemTweaks.logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private static void ReplaceText() { LanguageAPI.Add("ITEM_CHAINLIGHTNINGVOID_DESC", "<style=cIsDamage>25%</style> chance to fire <style=cIsDamage>lightning</style> for <style=cIsDamage>60%</style> TOTAL damage up to <style=cIsDamage>2</style> <style=cStack>(+2 per stack)</style> times. <style=cIsVoid>Corrupts all Ukeleles</style>."); } } } namespace VanillaItemTweaks.Uncommon { internal class BerzerkerPauldronRework { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__2_2; public static Func<Instruction, bool> <>9__2_3; public static Action<HealthComponent> <>9__2_1; public static Manipulator <>9__2_0; internal void <Init>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 5), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 2) })) { Log.LogInstrNotFound(il); return; } val.EmitDelegate<Action<HealthComponent>>((Action<HealthComponent>)delegate(HealthComponent healthComponent) { int num = (Object.op_Implicit((Object)(object)healthComponent.body.inventory) ? healthComponent.body.inventory.GetItemCountEffective(Items.WarCryOnMultiKill) : 0); }); } internal bool <Init>b__2_2(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 5); } internal bool <Init>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 2); } internal void <Init>b__2_1(HealthComponent healthComponent) { int num = (Object.op_Implicit((Object)(object)healthComponent.body.inventory) ? healthComponent.body.inventory.GetItemCountEffective(Items.WarCryOnMultiKill) : 0); } } private static float _damageCoeff; public static void TryInit(ConfigFile configFile) { bool value = configFile.Bind<bool>("Berzerker Pauldron Rework", "Enable Berzerker Pauldron Rework", true, "Changes guillotine execution threshold.").Value; _damageCoeff = configFile.Bind<float>("Berzerker Pauldron Rework", "Berzerker Pauldron Damage", 240f, "Box of Dynamite Damage does X% damage (+X% per stack). Default: 240. Vanilla: 240 (+85 per stack).").Value / 100f; if (value) { Init(); } } public static void Init() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown try { object obj = <>c.<>9__2_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); if (!val2.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 5), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 2) })) { Log.LogInstrNotFound(il); } else { val2.EmitDelegate<Action<HealthComponent>>((Action<HealthComponent>)delegate(HealthComponent healthComponent) { int num = (Object.op_Implicit((Object)(object)healthComponent.body.inventory) ? healthComponent.body.inventory.GetItemCountEffective(Items.WarCryOnMultiKill) : 0); }); } }; <>c.<>9__2_0 = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; UpdateText(); Log.LogInfo("Added Berzerker Pauldron Rework"); } catch (Exception ex) { Log.LogError(ex.Message + " - " + ex.StackTrace); } } private static void UpdateText() { LanguageAPI.Add("ITEM_DRONESDROPDYNAMITE_DESC", "Gain <style=cIsDamage>Lt. Droneboy</style>. While in combat, your drones drop sticks of dynamite that detonate for <style=cIsDamage>" + _damageCoeff * 100f + "%</style> <style=cStack>(+" + _damageCoeff * 100f + "% per stack)</style>, stunning enemies. Recharges after <style=cIsUtility>10</style> seconds."); } } internal class BoxOfDynamiteBuff { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__2_1; public static Func<Instruction, bool> <>9__2_2; public static Manipulator <>9__2_0; internal void <Init>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); float num2 = default(float); float num = default(float); if (!val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { Log.LogInstrNotFound(il); return; } val.Next.Operand = _damageCoeff; int index = val.Index; val.Index = index + 1; val.Next.Operand = _damageCoeff; } internal bool <Init>b__2_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <Init>b__2_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } } private static float _damageCoeff; public static void TryInit(ConfigFile configFile) { bool value = configFile.Bind<bool>("Box of Dynamite Buff", "Enable Box of Dynamite Buff", true, "Changes guillotine execution threshold.").Value; _damageCoeff = configFile.Bind<float>("Box of Dynamite Buff", "Box of Dynamite Damage", 240f, "Box of Dynamite Damage does X% damage (+X% per stack). Default: 240. Vanilla: 240 (+85 per stack).").Value / 100f; if (value) { Init(); } } public static void Init() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown try { object obj = <>c.<>9__2_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val2 = new ILCursor(il); float num2 = default(float); float num = default(float); if (!val2.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { Log.LogInstrNotFound(il); } else { val2.Next.Operand = _damageCoeff; int index = val2.Index; val2.Index = index + 1; val2.Next.Operand = _damageCoeff; } }; <>c.<>9__2_0 = val; obj = (object)val; } DroneDynamiteBehaviour.FixedUpdate += (Manipulator)obj; UpdateText(); Log.LogInfo("Added Box of Dynamite Buff"); } catch (Exception ex) { Log.LogError(ex.Message + " - " + ex.StackTrace); } } private static void UpdateText() { LanguageAPI.Add("ITEM_DRONESDROPDYNAMITE_DESC", "Gain <style=cIsDamage>Lt. Droneboy</style>. While in combat, your drones drop sticks of dynamite that detonate for <style=cIsDamage>" + _damageCoeff * 100f + "%</style> <style=cStack>(+" + _damageCoeff * 100f + "% per stack)</style>, stunning enemies. Recharges after <style=cIsUtility>10</style> seconds."); } } internal class DeathMarkBehavior : MonoBehaviour { private float _timer = 0f; private float _slowBuildUpSeconds = 4f; private CharacterBody _victimBody; private int _deathMarkCount = 1; public void SetBuildUpSeconds(float buildupSeconds) { _slowBuildUpSeconds = buildupSeconds; } private void OnEnable() { Log.LogDebug("Death Mark Beh OnEnable entered"); _victimBody = ((Component)this).GetComponent<CharacterBody>(); } public void ApplyMark() { Log.LogDebug("AppliedMark"); _victimBody.AddTimedBuff(Buffs.DeathMark, DeathMarkRework._duration * (float)_deathMarkCount); _timer = 0f; } public void TryUpdateCount(int count) { if (count > _deathMarkCount) { _deathMarkCount = count; } } private bool IsSlowed() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) Log.LogDebug("Check slow"); HashSet<BuffIndex> hashSet = new HashSet<BuffIndex> { Buffs.Slow80.buffIndex, Buffs.Slow50.buffIndex, Buffs.Slow60.buffIndex, Buffs.Cripple.buffIndex, Buffs.BeetleJuice.buffIndex, Buffs.ClayGoo.buffIndex, Buffs.Weak.buffIndex }; foreach (TimedBuff timedBuff in _victimBody.timedBuffs) { if (hashSet.Contains(timedBuff.buffIndex)) { return true; } } return false; } private void FixedUpdate() { if (_victimBody.HasBuff(Buffs.Entangle)) { ApplyMark(); } else if (!_victimBody.HasBuff(Buffs.DeathMark) && IsSlowed()) { _timer += Time.deltaTime; if (_timer >= _slowBuildUpSeconds) { ApplyMark(); } } } } internal class DeathMarkChoice { public static void TryInit(ConfigFile configFile) { bool value = configFile.Bind<bool>("Death Mark Rework", "Enable Death Mark Rework", true, "Death Mark applies on all hard CC.").Value; float value2 = configFile.Bind<float>("Death Mark Rework", "Death Mark Duration", 4f, "Death Mark lasts X (+X per stack) seconds.").Value; float value3 = configFile.Bind<float>("Death Mark Rework", "Death Mark Buildup Duration", 4f, "Death Mark can also be applied by slowing target for X seconds.").Value; float damageMultiplier = configFile.Bind<float>("Death Mark Rework", "Death Mark Damage Boost", 35f, "Death Mark increases damage to target by X%.").Value / 100f + 1f; bool value4 = configFile.Bind<bool>("Death Mark Buff", "Enable Death Mark Buff", false, "Reduces Death Mark debuffs required to 3 and reduces its damage multiplier to 1.35x.\nRework overrides buff.").Value; float damageMultiplier2 = configFile.Bind<float>("Death Mark Buff", "Death Mark Damage Boost", 35f, "Death Mark increases damage to target by X%.").Value / 100f + 1f; int value5 = configFile.Bind<int>("Death Mark Buff", "Death Mark Debuff Count", 3, "Death Mark requires X debuffs to activate.").Value; if (value) { DeathMarkRework.Init(value2, value3, damageMultiplier); } else if (value4) { DeathMarkFix.Init(damageMultiplier2, value5); } } } public static class DeathMarkFix { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__2_3; public static Func<int, int> <>9__2_2; public static Manipulator <>9__2_0; public static Func<Instruction, bool> <>9__2_4; public static Func<Instruction, bool> <>9__2_5; public static Func<Instruction, bool> <>9__2_6; public static Func<Instruction, bool> <>9__2_7; public static Func<Instruction, bool> <>9__2_8; public static Func<Instruction, bool> <>9__2_9; public static Func<Instruction, bool> <>9__2_10; public static Func<Instruction, bool> <>9__2_11; public static Manipulator <>9__2_1; internal void <Init>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 4) })) { Log.LogInstrNotFound(il); return; } int index = val.Index; val.Index = index + 1; val.EmitDelegate<Func<int, int>>((Func<int, int>)((int num) => _debuffCount)); } internal bool <Init>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 4); } internal int <Init>b__2_2(int num) { return _debuffCount; } internal void <Init>b__2_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); int num4 = default(int); int num3 = default(int); if (!val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num3) })) { Log.LogInstrNotFound(il); return; } int num2 = default(int); int num = default(int); if (!val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) })) { Log.LogInstrNotFound(il); return; } int index = val.Index; val.Index = index + 1; val.Next.Operand = _damageMultiplier; } internal bool <Init>b__2_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool <Init>b__2_5(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal bool <Init>b__2_6(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <Init>b__2_7(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal bool <Init>b__2_8(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool <Init>b__2_9(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal bool <Init>b__2_10(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <Init>b__2_11(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } } public static float _damageMultiplier; public static int _debuffCount; public static void Init(float damageMultiplier, int debuffCount) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown _damageMultiplier = damageMultiplier; _debuffCount = debuffCount; try { object obj = <>c.<>9__2_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val4 = new ILCursor(il); if (!val4.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 4) })) { Log.LogInstrNotFound(il); } else { int index2 = val4.Index; val4.Index = index2 + 1; val4.EmitDelegate<Func<int, int>>((Func<int, int>)((int num) => _debuffCount)); } }; <>c.<>9__2_0 = val; obj = (object)val; } GlobalEventManager.ProcDeathMark += (Manipulator)obj; object obj2 = <>c.<>9__2_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val3 = new ILCursor(il); int num5 = default(int); int num4 = default(int); int num3 = default(int); int num2 = default(int); if (!val3.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num5), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num4) })) { Log.LogInstrNotFound(il); } else if (!val3.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num2) })) { Log.LogInstrNotFound(il); } else { int index = val3.Index; val3.Index = index + 1; val3.Next.Operand = _damageMultiplier; } }; <>c.<>9__2_1 = val2; obj2 = (object)val2; } HealthComponent.TakeDamageProcess += (Manipulator)obj2; ReplaceText(); Log.LogInfo("Added Death Mark Buff"); } catch (Exception ex) { VanillaItemTweaks.logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private static void ReplaceText() { LanguageAPI.Add("ITEM_DEATHMARK_PICKUP", "Enemies with " + _debuffCount + " or more debuffs are marked for death, taking bonus damage."); LanguageAPI.Add("ITEM_DEATHMARK_DESC", "Enemies with <style=cIsDamage>" + _debuffCount + "</style> or more debuffs are <style=cIsDamage>marked for death</style>, increasing damage taken by <style=cIsDamage>" + (_damageMultiplier - 1f) * 100f + "%</style> from all sources for <style=cIsUtility>7</style> <style=cStack>(+7 per stack)</style> seconds."); } } public static class DeathMarkRework { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__3_5; public static Action<DamageReport> <>9__3_4; public static Manipulator <>9__3_0; public static Func<Instruction, bool> <>9__3_8; public static Func<Instruction, bool> <>9__3_9; public static Func<CharacterMaster, DamageInfo, GameObject, CharacterMaster> <>9__3_6; public static Func<Instruction, bool> <>9__3_10; public static Func<Instruction, bool> <>9__3_11; public static Func<Instruction, bool> <>9__3_12; public static Func<Instruction, bool> <>9__3_13; public static Action<DamageInfo, GameObject> <>9__3_7; public static Manipulator <>9__3_1; public static Manipulator <>9__3_2; public static Func<Instruction, bool> <>9__3_14; public static Func<Instruction, bool> <>9__3_15; public static Func<Instruction, bool> <>9__3_16; public static Func<Instruction, bool> <>9__3_17; public static Func<Instruction, bool> <>9__3_18; public static Func<Instruction, bool> <>9__3_19; public static Func<Instruction, bool> <>9__3_20; public static Func<Instruction, bool> <>9__3_21; public static Manipulator <>9__3_3; internal void <Init>b__3_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); string text = default(string); if (!val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, ref text) })) { Log.LogInstrNotFound(il); return; } val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Action<DamageReport>>((Action<DamageReport>)delegate(DamageReport dmgRep) { if (dmgRep.attackerMaster.inventory.GetItemCountEffective(Items.DeathMark) > 0) { dmgRep.victimBody.AddTimedBuff(Buffs.DeathMark, _duration); } }); } internal bool <Init>b__3_5(Instruction x) { string text = default(string); return ILPatternMatchingExt.MatchLdstr(x, ref text); } internal void <Init>b__3_4(DamageReport dmgRep) { if (dmgRep.attackerMaster.inventory.GetItemCountEffective(Items.DeathMark) > 0) { dmgRep.victimBody.AddTimedBuff(Buffs.DeathMark, _duration); } } internal void <Init>b__3_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int num2 = default(int); if (!val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num2) })) { Log.LogInstrNotFound(il); return; } val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldarg_2); val.EmitDelegate<Func<CharacterMaster, DamageInfo, GameObject, CharacterMaster>>((Func<CharacterMaster, DamageInfo, GameObject, CharacterMaster>)delegate(CharacterMaster master, DamageInfo dmgInfo, GameObject obj) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) Log.LogDebug("Entered stungrenade delegate"); Inventory inventory = master.inventory; int itemCountEffective2 = inventory.GetItemCountEffective(Items.StunChanceOnHit); Log.LogDebug("inventory: " + ((object)inventory)?.ToString() + "; stunGrenades: " + itemCountEffective2); if (inventory.GetItemCountEffective(Items.DeathMark) > 0 && itemCountEffective2 > 0 && (Object)(object)obj.GetComponent<SetStateOnHurt>() == (Object)null && Util.CheckRoll(Util.ConvertAmplificationPercentageIntoReductionPercentage(SetStateOnHurt.stunChanceOnHitBaseChancePercent * (float)itemCountEffective2 * dmgInfo.procCoefficient), master)) { Log.LogDebug("Doing fake stun grenade"); EffectManager.SimpleImpactEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/ImpactStunGrenade"), dmgInfo.position, -dmgInfo.force, true); obj.GetComponent<CharacterBody>().AddTimedBuff(Buffs.DeathMark, _duration); } return master; }); int num = default(int); ILLabel val2 = default(ILLabel); if (!val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "EliteBeadCorruption"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) })) { Log.LogInstrNotFound(il); return; } int index = val.Index; val.Index = index + 1; Log.LogDebug("index: " + val.Index); Log.LogDebug("next instr: " + (object)val.Next); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldarg_2); val.EmitDelegate<Action<DamageInfo, GameObject>>((Action<DamageInfo, GameObject>)delegate(DamageInfo dmgInfo, GameObject obj) { Log.LogDebug("Entered deathmark delegate"); CharacterBody component = obj.GetComponent<CharacterBody>(); int itemCountEffective = dmgInfo.attacker.GetComponent<CharacterBody>().inventory.GetItemCountEffective(Items.DeathMark); Log.LogDebug("count: " + itemCountEffective); if (itemCountEffective <= 0) { Log.LogDebug("no deathmarks"); } else { DeathMarkBehavior deathMarkBehavior = obj.GetComponent<DeathMarkBehavior>(); if ((Object)(object)deathMarkBehavior == (Object)null) { deathMarkBehavior = obj.AddComponent<DeathMarkBehavior>(); deathMarkBehavior.SetBuildUpSeconds(_slowBuildUpDuration); Log.LogDebug("Added deathMarkBehavior"); Log.LogDebug("Deathmark behavior parent disabled: " + obj.activeInHierarchy); } deathMarkBehavior.TryUpdateCount(itemCountEffective); if (IsHardCCDamageType(dmgInfo)) { deathMarkBehavior.ApplyMark(); } } }); } internal bool <Init>b__3_8(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"); } internal bool <Init>b__3_9(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal CharacterMaster <Init>b__3_6(CharacterMaster master, DamageInfo dmgInfo, GameObject obj) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) Log.LogDebug("Entered stungrenade delegate"); Inventory inventory = master.inventory; int itemCountEffective = inventory.GetItemCountEffective(Items.StunChanceOnHit); Log.LogDebug("inventory: " + ((object)inventory)?.ToString() + "; stunGrenades: " + itemCountEffective); if (inventory.GetItemCountEffective(Items.DeathMark) > 0 && itemCountEffective > 0 && (Object)(object)obj.GetComponent<SetStateOnHurt>() == (Object)null && Util.CheckRoll(Util.ConvertAmplificationPercentageIntoReductionPercentage(SetStateOnHurt.stunChanceOnHitBaseChancePercent * (float)itemCountEffective * dmgInfo.procCoefficient), master)) { Log.LogDebug("Doing fake stun grenade"); EffectManager.SimpleImpactEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/ImpactStunGrenade"), dmgInfo.position, -dmgInfo.force, true); obj.GetComponent<CharacterBody>().AddTimedBuff(Buffs.DeathMark, _duration); } return master; } internal bool <Init>b__3_10(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool <Init>b__3_11(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "EliteBeadCorruption"); } internal bool <Init>b__3_12(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"); } internal bool <Init>b__3_13(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal void <Init>b__3_7(DamageInfo dmgInfo, GameObject obj) { Log.LogDebug("Entered deathmark delegate"); CharacterBody component = obj.GetComponent<CharacterBody>(); int itemCountEffective = dmgInfo.attacker.GetComponent<CharacterBody>().inventory.GetItemCountEffective(Items.DeathMark); Log.LogDebug("count: " + itemCountEffective); if (itemCountEffective <= 0) { Log.LogDebug("no deathmarks"); return; } DeathMarkBehavior deathMarkBehavior = obj.GetComponent<DeathMarkBehavior>(); if ((Object)(object)deathMarkBehavior == (Object)null) { deathMarkBehavior = obj.AddComponent<DeathMarkBehavior>(); deathMarkBehavior.SetBuildUpSeconds(_slowBuildUpDuration); Log.LogDebug("Added deathMarkBehavior"); Log.LogDebug("Deathmark behavior parent disabled: " + obj.activeInHierarchy); } deathMarkBehavior.TryUpdateCount(itemCountEffective); if (IsHardCCDamageType(dmgInfo)) { deathMarkBehavior.ApplyMark(); } } internal void <Init>b__3_2(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ret); } internal void <Init>b__3_3(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); int num4 = default(int); int num3 = default(int); if (!val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num3) })) { Log.LogInstrNotFound(il); return; } int num2 = default(int); int num = default(int); if (!val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) })) { Log.LogInstrNotFound(il); return; } int index = val.Index; val.Index = index + 1; Log.LogDebug("Dmark coeff: " + val.Next.Operand); val.Next.Operand = _damageMultiplier; Log.LogDebug("Dmark coeff updated: " + val.Next.Operand); } internal bool <Init>b__3_14(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool <Init>b__3_15(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal bool <Init>b__3_16(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <Init>b__3_17(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal bool <Init>b__3_18(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool <Init>b__3_19(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal bool <Init>b__3_20(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <Init>b__3_21(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } } public static float _duration; public static float _slowBuildUpDuration; public static float _damageMultiplier; public static void Init(float duration, float slowBulidUpDuration, float damageMultiplier) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_0097: 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_00a2: Expected O, but got Unknown _duration = duration; _slowBuildUpDuration = slowBulidUpDuration; _damageMultiplier = damageMultiplier; try { object obj2 = <>c.<>9__3_0; if (obj2 == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) ILCursor val9 = new ILCursor(il); string text = default(string); if (!val9.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, ref text) })) { Log.LogInstrNotFound(il); } else { val9.Emit(OpCodes.Ldarg_1); val9.EmitDelegate<Action<DamageReport>>((Action<DamageReport>)delegate(DamageReport dmgRep) { if (dmgRep.attackerMaster.inventory.GetItemCountEffective(Items.DeathMark) > 0) { dmgRep.victimBody.AddTimedBuff(Buffs.DeathMark, _duration); } }); } }; <>c.<>9__3_0 = val; obj2 = (object)val; } SetStateOnHurt.OnTakeDamageServer += (Manipulator)obj2; object obj3 = <>c.<>9__3_1; if (obj3 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) ILCursor val7 = new ILCursor(il); int num6 = default(int); if (!val7.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num6) })) { Log.LogInstrNotFound(il); } else { val7.Emit(OpCodes.Ldarg_1); val7.Emit(OpCodes.Ldarg_2); val7.EmitDelegate<Func<CharacterMaster, DamageInfo, GameObject, CharacterMaster>>((Func<CharacterMaster, DamageInfo, GameObject, CharacterMaster>)delegate(CharacterMaster master, DamageInfo dmgInfo, GameObject obj) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) Log.LogDebug("Entered stungrenade delegate"); Inventory inventory = master.inventory; int itemCountEffective2 = inventory.GetItemCountEffective(Items.StunChanceOnHit); Log.LogDebug("inventory: " + ((object)inventory)?.ToString() + "; stunGrenades: " + itemCountEffective2); if (inventory.GetItemCountEffective(Items.DeathMark) > 0 && itemCountEffective2 > 0 && (Object)(object)obj.GetComponent<SetStateOnHurt>() == (Object)null && Util.CheckRoll(Util.ConvertAmplificationPercentageIntoReductionPercentage(SetStateOnHurt.stunChanceOnHitBaseChancePercent * (float)itemCountEffective2 * dmgInfo.procCoefficient), master)) { Log.LogDebug("Doing fake stun grenade"); EffectManager.SimpleImpactEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/ImpactStunGrenade"), dmgInfo.position, -dmgInfo.force, true); obj.GetComponent<CharacterBody>().AddTimedBuff(Buffs.DeathMark, _duration); } return master; }); int num5 = default(int); ILLabel val8 = default(ILLabel); if (!val7.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num5), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "EliteBeadCorruption"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val8) })) { Log.LogInstrNotFound(il); } else { int index2 = val7.Index; val7.Index = index2 + 1; Log.LogDebug("index: " + val7.Index); Log.LogDebug("next instr: " + (object)val7.Next); val7.Emit(OpCodes.Ldarg_1); val7.Emit(OpCodes.Ldarg_2); val7.EmitDelegate<Action<DamageInfo, GameObject>>((Action<DamageInfo, GameObject>)delegate(DamageInfo dmgInfo, GameObject obj) { Log.LogDebug("Entered deathmark delegate"); CharacterBody component = obj.GetComponent<CharacterBody>(); int itemCountEffective = dmgInfo.attacker.GetComponent<CharacterBody>().inventory.GetItemCountEffective(Items.DeathMark); Log.LogDebug("count: " + itemCountEffective); if (itemCountEffective <= 0) { Log.LogDebug("no deathmarks"); } else { DeathMarkBehavior deathMarkBehavior = obj.GetComponent<DeathMarkBehavior>(); if ((Object)(object)deathMarkBehavior == (Object)null) { deathMarkBehavior = obj.AddComponent<DeathMarkBehavior>(); deathMarkBehavior.SetBuildUpSeconds(_slowBuildUpDuration); Log.LogDebug("Added deathMarkBehavior"); Log.LogDebug("Deathmark behavior parent disabled: " + obj.activeInHierarchy); } deathMarkBehavior.TryUpdateCount(itemCountEffective); if (IsHardCCDamageType(dmgInfo)) { deathMarkBehavior.ApplyMark(); } } }); } } }; <>c.<>9__3_1 = val2; obj3 = (object)val2; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj3; object obj4 = <>c.<>9__3_2; if (obj4 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) ILCursor val6 = new ILCursor(il); val6.Emit(OpCodes.Ret); }; <>c.<>9__3_2 = val3; obj4 = (object)val3; } GlobalEventManager.ProcDeathMark += (Manipulator)obj4; object obj5 = <>c.<>9__3_3; if (obj5 == null) { Manipulator val4 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val5 = new ILCursor(il); int num4 = default(int); int num3 = default(int); int num2 = default(int); int num = default(int); if (!val5.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num3) })) { Log.LogInstrNotFound(il); } else if (!val5.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) })) { Log.LogInstrNotFound(il); } else { int index = val5.Index; val5.Index = index + 1; Log.LogDebug("Dmark coeff: " + val5.Next.Operand); val5.Next.Operand = _damageMultiplier; Log.LogDebug("Dmark coeff updated: " + val5.Next.Operand); } }; <>c.<>9__3_3 = val4; obj5 = (object)val4; } HealthComponent.TakeDamageProcess += (Manipulator)obj5; ReplaceText(); Log.LogInfo("Added Death Mark Rework"); } catch (Exception ex) { VanillaItemTweaks.logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private static bool IsHardCCDamageType(DamageInfo dmgInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) return DamageTypeCombo.op_Implicit(dmgInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)50364704)) > DamageTypeCombo.op_Implicit(DamageTypeCombo.Generic); } private static void ReplaceText() { LanguageAPI.Add("ITEM_DEATHMARK_PICKUP", "Movement-impaired enemies are <style=cIsDamage>marked for death</style>."); LanguageAPI.Add("ITEM_DEATHMARK_DESC", "Slowing enemies for " + _slowBuildUpDuration + " seconds <style=cIsDamage>applies Death Mark</style>, increasing damage taken by <style=cIsDamage>" + (_damageMultiplier - 1f) * 100f + "%</style> from all sources for <style=cIsUtility>" + _duration + "</style> <style=cStack>(+" + _duration + " per stack)</style> seconds. Stuns apply Death Mark instantly."); } } internal class HuntersHarpoonBehavior : ItemBehavior { private const int HUNTERS_HARPOON_COOLDOWN = 3; private const float HUNTERS_HARPOON_DURATION = 3f; private float _timer = 0f; private void OnDisable() { base.body.ClearTimedBuffs(Buffs.KillMoveSpeed); } public void TryApplyMovespeed() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_014d: 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_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) int num = Math.Clamp((int)Math.Truncate(_timer), 1, 3); Log.LogDebug("BuffCount: " + num); _timer = 0f; if (num <= 0) { return; } int buffCount = base.body.GetBuffCount(Buffs.KillMoveSpeed); if (num == buffCount) { for (int i = 0; i < base.body.timedBuffs.Count; i++) { TimedBuff val = base.body.timedBuffs[i]; if (val.buffIndex == Buffs.KillMoveSpeed.buffIndex) { val.timer = val.totalDuration; } } } else { if (num < buffCount) { return; } base.body.ClearTimedBuffs(Buffs.KillMoveSpeed); for (int j = 0; j < num; j++) { CharacterBody body = base.body; if (body != null) { body.AddTimedBuff(Buffs.KillMoveSpeed, 2f * (float)base.stack * (float)Math.Pow(0.75, j)); } } EffectData val2 = new EffectData(); val2.origin = base.body.corePosition; CharacterMotor characterMotor = base.body.characterMotor; bool flag = false; if (Object.op_Implicit((Object)(object)characterMotor)) { Vector3 moveDirection = characterMotor.moveDirection; if (moveDirection != Vector3.zero) { val2.rotation = Util.QuaternionSafeLookRotation(moveDirection); flag = true; } } if (!flag) { val2.rotation = base.body.transform.rotation; } EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MoveSpeedOnKillActivate"), val2, true); } } private void FixedUpdate() { if (_timer < 3f) { _timer += Time.deltaTime; } } } internal class HuntersHarpoonBehavior1 : BaseItemBodyBehavior { public static bool _configEnabled; [ItemDefAssociation(useOnClient = false, useOnServer = true)] private static ItemDef GetItemDef() { return _configEnabled ? Items.MoveSpeedOnKill : null; } private void OnEnable() { if (!Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body)) { Log.LogDebug("NULL BODY"); return; } Log.LogDebug("Adding hook!"); ((BaseItemBodyBehavior)this).body.onSkillActivatedServer += OnSkillActivated; } private void OnDisable() { if (Object.op_Implicit((Object)(object)((BaseItemBodyBehavior)this).body)) { ((BaseItemBodyBehavior)this).body.onSkillActivatedServer -= OnSkillActivated; ((BaseItemBodyBehavior)this).body.ClearTimedBuffs(Buffs.KillMoveSpeed); } } public void TryApplyMovespeed() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) Log.LogDebug("Entered tryapplymovespeed"); ((BaseItemBodyBehavior)this).body.ClearTimedBuffs(Buffs.KillMoveSpeed); for (int i = 0; i < HuntersHarpoonRework1._buffStacks; i++) { CharacterBody body = ((BaseItemBodyBehavior)this).body; if (body != null) { body.AddTimedBuff(Buffs.KillMoveSpeed, HuntersHarpoonRework1._speedDuration * (float)base.stack * (float)Math.Pow(0.75, i)); } } EffectData val = new EffectData(); val.origin = ((BaseItemBodyBehavior)this).body.corePosition; CharacterMotor characterMotor = ((BaseItemBodyBehavior)this).body.characterMotor; bool flag = false; if (Object.op_Implicit((Object)(object)characterMotor)) { Vector3 moveDirection = characterMotor.moveDirection; if (moveDirection != Vector3.zero) { val.rotation = Util.QuaternionSafeLookRotation(moveDirection); flag = true; } } if (!flag) { val.rotation = ((BaseItemBodyBehavior)this).body.transform.rotation; } EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MoveSpeedOnKillActivate"), val, true); } private void OnSkillActivated(GenericSkill skill) { //IL_002f: 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) Log.LogDebug("Entered onskill hook!"); if (!NetworkServer.active) { Log.LogDebug("Not server!"); } else if (((BaseItemBodyBehavior)this).body.bodyIndex == SpecialCases.RailGunner()) { if ((Object)(object)((BaseItemBodyBehavior)this).body.skillLocator.primary != (Object)(object)skill || !((BaseItemBodyBehavior)this).body.canAddIncrasePrimaryDamage) { Log.LogDebug("Railgunner failed. primary: " + (object)((BaseItemBodyBehavior)this).body.skillLocator.primary == ((object)skill)?.ToString() + "; canaddincrase: " + ((BaseItemBodyBehavior)this).body.canAddIncrasePrimaryDamage); } else { TryApplyMovespeed(); } } else if ((!skill.skillDef.autoHandleLuminousShot && !((BaseItemBodyBehavior)this).body.canAddIncrasePrimaryDamage) || (Object)(object)((BaseItemBodyBehavior)this).body.skillLocator.secondary != (Object)(object)skill) { Log.LogDebug("Not railgunner. autoHandle: " + skill.skillDef.autoHandleLuminousShot + " primary: " + (object)((BaseItemBodyBehavior)this).body.skillLocator.primary == ((object)skill)?.ToString() + "; canaddincrase: " + ((BaseItemBodyBehavior)this).body.canAddIncrasePrimaryDamage); } else { TryApplyMovespeed(); } } } public static class HuntersHarpoonBuff { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__2_4; public static Func<int, int> <>9__2_2; public static Func<Instruction, bool> <>9__2_5; public static Func<Instruction, bool> <>9__2_6; public static Action<DamageReport> <>9__2_3; public static Manipulator <>9__2_0; public static Func<Instruction, bool> <>9__2_8; public static Func<Instruction, bool> <>9__2_9; public static Func<CharacterMaster, CharacterMaster> <>9__2_7; public static Manipulator <>9__2_1; internal void <Init>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill") })) { Log.LogInstrNotFound(il); return; } val.Index += 4; val.EmitDelegate<Func<int, int>>((Func<int, int>)((int itemCount) => 0)); MethodReference val3 = default(MethodReference); if (!val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val3) })) { Log.LogInstrNotFound(il); return; } val.Index += 3; val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Action<DamageReport>>((Action<DamageReport>)delegate(DamageReport damageReport) { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = damageReport.attackerBody; int itemCountEffective = attackerBody.inventory.GetItemCountEffective(Items.MoveSpeedOnKill); if (itemCountEffective > 0) { int num = itemCountEffective - 1; int num2 = 5; float num3 = (float)(1.0 + (double)num * 0.5); attackerBody.ClearTimedBuffs(Buffs.KillMoveSpeed); for (int i = 0; i < _harpoonStacks; i++) { if (attackerBody != null) { attackerBody.AddTimedBuff(Buffs.KillMoveSpeed, _buffDuration * (float)itemCountEffective * (float)Math.Pow(0.75, i)); } } EffectData val2 = new EffectData(); val2.origin = attackerBody.corePosition; CharacterMotor characterMotor = attackerBody.characterMotor; bool flag = false; if (Object.op_Implicit((Object)(object)characterMotor)) { Vector3 moveDirection = characterMotor.moveDirection; if (moveDirection != Vector3.zero) { val2.rotation = Util.QuaternionSafeLookRotation(moveDirection); flag = true; } } if (!flag) { val2.rotation = attackerBody.transform.rotation; } EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MoveSpeedOnKillActivate"), val2, true); } }); } internal bool <Init>b__2_4(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill"); } internal int <Init>b__2_2(int itemCount) { return 0; } internal bool <Init>b__2_5(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 1); } internal bool <Init>b__2_6(Instruction x) { MethodReference val = default(MethodReference); return ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val); } internal void <Init>b__2_3(DamageReport damageReport) { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = damageReport.attackerBody; int itemCountEffective = attackerBody.inventory.GetItemCountEffective(Items.MoveSpeedOnKill); if (itemCountEffective <= 0) { return; } int num = itemCountEffective - 1; int num2 = 5; float num3 = (float)(1.0 + (double)num * 0.5); attackerBody.ClearTimedBuffs(Buffs.KillMoveSpeed); for (int i = 0; i < _harpoonStacks; i++) { if (attackerBody != null) { attackerBody.AddTimedBuff(Buffs.KillMoveSpeed, _buffDuration * (float)itemCountEffective * (float)Math.Pow(0.75, i)); } } EffectData val = new EffectData(); val.origin = attackerBody.corePosition; CharacterMotor characterMotor = attackerBody.characterMotor; bool flag = false; if (Object.op_Implicit((Object)(object)characterMotor)) { Vector3 moveDirection = characterMotor.moveDirection; if (moveDirection != Vector3.zero) { val.rotation = Util.QuaternionSafeLookRotation(moveDirection); flag = true; } } if (!flag) { val.rotation = attackerBody.transform.rotation; } EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MoveSpeedOnKillActivate"), val, true); } internal void <Init>b__2_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); int num = default(int); if (!val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) })) { Log.LogInstrNotFound(il); return; } val.EmitDelegate<Func<CharacterMaster, CharacterMaster>>((Func<CharacterMaster, CharacterMaster>)delegate(CharacterMaster master) { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) Log.LogDebug("Harpoons: " + master.GetBody().inventory.GetItemCountEffective(Items.MoveSpeedOnKill) + "; Harp buffs: " + master.GetBody().GetBuffCount(Buffs.KillMoveSpeed)); if (master.inventory.GetItemCountEffective(Items.MoveSpeedOnKill) > 0) { Log.LogDebug("Beginning loop"); TimedBuff val2 = null; CharacterBody body = master.GetBody(); for (int i = 0; i < body.timedBuffs.Count; i++) { TimedBuff val3 = body.timedBuffs[i]; Log.LogDebug("BuffTimer: " + val3.timer); if (val3.buffIndex == Buffs.KillMoveSpeed.buffIndex && (val2 == null || val3.timer > val2.timer)) { val2 = val3; } } if (val2 != null && val2.timer < _buffDuration) { val2.timer = _buffDuration; } } return master; }); } internal bool <Init>b__2_8(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"); } internal bool <Init>b__2_9(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal CharacterMaster <Init>b__2_7(CharacterMaster master) { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) Log.LogDebug("Harpoons: " + master.GetBody().inventory.GetItemCountEffective(Items.MoveSpeedOnKill) + "; Harp buffs: " + master.GetBody().GetBuffCount(Buffs.KillMoveSpeed)); if (master.inventory.GetItemCountEffective(Items.MoveSpeedOnKill) > 0) { Log.LogDebug("Beginning loop"); TimedBuff val = null; CharacterBody body = master.GetBody(); for (int i = 0; i < body.timedBuffs.Count; i++) { TimedBuff val2 = body.timedBuffs[i]; Log.LogDebug("BuffTimer: " + val2.timer); if (val2.buffIndex == Buffs.KillMoveSpeed.buffIndex && (val == null || val2.timer > val.timer)) { val = val2; } } if (val != null && val.timer < _buffDuration) { val.timer = _buffDuration; } } return master; } } private static int _harpoonStacks; private static float _buffDuration; public static void Init(int harpoonStacks, float buffDuration) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown _harpoonStacks = harpoonStacks; _buffDuration = buffDuration; try { object obj = <>c.<>9__2_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) ILCursor val6 = new ILCursor(il); if (!val6.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill") })) { Log.LogInstrNotFound(il); } else { val6.Index += 4; val6.EmitDelegate<Func<int, int>>((Func<int, int>)((int itemCount) => 0)); MethodReference val8 = default(MethodReference); if (!val6.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val8) })) { Log.LogInstrNotFound(il); } else { val6.Index += 3; val6.Emit(OpCodes.Ldarg_1); val6.EmitDelegate<Action<DamageReport>>((Action<DamageReport>)delegate(DamageReport damageReport) { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = damageReport.attackerBody; int itemCountEffective = attackerBody.inventory.GetItemCountEffective(Items.MoveSpeedOnKill); if (itemCountEffective > 0) { int num2 = itemCountEffective - 1; int num3 = 5; float num4 = (float)(1.0 + (double)num2 * 0.5); attackerBody.ClearTimedBuffs(Buffs.KillMoveSpeed); for (int j = 0; j < _harpoonStacks; j++) { if (attackerBody != null) { attackerBody.AddTimedBuff(Buffs.KillMoveSpeed, _buffDuration * (float)itemCountEffective * (float)Math.Pow(0.75, j)); } } EffectData val7 = new EffectData(); val7.origin = attackerBody.corePosition; CharacterMotor characterMotor = attackerBody.characterMotor; bool flag = false; if (Object.op_Implicit((Object)(object)characterMotor)) { Vector3 moveDirection = characterMotor.moveDirection; if (moveDirection != Vector3.zero) { val7.rotation = Util.QuaternionSafeLookRotation(moveDirection); flag = true; } } if (!flag) { val7.rotation = attackerBody.transform.rotation; } EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MoveSpeedOnKillActivate"), val7, true); } }); } } }; <>c.<>9__2_0 = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj; object obj2 = <>c.<>9__2_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val3 = new ILCursor(il); int num = default(int); if (!val3.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) })) { Log.LogInstrNotFound(il); } else { val3.EmitDelegate<Func<CharacterMaster, CharacterMaster>>((Func<CharacterMaster, CharacterMaster>)delegate(CharacterMaster master) { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) Log.LogDebug("Harpoons: " + master.GetBody().inventory.GetItemCountEffective(Items.MoveSpeedOnKill) + "; Harp buffs: " + master.GetBody().GetBuffCount(Buffs.KillMoveSpeed)); if (master.inventory.GetItemCountEffective(Items.MoveSpeedOnKill) > 0) { Log.LogDebug("Beginning loop"); TimedBuff val4 = null; CharacterBody body = master.GetBody(); for (int i = 0; i < body.timedBuffs.Count; i++) { TimedBuff val5 = body.timedBuffs[i]; Log.LogDebug("BuffTimer: " + val5.timer); if (val5.buffIndex == Buffs.KillMoveSpeed.buffIndex && (val4 == null || val5.timer > val4.timer)) { val4 = val5; } } if (val4 != null && val4.timer < _buffDuration) { val4.timer = _buffDuration; } } return master; }); } }; <>c.<>9__2_1 = val2; obj2 = (object)val2; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj2; UpdateText(); Log.LogInfo("Added Hunters Harpoon Buff"); } catch (Exception ex) { VanillaItemTweaks.logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private static void UpdateText() { LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", "Killing an enemy increases <style=cIsUtility>movement speed</style> by <style=cIsUtility>" + _harpoonStacks * 25 + "%</style> fading over <style=cIsUtility>" + _buffDuration + "</style> <style=cStack>(+" + _buffDuration + " per stack)</style> seconds. Attacks refresh the move speed."); } } internal class HuntersHarpoonChoice { public static void TryInit(ConfigFile configFile) { bool value = configFile.Bind<bool>("Hunters Harpoon Rework", "Enable Hunters Harpoon Rework", true, "Hunters Harpoon now grants fading move speed on secondary use.").Value; int value2 = configFile.Bind<int>("Hunters Harpoon Rework", "Hunters Harpoon Buff Stacks", 3, "Gain X * 25% fading movement speed upon casting secondary.").Value; float value3 = configFile.Bind<float>("Hunters Harpoon Rework", "Hunters Harpoon Duration", 2f, "Hunters Harpoon buff lasts X seconds.").Value; bool value4 = configFile.Bind<bool>("Hunters Harpoon Buff", "Enable Hunters Harpoon Buff", false, "Harpoon speed is less intense, but lasts longer.\nRework overrides buff.").Value; float value5 = configFile.Bind<float>("Hunters Harpoon Buff", "Hunters Harpoon Duration", 2f, "Hunters Harpoon buff lasts X seconds.").Value; int value6 = configFile.Bind<int>("Hunters Harpoon Buff", "Hunters Harpoon Buff Stacks", 4, "Gain X * 25% fading movement speed upon kill.").Value; if (value) { HuntersHarpoonBehavior1._configEnabled = true; HuntersHarpoonRework1.Init(value2, value3); } else if (value4) { HuntersHarpoonBuff.Init(value6, value5); } } } public static class HuntersHarpoonRework { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__0_4; public static Func<Instruction, bool> <>9__0_5; public static Func<Instruction, bool> <>9__0_6; public static Func<Instruction, bool> <>9__0_7; public static Func<CharacterBody, CharacterBody> <>9__0_3; public static Manipulator <>9__0_0; public static Func<Instruction, bool> <>9__0_8; public static Manipulator <>9__0_1; public static Func<Instruction, bool> <>9__0_9; public static Func<Instruction, bool> <>9__0_10; public static Func<CharacterMaster, DamageInfo, CharacterMaster> <>9__0_11; public static Manipulator <>9__0_2; internal void <Init>b__0_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int num2 = default(int); int num = default(int); if (!val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetActiveEquipment") })) { int index = val.Index; val.Index = index + 1; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<CharacterBody, CharacterBody>>((Func<CharacterBody, CharacterBody>)delegate(CharacterBody body) { Log.LogDebug("Attempting to add behavior for hunter: " + (object)body); body.AddItemBehavior<HuntersHarpoonBehavior>(body.inventory.GetItemCountEffective(Items.MoveSpeedOnKill)); Log.LogDebug("Behavior: " + (object)((Component)body).gameObject.GetComponent<HuntersHarpoonBehavior>()); Log.LogDebug("Behaviormasterbodypath: " + (object)((Component)body.master.GetBody()).GetComponent<HuntersHarpoonBehavior>()); return body; }); } internal bool <Init>b__0_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdarg(x, ref num); } internal bool <Init>b__0_5(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdarg(x, ref num); } internal bool <Init>b__0_6(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_inventory"); } internal bool <Init>b__0_7(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetActiveEquipment"); } internal CharacterBody <Init>b__0_3(CharacterBody body) { Log.LogDebug("Attempting to add behavior for hunter: " + (object)body); body.AddItemBehavior<HuntersHarpoonBehavior>(body.inventory.GetItemCountEffective(Items.MoveSpeedOnKill)); Log.LogDebug("Behavior: " + (object)((Component)body).gameObject.GetComponent<HuntersHarpoonBehavior>()); Log.LogDebug("Behaviormasterbodypath: " + (object)((Component)body.master.GetBody()).GetComponent<HuntersHarpoonBehavior>()); return body; } internal void <Init>b__0_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill") })) { Log.LogInstrNotFound(il); return; } val.Index += 2; val.Emit(OpCodes.Ldc_I4_0); val.Emit(OpCodes.Mul); } internal bool <Init>b__0_8(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill"); } internal void <Init>b__0_2(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int num = default(int); val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<CharacterMaster, DamageInfo, CharacterMaster>>((Func<CharacterMaster, DamageInfo, CharacterMaster>)delegate(CharacterMaster master, DamageInfo dmgInfo) { Log.LogDebug("Entering Hunter Harp delegate"); HuntersHarpoonBehavior component = ((Component)master.GetBody()).GetComponent<HuntersHarpoonBehavior>(); Log.LogDebug("Hunter harp behavior: " + (object)component); if ((Object)(object)component != (Object)null && ((DamageTypeCombo)(ref dmgInfo.damageType)).IsDamageSourceSkillBased) { component.TryApplyMovespeed(); } return master; }); } internal bool <Init>b__0_9(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"); } internal bool <Init>b__0_10(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal CharacterMaster <Init>b__0_11(CharacterMaster master, DamageInfo dmgInfo) { Log.LogDebug("Entering Hunter Harp delegate"); HuntersHarpoonBehavior component = ((Component)master.GetBody()).GetComponent<HuntersHarpoonBehavior>(); Log.LogDebug("Hunter harp behavior: " + (object)component); if ((Object)(object)component != (Object)null && ((DamageTypeCombo)(ref dmgInfo.damageType)).IsDamageSourceSkillBased) { component.TryApplyMovespeed(); } return master; } } public static void Init() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown try { object obj = <>c.<>9__0_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) ILCursor val6 = new ILCursor(il); int num3 = default(int); int num2 = default(int); if (!val6.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetActiveEquipment") })) { int index = val6.Index; val6.Index = index + 1; } val6.Emit(OpCodes.Ldarg_0); val6.EmitDelegate<Func<CharacterBody, CharacterBody>>((Func<CharacterBody, CharacterBody>)delegate(CharacterBody body) { Log.LogDebug("Attempting to add behavior for hunter: " + (object)body); body.AddItemBehavior<HuntersHarpoonBehavior>(body.inventory.GetItemCountEffective(Items.MoveSpeedOnKill)); Log.LogDebug("Behavior: " + (object)((Component)body).gameObject.GetComponent<HuntersHarpoonBehavior>()); Log.LogDebug("Behaviormasterbodypath: " + (object)((Component)body.master.GetBody()).GetComponent<HuntersHarpoonBehavior>()); return body; }); }; <>c.<>9__0_0 = val; obj = (object)val; } CharacterBody.OnInventoryChanged += (Manipulator)obj; object obj2 = <>c.<>9__0_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); if (!val5.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill") })) { Log.LogInstrNotFound(il); } else { val5.Index += 2; val5.Emit(OpCodes.Ldc_I4_0); val5.Emit(OpCodes.Mul); } }; <>c.<>9__0_1 = val2; obj2 = (object)val2; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj2; object obj3 = <>c.<>9__0_2; if (obj3 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); int num = default(int); val4.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMaster>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val4.Emit(OpCodes.Ldarg_1); val4.EmitDelegate<Func<CharacterMaster, DamageInfo, CharacterMaster>>((Func<CharacterMaster, DamageInfo, CharacterMaster>)delegate(CharacterMaster master, DamageInfo dmgInfo) { Log.LogDebug("Entering Hunter Harp delegate"); HuntersHarpoonBehavior component = ((Component)master.GetBody()).GetComponent<HuntersHarpoonBehavior>(); Log.LogDebug("Hunter harp behavior: " + (object)component); if ((Object)(object)component != (Object)null && ((DamageTypeCombo)(ref dmgInfo.damageType)).IsDamageSourceSkillBased) { component.TryApplyMovespeed(); } return master; }); }; <>c.<>9__0_2 = val3; obj3 = (object)val3; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj3; UpdateText(); Log.LogInfo("Added Hunters Harpoon Rework"); } catch (Exception ex) { VanillaItemTweaks.logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private static void UpdateText() { LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", "Killing an enemy increases <style=cIsUtility>movement speed</style> by <style=cIsUtility>100%</style> fading over <style=cIsUtility>2</style> <style=cStack>(+2 per stack)</style> seconds."); } } public static class HuntersHarpoonRework1 { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__2_1; public static Manipulator <>9__2_0; internal void <Init>b__2_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill") })) { Log.LogInstrNotFound(il); return; } val.Index += 2; val.Emit(OpCodes.Ldc_I4_0); val.Emit(OpCodes.Mul); } internal bool <Init>b__2_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill"); } } public static int _buffStacks; public static float _speedDuration; public static void Init(int buffStacks, float speedDuration) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown _buffStacks = buffStacks; _speedDuration = speedDuration; try { object obj = <>c.<>9__2_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (!val2.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill") })) { Log.LogInstrNotFound(il); } else { val2.Index += 2; val2.Emit(OpCodes.Ldc_I4_0); val2.Emit(OpCodes.Mul); } }; <>c.<>9__2_0 = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj; UpdateText(); Log.LogInfo("Added Hunters Harpoon Rework"); } catch (Exception ex) { VanillaItemTweaks.logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private static void UpdateText() { LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", "Using your secondary skill increases <style=cIsUtility>movement speed</style> by <style=cIsUtility>" + _buffStacks * 25 + "%</style> fading over <style=cIsUtility>" + _speedDuration + "</style> <style=cStack>(+" + _speedDuration + " per stack)</style> seconds."); } } internal class IgnitionTankRework { private delegate int ItemCountIfBurningDel(int itemCount, ref InflictDotInfo dotInfo); [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__0_2; public static Func<Instruction, bool> <>9__0_3; public static Manipulator <>9__0_0; public static Func<Instruction, bool> <>9__0_4; public static Func<Instruction, bool> <>9__0_5; public static Action<GenericCharacterMain> <>9__0_6; public static Manipulator <>9__0_1; internal void <Init>b__0_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int num = default(int); val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0) }); int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<ItemCountIfBurningDel>((ItemCountIfBurningDel)ItemCountIfBurning); } internal bool <Init>b__0_2(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool <Init>b__0_3(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal void <Init>b__0_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel val2 = default(ILLabel); val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchAnd(x), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<GenericCharacterMain>>((Action<GenericCharacterMain>)delegate(GenericCharacterMain gcm) { int itemCountEffective = ((EntityState)gcm).characterBody.inventory.GetItemCountEffective(Items.StrengthenBurn); if (itemCountEffective > 0) { ProcIgniteOnJump(((EntityState)gcm).characterBody, itemCountEffective); } }); } internal bool <Init>b__0_4(Instruction x) { return ILPatternMatchingExt.MatchAnd(x); } internal bool <Init>b__0_5(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal void <Init>b__0_6(GenericCharacterMain gcm) { int itemCountEffective = ((EntityState)gcm).characterBody.inventory.GetItemCountEffective(Items.StrengthenBurn); if (itemCountEffective > 0) { ProcIgniteOnJump(((EntityState)gcm).characterBody, itemCountEffective); } } } public static void Init() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown try { object obj = <>c.<>9__0_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); int num = default(int); val5.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0) }); int index = val5.Index; val5.Index = index + 1; val5.Emit(OpCodes.Ldarg_1); val5.EmitDelegate<ItemCountIfBurningDel>((ItemCountIfBurningDel)ItemCountIfBurning); }; <>c.<>9__0_0 = val; obj = (object)val; } StrengthenBurnUtils.CheckDotForUpgrade += (Manipulator)obj; object obj2 = <>c.<>9__0_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); ILLabel val4 = default(ILLabel); val3.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchAnd(x), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val4) }); val3.Index += 2; val3.Emit(OpCodes.Ldarg_0); val3.EmitDelegate<Action<GenericCharacterMain>>((Action<GenericCharacterMain>)delegate(GenericCharacterMain gcm) { int itemCountEffective = ((EntityState)gcm).characterBody.inventory.GetItemCountEffective(Items.StrengthenBurn); if (itemCountEffective > 0) { ProcIgniteOnJump(((EntityState)gcm).characterBody, itemCountEffective); } }); }; <>c.<>9__0_1 = val2; obj2 = (object)val2; } GenericCharacterMain.ProcessJump_bool += (Manipulator)obj2; UpdateText(); Log.LogInfo("Added Ignition Tank Rework"); } catch (Exception ex) { VanillaItemTweaks.logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private static int ItemCountIfBurning(int itemCount, ref InflictDotInfo dotInfo) { return dotInfo.victimObject.GetComponent<CharacterBody>().HasBuff(Buffs.StrongerBurn) ? itemCount : 0; } private static void ProcIgniteOnJump(CharacterBody attackerBody, int ignitionTankCount) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) float num = 12f + attackerBody.radius; Vector3 corePosition = attackerBody.corePosition; GlobalEventManager.igniteOnKillSphereSearch.origin = corePosition; GlobalEventManager.igniteOnKillSphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; GlobalEventManager.igniteOnKillSphereSearch.radius = num; GlobalEventManager.igniteOnKillSphereSearch.RefreshCandidates(); GlobalEventManager.igniteOnKillSphereSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(attackerBody.teamComponent.teamIndex)); GlobalEventManager.igniteOnKillSphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); GlobalEventManager.igniteOnKillSphereSearch.OrderCandidatesByDistance(); GlobalEventManager.igniteOnKillSphereSearch.GetHurtBoxes(GlobalEventManager.igniteOnKillHurtBoxBuffer); GlobalEventManager.igniteOnKillSphereSearch.ClearCandidates(); float num2 = 0.75f * attackerBody.damage; EffectManager.SpawnEffect(CommonAssets.igniteOnKillExplosionEffectPrefab, new EffectData { origin = corePosition, scale = num, rotation = new Quaternion(0f, 0f, 0f, 1f) }, true); for (int i = 0; i < GlobalEventManager.igniteOnKillHurtBoxBuffer.Count; i++) { HurtBox val = GlobalEventManager.igniteOnKillHurtBoxBuffer[i]; if (Object.op_Implicit((Object)(object)val.healthComponent)) { GameObject gameObject = ((Component)val.healthComponent).gameObject; UpgradeExistingBurns(gameObject, attackerBody); float num3 = 1 + ignitionTankCount * 3; InflictDotInfo val2 = default(InflictDotInfo); val2.victimObject = gameObject; val2.attackerObject = ((Component)attackerBody).gameObject; val2.totalDamage = num2 * num3; val2.dotIndex = (DotIndex)7; val2.damageMultiplier = num3; InflictDotInfo val3 = val2; DotController.InflictDot(ref val3); } } GlobalEventManager.igniteOnKillHurtBoxBuffer.Clear(); } private static void UpgradeExistingBurns(GameObject victim, CharacterBody attacker) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00df