diff --git a/Maple2.File.Parser/ItemOptionParser.cs b/Maple2.File.Parser/ItemOptionParser.cs index 681fbdd..f784114 100644 --- a/Maple2.File.Parser/ItemOptionParser.cs +++ b/Maple2.File.Parser/ItemOptionParser.cs @@ -2,6 +2,7 @@ using System.Xml; using System.Xml.Serialization; using Maple2.File.IO; +using Maple2.File.IO.Crypto.Common; using Maple2.File.Parser.Tools; using Maple2.File.Parser.Xml; using Maple2.File.Parser.Xml.Table; @@ -9,17 +10,6 @@ namespace Maple2.File.Parser; public class ItemOptionParser { - private readonly string[] constantSuffix = [ - "equip", - "equip_fighter", - "equip_pet", - "equip_s2", - "equipmanual", - "etc", - "gemstone", - "mergematerial", - "skin", - ]; private readonly string[] randomSuffix = [ "12", "13", @@ -114,9 +104,8 @@ public ItemOptionParser(M2dReader xmlReader) { } public IEnumerable ParseConstant() { - foreach (string suffix in constantSuffix) { - string filename = $"itemoption/constant/itemoptionconstant_{suffix}.xml"; - string xml = Sanitizer.RemoveEmpty(xmlReader.GetString(xmlReader.GetEntry(filename))); + foreach (PackFileEntry entry in xmlReader.Files.Where(entry => entry.Name.StartsWith("itemoption/constant/itemoptionconstant_"))) { + string xml = Sanitizer.RemoveEmpty(xmlReader.GetString(entry)); var reader = XmlReader.Create(new StringReader(xml)); var root = itemOptionConstantSerializer.Deserialize(reader) as ItemOptionConstantRoot; Debug.Assert(root != null); diff --git a/Maple2.File.Parser/Maple2.File.Parser.csproj b/Maple2.File.Parser/Maple2.File.Parser.csproj index b9dd719..ca4bb7a 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.18 + 2.4.20 net8.0 README.md enable diff --git a/Maple2.File.Parser/Xml/Map/MapXBlock.cs b/Maple2.File.Parser/Xml/Map/MapXBlock.cs index fcf25d9..82cbe89 100644 --- a/Maple2.File.Parser/Xml/Map/MapXBlock.cs +++ b/Maple2.File.Parser/Xml/Map/MapXBlock.cs @@ -1,4 +1,4 @@ -using System.Numerics; +using System.Numerics; using System.Xml.Serialization; using M2dXmlGenerator;