Updated createRandomLoot() to make use of rewardItemBlacklist black list

This commit is contained in:
Dev 2024-06-20 13:37:38 +01:00
parent bf276c54a0
commit 7891db84de
2 changed files with 9 additions and 1 deletions

View File

@ -50,10 +50,17 @@ export class LootGenerator
const itemTypeCounts = this.initItemLimitCounter(options.itemLimits);
const itemsDb = this.databaseService.getItems();
const itemBlacklist = new Set<string>([
let itemBlacklist = new Set<string>([
...this.itemFilterService.getBlacklistedItems(),
...options.itemBlacklist,
]);
if (options.useRewarditemBlacklist)
{
const itemsToAdd = this.itemFilterService.getItemRewardBlacklist();
itemBlacklist = new Set([...itemBlacklist, ...itemsToAdd]);
}
if (!options.allowBossItems)
{
for (const bossItem of this.itemFilterService.getBossItems())

View File

@ -13,4 +13,5 @@ export interface LootRequest
itemStackLimits: Record<string, MinMax>
armorLevelWhitelist: number[]
allowBossItems: boolean
useRewarditemBlacklist?: boolean
}