Decompiled source of WarfareFireAndIce v2.0.1
WarfareFireAndIce.dll
Decompiled 2 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 AzuExtendedPlayerInventory; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using CreatureManager; using HarmonyLib; using ItemManager; using JetBrains.Annotations; using Jewelcrafting; using LocalizationManager; using Microsoft.CodeAnalysis; using PieceManager; using ServerSync; using SoftReferenceableAssets; using TMPro; using UnityEngine; using UnityEngine.UI; using WarfareFireAndIce; using WarfareFireAndIce.Util; using WarfareFireAndIce_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("WarfareFireAndIce")] [assembly: AssemblyCompany("Therzie")] [assembly: AssemblyFileVersion("2.0.1")] [assembly: AssemblyDescription("")] [assembly: AssemblyTitle("WarfareFireAndIce")] [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("2.0.1.0")] [module: <12728071-7209-472d-bd2a-146611bc7f3b>RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [<315276dd-d23f-4e5b-92c9-1c7299a900ab>Embedded] internal sealed class <315276dd-d23f-4e5b-92c9-1c7299a900ab>EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] [<315276dd-d23f-4e5b-92c9-1c7299a900ab>Embedded] [CompilerGenerated] internal sealed class <aa4a29ed-20f3-424e-82a6-c74c77baef8c>NullableAttribute : Attribute { public readonly byte[] NullableFlags; public <aa4a29ed-20f3-424e-82a6-c74c77baef8c>NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public <aa4a29ed-20f3-424e-82a6-c74c77baef8c>NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] [CompilerGenerated] [<315276dd-d23f-4e5b-92c9-1c7299a900ab>Embedded] internal sealed class <ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContextAttribute : Attribute { public readonly byte Flag; public <ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContextAttribute(byte P_0) { Flag = P_0; } } [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [<315276dd-d23f-4e5b-92c9-1c7299a900ab>Embedded] [CompilerGenerated] internal sealed class <12728071-7209-472d-bd2a-146611bc7f3b>RefSafetyRulesAttribute : Attribute { public readonly int Version; public <12728071-7209-472d-bd2a-146611bc7f3b>RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace UpgradeWorld { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] 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)([<ac589c1f-4613-46e4-b1e0-a337832a767e>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); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [HarmonyPatch(typeof(Terminal), "InitTerminal")] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] 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 WarfareFireAndIce_StatusEffects.StatusEffects { [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class Adrenaline { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Adrenaline"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Adrenaline : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_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")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Adrenaline"))) { SE_WarfareFireAndIce_Adrenaline item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Adrenaline>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class AdrenalineLightning { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_AdrenalineLightning"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_AdrenalineLightning : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_AdrenalineLightning"; base.m_tooltip = "AdrenalineLightning"; base.m_name = "AdrenalineLightning"; 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 / 400f; ((Character)Player.m_localPlayer).AddStamina(num); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_AdrenalineLightning"))) { SE_WarfareFireAndIce_AdrenalineLightning item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_AdrenalineLightning>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class Bash { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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 || !WarfareFireAndIceUtils.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); } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class Bleeding { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Bleeding"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Bleeding : StatusEffect { public int stack; public SE_WarfareFireAndIce_Bleeding() { ((Object)this).name = "WarfareFireAndIce_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("WarfareFireAndIce_Bleeding_Stacking"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_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 = "WarfareFireAndIce_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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; int num = 35; HitData val = new HitData(); val.m_damage.m_pierce = num; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Bleeding"))) { SE_WarfareFireAndIce_Bleeding item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Bleeding>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Bleeding_Stacking"))) { SE_WarfareFireAndIce_Bleeding_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Bleeding_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class BleedingSecondaryAttack { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value) && ((Humanoid)Player.m_localPlayer).m_currentAttackIsSecondary) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_BleedingSecondaryAttack"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_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 = "WarfareFireAndIce_BleedingSecondaryAttack"; base.m_tooltip = "BleedingSecondaryAttack"; base.m_name = "BleedingSecondaryAttack"; 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; int num = 30; HitData val = new HitData(); val.m_damage.m_pierce = num; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_BleedingSecondaryAttack"))) { SE_WarfareFireAndIce_BleedingSecondaryAttack item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_BleedingSecondaryAttack>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class Bludgeoner { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Bludgeoner"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Bludgeoner : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_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 >= 6) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Bludgeoner_ShreadResistance"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Bludgeoner_Stacking : StatusEffect { public int shread; public SE_WarfareFireAndIce_Bludgeoner_Stacking() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0050: 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_0071: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown ((Object)this).name = "WarfareFireAndIce_Bludgeoner_ShreadResistance"; base.m_tooltip = "Bludgeoner"; base.m_name = "Bludgeoner"; 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_blunt = (DamageModifier)2; } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Bludgeoner"))) { SE_WarfareFireAndIce_Bludgeoner item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Bludgeoner>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Bludgeoner_ShreadResistance"))) { SE_WarfareFireAndIce_Bludgeoner_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Bludgeoner_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class BurningSecondaryAttack { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value) && ((Humanoid)Player.m_localPlayer).m_currentAttackIsSecondary) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_BurningSecondaryAttack"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_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 = "WarfareFireAndIce_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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; int num = 20; HitData val = new HitData(); val.m_damage.m_fire = num; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_BurningSecondaryAttack"))) { SE_WarfareFireAndIce_BurningSecondaryAttack item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_BurningSecondaryAttack>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class Decapitator4 { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Decapitator4"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Decapitator : StatusEffect { public int stack; public SE_WarfareFireAndIce_Decapitator() { ((Object)this).name = "WarfareFireAndIce_Decapitator4"; base.m_tooltip = "Decapitator4"; base.m_name = "Decapitator4"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 4) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Decapitator_ShreadResistance4"), true, itemLevel, 0f); base.m_ttl = 0.1f; } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_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 = "WarfareFireAndIce_Decapitator_ShreadResistance4"; base.m_tooltip = "Decapitator4"; base.m_name = "Decapitator4"; 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; } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Decapitator4"))) { SE_WarfareFireAndIce_Decapitator item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Decapitator>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Decapitator_ShreadResistance4"))) { SE_WarfareFireAndIce_Decapitator_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Decapitator_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class Decapitator5 { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Decapitator5"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Decapitator : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_Decapitator5"; base.m_tooltip = "Decapitator5"; base.m_name = "Decapitator5"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 5) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Decapitator_ShreadResistance5"), true, itemLevel, 0f); base.m_ttl = 0.1f; } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Decapitator_Stacking : StatusEffect { public int shread; public SE_WarfareFireAndIce_Decapitator_Stacking() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0050: 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_0071: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown ((Object)this).name = "WarfareFireAndIce_Decapitator_ShreadResistance5"; base.m_tooltip = "Decapitator5"; base.m_name = "Decapitator5"; 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; } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Decapitator5"))) { SE_WarfareFireAndIce_Decapitator item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Decapitator>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Decapitator_ShreadResistance5"))) { SE_WarfareFireAndIce_Decapitator_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Decapitator_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class Executioner { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.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); } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class Ghost { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] private static void Prefix(ref HitData hit) { if (!((Object)(object)hit.GetAttacker() != (Object)(object)Player.m_localPlayer) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Ghost"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Ghost : StatusEffect { public int stack; public int modifier; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_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")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Ghost"))) { SE_WarfareFireAndIce_Ghost item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Ghost>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class GhostSecondary { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value) && ((Humanoid)Player.m_localPlayer).m_currentAttackIsSecondary) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_GhostSecondary"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_GhostSecondary : 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 = "WarfareFireAndIce_GhostSecondary"; base.m_tooltip = "GhostSecondary"; base.m_name = "GhostSecondary"; 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 void ModifySpeed(float baseSpeed, ref float speed) { speed *= 2f; } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_GhostSecondary"))) { SE_WarfareFireAndIce_GhostSecondary item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_GhostSecondary>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class HacknSlash { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_HacknSlash"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_HacknSlash : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_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("WarfareFireAndIce_HacknSlash_ShreadResistance"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_HacknSlash_Stacking : StatusEffect { public int shread; public SE_WarfareFireAndIce_HacknSlash_Stacking() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0050: 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_0071: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown ((Object)this).name = "WarfareFireAndIce_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; } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_HacknSlash"))) { SE_WarfareFireAndIce_HacknSlash item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_HacknSlash>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_HacknSlash_ShreadResistance"))) { SE_WarfareFireAndIce_HacknSlash_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_HacknSlash_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class Haste { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.Contains(prefab)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Haste"), true, 0, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Haste : StatusEffect { public float counter; public int percentage; private int stack; public SE_WarfareFireAndIce_Haste() { ((Object)this).name = "WarfareFireAndIce_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("WarfareFireAndIce_Haste_Stacking"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_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 = "WarfareFireAndIce_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; } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Haste"))) { SE_WarfareFireAndIce_Haste item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Haste>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Haste_Stacking"))) { SE_WarfareFireAndIce_Haste_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Haste_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class Impale { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value) && ((Humanoid)Player.m_localPlayer).m_currentAttackIsSecondary) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Impale"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_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 = "WarfareFireAndIce_Impale"; base.m_tooltip = "Impale"; base.m_name = "Impale"; 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; int num = 100; HitData val = new HitData(); val.m_damage.m_pierce = num; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Impale"))) { SE_WarfareFireAndIce_Impale item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Impale>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class Juggernaut { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Juggernaut"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Juggernaut : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_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("WarfareFireAndIce_Juggernaut_ShreadResistance"), true, itemLevel, 0f); base.m_ttl = 0.1f; } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Juggernaut_Stacking : StatusEffect { public int shread; public SE_WarfareFireAndIce_Juggernaut_Stacking() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0050: 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_0071: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown ((Object)this).name = "WarfareFireAndIce_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; } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Juggernaut"))) { SE_WarfareFireAndIce_Juggernaut item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Juggernaut>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Juggernaut_ShreadResistance"))) { SE_WarfareFireAndIce_Juggernaut_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Juggernaut_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class LightningBurst { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_LightningBurst"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_LightningBurst : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_LightningBurst"; base.m_tooltip = "LightningBurst"; base.m_name = "LightningBurst"; base.m_ttl = 3f; 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 >= 6) { int num = 35; HitData val = new HitData(); val.m_damage.m_lightning = 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); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_LightningBurst"))) { SE_WarfareFireAndIce_LightningBurst item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_LightningBurst>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class Madness { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.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); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class PierceBurst { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_PierceBurst"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_LightningBurst : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_PierceBurst"; base.m_tooltip = "PierceBurst"; base.m_name = "PierceBurst"; base.m_ttl = 6f; 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 >= 6) { int num = 25; 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); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_PierceBurst"))) { SE_WarfareFireAndIce_LightningBurst item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_LightningBurst>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class PierceGreatbow { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Pierced"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_Pierced : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_Pierced"; base.m_tooltip = "Pierced"; base.m_name = "Pierced"; 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 = 100; 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); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Pierced"))) { SE_WarfareFireAndIce_Pierced item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Pierced>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] public static class Pinned { [HarmonyPatch(typeof(Character), "Damage")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Pinned"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_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 = "WarfareFireAndIce_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; } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Pinned"))) { SE_WarfareFireAndIce_Pinned item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Pinned>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } [<aa4a29ed-20f3-424e-82a6-c74c77baef8c>Nullable(0)] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static class PinnedFrozen { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.TryGetValue(prefab, out var value)) { __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_PinnedFrozen"), true, value, 0f); } } } [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public class SE_WarfareFireAndIce_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 = "WarfareFireAndIce_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 = 0f; } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBAwake { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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([<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_PinnedFrozen"))) { SE_WarfareFireAndIce_PinnedFrozen item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_PinnedFrozen>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } } } public static class Protector { [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<ac589c1f-4613-46e4-b1e0-a337832a767e>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) && WarfareFireAndIceUtils.TryGetAttackWeapon(out var prefab) && Targets.Contains(prefab)) { ((Character)Player.m_localPlayer).m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Protector"), true, 0, 0f); } } } public class SE_WarfareFireAndIce_Protector : StatusEffect { public int stack; public void OnEnable() { ((Object)this).name = "WarfareFireAndIce_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("WarfareFireAndIce_Protector_Stacking"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } public class SE_WarfareFireAndIce_Protector_Stacking : StatusEffect { public SE_WarfareFireAndIce_Protector_Stacking() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0050: 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_0071: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown ((Object)this).name = "WarfareFireAndIce_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 { [<ac589c1f-4613-46e4-b1e0-a337832a767e>NullableContext(1)] private static void Postfix(ItemDrop __instance, ref float __result) { SE_WarfareFireAndIce_Protector_Stacking sE_WarfareFireAndIce_Protector_Stacking = ((Character)Player.m_localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Protector_Stacking")) as SE_WarfareFireAndIce_Protector_Stacking; if (!((Object)(object)sE_WarfareFireAndIce_Protector_Stacking == (Object)null)) { __re