diff --git a/BossMod/Config/ConfigRoot.cs b/BossMod/Config/ConfigRoot.cs index 77d525e19f..ee472f6f28 100644 --- a/BossMod/Config/ConfigRoot.cs +++ b/BossMod/Config/ConfigRoot.cs @@ -6,7 +6,7 @@ namespace BossMod; public class ConfigRoot { - private const int _version = 8; + private const int _version = 9; public Event Modified = new(); private readonly Dictionary _nodes = []; @@ -298,7 +298,8 @@ private static JObject ConvertConfig(JObject payload, int version) amConfig["GTMode"] = autorotConfig?["GTMode"] ?? "Manual"; } // v8: remove accidentally serializable Modified field - if (version < 8) + // v9: and again the same thing... + if (version < 9) { foreach (var (_, config) in payload) { diff --git a/BossMod/Config/CooldownPlanningConfigNode.cs b/BossMod/Config/CooldownPlanningConfigNode.cs index 369a5179af..7d5231633e 100644 --- a/BossMod/Config/CooldownPlanningConfigNode.cs +++ b/BossMod/Config/CooldownPlanningConfigNode.cs @@ -1,6 +1,7 @@ using ImGuiNET; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using System.Reflection; namespace BossMod; @@ -153,7 +154,7 @@ public override JObject Serialize(JsonSerializer ser) { var baseType = typeof(CooldownPlanningConfigNode); JObject res = []; - foreach (var f in GetType().GetFields().Where(f => f.DeclaringType != baseType)) + foreach (var f in GetType().GetFields().Where(f => f.DeclaringType != baseType && f.GetCustomAttribute() == null)) { var v = f.GetValue(this); if (v != null)