diff --git a/proto/warrior.proto b/proto/warrior.proto index b0a56ad825..8886e52313 100644 --- a/proto/warrior.proto +++ b/proto/warrior.proto @@ -227,6 +227,7 @@ message Warrior { bool use_shattering_throw = 4; WarriorShout shout = 3; bool stance_snapshot = 6; + bool disable_expertise_gemming = 7; } Options options = 3; } diff --git a/ui/core/player.ts b/ui/core/player.ts index 4de592687f..e2fd163f7e 100644 --- a/ui/core/player.ts +++ b/ui/core/player.ts @@ -220,7 +220,6 @@ 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; @@ -254,7 +253,6 @@ 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'); @@ -297,7 +295,6 @@ export class Player { this.inFrontOfTargetChangeEmitter, this.distanceFromTargetChangeEmitter, this.healingModelChangeEmitter, - this.disableExpertiseGemmingChangeEmitter, this.epWeightsChangeEmitter, this.epRatiosChangeEmitter, this.epRefStatChangeEmitter, @@ -908,18 +905,6 @@ 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 0e176c5d68..f5e7f75a05 100644 --- a/ui/warrior/inputs.ts +++ b/ui/warrior/inputs.ts @@ -38,18 +38,6 @@ 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', @@ -57,6 +45,14 @@ export const StanceSnapshot = InputHelpers.makeSpecOptionsBooleanInput({ + fieldName: 'disableExpertiseGemming', + label: 'Disable expertise gemming', + labelTooltip: 'Disables auto gemming for expertise', +}); + export const ShoutPicker = InputHelpers.makeSpecOptionsEnumIconInput({ fieldName: 'shout', values: [ diff --git a/ui/warrior/presets.ts b/ui/warrior/presets.ts index 003ac7dae0..c93ea0affc 100644 --- a/ui/warrior/presets.ts +++ b/ui/warrior/presets.ts @@ -133,6 +133,7 @@ export const DefaultOptions = WarriorOptions.create({ startingRage: 0, useRecklessness: true, useShatteringThrow: true, + disableExpertiseGemming: false, shout: WarriorShout.WarriorShoutCommanding, }); diff --git a/ui/warrior/sim.ts b/ui/warrior/sim.ts index 04036061bd..54b0f0bf5f 100644 --- a/ui/warrior/sim.ts +++ b/ui/warrior/sim.ts @@ -212,7 +212,7 @@ export class WarriorSimUI extends IndividualSimUI { const redGemCaps = new Array<[number, Stats]>(); redGemCaps.push([40117, this.calcArpCap(optimizedGear)]); // Should we gem expertise? - const enableExpertiseGemming = !this.player.getDisableExpertiseGemming() + const enableExpertiseGemming = !this.player.getSpecOptions().disableExpertiseGemming const expCap = this.calcExpCap(); if(enableExpertiseGemming){ redGemCaps.push([40118, expCap]); @@ -238,6 +238,7 @@ export class WarriorSimUI extends IndividualSimUI { yellowGemCaps.push([40125, hitCap]); if(enableExpertiseGemming){ yellowGemCaps.push([40162, hitCap.add(expCap)]); + yellowGemCaps.push([40118, expCap]); } yellowGemCaps.push([40143, hitCap]); yellowGemCaps.push([40142, critCap]);