[Not Recognized Modifier] - Quality (Attribute Modifiers): +20% (augmented) #186

This commit is contained in:
kvan7
2025-01-31 18:44:21 -06:00
parent d577fbab1a
commit 279138d830
+19
View File
@@ -70,6 +70,7 @@ const parsers: Array<ParserFn | { virtual: VirtualParserFn }> = [
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