diff --git a/renderer/src/parser/Parser.ts b/renderer/src/parser/Parser.ts index 847e5ed9..baf1e174 100644 --- a/renderer/src/parser/Parser.ts +++ b/renderer/src/parser/Parser.ts @@ -70,6 +70,7 @@ const parsers: Array = [ parseArmour, parseWeapon, parseFlask, + parseJewelery, parseCharmSlots, parseSpirit, parsePriceNote, @@ -1068,6 +1069,24 @@ function parseFlask(section: string[], item: ParsedItem) { return isParsed; } +function parseJewelery(section: string[], item: ParsedItem) { + if ( + item.category !== ItemCategory.Amulet && + item.category !== ItemCategory.Ring && + item.category !== ItemCategory.Belt + ) { + return "PARSER_SKIPPED"; + } + + for (const line of section) { + if (line.startsWith(_$.QUALITY.substring(0, _$.QUALITY.indexOf(":")))) { + return "SECTION_PARSED"; + } + } + + return "SECTION_SKIPPED"; +} + function parseCharmSlots(section: string[], item: ParsedItem) { // the purpose of this parser is to "consume" charm slot 1 sections // so they are not recognized as modifiers