diff --git a/ui/core/player.ts b/ui/core/player.ts index e2fd163f7e..4de592687f 100644 --- a/ui/core/player.ts +++ b/ui/core/player.ts @@ -220,6 +220,7 @@ export class Player { private distanceFromTarget: number = 0; private healingModel: HealingModel = HealingModel.create(); private healingEnabled: boolean = false; + private disableExpertiseGemming: boolean = false; private autoRotationGenerator: AutoRotationGenerator | null = null; private simpleRotationGenerator: SimpleRotationGenerator | null = null; @@ -253,6 +254,7 @@ export class Player { readonly inFrontOfTargetChangeEmitter = new TypedEvent('PlayerInFrontOfTarget'); readonly distanceFromTargetChangeEmitter = new TypedEvent('PlayerDistanceFromTarget'); readonly healingModelChangeEmitter = new TypedEvent('PlayerHealingModel'); + readonly disableExpertiseGemmingChangeEmitter = new TypedEvent('DisableExpertiseGemming'); readonly epWeightsChangeEmitter = new TypedEvent('PlayerEpWeights'); readonly miscOptionsChangeEmitter = new TypedEvent('PlayerMiscOptions'); @@ -295,6 +297,7 @@ export class Player { this.inFrontOfTargetChangeEmitter, this.distanceFromTargetChangeEmitter, this.healingModelChangeEmitter, + this.disableExpertiseGemmingChangeEmitter, this.epWeightsChangeEmitter, this.epRatiosChangeEmitter, this.epRefStatChangeEmitter, @@ -905,6 +908,18 @@ export class Player { this.healingModelChangeEmitter.emit(eventID); } + getDisableExpertiseGemming(): boolean { + return this.disableExpertiseGemming; + } + + setDisableExpertiseGemming(eventID: EventID, newDisableExpertiseGemming: boolean) { + if (newDisableExpertiseGemming == this.disableExpertiseGemming) + return; + + this.disableExpertiseGemming = newDisableExpertiseGemming; + this.disableExpertiseGemmingChangeEmitter.emit(eventID); + } + computeStatsEP(stats?: Stats): number { if (stats == undefined) { return 0; diff --git a/ui/warrior/inputs.ts b/ui/warrior/inputs.ts index 98cab8f902..0e176c5d68 100644 --- a/ui/warrior/inputs.ts +++ b/ui/warrior/inputs.ts @@ -38,6 +38,19 @@ export const StartingRage = InputHelpers.makeSpecOptionsNumberInput) => player.disableExpertiseGemmingChangeEmitter, + getValue: (player: Player) => player.getDisableExpertiseGemming(), + setValue: (eventID: EventID, player: Player, newValue: boolean) => { + player.setDisableExpertiseGemming(eventID, newValue); + }, +}; + export const StanceSnapshot = InputHelpers.makeSpecOptionsBooleanInput({ fieldName: 'stanceSnapshot', label: 'Stance Snapshot', diff --git a/ui/warrior/sim.ts b/ui/warrior/sim.ts index f10754f070..04036061bd 100644 --- a/ui/warrior/sim.ts +++ b/ui/warrior/sim.ts @@ -147,6 +147,7 @@ export class WarriorSimUI extends IndividualSimUI { inputs: [ WarriorInputs.StartingRage, WarriorInputs.StanceSnapshot, + WarriorInputs.DisableExpertiseGemming, OtherInputs.TankAssignment, OtherInputs.InFrontOfTarget, ], @@ -210,8 +211,12 @@ export class WarriorSimUI extends IndividualSimUI { // Rank order red gems to use with their associated stat caps const redGemCaps = new Array<[number, Stats]>(); redGemCaps.push([40117, this.calcArpCap(optimizedGear)]); + // Should we gem expertise? + const enableExpertiseGemming = !this.player.getDisableExpertiseGemming() const expCap = this.calcExpCap(); - redGemCaps.push([40118, expCap]); + if(enableExpertiseGemming){ + redGemCaps.push([40118, expCap]); + } const critCap = this.calcCritCap(optimizedGear); redGemCaps.push([40111, new Stats()]); @@ -231,7 +236,9 @@ export class WarriorSimUI extends IndividualSimUI { const yellowGemCaps = new Array<[number, Stats]>(); const hitCap = new Stats().withStat(Stat.StatMeleeHit, 8. * 32.79 + 4); yellowGemCaps.push([40125, hitCap]); - yellowGemCaps.push([40162, hitCap.add(expCap)]); + if(enableExpertiseGemming){ + yellowGemCaps.push([40162, hitCap.add(expCap)]); + } yellowGemCaps.push([40143, hitCap]); yellowGemCaps.push([40142, critCap]); await this.fillGemsToCaps(optimizedGear, yellowSockets, yellowGemCaps, 0, 0);