Skip to content

Commit

Permalink
Merge pull request #4079 from wowsims/apl
Browse files Browse the repository at this point in the history
Filter out JC gems when JC is not selected
  • Loading branch information
jimmyt857 authored Dec 6, 2023
2 parents c1a8226 + e50ef60 commit dfaf1cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/core/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1303,8 +1303,12 @@ export class Player<SpecType extends Spec> {
filterGemData<T>(gemData: Array<T>, getGemFunc: (val: T) => Gem, slot: ItemSlot, socketColor: GemColor): Array<T> {
const filters = this.sim.getFilters();

const isJewelcrafting = this.hasProfession(Profession.Jewelcrafting);
return gemData.filter(gemElem => {
const gem = getGemFunc(gemElem);
if (!isJewelcrafting && gem.requiredProfession == Profession.Jewelcrafting) {
return false;
}

if (filters.matchingGemsOnly && !gemMatchesSocket(gem, socketColor)) {
return false;
Expand Down

0 comments on commit dfaf1cf

Please sign in to comment.