Decompiled source of Warfare v1.8.5
Warfare.dll
Decompiled 3 hours 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.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using ItemManager; using JetBrains.Annotations; using Jewelcrafting; using KG_Managers; using LocalizationManager; using Microsoft.CodeAnalysis; using PieceManager; using ServerSync; using SkillManager; using SoftReferenceableAssets; using TMPro; using UnityEngine; using UnityEngine.UI; using Warfare.Util; using Warfare_StatusEffects; using Warfare_StatusEffects.StatusEffects; using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Core.Tokens; using YamlDotNet.Helpers; using YamlDotNet.Serialization; using YamlDotNet.Serialization.Converters; using YamlDotNet.Serialization.EventEmitters; using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NodeDeserializers; using YamlDotNet.Serialization.NodeTypeResolvers; using YamlDotNet.Serialization.ObjectFactories; using YamlDotNet.Serialization.ObjectGraphTraversalStrategies; using YamlDotNet.Serialization.ObjectGraphVisitors; using YamlDotNet.Serialization.Schemas; using YamlDotNet.Serialization.TypeInspectors; using YamlDotNet.Serialization.TypeResolvers; using YamlDotNet.Serialization.Utilities; using YamlDotNet.Serialization.ValueDeserializers; [assembly: ComVisible(false)] [assembly: AssemblyTrademark("")] [assembly: AssemblyCopyright("Copyright © 2022")] [assembly: AssemblyProduct("Warfare")] [assembly: AssemblyCompany("Therzie")] [assembly: AssemblyFileVersion("1.8.5")] [assembly: AssemblyDescription("")] [assembly: AssemblyTitle("Warfare")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: Guid("E0E2F92E-557C-4A05-9D89-AA92A0BD75C4")] [assembly: AssemblyConfiguration("")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.8.5.0")] [module: <9521c08b-20be-499b-8dd0-a7f61e97e120>RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [<5a34ad2c-8421-481e-91f4-072e069b8937>Embedded] internal sealed class <5a34ad2c-8421-481e-91f4-072e069b8937>EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] [<5a34ad2c-8421-481e-91f4-072e069b8937>Embedded] internal sealed class <4db7c964-ef2b-4966-b0cf-60cd2e996f84>NullableAttribute : Attribute { public readonly byte[] NullableFlags; public <4db7c964-ef2b-4966-b0cf-60cd2e996f84>NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public <4db7c964-ef2b-4966-b0cf-60cd2e996f84>NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] [<5a34ad2c-8421-481e-91f4-072e069b8937>Embedded] [CompilerGenerated] internal sealed class <6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContextAttribute : Attribute { public readonly byte Flag; public <6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [<5a34ad2c-8421-481e-91f4-072e069b8937>Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class <9521c08b-20be-499b-8dd0-a7f61e97e120>RefSafetyRulesAttribute : Attribute { public readonly int Version; public <9521c08b-20be-499b-8dd0-a7f61e97e120>RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace UpgradeWorld { [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public class Register { public string name = ""; public string description = ""; public string[] commands = new string[0]; public void AddCommand() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) new ConsoleCommand(name, description, (ConsoleEvent)([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (ConsoleEventArgs args) => { string[] array = commands; foreach (string text in array) { args.Context.TryRunCommand(text, false, false); } }), false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [HarmonyPatch(typeof(Terminal), "InitTerminal")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Upgrade { private static List<Register> registers = new List<Register>(); public const string GUID = "upgrade_world"; private static void Postfix() { foreach (Register register in registers) { register.AddCommand(); } } public static void Register(string name, string description, params string[] commands) { if (Chainloader.PluginInfos.ContainsKey("upgrade_world")) { registers.Add(new Register { name = name, description = description, commands = commands }); } } } } namespace Warfare_StatusEffects { [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class LightningBurstStacking { [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public class SE_Warfare_LightningBurstStacking : StatusEffect { public int stack; private float _timer = 1f; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_LightningBurstStacking"; base.m_tooltip = ""; base.m_name = ""; base.m_ttl = 0f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void UpdateStatusEffect(float dt) { ((StatusEffect)this).UpdateStatusEffect(dt); _timer -= dt; if (_timer <= 0f) { _timer = 6f; if (stack < 3) { stack++; } } } public override void ModifyAttack(SkillType skill, ref HitData hitData) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (stack > 0) { stack = 0; float value; float num = (DamageMap.TryGetValue(skill, out value) ? value : 10f); hitData.m_damage.m_lightning += stack * 6; HitData obj = hitData; obj.m_pushForce += (float)(stack * 3); } } public override string GetIconText() { return stack.ToString(); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static StatusEffect _se; private static GameObject VFX; private static Sprite Icon; private const float DEFAULT_DAMAGE = 10f; private static readonly Dictionary<SkillType, float> DamageMap = new Dictionary<SkillType, float> { { (SkillType)3, 20f }, { (SkillType)1, 50f } }; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToWeapon(GameObject prefab) { if (_se == null) { _se = (StatusEffect)(object)ScriptableObject.CreateInstance<SE_Warfare_LightningBurstStacking>(); } prefab.GetComponent<ItemDrop>().m_itemData.m_shared.m_equipStatusEffect = _se; } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_LightningBurstStacking"))) { odb.m_StatusEffects.Add(_se); } } } } namespace Warfare_StatusEffects.StatusEffects { [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Adrenaline { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Adrenaline"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Adrenaline : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_Adrenaline"; base.m_tooltip = "Adrenaline"; base.m_name = "Adrenaline"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { //IL_003c: 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) stack++; if (stack >= 5) { if (Object.op_Implicit((Object)(object)VFX)) { Object.Instantiate<GameObject>(VFX, ((Component)base.m_character).transform.position, ((Component)base.m_character).transform.rotation); } float num = ((Character)Player.m_localPlayer).GetMaxStamina() * (float)itemLevel / 350f; ((Character)Player.m_localPlayer).AddStamina(num); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Adrenaline"))) { SE_Warfare_Adrenaline item = ScriptableObject.CreateInstance<SE_Warfare_Adrenaline>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class Bash { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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) if (!__instance.m_nview.IsValid() || (Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer || !WarfareUtils.TryGetAttackWeapon(out var prefab) || !Targets.TryGetValue(prefab, out var value) || ((Humanoid)Player.m_localPlayer).m_currentAttackIsSecondary) { return; } int num = Random.Range(0, 100); if (num <= value) { __instance.Stagger(Vector3.zero); if (Object.op_Implicit((Object)(object)VFX)) { Object.Instantiate<GameObject>(VFX, ((Component)__instance).transform.position, Quaternion.identity); } } } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Bleeding { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Bleeding"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Bleeding : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_Bleeding"; base.m_tooltip = "Bleeding"; base.m_name = "Bleeding"; base.m_ttl = 4f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 4) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Bleeding_Stacking"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Bleeding_Stacking : StatusEffect { public float counter; public int maxHP; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Bleeding_Stacking"; base.m_tooltip = "Bleeding"; base.m_name = "Bleeding"; base.m_ttl = 4f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { maxHP = itemLevel; } public override void UpdateStatusEffect(float dt) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006f: 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) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; float pierce = base.m_character.GetMaxHealth() * (float)maxHP * 0.0025f; HitData val = new HitData(); val.m_damage.m_pierce = pierce; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null)) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Bleeding"))) { SE_Warfare_Bleeding item = ScriptableObject.CreateInstance<SE_Warfare_Bleeding>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Bleeding_Stacking"))) { SE_Warfare_Bleeding_Stacking item2 = ScriptableObject.CreateInstance<SE_Warfare_Bleeding_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class BleedingSecondaryAttack { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value) && ((Humanoid)Player.m_localPlayer).m_currentAttackIsSecondary) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_BleedingSecondaryAttack"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_BleedingSecondaryAttack : StatusEffect { public float counter; public int percentage; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_BleedingSecondaryAttack"; base.m_tooltip = "BleedingSecondaryAttack"; base.m_name = "BleedingSecondaryAttack"; base.m_ttl = 8f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { percentage = itemLevel; } public override void UpdateStatusEffect(float dt) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006f: 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) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; float pierce = base.m_character.GetMaxHealth() * (float)percentage * 0.00125f; HitData val = new HitData(); val.m_damage.m_pierce = pierce; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_BleedingSecondaryAttack"))) { SE_Warfare_BleedingSecondaryAttack item = ScriptableObject.CreateInstance<SE_Warfare_BleedingSecondaryAttack>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class Bludgeoner { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (!((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Bludgeoner"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Bludgeoner : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_Bludgeoner"; base.m_tooltip = "Bludgeoner"; base.m_name = "Bludgeoner"; base.m_ttl = 3f; base.m_icon = Icon_Secondary; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 5) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Bludgeoner_ShreadResistance"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Bludgeoner_Stacking : StatusEffect { public int shread; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Bludgeoner_ShreadResistance"; base.m_tooltip = "Bludgeoner"; base.m_name = "Bludgeoner"; base.m_ttl = 3f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { shread = itemLevel; } public override void ModifyDamageMods(ref DamageModifiers modifiers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) modifiers.m_blunt = (DamageModifier)2; } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; private static Sprite Icon_Secondary; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void UseIcon_Secondary(Sprite icon) { Icon_Secondary = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null)) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Bludgeoner"))) { SE_Warfare_Bludgeoner item = ScriptableObject.CreateInstance<SE_Warfare_Bludgeoner>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Bludgeoner_ShreadResistance"))) { SE_Warfare_Bludgeoner_Stacking item2 = ScriptableObject.CreateInstance<SE_Warfare_Bludgeoner_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class BurningSecondaryAttack { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value) && ((Humanoid)Player.m_localPlayer).m_currentAttackIsSecondary) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_BurningSecondaryAttack"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_BurningSecondaryAttack : StatusEffect { public float counter; public int percentage; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_BurningSecondaryAttack"; base.m_tooltip = "BurningSecondaryAttack"; base.m_name = "BurningSecondaryAttack"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { percentage = itemLevel; } public override void UpdateStatusEffect(float dt) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006f: 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) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; float fire = base.m_character.GetMaxHealth() * (float)percentage * 0.00125f; HitData val = new HitData(); val.m_damage.m_fire = fire; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_BurningSecondaryAttack"))) { SE_Warfare_BurningSecondaryAttack item = ScriptableObject.CreateInstance<SE_Warfare_BurningSecondaryAttack>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Decapitator4 { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Decapitator"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Decapitator : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_Decapitator"; base.m_tooltip = "Decapitator"; base.m_name = "Decapitator"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 4) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Decapitator_ShreadResistance"), true, itemLevel, 0f); base.m_ttl = 0.1f; } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Decapitator_Stacking : StatusEffect { public int shread; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Decapitator_ShreadResistance"; base.m_tooltip = "Decapitator"; base.m_name = "Decapitator"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { shread = itemLevel; } public override void ModifyDamageMods(ref DamageModifiers modifiers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) modifiers.m_slash = (DamageModifier)2; base.m_ttl = 0.1f; } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null)) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Decapitator"))) { SE_Warfare_Decapitator item = ScriptableObject.CreateInstance<SE_Warfare_Decapitator>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Decapitator_ShreadResistance"))) { SE_Warfare_Decapitator_Stacking item2 = ScriptableObject.CreateInstance<SE_Warfare_Decapitator_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Decapitator5 { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Decapitator"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Decapitator : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_Decapitator"; base.m_tooltip = "Decapitator"; base.m_name = "Decapitator"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 5) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Decapitator_ShreadResistance"), true, itemLevel, 0f); base.m_ttl = 0.1f; } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Decapitator_Stacking : StatusEffect { public int shread; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Decapitator_ShreadResistance"; base.m_tooltip = "Decapitator"; base.m_name = "Decapitator"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { shread = itemLevel; } public override void ModifyDamageMods(ref DamageModifiers modifiers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) modifiers.m_slash = (DamageModifier)2; base.m_ttl = 0.1f; } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null)) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Decapitator"))) { SE_Warfare_Decapitator item = ScriptableObject.CreateInstance<SE_Warfare_Decapitator>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Decapitator_ShreadResistance"))) { SE_Warfare_Decapitator_Stacking item2 = ScriptableObject.CreateInstance<SE_Warfare_Decapitator_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class EikthyrCrossbow { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_EikthyrCrossbow"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_EikthyrCrossbow : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_EikthyrCrossbow"; base.m_tooltip = "EikthyrCrossbow"; base.m_name = "EikthyrCrossbow"; base.m_ttl = 10f; base.m_icon = Icon; } public override void SetLevel(int itemLevel, float skillLevel) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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) stack++; if (stack >= 4) { float pierce = base.m_character.GetMaxHealth() * (float)itemLevel * 0f; HitData val = new HitData(); val.m_damage.m_pierce = pierce; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); if (Object.op_Implicit((Object)(object)VFX)) { Object.Instantiate<GameObject>(VFX, ((Component)base.m_character).transform.position, ((Component)base.m_character).transform.rotation); } base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_EikthyrCrossbow"))) { SE_Warfare_EikthyrCrossbow item = ScriptableObject.CreateInstance<SE_Warfare_EikthyrCrossbow>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Executioner { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (!((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { float maxHealth = __instance.GetMaxHealth(); float health = __instance.GetHealth(); if (health / maxHealth <= 0.25f) { hit.ApplyModifier(1f + (float)value / 100f); } } } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Ghost { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(ref HitData hit) { if (!((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Ghost"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Ghost : StatusEffect { public int stack; public int modifier; public void OnEnable() { ((Object)this).name = "Warfare_Ghost"; base.m_tooltip = "Ghost"; base.m_name = "Ghost"; base.m_ttl = 3f; base.m_icon = Icon; } public void ModifySpeed(float baseSpeed, ref float speed) { speed *= 1f + 0.05f * (float)modifier * (float)stack; } public override void SetLevel(int itemLevel, float skillLevel) { stack = Mathf.Min(3, stack + 1); modifier = itemLevel; } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Ghost"))) { SE_Warfare_Ghost item = ScriptableObject.CreateInstance<SE_Warfare_Ghost>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class HacknSlash { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_HacknSlash"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_HacknSlash : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_HacknSlash"; base.m_tooltip = "HacknSlash"; base.m_name = "HacknSlash"; base.m_ttl = 2.5f; base.m_icon = Icon_Secondary; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 6) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_HacknSlash_ShreadResistance"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_HacknSlash_Stacking : StatusEffect { public int shread; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_HacknSlash_ShreadResistance"; base.m_tooltip = "HacknSlash"; base.m_name = "HacknSlash"; base.m_ttl = 1f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { shread = itemLevel; } public override void ModifyDamageMods(ref DamageModifiers modifiers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) modifiers.m_slash = (DamageModifier)2; } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; private static Sprite Icon_Secondary; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void UseIcon_Secondary(Sprite icon) { Icon_Secondary = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null)) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_HacknSlash"))) { SE_Warfare_HacknSlash item = ScriptableObject.CreateInstance<SE_Warfare_HacknSlash>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_HacknSlash_ShreadResistance"))) { SE_Warfare_HacknSlash_Stacking item2 = ScriptableObject.CreateInstance<SE_Warfare_HacknSlash_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class Haste { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.Contains(prefab)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Haste"), true, 0, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Haste : StatusEffect { public float counter; public int percentage; private int stack; public void OnEnable() { ((Object)this).name = "Warfare_Haste"; base.m_tooltip = "Haste"; base.m_name = "Haste"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 6) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Haste_Stacking"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Haste_Stacking : StatusEffect { public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Haste_Stacking"; base.m_tooltip = "Haste"; base.m_name = "Haste"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public void ModifySpeed(float baseSpeed, ref float speed) { speed *= 1.4f; } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly HashSet<string> Targets = new HashSet<string>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab) { Targets.Add(prefab); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null)) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Haste"))) { SE_Warfare_Haste item = ScriptableObject.CreateInstance<SE_Warfare_Haste>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Haste_Stacking"))) { SE_Warfare_Haste_Stacking item2 = ScriptableObject.CreateInstance<SE_Warfare_Haste_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Impale { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value) && ((Humanoid)Player.m_localPlayer).m_currentAttackIsSecondary) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Impale"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Impale : StatusEffect { public float counter; public int percentage; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Impale"; base.m_tooltip = "Impale"; base.m_name = "Impale"; base.m_ttl = 10f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { percentage = itemLevel; } public override void UpdateStatusEffect(float dt) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006f: 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) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; float pierce = base.m_character.GetMaxHealth() * (float)percentage * 0.0025f; HitData val = new HitData(); val.m_damage.m_pierce = pierce; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Impale"))) { SE_Warfare_Impale item = ScriptableObject.CreateInstance<SE_Warfare_Impale>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class Juggernaut { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Juggernaut"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Juggernaut : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_Juggernaut"; base.m_tooltip = "Juggernaut"; base.m_name = "Juggernaut"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 4) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Juggernaut_ShreadResistance"), true, itemLevel, 0f); base.m_ttl = 0.1f; } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Juggernaut_Stacking : StatusEffect { public int shread; public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Juggernaut_ShreadResistance"; base.m_tooltip = "Juggernaut"; base.m_name = "Juggernaut"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { shread = itemLevel; } public override void ModifyDamageMods(ref DamageModifiers modifiers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) modifiers.m_pierce = (DamageModifier)2; base.m_ttl = 0.1f; } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null)) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Juggernaut"))) { SE_Warfare_Juggernaut item = ScriptableObject.CreateInstance<SE_Warfare_Juggernaut>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Juggernaut_ShreadResistance"))) { SE_Warfare_Juggernaut_Stacking item2 = ScriptableObject.CreateInstance<SE_Warfare_Juggernaut_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class Madness { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (!((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { float durability = ((Humanoid)Player.m_localPlayer).m_currentAttack.m_weapon.m_durability; float maxDurability = ((Humanoid)Player.m_localPlayer).m_currentAttack.m_weapon.m_shared.m_maxDurability; float num = durability / maxDurability; if ((double)num <= 0.3) { hit.ApplyModifier(1f + (float)value / 100f); } } } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class PiercingGreatbowMistlands { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_PiercingGreatbowMistlands"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class Warfare_PiercingGreatbowMistlands : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_PiercingGreatbowMistlands"; base.m_tooltip = "PiercingGreatbowMistlands"; base.m_name = "PiercingGreatbowMistlands"; base.m_ttl = 10f; base.m_icon = Icon; } public override void SetLevel(int itemLevel, float skillLevel) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) stack++; if (stack >= 4) { int num = 60; HitData val = new HitData(); val.m_damage.m_pierce = num; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); if (Object.op_Implicit((Object)(object)VFX)) { Object.Instantiate<GameObject>(VFX, ((Component)base.m_character).transform.position, ((Component)base.m_character).transform.rotation); } base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_PiercingGreatbowMistlands"))) { Warfare_PiercingGreatbowMistlands item = ScriptableObject.CreateInstance<Warfare_PiercingGreatbowMistlands>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class PiercingGreatbowModer { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_PiercingGreatbowModer"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class Warfare_PiercingGreatbowModer : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_PiercingGreatbowModer"; base.m_tooltip = "PiercingGreatbowModer"; base.m_name = "PiercingGreatbowModer"; base.m_ttl = 10f; base.m_icon = Icon; } public override void SetLevel(int itemLevel, float skillLevel) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) stack++; if (stack >= 4) { int num = 40; HitData val = new HitData(); val.m_damage.m_frost = num; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); if (Object.op_Implicit((Object)(object)VFX)) { Object.Instantiate<GameObject>(VFX, ((Component)base.m_character).transform.position, ((Component)base.m_character).transform.rotation); } base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_PiercingGreatbowMistlands"))) { Warfare_PiercingGreatbowModer item = ScriptableObject.CreateInstance<Warfare_PiercingGreatbowModer>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class PiercingGreatbowPlains { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_PiercingGreatbowPlains"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class Warfare_PiercingGreatbowPlains : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_PiercingGreatbowPlains"; base.m_tooltip = "PiercingGreatbowPlains"; base.m_name = "PiercingGreatbowPlains"; base.m_ttl = 10f; base.m_icon = Icon; } public override void SetLevel(int itemLevel, float skillLevel) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) stack++; if (stack >= 4) { int num = 40; HitData val = new HitData(); val.m_damage.m_pierce = num; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); if (Object.op_Implicit((Object)(object)VFX)) { Object.Instantiate<GameObject>(VFX, ((Component)base.m_character).transform.position, ((Component)base.m_character).transform.rotation); } base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_PiercingGreatbowPlains"))) { Warfare_PiercingGreatbowPlains item = ScriptableObject.CreateInstance<Warfare_PiercingGreatbowPlains>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static class Pinned { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Pinned"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_Pinned : StatusEffect { public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Pinned"; base.m_tooltip = "Pinned"; base.m_name = "Pinned"; base.m_ttl = 4f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { base.m_ttl = itemLevel; } public void ModifySpeed(float baseSpeed, ref float speed) { speed = 0f; } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_Pinned"))) { SE_Warfare_Pinned item = ScriptableObject.CreateInstance<SE_Warfare_Pinned>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(0)] public static class PinnedFrozen { [HarmonyPatch(typeof(Character), "Damage")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_PinnedFrozen"), true, value, 0f); } } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public class SE_Warfare_PinnedFrozen : StatusEffect { public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_PinnedFrozen"; base.m_tooltip = "PinnedFrozen"; base.m_name = "PinnedFrozen"; base.m_ttl = 4f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { base.m_ttl = itemLevel; } public void ModifySpeed(float baseSpeed, ref float speed) { speed = -0.35f; } } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } private static readonly Dictionary<string, int> Targets = new Dictionary<string, int>(); private static GameObject VFX; private static Sprite Icon; public static void UseVFX(GameObject vfx) { VFX = vfx; } public static void UseIcon(Sprite icon) { Icon = icon; } public static void AddToItem(string prefab, int value) { Targets.Add(prefab, value); } private static void AddSE(ObjectDB odb) { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && !((Object)(object)ObjectDB.instance.GetItemPrefab("Amber") == (Object)null) && !Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "Warfare_PinnedFrozen"))) { SE_Warfare_PinnedFrozen item = ScriptableObject.CreateInstance<SE_Warfare_PinnedFrozen>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } public static class Protector { [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Prefix(Character __instance, ref HitData hit) { if (__instance.m_nview.IsValid() && !((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareUtils.TryGetAttackWeapon(out var prefab) && Targets.Contains(prefab)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Protector"), true, 0, 0f); } } } public class SE_Warfare_Protector : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "Warfare_Protector"; base.m_tooltip = "Protector"; base.m_name = "Protector"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 4) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Protector_Stacking"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } public class SE_Warfare_Protector_Stacking : StatusEffect { public void OnEnable() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ((Object)this).name = "Warfare_Protector_Stacking"; base.m_tooltip = "Protector"; base.m_name = "Protector"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } } [HarmonyPatch(typeof(ItemData), "GetBlockPower", new Type[] { typeof(float) })] private static class ItemDrop__Patch { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] private static void Postfix(ItemDrop __instance, ref float __result) { SE_Warfare_Protector_Stacking sE_Warfare_Protector_Stacking = ((Character)Player.m_localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("Warfare_Protector_Stacking")) as SE_Warfare_Protector_Stacking; if (!((Object)(object)sE_Warfare_Protector_Stacking == (Object)null)) { __result += 1E+09f; ((Character)Player.m_localPlayer).GetSEMan().RemoveStatusEffect((StatusEffect)(object)sE_Warfare_Protector_Stacking, true); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(1)] private static readonly HashSet<string> Targets = new HashSet<string>(); [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(1)] private static GameObject VFX; [<4db7c964-ef2b-4966-b0cf-60cd2e996f84>Nullable(1)] private static Sprite Icon; [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>NullableContext(1)] public static void UseVFX(GameObject vfx) { VFX = vfx; } [<6eaf4be3-d8b3-4372-b054-7f49b81df3ea>Nullab