Skip to content

Commit

Permalink
Merge pull request #10721 from FlaminSarge/dupeperks
Browse files Browse the repository at this point in the history
Make is:dupeperks avoid seeing different-class armor as dupeperks
  • Loading branch information
FlaminSarge authored Sep 9, 2024
2 parents 951df1f + b3e2aea commit afbddf5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/search/items/search-filters/dupes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,16 @@ const dupeFilters: ItemFilterDefinition[] = [
const duplicates = new Map<string, PerksSet>();
for (const i of allItems) {
if (i.sockets?.allSockets.some((s) => s.isPerk && s.socketDefinition.defaultVisible)) {
if (!duplicates.has(i.typeName)) {
duplicates.set(i.typeName, new PerksSet());
const dupeId = i.classType + i.type;
if (!duplicates.has(dupeId)) {
duplicates.set(dupeId, new PerksSet());
}
duplicates.get(i.typeName)!.insert(i);
duplicates.get(dupeId)!.insert(i);
}
}
return (item) =>
item.sockets?.allSockets.some((s) => s.isPerk && s.socketDefinition.defaultVisible) &&
Boolean(duplicates.get(item.typeName)?.hasPerkDupes(item));
Boolean(duplicates.get(item.classType + item.type)?.hasPerkDupes(item));
},
},
];
Expand Down

0 comments on commit afbddf5

Please sign in to comment.