diff --git a/src/server/loaders.js b/src/server/loaders.js index c381483..8c3b819 100644 --- a/src/server/loaders.js +++ b/src/server/loaders.js @@ -278,8 +278,8 @@ const buildItemByNameLoader = (db, loaders) => const itemSearchKindConditions = { // NOTE: We assume that items cannot have NC rarity and the PB description, // so we don't bother to filter out PB items in the NC filter, for perf. - NC: `rarity_index IN (0, 500)`, - NP: `rarity_index NOT IN (0, 500) AND description NOT LIKE "%This item is part of a deluxe paint brush set!%"`, + NC: `rarity_index IN (0, 500) OR is_manually_nc = 1`, + NP: `rarity_index NOT IN (0, 500) AND is_manually_nc = 0 AND description NOT LIKE "%This item is part of a deluxe paint brush set!%"`, PB: `description LIKE "%This item is part of a deluxe paint brush set!%"`, }; diff --git a/src/server/types/Item.js b/src/server/types/Item.js index 7c0b41b..2205858 100644 --- a/src/server/types/Item.js +++ b/src/server/types/Item.js @@ -217,10 +217,11 @@ const resolvers = { const item = await itemLoader.load(id); return item.rarityIndex; }, - isNc: async ({ id, rarityIndex }, _, { itemLoader }) => { - if (rarityIndex != null) return rarityIndex === 500 || rarityIndex === 0; + isNc: async ({ id }, _, { itemLoader }) => { const item = await itemLoader.load(id); - return item.rarityIndex === 500 || item.rarityIndex === 0; + return ( + item.rarityIndex === 500 || item.rarityIndex === 0 || item.isManuallyNc + ); }, isPb: async ({ id }, _, { itemTranslationLoader }) => { const translation = await itemTranslationLoader.load(id);