mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2025-12-14 03:55:42 +00:00
Fix for exceptional white items
Co-authored-by: Jason <badxnameless@gmail.com>
This commit is contained in:
@@ -56,6 +56,7 @@ interface ParserState extends ParsedItem {
|
||||
const parsers: Array<ParserFn | { virtual: VirtualParserFn }> = [
|
||||
parseUnidentified,
|
||||
{ virtual: parseSuperior },
|
||||
{ virtual: parseExceptional },
|
||||
parseSynthesised,
|
||||
parseCategoryByHelpText,
|
||||
{ virtual: normalizeName },
|
||||
@@ -1232,6 +1233,19 @@ function parseSuperior(item: ParserState) {
|
||||
}
|
||||
}
|
||||
|
||||
function parseExceptional(item: ParserState) {
|
||||
if (
|
||||
item.rarity === ItemRarity.Normal ||
|
||||
(item.rarity === ItemRarity.Magic && item.isUnidentified) ||
|
||||
(item.rarity === ItemRarity.Rare && item.isUnidentified) ||
|
||||
(item.rarity === ItemRarity.Unique && item.isUnidentified)
|
||||
) {
|
||||
if (_$.ITEM_EXCEPTIONAL.test(item.name)) {
|
||||
item.name = _$REF.ITEM_EXCEPTIONAL.exec(item.name)![1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseCategoryByHelpText(section: string[], item: ParsedItem) {
|
||||
if (section[0] === _$.BEAST_HELP) {
|
||||
item.category = ItemCategory.CapturedBeast;
|
||||
|
||||
Reference in New Issue
Block a user