From d44bda96cf15e4deee6974d39d48cf95403e7996 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 15 Oct 2023 10:43:27 +0100 Subject: [PATCH] make use of `isbaseclasses` to check for bad items instead of a non-optimal loop --- project/src/generators/RepeatableQuestGenerator.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index 7d144047..0127835a 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -918,12 +918,9 @@ export class RepeatableQuestGenerator } // Item has blacklisted base type - for (const baseType of repeatableQuestConfig.rewardBaseTypeBlacklist) + if (this.itemHelper.isOfBaseclasses(tpl, [...repeatableQuestConfig.rewardBaseTypeBlacklist])) { - if (this.itemHelper.isOfBaseclass(tpl, baseType)) - { - return false; - } + return false; } if (this.itemHelper.isOfBaseclasses(tpl, [BaseClasses.DOG_TAG_USEC, BaseClasses.DOG_TAG_BEAR, BaseClasses.MOUNT, BaseClasses.KEY, BaseClasses.ARMBAND]))