make use of isbaseclasses to check for bad items instead of a non-optimal loop

This commit is contained in:
Dev 2023-10-15 10:43:27 +01:00
parent fdd328b07a
commit d44bda96cf

View File

@ -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]))