Decompiled source of WarfareFireAndIce v1.1.7
WarfareFireAndIce.dll
Decompiled 7 months 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 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("1.1.7")] [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.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: Guid("E0E2F92E-557C-4A05-9D89-AA92A0BD75C4")] [assembly: AssemblyConfiguration("")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.7.0")] [module: <28c95fd9-a48c-40eb-848d-45bfb0aa6542>RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [<a5edbec6-fed1-4f2a-b37b-c8679af5c379>Embedded] internal sealed class <a5edbec6-fed1-4f2a-b37b-c8679af5c379>EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [<a5edbec6-fed1-4f2a-b37b-c8679af5c379>Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class <eadc3472-6acf-43b2-99bc-6c1b6a46ae23>NullableAttribute : Attribute { public readonly byte[] NullableFlags; public <eadc3472-6acf-43b2-99bc-6c1b6a46ae23>NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public <eadc3472-6acf-43b2-99bc-6c1b6a46ae23>NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [<a5edbec6-fed1-4f2a-b37b-c8679af5c379>Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class <6285c949-acab-462f-8015-d1164887fb27>NullableContextAttribute : Attribute { public readonly byte Flag; public <6285c949-acab-462f-8015-d1164887fb27>NullableContextAttribute(byte P_0) { Flag = P_0; } } [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [CompilerGenerated] [<a5edbec6-fed1-4f2a-b37b-c8679af5c379>Embedded] internal sealed class <28c95fd9-a48c-40eb-848d-45bfb0aa6542>RefSafetyRulesAttribute : Attribute { public readonly int Version; public <28c95fd9-a48c-40eb-848d-45bfb0aa6542>RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace UpgradeWorld { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>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)([<6285c949-acab-462f-8015-d1164887fb27>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); } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [HarmonyPatch(typeof(Terminal), "InitTerminal")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Upgrade { private static List<Register> registers = new List<Register>(); public const string GUID = "upgrade_world"; private static void Postfix() { foreach (Register register in registers) { register.AddCommand(); } } public static void Register(string name, string description, params string[] commands) { if (Chainloader.PluginInfos.ContainsKey("upgrade_world")) { registers.Add(new Register { name = name, description = description, commands = commands }); } } } } namespace WarfareFireAndIce_StatusEffects.StatusEffects { [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Adrenaline { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Adrenaline : StatusEffect { public int stack; public SE_WarfareFireAndIce_Adrenaline() { ((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")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class AdrenalineLightning { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_AdrenalineLightning : StatusEffect { public int stack; public SE_WarfareFireAndIce_AdrenalineLightning() { ((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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class Bash { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Bleeding { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Bleeding_Stacking : StatusEffect { public float counter; public int maxHP; public SE_WarfareFireAndIce_Bleeding_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_Bleeding_Stacking"; base.m_tooltip = "Bleeding"; base.m_name = "Bleeding"; base.m_ttl = 4f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { maxHP = itemLevel; } public override void UpdateStatusEffect(float dt) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; float pierce = base.m_character.GetMaxHealth() * (float)maxHP * 0.00125f; HitData val = new HitData(); val.m_damage.m_pierce = pierce; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class BleedingSecondaryAttack { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_BleedingSecondaryAttack : StatusEffect { public float counter; public int percentage; public SE_WarfareFireAndIce_BleedingSecondaryAttack() { //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_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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; float pierce = base.m_character.GetMaxHealth() * (float)percentage * 0.00075f; HitData val = new HitData(); val.m_damage.m_pierce = pierce; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Bludgeoner { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Bludgeoner : StatusEffect { public int stack; public SE_WarfareFireAndIce_Bludgeoner() { ((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 >= 5) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Bludgeoner_ShreadResistance"), true, itemLevel, 0f); base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6285c949-acab-462f-8015-d1164887fb27>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 = 3f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { shread = itemLevel; } public override void ModifyDamageMods(ref DamageModifiers modifiers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) modifiers.m_blunt = (DamageModifier)2; } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class BurningSecondaryAttack { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_BurningSecondaryAttack : StatusEffect { public float counter; public int percentage; public SE_WarfareFireAndIce_BurningSecondaryAttack() { //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_BurningSecondaryAttack"; base.m_tooltip = "BurningSecondaryAttack"; base.m_name = "BurningSecondaryAttack"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { percentage = itemLevel; } public override void UpdateStatusEffect(float dt) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; float fire = base.m_character.GetMaxHealth() * (float)percentage * 0.00125f; HitData val = new HitData(); val.m_damage.m_fire = fire; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Decapitator4 { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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_Decapitator"), true, value, 0f); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Decapitator : StatusEffect { public int stack; public SE_WarfareFireAndIce_Decapitator() { ((Object)this).name = "WarfareFireAndIce_Decapitator"; base.m_tooltip = "Decapitator"; base.m_name = "Decapitator"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 4) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Decapitator_ShreadResistance"), true, itemLevel, 0f); base.m_ttl = 0.1f; } } } [<6285c949-acab-462f-8015-d1164887fb27>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_ShreadResistance"; base.m_tooltip = "Decapitator"; base.m_name = "Decapitator"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { shread = itemLevel; } public override void ModifyDamageMods(ref DamageModifiers modifiers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) modifiers.m_slash = (DamageModifier)2; base.m_ttl = 0.1f; } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Decapitator"))) { 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([<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Decapitator_ShreadResistance"))) { SE_WarfareFireAndIce_Decapitator_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Decapitator_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class Decapitator5 { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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_Decapitator"), true, value, 0f); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Decapitator : StatusEffect { public int stack; public SE_WarfareFireAndIce_Decapitator() { ((Object)this).name = "WarfareFireAndIce_Decapitator"; base.m_tooltip = "Decapitator"; base.m_name = "Decapitator"; base.m_ttl = 6f; } public override void SetLevel(int itemLevel, float skillLevel) { stack++; if (stack >= 5) { base.m_character.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("WarfareFireAndIce_Decapitator_ShreadResistance"), true, itemLevel, 0f); base.m_ttl = 0.1f; } } } [<6285c949-acab-462f-8015-d1164887fb27>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_ShreadResistance"; base.m_tooltip = "Decapitator"; base.m_name = "Decapitator"; base.m_ttl = 6f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { shread = itemLevel; } public override void ModifyDamageMods(ref DamageModifiers modifiers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) modifiers.m_slash = (DamageModifier)2; base.m_ttl = 0.1f; } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Decapitator"))) { 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([<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] (StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Decapitator_ShreadResistance"))) { SE_WarfareFireAndIce_Decapitator_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Decapitator_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class Executioner { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Ghost { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Ghost : StatusEffect { public int stack; public int modifier; public SE_WarfareFireAndIce_Ghost() { ((Object)this).name = "WarfareFireAndIce_Ghost"; base.m_tooltip = "Ghost"; base.m_name = "Ghost"; base.m_ttl = 3f; base.m_icon = Icon; } public override 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; } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class HacknSlash { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_HacknSlash : StatusEffect { public int stack; public SE_WarfareFireAndIce_HacknSlash() { ((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); } } } [<6285c949-acab-462f-8015-d1164887fb27>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; } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Haste { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Haste_Stacking : StatusEffect { public SE_WarfareFireAndIce_Haste_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_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 override void ModifySpeed(float baseSpeed, ref float speed) { speed *= 1.4f; } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Impale { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Impale : StatusEffect { public float counter; public int percentage; public SE_WarfareFireAndIce_Impale() { //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_Impale"; base.m_tooltip = "Impale"; base.m_name = "Impale"; base.m_ttl = 10f; base.m_icon = Icon; EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_attach = true, m_enabled = true, m_inheritParentRotation = true, m_inheritParentScale = true, m_prefab = VFX, m_randomRotation = false, m_scale = true } }; base.m_startEffects = val; } public override void SetLevel(int itemLevel, float skillLevel) { percentage = itemLevel; } public override void UpdateStatusEffect(float dt) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) ((StatusEffect)this).UpdateStatusEffect(dt); counter += dt; if (counter >= 1f) { counter = 0f; float pierce = base.m_character.GetMaxHealth() * (float)percentage * 0.0025f; HitData val = new HitData(); val.m_damage.m_pierce = pierce; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class Juggernaut { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Juggernaut : StatusEffect { public int stack; public SE_WarfareFireAndIce_Juggernaut() { ((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; } } } [<6285c949-acab-462f-8015-d1164887fb27>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")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class LightningBurst { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_LightningBurst : StatusEffect { public int stack; public SE_WarfareFireAndIce_LightningBurst() { ((Object)this).name = "WarfareFireAndIce_LightningBurst"; base.m_tooltip = "LightningBurst"; base.m_name = "LightningBurst"; base.m_ttl = 6f; base.m_icon = Icon; } public override void SetLevel(int itemLevel, float skillLevel) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) stack++; if (stack >= 5) { float lightning = base.m_character.GetMaxHealth() * (float)itemLevel * 0.02f; HitData val = new HitData(); val.m_damage.m_lightning = lightning; 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")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Madness { [HarmonyPatch(typeof(Character), "Damage")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class Pierced { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Pierced : StatusEffect { public int stack; public SE_WarfareFireAndIce_Pierced() { ((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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) stack++; if (stack >= 4) { float pierce = base.m_character.GetMaxHealth() * (float)itemLevel * 0.0003f; HitData val = new HitData(); val.m_damage.m_pierce = pierce; val.m_point = ((Component)base.m_character).transform.position; base.m_character.Damage(val); if (Object.op_Implicit((Object)(object)VFX)) { Object.Instantiate<GameObject>(VFX, ((Component)base.m_character).transform.position, ((Component)base.m_character).transform.rotation); } base.m_character.m_seman.RemoveStatusEffect((StatusEffect)(object)this, true); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] public static class Pinned { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Pinned : StatusEffect { public SE_WarfareFireAndIce_Pinned() { //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_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 override void ModifySpeed(float baseSpeed, ref float speed) { speed = 0f; } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class PinnedFrozen { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_PinnedFrozen : StatusEffect { public SE_WarfareFireAndIce_PinnedFrozen() { //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_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 override void ModifySpeed(float baseSpeed, ref float speed) { speed = 0f; } } [HarmonyPatch(typeof(ObjectDB), "Awake")] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>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 { [<6285c949-acab-462f-8015-d1164887fb27>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 SE_WarfareFireAndIce_Protector() { ((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 { [<6285c949-acab-462f-8015-d1164887fb27>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)) { __result += 1E+09f; ((Character)Player.m_localPlayer).GetSEMan().RemoveStatusEffect((StatusEffect)(object)sE_WarfareFireAndIce_Protector_Stacking, true); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(1)] private static readonly HashSet<string> Targets = new HashSet<string>(); [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(1)] private static GameObject VFX; [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(1)] private static Sprite Icon; [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void UseVFX(GameObject vfx) { VFX = vfx; } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void UseIcon(Sprite icon) { Icon = icon; } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void AddToItem(string prefab) { Targets.Add(prefab); } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] 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((StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Protector"))) { SE_WarfareFireAndIce_Protector item = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Protector>(); odb.m_StatusEffects.Add((StatusEffect)(object)item); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "WarfareFireAndIce_Protector_Stacking"))) { SE_WarfareFireAndIce_Protector_Stacking item2 = ScriptableObject.CreateInstance<SE_WarfareFireAndIce_Protector_Stacking>(); odb.m_StatusEffects.Add((StatusEffect)(object)item2); } } } } [<eadc3472-6acf-43b2-99bc-6c1b6a46ae23>Nullable(0)] [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static class Shatter { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Damage")] private static class Character_Damage_Patch { [<6285c949-acab-462f-8015-d1164887fb27>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_nview.InvokeRPC("SE_WarfareFireAndIce_Shatter", new object[1] { value }); } } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] public class SE_WarfareFireAndIce_Shatter : StatusEffect { public int Multiplier; public SE_WarfareFireAndIce_Shatter() { //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_Shatter"; base.m_tooltip = "Shatter"; base.m_name = "Shatter"; 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; } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public override void OnDamaged(HitData hit, Character attacker) { float num = 1f + (float)Multiplier * 0.05f; hit.ApplyModifier(num); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(Character), "Awake")] private static class Character_Awake_Patch { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] private static void Postfix(Character __instance) { __instance.m_nview.Register<int>("SE_WarfareFireAndIce_Shatter", (Action<long, int>)delegate(long _, int value) { StatusEffect statusEffect = __instance.m_seman.GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_WarfareFireAndIce_Shatter")); if (Object.op_Implicit((Object)(object)statusEffect)) { ((SE_WarfareFireAndIce_Shatter)(object)statusEffect).Multiplier += value; statusEffect.ResetTime(); } else { statusEffect = __instance.m_seman.AddStatusEffect(StringExtensionMethods.GetStableHashCode("SE_WarfareFireAndIce_Shatter"), false, 0, 0f); if (Object.op_Implicit((Object)(object)statusEffect)) { ((SE_WarfareFireAndIce_Shatter)(object)statusEffect).Multiplier = value; } } }); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(1)] public static void Postfix(ObjectDB __instance) { AddSE(__instance); } } [<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { [<6285c949-acab-462f-8015-d1164887fb27>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([<6285c949-acab-462f-8015-d1164887fb27>NullableContext(0)] (StatusEffec