Updated createRandomLoot()
to make use of rewardItemBlacklist
black list
This commit is contained in:
parent
bf276c54a0
commit
7891db84de
@ -50,10 +50,17 @@ export class LootGenerator
|
|||||||
const itemTypeCounts = this.initItemLimitCounter(options.itemLimits);
|
const itemTypeCounts = this.initItemLimitCounter(options.itemLimits);
|
||||||
|
|
||||||
const itemsDb = this.databaseService.getItems();
|
const itemsDb = this.databaseService.getItems();
|
||||||
const itemBlacklist = new Set<string>([
|
let itemBlacklist = new Set<string>([
|
||||||
...this.itemFilterService.getBlacklistedItems(),
|
...this.itemFilterService.getBlacklistedItems(),
|
||||||
...options.itemBlacklist,
|
...options.itemBlacklist,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (options.useRewarditemBlacklist)
|
||||||
|
{
|
||||||
|
const itemsToAdd = this.itemFilterService.getItemRewardBlacklist();
|
||||||
|
itemBlacklist = new Set([...itemBlacklist, ...itemsToAdd]);
|
||||||
|
}
|
||||||
|
|
||||||
if (!options.allowBossItems)
|
if (!options.allowBossItems)
|
||||||
{
|
{
|
||||||
for (const bossItem of this.itemFilterService.getBossItems())
|
for (const bossItem of this.itemFilterService.getBossItems())
|
||||||
|
@ -13,4 +13,5 @@ export interface LootRequest
|
|||||||
itemStackLimits: Record<string, MinMax>
|
itemStackLimits: Record<string, MinMax>
|
||||||
armorLevelWhitelist: number[]
|
armorLevelWhitelist: number[]
|
||||||
allowBossItems: boolean
|
allowBossItems: boolean
|
||||||
|
useRewarditemBlacklist?: boolean
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user