Skip to content

Commit

Permalink
Merge pull request #41 from wowsims/WFFix
Browse files Browse the repository at this point in the history
Fixes WF
  • Loading branch information
ericbtaylorjr authored Dec 19, 2024
2 parents d5239d0 + 1f74a68 commit 1b6da5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 2 additions & 5 deletions ui/core/components/individual_sim_ui/consumes_picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ export class ConsumesPicker extends Component {
const potionsOptions = ConsumablesInputs.makePotionsInput(relevantStatOptions(ConsumablesInputs.POTIONS_CONFIG, this.simUI), 'Potions');
const conjuredOptions = ConsumablesInputs.makeConjuredInput(relevantStatOptions(ConsumablesInputs.CONJURED_CONFIG, this.simUI));

const pickers = [
buildIconInput(potionsElem, this.simUI.player, potionsOptions),
buildIconInput(potionsElem, this.simUI.player, conjuredOptions),
];
const pickers = [buildIconInput(potionsElem, this.simUI.player, potionsOptions), buildIconInput(potionsElem, this.simUI.player, conjuredOptions)];

TypedEvent.onAny([this.simUI.player.professionChangeEmitter]).on(() => this.updateRow(row, pickers));
this.updateRow(row, pickers);
Expand Down Expand Up @@ -95,7 +92,7 @@ export class ConsumesPicker extends Component {

const pickers = [buildIconInput(imbuesElem, this.simUI.player, mhImbueOptions), buildIconInput(imbuesElem, this.simUI.player, ohImbueOptions)];

TypedEvent.onAny([this.simUI.player.gearChangeEmitter]).on(() => this.updateRow(row, pickers));
TypedEvent.onAny([this.simUI.player.gearChangeEmitter, this.simUI.player.raceChangeEmitter]).on(() => this.updateRow(row, pickers));
this.updateRow(row, pickers);
}

Expand Down
3 changes: 2 additions & 1 deletion ui/core/components/inputs/consumables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ function makeConsumeInputFactory<T extends number>(
),
equals: (a: T, b: T) => a == b,
zeroValue: 0 as T,
changedEvent: (player: Player<any>) => TypedEvent.onAny([player.consumesChangeEmitter, player.gearChangeEmitter, player.professionChangeEmitter]),
changedEvent: (player: Player<any>) =>
TypedEvent.onAny([player.consumesChangeEmitter, player.gearChangeEmitter, player.professionChangeEmitter, player.raceChangeEmitter]),
showWhen: (player: Player<any>) => !args.showWhen || args.showWhen(player),
getValue: (player: Player<any>) => player.getConsumes()[args.consumesFieldName] as T,
setValue: (eventID: EventID, player: Player<any>, newValue: number) => {
Expand Down
4 changes: 2 additions & 2 deletions ui/core/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,8 @@ export class Player<SpecType extends Spec> {
}
}

for(const zoneName in RaidFilterOption) {
const zoneId = parseInt(RaidFilterOption[zoneName])
for (const zoneName in RaidFilterOption) {
const zoneId = parseInt(RaidFilterOption[zoneName]);
if (!filters.sources.includes(SourceFilterOption.SourceRaid) || !filters.raids.includes(zoneId)) {
itemData = filterItems(
itemData,
Expand Down

0 comments on commit 1b6da5c

Please sign in to comment.