Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of BossAdd v1.0.2
bossadd/AnimationSpeedManager.dll
Decompiled a day agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using HarmonyLib; using JetBrains.Annotations; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("AnimationSpeedManager")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AnimationSpeedManager")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("B3A6D52C-449A-4665-9FD0-BB48C8CF2CDF")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public static class AnimationSpeedManager { public delegate double Handler(Character character, double speed); private static readonly Harmony harmony = new Harmony("AnimationSpeedManager"); private static bool hasMarkerPatch = false; private static readonly MethodInfo method = AccessTools.DeclaredMethod(typeof(CharacterAnimEvent), "CustomFixedUpdate", (Type[])null, (Type[])null); private static int index = 0; private static bool changed = false; private static Handler[][] handlers = Array.Empty<Handler[]>(); private static readonly Dictionary<int, List<Handler>> handlersPriorities = new Dictionary<int, List<Handler>>(); [PublicAPI] public static void Add(Handler handler, int priority = 400) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown if (!hasMarkerPatch) { harmony.Patch((MethodBase)method, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(AnimationSpeedManager), "markerPatch", (Type[])null, (Type[])null)), (HarmonyMethod)null); hasMarkerPatch = true; } if (!handlersPriorities.TryGetValue(priority, out List<Handler> value)) { handlersPriorities.Add(priority, value = new List<Handler>()); harmony.Patch((MethodBase)method, (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(AnimationSpeedManager), "wrapper", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } value.Add(handler); handlers = (from kv in handlersPriorities orderby kv.Key select kv.Value.ToArray()).ToArray(); } private static void wrapper(Character ___m_character, Animator ___m_animator) { Character ___m_character2 = ___m_character; double num = (double)___m_animator.speed * 10000000.0 % 100.0; if ((!(num > 10.0) || !(num < 30.0)) && !(___m_animator.speed <= 0.001f)) { double num2 = ___m_animator.speed; double num3 = handlers[index++].Aggregate(num2, (double current, Handler handler) => handler(___m_character2, current)); if (num3 != num2) { ___m_animator.speed = (float)(num3 - num3 % 1E-05); changed = true; } } } private static void markerPatch(Animator ___m_animator) { if (changed) { double num = (double)___m_animator.speed * 10000000.0 % 100.0; if ((num < 10.0 || num > 30.0) ? true : false) { ___m_animator.speed += 1.9E-06f; } changed = false; } index = 0; } }
bossadd/bossadd.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; using bossadd.Patches; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace bossadd { public static class BonemassConfig { public static ConfigEntry<bool> SplitEnabled { get; private set; } public static ConfigEntry<float> SplitHealthThreshold { get; private set; } public static ConfigEntry<bool> KillConditionEnabled { get; private set; } public static ConfigEntry<bool> KillOrderEnabled { get; private set; } public static ConfigEntry<float> WrongOrderHealPercent { get; private set; } public static ConfigEntry<float> MiniDamageMult { get; private set; } public static ConfigEntry<float> MiniHPMult { get; private set; } public static ConfigEntry<float> MiniSpeedMult { get; private set; } public static ConfigEntry<float> MiniAttackRangeMult { get; private set; } public static ConfigEntry<float> MiniAttackIntervalMult { get; private set; } public static ConfigEntry<string> MiniResistBlunt { get; private set; } public static ConfigEntry<string> MiniResistSlash { get; private set; } public static ConfigEntry<string> MiniResistPierce { get; private set; } public static ConfigEntry<string> MiniResistFire { get; private set; } public static ConfigEntry<string> MiniResistFrost { get; private set; } public static ConfigEntry<string> MiniResistLightning { get; private set; } public static ConfigEntry<string> MiniResistPoison { get; private set; } public static ConfigEntry<string> MiniResistSpirit { get; private set; } public static ConfigEntry<bool> BonusSpawnEnabled { get; private set; } public static ConfigEntry<string> BonusSpawnPrefab { get; private set; } public static ConfigEntry<float> BonusSpawnChance { get; private set; } public static ConfigEntry<int> BonusSpawnCount { get; private set; } public static ConfigEntry<float> BonusSpawnHealthThreshold { get; private set; } public static ConfigEntry<string> PhaseMessage { get; private set; } public static ConfigEntry<float> PhaseMessageHP { get; private set; } public static void Bind(ConfigFile cfg) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Expected O, but got Unknown //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Expected O, but got Unknown //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Expected O, but got Unknown //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Expected O, but got Unknown //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Expected O, but got Unknown //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Expected O, but got Unknown //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Expected O, but got Unknown //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Expected O, but got Unknown //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Expected O, but got Unknown //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Expected O, but got Unknown //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Expected O, but got Unknown //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Expected O, but got Unknown //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Expected O, but got Unknown //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Expected O, but got Unknown //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Expected O, but got Unknown //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Expected O, but got Unknown //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Expected O, but got Unknown //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Expected O, but got Unknown //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Expected O, but got Unknown SplitEnabled = cfg.Bind<bool>("Bonemass", "(Split Summon) Enabled", true, LocalizationManager.Desc("Bonemass.SplitSummon.Enabled")); SplitHealthThreshold = cfg.Bind<float>("Bonemass", "(Split Summon) HPThreshold", 50f, new ConfigDescription(LocalizationManager.Desc("Bonemass.SplitSummon.HPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>())); KillConditionEnabled = cfg.Bind<bool>("Bonemass", "(Kill Condition) Enabled", true, LocalizationManager.Desc("Bonemass.KillCondition.Enabled")); KillOrderEnabled = cfg.Bind<bool>("Bonemass", "(Kill Condition) OrderEnabled", true, LocalizationManager.Desc("Bonemass.KillCondition.OrderEnabled")); WrongOrderHealPercent = cfg.Bind<float>("Bonemass", "(Kill Condition) WrongOrderHeal", 5f, new ConfigDescription(LocalizationManager.Desc("Bonemass.KillCondition.WrongOrderHeal"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 50f), Array.Empty<object>())); MiniDamageMult = cfg.Bind<float>("Bonemass", "(Mini Stat) DamageMult", 1f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.DamageMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>())); MiniHPMult = cfg.Bind<float>("Bonemass", "(Mini Stat) HPMult", 0.3f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.HPMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.05f, 1f), Array.Empty<object>())); MiniSpeedMult = cfg.Bind<float>("Bonemass", "(Mini Stat) SpeedMult", 1.6f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.SpeedMult"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 4f), Array.Empty<object>())); MiniAttackRangeMult = cfg.Bind<float>("Bonemass", "(Mini Stat) AttackRangeMult", 0.35f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.AttackRangeMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 1f), Array.Empty<object>())); MiniAttackIntervalMult = cfg.Bind<float>("Bonemass", "(Mini Stat) AttackIntervalMult", 1f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.AttackIntervalMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.3f, 3f), Array.Empty<object>())); AcceptableValueList<string> val = new AcceptableValueList<string>(new string[8] { "Inherit", "Normal", "Resistant", "VeryResistant", "Weak", "VeryWeak", "Immune", "Ignore" }); MiniResistBlunt = cfg.Bind<string>("Bonemass", "(Mini Resist) Blunt", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Blunt"), (AcceptableValueBase)val, Array.Empty<object>())); MiniResistSlash = cfg.Bind<string>("Bonemass", "(Mini Resist) Slash", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Slash"), (AcceptableValueBase)val, Array.Empty<object>())); MiniResistPierce = cfg.Bind<string>("Bonemass", "(Mini Resist) Pierce", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Pierce"), (AcceptableValueBase)val, Array.Empty<object>())); MiniResistFire = cfg.Bind<string>("Bonemass", "(Mini Resist) Fire", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Fire"), (AcceptableValueBase)val, Array.Empty<object>())); MiniResistFrost = cfg.Bind<string>("Bonemass", "(Mini Resist) Frost", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Frost"), (AcceptableValueBase)val, Array.Empty<object>())); MiniResistLightning = cfg.Bind<string>("Bonemass", "(Mini Resist) Lightning", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Lightning"), (AcceptableValueBase)val, Array.Empty<object>())); MiniResistPoison = cfg.Bind<string>("Bonemass", "(Mini Resist) Poison", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Poison"), (AcceptableValueBase)val, Array.Empty<object>())); MiniResistSpirit = cfg.Bind<string>("Bonemass", "(Mini Resist) Spirit", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Spirit"), (AcceptableValueBase)val, Array.Empty<object>())); BonusSpawnEnabled = cfg.Bind<bool>("Bonemass", "(Throw Summon) Enabled", false, LocalizationManager.Desc("Bonemass.ThrowSummon.Enabled")); BonusSpawnPrefab = cfg.Bind<string>("Bonemass", "(Throw Summon) Prefab", "Blob", LocalizationManager.Desc("Bonemass.ThrowSummon.Prefab")); BonusSpawnChance = cfg.Bind<float>("Bonemass", "(Throw Summon) Chance", 50f, new ConfigDescription(LocalizationManager.Desc("Bonemass.ThrowSummon.Chance"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>())); BonusSpawnCount = cfg.Bind<int>("Bonemass", "(Throw Summon) Count", 1, new ConfigDescription(LocalizationManager.Desc("Bonemass.ThrowSummon.Count"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 10), Array.Empty<object>())); BonusSpawnHealthThreshold = cfg.Bind<float>("Bonemass", "(Throw Summon) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Bonemass.ThrowSummon.HPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); PhaseMessage = cfg.Bind<string>("Bonemass", "(Phase) Message", "", LocalizationManager.Desc("Bonemass.Phase.Message")); PhaseMessageHP = cfg.Bind<float>("Bonemass", "(Phase) MessageHP", 50f, new ConfigDescription(LocalizationManager.Desc("Bonemass.Phase.MessageHP"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); } } public class BossConfig { public readonly string PrefabName; public readonly string DisplayName; public ConfigEntry<bool> Enabled { get; private set; } public ConfigEntry<SummonTriggerMode> TriggerMode { get; private set; } public ConfigEntry<int> HealthStepCount { get; private set; } public ConfigEntry<float> TimerInterval { get; private set; } public ConfigEntry<string> SummonPrefab { get; private set; } public ConfigEntry<int> SummonCount { get; private set; } public ConfigEntry<int> SummonLevel { get; private set; } public ConfigEntry<int> MaxTotalSummons { get; private set; } public ConfigEntry<bool> UseCLLC { get; private set; } public ConfigEntry<bool> SpecialSummonEnabled { get; private set; } public ConfigEntry<float> SpecialSummonHealthThreshold { get; private set; } public ConfigEntry<string> SpecialSummonPrefab { get; private set; } public ConfigEntry<int> SpecialSummonCount { get; private set; } public ConfigEntry<int> SpecialSummonLevel { get; private set; } public ConfigEntry<string> SpecialSummonVfxPrefab { get; private set; } public BossConfig(string prefabName, string displayName, string sectionName, ConfigFile cfg, string defaultPrefab, int defaultCount = 2, int defaultLevel = 1, string specialPrefab = "", int specialCount = 1, int specialLevel = 3) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Expected O, but got Unknown //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Expected O, but got Unknown PrefabName = prefabName; DisplayName = displayName; Enabled = cfg.Bind<bool>(sectionName, "(Summon) Enabled", true, LocalizationManager.Desc("BossSummon.Enabled")); TriggerMode = cfg.Bind<SummonTriggerMode>(sectionName, "(Summon) TriggerMode", SummonTriggerMode.Health, LocalizationManager.Desc("BossSummon.TriggerMode")); HealthStepCount = cfg.Bind<int>(sectionName, "(Summon) HealthStepCount", 5, new ConfigDescription(LocalizationManager.Desc("BossSummon.HealthStepCount"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 100), Array.Empty<object>())); TimerInterval = cfg.Bind<float>(sectionName, "(Summon) TimerInterval", 30f, new ConfigDescription(LocalizationManager.Desc("BossSummon.TimerInterval"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 3600f), Array.Empty<object>())); SummonPrefab = cfg.Bind<string>(sectionName, "(Summon) Prefab", defaultPrefab, LocalizationManager.Desc("BossSummon.Prefab")); SummonCount = cfg.Bind<int>(sectionName, "(Summon) Count", defaultCount, new ConfigDescription(LocalizationManager.Desc("BossSummon.Count"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 50), Array.Empty<object>())); SummonLevel = cfg.Bind<int>(sectionName, "(Summon) Level", defaultLevel, new ConfigDescription(LocalizationManager.Desc("BossSummon.Level"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 5), Array.Empty<object>())); MaxTotalSummons = cfg.Bind<int>(sectionName, "(Summon) MaxTotal", 20, new ConfigDescription(LocalizationManager.Desc("BossSummon.MaxTotal"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 200), Array.Empty<object>())); UseCLLC = cfg.Bind<bool>(sectionName, "(Summon) UseCLLC", false, LocalizationManager.Desc("BossSummon.UseCLLC")); SpecialSummonEnabled = cfg.Bind<bool>(sectionName, "(Special Summon) Enabled", true, LocalizationManager.Desc("BossSummon.SpecialEnabled")); SpecialSummonHealthThreshold = cfg.Bind<float>(sectionName, "(Special Summon) HPThreshold", 50f, new ConfigDescription(LocalizationManager.Desc("BossSummon.SpecialHPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>())); SpecialSummonPrefab = cfg.Bind<string>(sectionName, "(Special Summon) Prefab", string.IsNullOrEmpty(specialPrefab) ? defaultPrefab : specialPrefab, LocalizationManager.Desc("BossSummon.SpecialPrefab")); SpecialSummonCount = cfg.Bind<int>(sectionName, "(Special Summon) Count", specialCount, new ConfigDescription(LocalizationManager.Desc("BossSummon.SpecialCount"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 10), Array.Empty<object>())); SpecialSummonLevel = cfg.Bind<int>(sectionName, "(Special Summon) Level", specialLevel, new ConfigDescription(LocalizationManager.Desc("BossSummon.SpecialLevel"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 5), Array.Empty<object>())); SpecialSummonVfxPrefab = cfg.Bind<string>(sectionName, "(Special Summon) VFX", "vfx_GodExplosion", LocalizationManager.Desc("BossSummon.SpecialVFX")); } } public static class BossStatConfig { public static readonly Dictionary<string, BossStatEntry> All = new Dictionary<string, BossStatEntry>(); public static void Bind(ConfigFile cfg) { Register(new BossStatEntry("Eikthyr", "에이크쉬르", "Eikthyr", cfg)); Register(new BossStatEntry("gd_king", "더 엘더", "The Elder", cfg)); Register(new BossStatEntry("Bonemass", "본매스", "Bonemass", cfg)); Register(new BossStatEntry("Dragon", "모더", "Moder", cfg)); Register(new BossStatEntry("GoblinKing", "야글루스", "Yagluth", cfg)); Register(new BossStatEntry("SeekerQueen", "더 퀸", "The Queen", cfg)); Register(new BossStatEntry("Fader", "페이더", "Fader", cfg)); } private static void Register(BossStatEntry e) { All[e.PrefabName] = e; } } public class BossStatEntry { public readonly string PrefabName; public readonly string DisplayName; public ConfigEntry<float> HealthMultiplier { get; private set; } public ConfigEntry<float> MoveSpeedMultiplier { get; private set; } public ConfigEntry<float> AttackSpeedMultiplier { get; private set; } public BossStatEntry(string prefabName, string displayName, string sectionName, ConfigFile cfg) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown PrefabName = prefabName; DisplayName = displayName; HealthMultiplier = cfg.Bind<float>(sectionName, "(Boss Stat) HealthMultiplier", 1f, new ConfigDescription(LocalizationManager.Desc("BossStat.Health"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 100f), Array.Empty<object>())); MoveSpeedMultiplier = cfg.Bind<float>(sectionName, "(Boss Stat) MoveSpeedMultiplier", 1f, new ConfigDescription(LocalizationManager.Desc("BossStat.Speed"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>())); AttackSpeedMultiplier = cfg.Bind<float>(sectionName, "(Boss Stat) AttackSpeedMultiplier", 1f, new ConfigDescription(LocalizationManager.Desc("BossStat.AttackFreq"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>())); } } public static class BossSummonConfig { public static readonly Dictionary<string, BossConfig> All = new Dictionary<string, BossConfig>(); public static void Bind(ConfigFile cfg) { Register(new BossConfig("gd_king", "더 엘더", "The Elder", cfg, "Greydwarf_Elite", 2, 1, "Troll")); Register(new BossConfig("Bonemass", "본매스", "Bonemass", cfg, "Skeleton", 3, 1, "Draugr_Elite")); Register(new BossConfig("Dragon", "모더", "Moder", cfg, "Hatchling", 2, 1, "StoneGolem")); Register(new BossConfig("GoblinKing", "야글루스", "Yagluth", cfg, "Goblin", 3, 1, "GoblinBrute")); Register(new BossConfig("SeekerQueen", "더 퀸", "The Queen", cfg, "Seeker", 2, 1, "SeekerBrute")); Register(new BossConfig("Fader", "페이더", "Fader", cfg, "Charred_Melee", 2, 1, "Charred_Melee")); } private static void Register(BossConfig c) { All[c.PrefabName] = c; } } public static class BossVFXManager { private static readonly Dictionary<string, GameObject> _cache = new Dictionary<string, GameObject>(StringComparer.Ordinal); private static readonly HashSet<string> _safeToDestroy = new HashSet<string>(StringComparer.Ordinal); private static bool _initialized = false; public static void Initialize() { if (!_initialized) { string[] array = new string[4] { "fx_Lightning", "fx_eikthyr_stomp", "vfx_spawn_small", "vfx_GodExplosion" }; for (int i = 0; i < array.Length; i++) { TryCachePrefab(array[i]); } _initialized = true; Plugin.Log.LogInfo((object)$"[BossVFX] 초기화 완료 ({_cache.Count}개 캐싱)"); } } private static void TryCachePrefab(string prefabName) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown if (!_cache.ContainsKey(prefabName) && !((Object)ZNetScene.instance == (Object)null)) { GameObject prefab = ZNetScene.instance.GetPrefab(prefabName); if ((Object)prefab != (Object)null) { _cache[prefabName] = prefab; } } } public static void RegisterAsDestroyable(string prefabName) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown if (_safeToDestroy.Contains(prefabName) || (Object)ZNetScene.instance == (Object)null) { return; } GameObject prefab = ZNetScene.instance.GetPrefab(prefabName); if ((Object)prefab == (Object)null) { Plugin.Log.LogWarning((object)("[BossVFX] RegisterAsDestroyable: '" + prefabName + "' 없음")); return; } bool activeSelf = prefab.activeSelf; prefab.SetActive(false); GameObject val = Object.Instantiate<GameObject>(prefab); prefab.SetActive(activeSelf); ((Object)val).name = prefabName; Object.DontDestroyOnLoad((Object)val); ZNetView[] componentsInChildren = val.GetComponentsInChildren<ZNetView>(true); for (int i = 0; i < componentsInChildren.Length; i++) { Object.DestroyImmediate((Object)componentsInChildren[i]); } ZSyncTransform[] componentsInChildren2 = val.GetComponentsInChildren<ZSyncTransform>(true); for (int i = 0; i < componentsInChildren2.Length; i++) { Object.DestroyImmediate((Object)componentsInChildren2[i]); } ZSyncAnimation[] componentsInChildren3 = val.GetComponentsInChildren<ZSyncAnimation>(true); for (int i = 0; i < componentsInChildren3.Length; i++) { Object.DestroyImmediate((Object)componentsInChildren3[i]); } val.SetActive(false); _cache[prefabName] = val; _safeToDestroy.Add(prefabName); Plugin.Log.LogInfo((object)("[BossVFX] '" + prefabName + "' Destroyable 등록 완료")); } public static GameObject Play(string prefabName, Vector3 position, float lifetime = 3f) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown if (string.IsNullOrEmpty(prefabName)) { return null; } if ((Object)ZNetScene.instance == (Object)null) { return null; } try { if (!_cache.TryGetValue(prefabName, out var value) || (Object)value == (Object)null) { value = ZNetScene.instance.GetPrefab(prefabName); if ((Object)value == (Object)null) { Plugin.Log.LogWarning((object)("[BossVFX] 프리팹 '" + prefabName + "' 없음")); return null; } _cache[prefabName] = value; } GameObject val = Object.Instantiate<GameObject>(value, position, Quaternion.identity); if ((Object)val == (Object)null) { return null; } if (!val.activeSelf) { val.SetActive(true); } if (lifetime > 0f && _safeToDestroy.Contains(prefabName)) { Object.Destroy((Object)val, lifetime); } return val; } catch (Exception ex) { Plugin.Log.LogError((object)("[BossVFX] Play(" + prefabName + ") 실패: " + ex.Message)); return null; } } public static GameObject PlayAndDestroy(string prefabName, Vector3 position, float lifetime = 3f) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0069: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown if (string.IsNullOrEmpty(prefabName)) { return null; } if ((Object)ZNetScene.instance == (Object)null) { return null; } try { GameObject prefab = ZNetScene.instance.GetPrefab(prefabName); if ((Object)prefab == (Object)null) { Plugin.Log.LogWarning((object)("[BossVFX] PlayAndDestroy: '" + prefabName + "' 없음")); return null; } bool activeSelf = prefab.activeSelf; prefab.SetActive(false); GameObject val = Object.Instantiate<GameObject>(prefab, position, Quaternion.identity); prefab.SetActive(activeSelf); ZNetView[] componentsInChildren = val.GetComponentsInChildren<ZNetView>(true); for (int i = 0; i < componentsInChildren.Length; i++) { Object.DestroyImmediate((Object)componentsInChildren[i]); } ZSyncTransform[] componentsInChildren2 = val.GetComponentsInChildren<ZSyncTransform>(true); for (int i = 0; i < componentsInChildren2.Length; i++) { Object.DestroyImmediate((Object)componentsInChildren2[i]); } ZSyncAnimation[] componentsInChildren3 = val.GetComponentsInChildren<ZSyncAnimation>(true); for (int i = 0; i < componentsInChildren3.Length; i++) { Object.DestroyImmediate((Object)componentsInChildren3[i]); } Aoe[] componentsInChildren4 = val.GetComponentsInChildren<Aoe>(true); for (int i = 0; i < componentsInChildren4.Length; i++) { Object.DestroyImmediate((Object)componentsInChildren4[i]); } val.SetActive(true); if (lifetime > 0f) { Object.Destroy((Object)val, lifetime); } return val; } catch (Exception ex) { Plugin.Log.LogError((object)("[BossVFX] PlayAndDestroy(" + prefabName + ") 실패: " + ex.Message)); return null; } } public static void ClearCache() { _cache.Clear(); _safeToDestroy.Clear(); _initialized = false; Plugin.Log.LogInfo((object)"[BossVFX] 캐시 초기화 완료 (씬 언로드)"); } } [HarmonyPatch(typeof(ZNetScene), "OnDestroy")] public static class BossVFXManager_ZNetScene_OnDestroy_Patch { [HarmonyPostfix] public static void Postfix() { BossVFXManager.ClearCache(); } } [HarmonyPatch(typeof(ZNetScene), "Awake")] public static class BossVFXManager_ZNetScene_Patch { [HarmonyPostfix] public static void Postfix() { try { BossVFXManager.Initialize(); BossVFXManager.RegisterAsDestroyable("vfx_GodExplosion"); } catch (Exception ex) { Plugin.Log.LogError((object)("[BossVFX] ZNetScene 초기화 실패: " + ex.Message)); } } } public static class EikthyrSummonConfig { public static ConfigEntry<bool> Enabled { get; private set; } public static ConfigEntry<SummonTriggerMode> TriggerMode { get; private set; } public static ConfigEntry<int> HealthStepCount { get; private set; } public static ConfigEntry<float> TimerInterval { get; private set; } public static ConfigEntry<string> SummonPrefab { get; private set; } public static ConfigEntry<int> SummonCount { get; private set; } public static ConfigEntry<int> SummonLevel { get; private set; } public static ConfigEntry<int> MaxTotalSummons { get; private set; } public static ConfigEntry<bool> UseCLLC { get; private set; } public static ConfigEntry<bool> SpecialSummonEnabled { get; private set; } public static ConfigEntry<float> SpecialSummonHealthThreshold { get; private set; } public static ConfigEntry<string> SpecialSummonPrefab { get; private set; } public static ConfigEntry<int> SpecialSummonCount { get; private set; } public static ConfigEntry<int> SpecialSummonLevel { get; private set; } public static ConfigEntry<string> SpecialSummonVfxPrefab { get; private set; } public static ConfigEntry<bool> Phase2Enabled { get; private set; } public static ConfigEntry<float> Phase2HealthThreshold { get; private set; } public static ConfigEntry<string> StompAnimName { get; private set; } public static ConfigEntry<float> LightningProcChance { get; private set; } public static ConfigEntry<int> LightningCount { get; private set; } public static ConfigEntry<float> LightningDamageBlunt { get; private set; } public static ConfigEntry<float> LightningDamageSlash { get; private set; } public static ConfigEntry<float> LightningDamagePierce { get; private set; } public static ConfigEntry<float> LightningDamageLightning { get; private set; } public static ConfigEntry<string> LightningVfxPrefab { get; private set; } public static ConfigEntry<float> LightningStartDelay { get; private set; } public static ConfigEntry<float> LightningSafeZoneRadius { get; private set; } public static ConfigEntry<bool> FirePatchEnabled { get; private set; } public static ConfigEntry<float> FirePatchRadius { get; private set; } public static ConfigEntry<float> FirePatchDuration { get; private set; } public static ConfigEntry<float> FirePatchDamagePerTick { get; private set; } public static ConfigEntry<string> FirePatchHitVfxPrefab { get; private set; } public static ConfigEntry<string> FirePatchTickVfxPrefab { get; private set; } public static ConfigEntry<bool> HornLaunchEnabled { get; private set; } public static ConfigEntry<float> HornLaunchHealthThreshold { get; private set; } public static ConfigEntry<string> HornLaunchAnimName { get; private set; } public static ConfigEntry<float> HornLaunchRange { get; private set; } public static ConfigEntry<float> HornLaunchHorizontalForce { get; private set; } public static ConfigEntry<float> HornLaunchVerticalForce { get; private set; } public static ConfigEntry<float> HornLaunchProcChance { get; private set; } public static ConfigEntry<bool> HornLaunchAffectsBlocking { get; private set; } public static ConfigEntry<string> PhaseMessage { get; private set; } public static ConfigEntry<float> PhaseMessageHP { get; private set; } public static void Bind(ConfigFile cfg) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Expected O, but got Unknown //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Expected O, but got Unknown //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Expected O, but got Unknown //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Expected O, but got Unknown //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Expected O, but got Unknown //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Expected O, but got Unknown //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Expected O, but got Unknown //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Expected O, but got Unknown //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Expected O, but got Unknown //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Expected O, but got Unknown //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Expected O, but got Unknown //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Expected O, but got Unknown //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Expected O, but got Unknown //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Expected O, but got Unknown //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Expected O, but got Unknown //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Expected O, but got Unknown //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Expected O, but got Unknown //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Expected O, but got Unknown //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Expected O, but got Unknown //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Expected O, but got Unknown //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Expected O, but got Unknown //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Expected O, but got Unknown //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Expected O, but got Unknown //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Expected O, but got Unknown //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_0758: Expected O, but got Unknown //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Expected O, but got Unknown //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Expected O, but got Unknown //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_079f: Expected O, but got Unknown //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Expected O, but got Unknown //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Expected O, but got Unknown //IL_080f: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Expected O, but got Unknown //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0823: Expected O, but got Unknown //IL_0895: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Expected O, but got Unknown //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_08a9: Expected O, but got Unknown Enabled = cfg.Bind<bool>("Eikthyr", "(Summon) Enabled", true, LocalizationManager.Desc("Eikthyr.Summon.Enabled")); TriggerMode = cfg.Bind<SummonTriggerMode>("Eikthyr", "(Summon) TriggerMode", SummonTriggerMode.Both, LocalizationManager.Desc("Eikthyr.Summon.TriggerMode")); HealthStepCount = cfg.Bind<int>("Eikthyr", "(Summon) HealthStepCount", 10, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.HealthStepCount"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 100), Array.Empty<object>())); TimerInterval = cfg.Bind<float>("Eikthyr", "(Summon) TimerInterval", 30f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.TimerInterval"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 3600f), Array.Empty<object>())); SummonPrefab = cfg.Bind<string>("Eikthyr", "(Summon) Prefab", "Troll", LocalizationManager.Desc("Eikthyr.Summon.Prefab")); SummonCount = cfg.Bind<int>("Eikthyr", "(Summon) Count", 2, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.Count"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 50), Array.Empty<object>())); SummonLevel = cfg.Bind<int>("Eikthyr", "(Summon) Level", 1, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.Level"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 5), Array.Empty<object>())); MaxTotalSummons = cfg.Bind<int>("Eikthyr", "(Summon) MaxTotal", 20, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.MaxTotal"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 200), Array.Empty<object>())); UseCLLC = cfg.Bind<bool>("Eikthyr", "(Summon) UseCLLC", false, LocalizationManager.Desc("Eikthyr.Summon.UseCLLC")); SpecialSummonEnabled = cfg.Bind<bool>("Eikthyr", "(Special Summon) Enabled", true, LocalizationManager.Desc("Eikthyr.Summon.SpecialEnabled")); SpecialSummonHealthThreshold = cfg.Bind<float>("Eikthyr", "(Special Summon) HPThreshold", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.SpecialHPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>())); SpecialSummonPrefab = cfg.Bind<string>("Eikthyr", "(Special Summon) Prefab", "Troll", LocalizationManager.Desc("Eikthyr.Summon.SpecialPrefab")); SpecialSummonCount = cfg.Bind<int>("Eikthyr", "(Special Summon) Count", 1, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.SpecialCount"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 10), Array.Empty<object>())); SpecialSummonLevel = cfg.Bind<int>("Eikthyr", "(Special Summon) Level", 3, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.SpecialLevel"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 5), Array.Empty<object>())); SpecialSummonVfxPrefab = cfg.Bind<string>("Eikthyr", "(Special Summon) VFX", "vfx_GodExplosion", LocalizationManager.Desc("Eikthyr.Summon.SpecialVFX")); Phase2Enabled = cfg.Bind<bool>("Eikthyr", "(Lightning) Enabled", true, LocalizationManager.Desc("Eikthyr.Lightning.Enabled")); Phase2HealthThreshold = cfg.Bind<float>("Eikthyr", "(Lightning) HPThreshold", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.HPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>())); StompAnimName = cfg.Bind<string>("Eikthyr", "(Lightning) StompAnim", "stomp", LocalizationManager.Desc("Eikthyr.Lightning.StompAnim")); LightningProcChance = cfg.Bind<float>("Eikthyr", "(Lightning) ProcChance", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.ProcChance"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>())); LightningCount = cfg.Bind<int>("Eikthyr", "(Lightning) Count", 3, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.Count"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 20), Array.Empty<object>())); LightningDamageBlunt = cfg.Bind<float>("Eikthyr", "(Lightning) DamageBlunt", 0f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DamageBlunt"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>())); LightningDamageSlash = cfg.Bind<float>("Eikthyr", "(Lightning) DamageSlash", 0f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DamageSlash"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>())); LightningDamagePierce = cfg.Bind<float>("Eikthyr", "(Lightning) DamagePierce", 0f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DamagePierce"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>())); LightningDamageLightning = cfg.Bind<float>("Eikthyr", "(Lightning) DamageLightning", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DamageLightning"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>())); LightningVfxPrefab = cfg.Bind<string>("Eikthyr", "(Lightning) VFX", "fx_Lightning", LocalizationManager.Desc("Eikthyr.Lightning.VFX")); LightningStartDelay = cfg.Bind<float>("Eikthyr", "(Lightning) StartDelay", 0.8f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.StartDelay"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 5f), Array.Empty<object>())); LightningSafeZoneRadius = cfg.Bind<float>("Eikthyr", "(Lightning) SafeZoneRadius", 10f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.SafeZoneRadius"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 49f), Array.Empty<object>())); FirePatchEnabled = cfg.Bind<bool>("Eikthyr", "(Fire Patch) Enabled", true, LocalizationManager.Desc("Eikthyr.FirePatch.Enabled")); FirePatchRadius = cfg.Bind<float>("Eikthyr", "(Fire Patch) Radius", 3f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.FirePatch.Radius"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 20f), Array.Empty<object>())); FirePatchDuration = cfg.Bind<float>("Eikthyr", "(Fire Patch) Duration", 10f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.FirePatch.Duration"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 120f), Array.Empty<object>())); FirePatchDamagePerTick = cfg.Bind<float>("Eikthyr", "(Fire Patch) DamagePerTick", 10f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.FirePatch.DamagePerTick"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>())); FirePatchHitVfxPrefab = cfg.Bind<string>("Eikthyr", "(Fire Patch) HitVFX", "vfx_Burning", LocalizationManager.Desc("Eikthyr.FirePatch.HitVFX")); FirePatchTickVfxPrefab = cfg.Bind<string>("Eikthyr", "(Fire Patch) TickVFX", "vfx_Burning", LocalizationManager.Desc("Eikthyr.FirePatch.TickVFX")); HornLaunchEnabled = cfg.Bind<bool>("Eikthyr", "(Horn Attack) Enabled", true, LocalizationManager.Desc("Eikthyr.HornAttack.Enabled")); HornLaunchHealthThreshold = cfg.Bind<float>("Eikthyr", "(Horn Attack) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.HPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); HornLaunchAnimName = cfg.Bind<string>("Eikthyr", "(Horn Attack) Anim", "attack1", LocalizationManager.Desc("Eikthyr.HornAttack.Anim")); HornLaunchRange = cfg.Bind<float>("Eikthyr", "(Horn Attack) Range", 5f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.Range"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 20f), Array.Empty<object>())); HornLaunchHorizontalForce = cfg.Bind<float>("Eikthyr", "(Horn Attack) HorizontalForce", 15f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.HorizontalForce"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>())); HornLaunchVerticalForce = cfg.Bind<float>("Eikthyr", "(Horn Attack) VerticalForce", 12f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.VerticalForce"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>())); HornLaunchProcChance = cfg.Bind<float>("Eikthyr", "(Horn Attack) ProcChance", 100f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.ProcChance"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>())); HornLaunchAffectsBlocking = cfg.Bind<bool>("Eikthyr", "(Horn Attack) AffectsBlocking", false, LocalizationManager.Desc("Eikthyr.HornAttack.AffectsBlocking")); PhaseMessage = cfg.Bind<string>("Eikthyr", "(Phase) Message", "", LocalizationManager.Desc("Eikthyr.Phase.Message")); PhaseMessageHP = cfg.Bind<float>("Eikthyr", "(Phase) MessageHP", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Phase.MessageHP"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); } } public static class LocalizationManager { private static Dictionary<string, string> _strings = new Dictionary<string, string>(); public static void Init() { string text = ((PlayerPrefs.GetString("language", "English") == "Korean") ? "ko" : "en"); string text2 = "bossadd.Shared.Localization." + text + ".json"; using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(text2)) { if (stream == null) { ManualLogSource log = Plugin.Log; if (log != null) { log.LogWarning((object)("[BossAdd] Localization resource not found: " + text2)); } return; } using StreamReader streamReader = new StreamReader(stream); _strings = ParseJson(streamReader.ReadToEnd()); } ManualLogSource log2 = Plugin.Log; if (log2 != null) { log2.LogInfo((object)("[BossAdd] Localization loaded: " + text + " (" + _strings.Count + " keys)")); } } public static string Desc(string key) { if (!_strings.TryGetValue(key, out var value)) { return key; } return value; } private static Dictionary<string, string> ParseJson(string json) { Dictionary<string, string> dictionary = new Dictionary<string, string>(); foreach (Match item in Regex.Matches(json, "\"((?:[^\"\\\\]|\\\\.)*?)\"[ \\t]*:[ \\t]*\"((?:[^\"\\\\]|\\\\.)*?)\"")) { dictionary[item.Groups[1].Value] = Unescape(item.Groups[2].Value); } return dictionary; } private static string Unescape(string s) { return s.Replace("\\n", "\n").Replace("\\t", "\t").Replace("\\\"", "\"") .Replace("\\\\", "\\"); } } [HarmonyPatch(typeof(ZNetScene), "CreateObject")] internal static class MiniBonemassStaleZDOCleanupPatch { [HarmonyPrefix] public static bool Prefix(ZNetScene __instance, ZDO zdo, ref GameObject __result) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) int prefab = zdo.GetPrefab(); GameObject prefab2 = __instance.GetPrefab(prefab); if ((Object)prefab2 == (Object)null || !MiniBonemassVariants.IsMini(((Object)prefab2).name)) { return true; } if (ZDOMan.instance != null && zdo.IsOwner()) { ZDOMan.instance.DestroyZDO(zdo); } Plugin.Log.LogInfo((object)$"[MonsterDB] 잔존 ZDO 제거: {((Object)prefab2).name} ({zdo.m_uid})"); __result = null; return false; } } internal static class MiniBonemassVariants { public const int Count = 5; public static readonly string[] Names = new string[5] { "MiniBonemass_Red", "MiniBonemass_Orange", "MiniBonemass_Yellow", "MiniBonemass_Green", "MiniBonemass_Blue" }; public static readonly string[] KoreanNames = new string[5] { "빨강", "주황", "노랑", "초록", "파랑" }; public static readonly Color[] Colors = (Color[])(object)new Color[5] { new Color(1f, 0.05f, 0.05f), new Color(1f, 0.45f, 0f), new Color(1f, 1f, 0f), new Color(0f, 0.9f, 0.8f), new Color(0.05f, 0.3f, 1f) }; public static bool IsMini(string prefabName) { return prefabName?.StartsWith("MiniBonemass_") ?? false; } public static int IndexOf(string prefabName) { for (int i = 0; i < Names.Length; i++) { if (Names[i] == prefabName) { return i; } } return -1; } } [HarmonyPatch(typeof(ZNetScene), "CreateObject")] internal static class MiniModerStaleZDOCleanupPatch { [HarmonyPrefix] public static bool Prefix(ZNetScene __instance, ZDO zdo, ref GameObject __result) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) int prefab = zdo.GetPrefab(); GameObject prefab2 = __instance.GetPrefab(prefab); if ((Object)prefab2 == (Object)null || ((Object)prefab2).name != "MiniModer") { return true; } if (ZDOMan.instance != null && zdo.IsOwner()) { ZDOMan.instance.DestroyZDO(zdo); } Plugin.Log.LogInfo((object)$"[ModerDB] 잔존 ZDO 제거: MiniModer ({zdo.m_uid})"); __result = null; return false; } } public static class ModerConfig { public static ConfigEntry<bool> SplitEnabled { get; private set; } public static ConfigEntry<float> SplitHPThreshold { get; private set; } public static ConfigEntry<int> SplitCount { get; private set; } public static ConfigEntry<float> MiniScaleMult { get; private set; } public static ConfigEntry<float> MiniHPMult { get; private set; } public static ConfigEntry<float> MiniDamageMult { get; private set; } public static ConfigEntry<float> MiniSpeedMult { get; private set; } public static ConfigEntry<float> MiniAttackIntervalMult { get; private set; } public static ConfigEntry<float> MiniAttackRangeMult { get; private set; } public static ConfigEntry<float> MiniFlightDuration { get; private set; } public static ConfigEntry<float> MiniFarTargetMinDist { get; private set; } public static ConfigEntry<bool> AirBreathEnabled { get; private set; } public static ConfigEntry<float> AirBreathCooldown { get; private set; } public static ConfigEntry<float> AirBreathRange { get; private set; } public static ConfigEntry<float> AirBreathAngle { get; private set; } public static ConfigEntry<float> AirBreathDamageFrost { get; private set; } public static ConfigEntry<float> AirBreathDamageBlunt { get; private set; } public static ConfigEntry<string> AirBreathVFX { get; private set; } public static ConfigEntry<float> AirBreathMinAltitude { get; private set; } public static ConfigEntry<float> AirBreathHPThreshold { get; private set; } public static ConfigEntry<string> AirBreathPhaseMessage { get; private set; } public static ConfigEntry<float> AirBreathPhaseMessageHP { get; private set; } public static ConfigEntry<bool> LandBlastEnabled { get; private set; } public static ConfigEntry<float> LandBlastRadius { get; private set; } public static ConfigEntry<float> LandBlastPushForce { get; private set; } public static ConfigEntry<float> LandBlastPushForceY { get; private set; } public static ConfigEntry<string> LandBlastVFX { get; private set; } public static ConfigEntry<float> LandBlastVFXScale { get; private set; } public static ConfigEntry<string> LandBlastSFX { get; private set; } public static ConfigEntry<float> LandBlastCooldown { get; private set; } public static ConfigEntry<float> LandBlastDelay { get; private set; } public static ConfigEntry<bool> RoarEnabled { get; private set; } public static ConfigEntry<float> RoarHPThreshold { get; private set; } public static ConfigEntry<float> RoarCooldown { get; private set; } public static ConfigEntry<float> RoarRadius { get; private set; } public static ConfigEntry<float> RoarDamageFrost { get; private set; } public static ConfigEntry<float> RoarDamageBlunt { get; private set; } public static ConfigEntry<float> RoarPushForce { get; private set; } public static ConfigEntry<float> RoarStaggerMult { get; private set; } public static ConfigEntry<bool> RoarBlockable { get; private set; } public static ConfigEntry<string> RoarVFX { get; private set; } public static ConfigEntry<string> RoarSFX { get; private set; } public static ConfigEntry<bool> ZoneEnabled { get; private set; } public static ConfigEntry<float> ZoneHPThreshold { get; private set; } public static ConfigEntry<bool> ZoneSlowEnabled { get; private set; } public static ConfigEntry<int> ZoneCount { get; private set; } public static ConfigEntry<float> ZoneSpawnRange { get; private set; } public static ConfigEntry<float> ZoneRadius { get; private set; } public static ConfigEntry<float> ZoneDamageFrost { get; private set; } public static ConfigEntry<float> ZoneDamageBlunt { get; private set; } public static ConfigEntry<float> ZoneDuration { get; private set; } public static ConfigEntry<string> ZoneVFX { get; private set; } public static ConfigEntry<float> ZoneVFXScale { get; private set; } public static void Bind(ConfigFile cfg) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Expected O, but got Unknown //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Expected O, but got Unknown //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Expected O, but got Unknown //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Expected O, but got Unknown //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Expected O, but got Unknown //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Expected O, but got Unknown //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Expected O, but got Unknown //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Expected O, but got Unknown //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Expected O, but got Unknown //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Expected O, but got Unknown //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Expected O, but got Unknown //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Expected O, but got Unknown //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Expected O, but got Unknown //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Expected O, but got Unknown //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Expected O, but got Unknown //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Expected O, but got Unknown //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Expected O, but got Unknown //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Expected O, but got Unknown //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Expected O, but got Unknown //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Expected O, but got Unknown //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Expected O, but got Unknown //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_0662: Expected O, but got Unknown //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Expected O, but got Unknown //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Expected O, but got Unknown //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Expected O, but got Unknown //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Expected O, but got Unknown //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Expected O, but got Unknown //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_076c: Expected O, but got Unknown //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Expected O, but got Unknown //IL_079f: Unknown result type (might be due to invalid IL or missing references) //IL_07ae: Expected O, but got Unknown //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07b3: Expected O, but got Unknown //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07f0: Expected O, but got Unknown //IL_07eb: Unknown result type (might be due to invalid IL or missing references) //IL_07f5: Expected O, but got Unknown //IL_0823: Unknown result type (might be due to invalid IL or missing references) //IL_0832: Expected O, but got Unknown //IL_082d: Unknown result type (might be due to invalid IL or missing references) //IL_0837: Expected O, but got Unknown //IL_0865: Unknown result type (might be due to invalid IL or missing references) //IL_0874: Expected O, but got Unknown //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0879: Expected O, but got Unknown //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08b6: Expected O, but got Unknown //IL_08b1: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Expected O, but got Unknown //IL_08e9: Unknown result type (might be due to invalid IL or missing references) //IL_08f8: Expected O, but got Unknown //IL_08f3: Unknown result type (might be due to invalid IL or missing references) //IL_08fd: Expected O, but got Unknown //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Expected O, but got Unknown //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_09c7: Expected O, but got Unknown //IL_0a0a: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Expected O, but got Unknown //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a1e: Expected O, but got Unknown //IL_0a4c: Unknown result type (might be due to invalid IL or missing references) //IL_0a5b: Expected O, but got Unknown //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a60: Expected O, but got Unknown //IL_0a8e: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Expected O, but got Unknown //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_0aa2: Expected O, but got Unknown //IL_0ad0: Unknown result type (might be due to invalid IL or missing references) //IL_0adf: Expected O, but got Unknown //IL_0ada: Unknown result type (might be due to invalid IL or missing references) //IL_0ae4: Expected O, but got Unknown //IL_0b12: Unknown result type (might be due to invalid IL or missing references) //IL_0b21: Expected O, but got Unknown //IL_0b1c: Unknown result type (might be due to invalid IL or missing references) //IL_0b26: Expected O, but got Unknown //IL_0b54: Unknown result type (might be due to invalid IL or missing references) //IL_0b63: Expected O, but got Unknown //IL_0b5e: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Expected O, but got Unknown //IL_0bba: Unknown result type (might be due to invalid IL or missing references) //IL_0bc9: Expected O, but got Unknown //IL_0bc4: Unknown result type (might be due to invalid IL or missing references) //IL_0bce: Expected O, but got Unknown SplitEnabled = cfg.Bind<bool>("Moder", "(Frost Clone) Enabled", true, LocalizationManager.Desc("Moder.FrostClone.Enabled")); SplitHPThreshold = cfg.Bind<float>("Moder", "(Frost Clone) HPThreshold", 40f, new ConfigDescription(LocalizationManager.Desc("Moder.FrostClone.HPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>())); SplitCount = cfg.Bind<int>("Moder", "(Frost Clone) Count", 2, new ConfigDescription(LocalizationManager.Desc("Moder.FrostClone.Count"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 5), Array.Empty<object>())); MiniScaleMult = cfg.Bind<float>("Moder", "(Mini Stat) ScaleMult", 0.55f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.ScaleMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.2f, 0.9f), Array.Empty<object>())); MiniHPMult = cfg.Bind<float>("Moder", "(Mini Stat) HPMult", 0.3f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.HPMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.05f, 1f), Array.Empty<object>())); MiniDamageMult = cfg.Bind<float>("Moder", "(Mini Stat) DamageMult", 0.5f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.DamageMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 3f), Array.Empty<object>())); MiniSpeedMult = cfg.Bind<float>("Moder", "(Mini Stat) SpeedMult", 1.4f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.SpeedMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.5f, 3f), Array.Empty<object>())); MiniAttackIntervalMult = cfg.Bind<float>("Moder", "(Mini Stat) AttackIntervalMult", 0.6f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.AttackIntervalMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.2f, 2f), Array.Empty<object>())); MiniAttackRangeMult = cfg.Bind<float>("Moder", "(Mini Stat) AttackRangeMult", 0.6f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.AttackRangeMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 1.5f), Array.Empty<object>())); MiniFlightDuration = cfg.Bind<float>("Moder", "(Mini Flight) FlightDuration", 6f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniFlight.FlightDuration"), (AcceptableValueBase)new AcceptableValueRange<float>(2f, 30f), Array.Empty<object>())); MiniFarTargetMinDist = cfg.Bind<float>("Moder", "(Mini Flight) FarTargetMinDist", 20f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniFlight.FarTargetMinDist"), (AcceptableValueBase)new AcceptableValueRange<float>(5f, 60f), Array.Empty<object>())); AirBreathEnabled = cfg.Bind<bool>("Moder", "(Air Breath) Enabled", true, LocalizationManager.Desc("Moder.AirBreath.Enabled")); AirBreathCooldown = cfg.Bind<float>("Moder", "(Air Breath) Cooldown", 8f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.Cooldown"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 60f), Array.Empty<object>())); AirBreathRange = cfg.Bind<float>("Moder", "(Air Breath) Range", 28f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.Range"), (AcceptableValueBase)new AcceptableValueRange<float>(5f, 80f), Array.Empty<object>())); AirBreathAngle = cfg.Bind<float>("Moder", "(Air Breath) Angle", 60f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.Angle"), (AcceptableValueBase)new AcceptableValueRange<float>(10f, 180f), Array.Empty<object>())); AirBreathDamageFrost = cfg.Bind<float>("Moder", "(Air Breath) DamageFrost", 25f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.DamageFrost"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>())); AirBreathDamageBlunt = cfg.Bind<float>("Moder", "(Air Breath) DamageBlunt", 0f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.DamageBlunt"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>())); AirBreathVFX = cfg.Bind<string>("Moder", "(Air Breath) VFX", "vfx_dragon_coldbreath", LocalizationManager.Desc("Moder.AirBreath.VFX")); AirBreathMinAltitude = cfg.Bind<float>("Moder", "(Air Breath) MinAltitude", 8f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.MinAltitude"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 30f), Array.Empty<object>())); AirBreathHPThreshold = cfg.Bind<float>("Moder", "(Air Breath) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.HPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); AirBreathPhaseMessage = cfg.Bind<string>("Moder", "(Air Breath) PhaseMessage", "", LocalizationManager.Desc("Moder.AirBreath.PhaseMessage")); AirBreathPhaseMessageHP = cfg.Bind<float>("Moder", "(Air Breath) PhaseMessageHP", 50f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.PhaseMessageHP"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); LandBlastEnabled = cfg.Bind<bool>("Moder", "(Landing Blast) Enabled", true, LocalizationManager.Desc("Moder.LandingBlast.Enabled")); LandBlastRadius = cfg.Bind<float>("Moder", "(Landing Blast) Radius", 14f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.Radius"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 40f), Array.Empty<object>())); LandBlastPushForce = cfg.Bind<float>("Moder", "(Landing Blast) PushForce", 25f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.PushForce"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>())); LandBlastPushForceY = cfg.Bind<float>("Moder", "(Landing Blast) PushForceY", 0f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.PushForceY"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>())); LandBlastVFX = cfg.Bind<string>("Moder", "(Landing Blast) VFX", "fx_eikthyr_stomp", LocalizationManager.Desc("Moder.LandingBlast.VFX")); LandBlastVFXScale = cfg.Bind<float>("Moder", "(Landing Blast) VFXScale", 2f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.VFXScale"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>())); LandBlastSFX = cfg.Bind<string>("Moder", "(Landing Blast) SFX", "sfx_dragon_scream", LocalizationManager.Desc("Moder.LandingBlast.SFX")); LandBlastCooldown = cfg.Bind<float>("Moder", "(Landing Blast) Cooldown", 10f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.Cooldown"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 60f), Array.Empty<object>())); LandBlastDelay = cfg.Bind<float>("Moder", "(Landing Blast) Delay", 2f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.Delay"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 5f), Array.Empty<object>())); RoarEnabled = cfg.Bind<bool>("Moder", "(Freeze Roar) Enabled", true, LocalizationManager.Desc("Moder.FreezeRoar.Enabled")); RoarHPThreshold = cfg.Bind<float>("Moder", "(Freeze Roar) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.HPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); RoarCooldown = cfg.Bind<float>("Moder", "(Freeze Roar) Cooldown", 25f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.Cooldown"), (AcceptableValueBase)new AcceptableValueRange<float>(5f, 300f), Array.Empty<object>())); RoarRadius = cfg.Bind<float>("Moder", "(Freeze Roar) Radius", 15f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.Radius"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 60f), Array.Empty<object>())); RoarDamageFrost = cfg.Bind<float>("Moder", "(Freeze Roar) DamageFrost", 30f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.DamageFrost"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>())); RoarDamageBlunt = cfg.Bind<float>("Moder", "(Freeze Roar) DamageBlunt", 0f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.DamageBlunt"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>())); RoarPushForce = cfg.Bind<float>("Moder", "(Freeze Roar) PushForce", 20f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.PushForce"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>())); RoarStaggerMult = cfg.Bind<float>("Moder", "(Freeze Roar) StaggerMult", 1f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.StaggerMult"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 5f), Array.Empty<object>())); RoarBlockable = cfg.Bind<bool>("Moder", "(Freeze Roar) Blockable", true, LocalizationManager.Desc("Moder.FreezeRoar.Blockable")); RoarVFX = cfg.Bind<string>("Moder", "(Freeze Roar) VFX", "", LocalizationManager.Desc("Moder.FreezeRoar.VFX")); RoarSFX = cfg.Bind<string>("Moder", "(Freeze Roar) SFX", "", LocalizationManager.Desc("Moder.FreezeRoar.SFX")); ZoneEnabled = cfg.Bind<bool>("Moder", "(Ice Field) Enabled", true, LocalizationManager.Desc("Moder.IceField.Enabled")); ZoneHPThreshold = cfg.Bind<float>("Moder", "(Ice Field) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.HPThreshold"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>())); ZoneSlowEnabled = cfg.Bind<bool>("Moder", "(Ice Field) SlowEnabled", true, LocalizationManager.Desc("Moder.IceField.SlowEnabled")); ZoneCount = cfg.Bind<int>("Moder", "(Ice Field) Count", 2, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.Count"), (AcceptableValueBase)new AcceptableValueRange<int>(1, 30), Array.Empty<object>())); ZoneSpawnRange = cfg.Bind<float>("Moder", "(Ice Field) SpawnRange", 12f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.SpawnRange"), (AcceptableValueBase)new AcceptableValueRange<float>(2f, 40f), Array.Empty<object>())); ZoneRadius = cfg.Bind<float>("Moder", "(Ice Field) Radius", 6f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.Radius"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 20f), Array.Empty<object>())); ZoneDamageFrost = cfg.Bind<float>("Moder", "(Ice Field) DamageFrost", 10f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.DamageFrost"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>())); ZoneDamageBlunt = cfg.Bind<float>("Moder", "(Ice Field) DamageBlunt", 0f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.DamageBlunt"), (AcceptableValueBase)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>())); ZoneDuration = cfg.Bind<float>("Moder", "(Ice Field) Duration", 8f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.Duration"), (AcceptableValueBase)new AcceptableValueRange<float>(1f, 60f), Array.Empty<object>())); ZoneVFX = cfg.Bind<string>("Moder", "(Ice Field) VFX", "fx_fenring_icenova", LocalizationManager.Desc("Moder.IceField.VFX")); ZoneVFXScale = cfg.Bind<float>("Moder", "(Ice Field) VFXScale", 1f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.VFXScale"), (AcceptableValueBase)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>())); } } [HarmonyPatch(typeof(ZNetScene), "Awake")] internal static class ModerMonsterDB { private static readonly FieldInfo s_namedPrefabsField = AccessTools.Field(typeof(ZNetScene), "m_namedPrefabs"); private static GameObject s_miniModer; public const string PrefabName = "MiniModer"; [HarmonyPostfix] public static void Postfix(ZNetScene __instance) { if (!(s_namedPrefabsField.GetValue(__instance) is Dictionary<int, GameObject> namedPrefabs)) { Plugin.Log.LogError((object)"[ModerDB] m_namedPrefabs 접근 실패"); } else { RegisterMiniModer(__instance, namedPrefabs); } } private static void RegisterMiniModer(ZNetScene zns, Dictionary<int, GameObject> namedPrefabs) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Expected O, but got Unknown //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) if ((Object)zns.GetPrefab("MiniModer") != (Object)null) { return; } if ((Object)s_miniModer != (Object)null) { zns.m_prefabs.Add(s_miniModer); namedPrefabs[StringExtensionMethods.GetStableHashCode("MiniModer")] = s_miniModer; Plugin.Log.LogInfo((object)"[ModerDB] MiniModer 재등록"); return; } GameObject prefab = zns.GetPrefab("Dragon"); if ((Object)prefab == (Object)null) { Plugin.Log.LogError((object)"[ModerDB] Dragon 프리팹 없음 — MiniModer 등록 실패"); return; } bool activeSelf = prefab.activeSelf; prefab.SetActive(false); GameObject val = Object.Instantiate<GameObject>(prefab); prefab.SetActive(activeSelf); ((Object)val).name = "MiniModer"; Object.DontDestroyOnLoad((Object)val); val.SetActive(false); Character component = prefab.GetComponent<Character>(); Character component2 = val.GetComponent<Character>(); if ((Object)component2 != (Object)null) { component2.m_boss = false; component2.m_bossEvent = ""; float value = ModerConfig.MiniSpeedMult.Value; component2.m_runSpeed *= value; component2.m_walkSpeed *= value; component2.m_swimSpeed *= value; if ((Object)component != (Object)null) { component2.m_health = Mathf.Max(component.m_health * ModerConfig.MiniHPMult.Value, 1f); } } ZNetView component3 = val.GetComponent<ZNetView>(); if ((Object)component3 != (Object)null) { component3.m_persistent = false; } MonsterAI component4 = val.GetComponent<MonsterAI>(); if ((Object)component4 != (Object)null) { float value2 = ModerConfig.MiniAttackIntervalMult.Value; if (!Mathf.Approximately(value2, 1f)) { component4.m_minAttackInterval *= value2; } } CharacterDrop component5 = val.GetComponent<CharacterDrop>(); if ((Object)component5 != (Object)null) { component5.m_drops.Clear(); } ApplyFrostTint(val, new Color(0.15f, 0.55f, 1f)); float value3 = ModerConfig.MiniScaleMult.Value; val.transform.localScale = Vector3.one * value3; zns.m_prefabs.Add(val); namedPrefabs[StringExtensionMethods.GetStableHashCode("MiniModer")] = val; s_miniModer = val; Plugin.Log.LogInfo((object)("[ModerDB] MiniModer 등록 완료 — " + $"HP {component2?.m_health:F0} / scale {value3:F2} / 보스 플래그 OFF")); } private static void ApplyFrostTint(GameObject go, Color tint) { //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) Renderer[] componentsInChildren = go.GetComponentsInChildren<Renderer>(true); foreach (Renderer val in componentsInChildren) { if (val is ParticleSystemRenderer) { continue; } Material[] sharedMaterials = val.sharedMaterials; bool flag = false; for (int j = 0; j < sharedMaterials.Length; j++) { if (!((Object)sharedMaterials[j] == (Object)null)) { Material val2 = new Material(sharedMaterials[j]); if (val2.HasProperty("_Color")) { Color color = val2.color; val2.color = new Color(tint.r, tint.g, tint.b, color.a); } if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", tint * 8f); } if (val2.HasProperty("_TintColor")) { val2.SetColor("_TintColor", new Color(tint.r, tint.g, tint.b, 0.5f)); } sharedMaterials[j] = val2; flag = true; } } if (flag) { val.sharedMaterials = sharedMaterials; } } ParticleSystem[] componentsInChildren2 = go.GetComponentsInChildren<ParticleSystem>(true); foreach (ParticleSystem obj in componentsInChildren2) { MainModule main = obj.main; EmissionModule emission = obj.emission; ((EmissionModule)(ref emission)).rateOverTimeMultiplier = ((EmissionModule)(ref emission)).rateOverTimeMultiplier * 0.5f; ((EmissionModule)(ref emission)).rateOverDistanceMultiplier = ((EmissionModule)(ref emission)).rateOverDistanceMultiplier * 0.5f; ((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * 0.6f; MinMaxGradient startColor = ((MainModule)(ref main)).startColor; Color color2 = ((MinMaxGradient)(ref startColor)).color; ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(tint.r, tint.g, tint.b, color2.a)); } } } [HarmonyPatch(typeof(ZNetScene), "Awake")] internal static class MonsterDB { private static readonly FieldInfo s_namedPrefabsField = AccessTools.Field(typeof(ZNetScene), "m_namedPrefabs"); private static readonly GameObject[] s_variants = (GameObject[])(object)new GameObject[5]; [HarmonyPostfix] public static void Postfix(ZNetScene __instance) { if (!(s_namedPrefabsField.GetValue(__instance) is Dictionary<int, GameObject> namedPrefabs)) { Plugin.Log.LogError((object)"[MonsterDB] m_namedPrefabs 접근 실패"); return; } for (int i = 0; i < 5; i++) { RegisterVariant(__instance, namedPrefabs, i); } } private static void RegisterVariant(ZNetScene zns, Dictionary<int, GameObject> namedPrefabs, int idx) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Expected O, but got Unknown //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Expected O, but got Unknown //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) string text = MiniBonemassVariants.Names[idx]; Color tint = MiniBonemassVariants.Colors[idx]; if ((Object)zns.GetPrefab(text) != (Object)null) { return; } if ((Object)s_variants[idx] != (Object)null) { zns.m_prefabs.Add(s_variants[idx]); namedPrefabs[StringExtensionMethods.GetStableHashCode(text)] = s_variants[idx]; Plugin.Log.LogInfo((object)("[MonsterDB] " + text + " 재등록")); return; } GameObject prefab = zns.GetPrefab("Bonemass"); if ((Object)prefab == (Object)null) { Plugin.Log.LogError((object)("[MonsterDB] Bonemass 프리팹 없음 — " + text + " 등록 실패")); return; } bool activeSelf = prefab.activeSelf; prefab.SetActive(false); GameObject val = Object.Instantiate<GameObject>(prefab); prefab.SetActive(activeSelf); ((Object)val).name = text; Object.DontDestroyOnLoad((Object)val); val.SetActive(false); Character component = prefab.GetComponent<Character>(); Character component2 = val.GetComponent<Character>(); if ((Object)component2 != (Object)null) { component2.m_boss = false; component2.m_bossEvent = ""; component2.m_runSpeed *= BonemassConfig.MiniSpeedMult.Value; component2.m_walkSpeed *= BonemassConfig.MiniSpeedMult.Value; component2.m_swimSpeed *= BonemassConfig.MiniSpeedMult.Value; if ((Object)component != (Object)null) { component2.m_health = Mathf.Max(component.m_health * BonemassConfig.MiniHPMult.Value, 1f); } } if ((Object)component2 != (Object)null) { DamageModifiers damageModifiers = component2.m_damageModifiers; damageModifiers.m_blunt = ParseModifier(BonemassConfig.MiniResistBlunt.Value, damageModifiers.m_blunt); damageModifiers.m_slash = ParseModifier(BonemassConfig.MiniResistSlash.Value, damageModifiers.m_slash); damageModifiers.m_pierce = ParseModifier(BonemassConfig.MiniResistPierce.Value, damageModifiers.m_pierce); damageModifiers.m_fire = ParseModifier(BonemassConfig.MiniResistFire.Value, damageModifiers.m_fire); damageModifiers.m_frost = ParseModifier(BonemassConfig.MiniResistFrost.Value, damageModifiers.m_frost); damageModifiers.m_lightning = ParseModifier(BonemassConfig.MiniResistLightning.Value, damageModifiers.m_lightning); damageModifiers.m_poison = ParseModifier(BonemassConfig.MiniResistPoison.Value, damageModifiers.m_poison); damageModifiers.m_spirit = ParseModifier(BonemassConfig.MiniResistSpirit.Value, damageModifiers.m_spirit); component2.m_damageModifiers = damageModifiers; } ZNetView component3 = val.GetComponent<ZNetView>(); if ((Object)component3 != (Object)null) { component3.m_persistent = false; } MonsterAI component4 = val.GetComponent<MonsterAI>(); if ((Object)component4 != (Object)null && BonemassConfig.MiniAttackIntervalMult.Value != 1f) { component4.m_minAttackInterval *= BonemassConfig.MiniAttackIntervalMult.Value; } CharacterDrop component5 = val.GetComponent<CharacterDrop>(); if ((Object)component5 != (Object)null) { component5.m_drops.Clear(); } ApplyTint(val, tint); val.transform.localScale = Vector3.one * 0.3f; zns.m_prefabs.Add(val); namedPrefabs[StringExtensionMethods.GetStableHashCode(text)] = val; s_variants[idx] = val; Plugin.Log.LogInfo((object)("[MonsterDB] " + text + " 등록 완료 — " + $"HP {component2?.m_health:F0} / 보스 플래그 OFF")); } private static DamageModifier ParseModifier(string value, DamageModifier original) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrEmpty(value) || value == "Inherit") { return original; } if (Enum.TryParse<DamageModifier>(value, out DamageModifier result)) { return result; } Plugin.Log.LogWarning((object)("[MonsterDB] 알 수 없는 저항값 '" + value + "' → Inherit 처리")); return original; } private static void ApplyTint(GameObject go, Color tint) { //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due t