Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes WF #41

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading