From 70585f6f13d74fbb7f2fe5dccaeb16c8ac49218e Mon Sep 17 00:00:00 2001 From: Zin <62830952+Zintixx@users.noreply.github.com> Date: Mon, 23 Nov 2026 21:01:52 -0800 Subject: [PATCH 1/2] Parse step and partLimit on server itemMergeOptionBase slots The client table nests slots under , but the server file has no such level, so a slot now names its step in a step attribute (default 1, which is what every retail row is). partLimit was already present on the 370300xx/370400xx rows and was dropped by the type. Co-Authored-By: Claude Opus 5.5 --- Maple2.File.Parser/Maple2.File.Parser.csproj | 2 +- .../Xml/Table/Server/ItemMergeOption.cs | 5 +++++ Maple2.File.Tests/ServerTableParserTest.cs | 11 ++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Maple2.File.Parser/Maple2.File.Parser.csproj b/Maple2.File.Parser/Maple2.File.Parser.csproj index 93fe19a..52a95c7 100644 --- a/Maple2.File.Parser/Maple2.File.Parser.csproj +++ b/Maple2.File.Parser/Maple2.File.Parser.csproj @@ -13,7 +13,7 @@ MapleStory2, File, Parser, m2d, xml true - 2.4.39 + 2.4.40 net8.0 README.md enable diff --git a/Maple2.File.Parser/Xml/Table/Server/ItemMergeOption.cs b/Maple2.File.Parser/Xml/Table/Server/ItemMergeOption.cs index 824b1b6..1998d89 100644 --- a/Maple2.File.Parser/Xml/Table/Server/ItemMergeOption.cs +++ b/Maple2.File.Parser/Xml/Table/Server/ItemMergeOption.cs @@ -16,6 +16,11 @@ public partial class MergeOption { public partial class Slot { [XmlAttribute] public int part = 1; + // The client table nests slots under ; the server file has no such + // level, so a slot names its step here. Retail rows carry none and are all step 1. + [XmlAttribute] public int step = 1; + // Some tables (the 370300xx/370400xx crystals) list their slots here instead of in part. + [M2dArray] public int[] partLimit = Array.Empty(); [XmlAttribute] public long consumeMeso; [M2dArray] public string[] itemMaterial1 = Array.Empty(); [M2dArray] public string[] itemMaterial2 = Array.Empty(); diff --git a/Maple2.File.Tests/ServerTableParserTest.cs b/Maple2.File.Tests/ServerTableParserTest.cs index 3289ebc..061eab8 100644 --- a/Maple2.File.Tests/ServerTableParserTest.cs +++ b/Maple2.File.Tests/ServerTableParserTest.cs @@ -481,9 +481,14 @@ public void TestUnlimitedEnchantOption() { public void TestItemMergeOption() { var parser = new ServerTableParser(TestUtils.ServerReader); - foreach ((_, _) in parser.ParseItemMergeOption()) { - continue; - } + var options = parser.ParseItemMergeOption().ToDictionary(entry => entry.Id, entry => entry.MergeOption); + + // Retail rows name no step, so every slot falls back to step 1. + Assert.IsTrue(options.Values.SelectMany(option => option.slot).All(slot => slot.step == 1)); + + // 37030001 addresses its slots by partLimit="13,14,15,16,17" and carries no part. + var chaos = options[37030001].slot.Single(); + CollectionAssert.AreEqual(new[] { 13, 14, 15, 16, 17 }, chaos.partLimit); } [TestMethod] From 1fef2ad62a5e33b647c008d29506b67fc66947dd Mon Sep 17 00:00:00 2001 From: Zin <62830952+Zintixx@users.noreply.github.com> Date: Mon, 23 Nov 2026 21:52:10 -0800 Subject: [PATCH 2/2] Drop the all-step-1 assertion from TestItemMergeOption Edited archives may give a slot a higher step, so the shipped data being all step 1 is not something the parser test should pin. Co-Authored-By: Claude Opus 5.5 --- Maple2.File.Tests/ServerTableParserTest.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Maple2.File.Tests/ServerTableParserTest.cs b/Maple2.File.Tests/ServerTableParserTest.cs index 061eab8..2ce4f7f 100644 --- a/Maple2.File.Tests/ServerTableParserTest.cs +++ b/Maple2.File.Tests/ServerTableParserTest.cs @@ -483,9 +483,6 @@ public void TestItemMergeOption() { var options = parser.ParseItemMergeOption().ToDictionary(entry => entry.Id, entry => entry.MergeOption); - // Retail rows name no step, so every slot falls back to step 1. - Assert.IsTrue(options.Values.SelectMany(option => option.slot).All(slot => slot.step == 1)); - // 37030001 addresses its slots by partLimit="13,14,15,16,17" and carries no part. var chaos = options[37030001].slot.Single(); CollectionAssert.AreEqual(new[] { 13, 14, 15, 16, 17 }, chaos.partLimit);