diff --git a/ui/core/components/suggest_reforges_action.tsx b/ui/core/components/suggest_reforges_action.tsx index a7c50d6309..2e1a22b410 100644 --- a/ui/core/components/suggest_reforges_action.tsx +++ b/ui/core/components/suggest_reforges_action.tsx @@ -9,7 +9,7 @@ import { Player } from '../player'; import { Class, ItemSlot, Spec, Stat } from '../proto/common'; import { StatCapConfig, StatCapType } from '../proto/ui'; import { Gear } from '../proto_utils/gear'; -import { getClassStatName } from '../proto_utils/names'; +import { getClassStatName, statCapTypeNames } from '../proto_utils/names'; import { statPercentageOrPointsToNumber, Stats, statToPercentageOrPoints } from '../proto_utils/stats'; import { SpecTalents } from '../proto_utils/utils'; import { Sim } from '../sim'; @@ -150,9 +150,11 @@ export class ReforgeOptimizer { if (!!this.softCapsConfig?.length) tippy(startReforgeOptimizationButton, { + theme: 'suggest-reforges-softcaps', content: this.buildReforgeButtonTooltip(), placement: 'bottom', maxWidth: 310, + interactive: true, }); tippy(contextMenuButton, { @@ -201,8 +203,45 @@ export class ReforgeOptimizer { buildReforgeButtonTooltip() { return ( <> - The following soft caps / breakpoints have been implemented for this spec: - +

The following breakpoints have been implemented for this spec:

+ + + {this.softCapsConfig?.map(({ stat, breakpoints, capType, postCapEPs }, index) => ( + <> + + + + + + + + + + {breakpoints.map((breakpoint, breakpointIndex) => ( + + + + + + ))} + {index !== this.softCapsConfig.length - 1 && ( + <> + + + + + + + + )} + + ))} + +
{getClassStatName(stat, this.player.getClass())}{statCapTypeNames.get(capType)}
Rating + % + + Post cap EP +
{Math.round(breakpoint)}{statToPercentageOrPoints(stat, breakpoint, new Stats()).toFixed(2)}{postCapEPs[breakpointIndex]}
); } diff --git a/ui/core/proto_utils/names.ts b/ui/core/proto_utils/names.ts index d76873d0f3..cf3273f502 100644 --- a/ui/core/proto_utils/names.ts +++ b/ui/core/proto_utils/names.ts @@ -1,6 +1,6 @@ import { ResourceType } from '../proto/api.js'; import { ArmorType, Class, ItemSlot, Profession, PseudoStat, Race, RangedWeaponType, Spec, Stat, WeaponType } from '../proto/common.js'; -import { DungeonDifficulty, RaidFilterOption, RepFaction, RepLevel, SourceFilterOption } from '../proto/ui.js'; +import { DungeonDifficulty, RaidFilterOption, RepFaction, RepLevel, SourceFilterOption, StatCapType } from '../proto/ui.js'; export const armorTypeNames: Map = new Map([ [ArmorType.ArmorTypeUnknown, 'Unknown'], @@ -193,11 +193,7 @@ export const shortSecondaryStatNames: Map = new Map([ [Stat.StatParry, 'Parry'], ]); -export const pseudoStatOrder: Array = [ - PseudoStat.PseudoStatMainHandDps, - PseudoStat.PseudoStatOffHandDps, - PseudoStat.PseudoStatRangedDps, -]; +export const pseudoStatOrder: Array = [PseudoStat.PseudoStatMainHandDps, PseudoStat.PseudoStatOffHandDps, PseudoStat.PseudoStatRangedDps]; export const pseudoStatNames: Map = new Map([ [PseudoStat.PseudoStatMainHandDps, 'Main Hand DPS'], [PseudoStat.PseudoStatOffHandDps, 'Off Hand DPS'], @@ -338,8 +334,8 @@ export const REP_FACTION_NAMES: Record = { [RepFaction.RepFactionDragonmawClan]: 'Dragonmaw Clan', [RepFaction.RepFactionRamkahen]: 'Ramkahen', [RepFaction.RepFactionWildhammerClan]: 'Wildhammer Clan', - [RepFaction.RepFactionBaradinsWardens]: 'Baradin\'s Wardens', - [RepFaction.RepFactionHellscreamsReach]: 'Hellscream\'s Reach', + [RepFaction.RepFactionBaradinsWardens]: "Baradin's Wardens", + [RepFaction.RepFactionHellscreamsReach]: "Hellscream's Reach", [RepFaction.RepFactionAvengersOfHyjal]: 'Avengers of Hyjal', }; @@ -354,7 +350,7 @@ export const REP_FACTION_QUARTERMASTERS: Record = { [RepFaction.RepFactionBaradinsWardens]: 47328, [RepFaction.RepFactionHellscreamsReach]: 48531, [RepFaction.RepFactionAvengersOfHyjal]: 54401, -} +}; export const masterySpellNames: Map = new Map([ [Spec.SpecAssassinationRogue, 'Potent Poisons'], @@ -423,3 +419,8 @@ export const masterySpellIDs: Map = new Map([ [Spec.SpecDemonologyWarlock, 77219], [Spec.SpecDestructionWarlock, 77220], ]); +export const statCapTypeNames = new Map([ + [StatCapType.TypeHardCap, 'Hard cap'], + [StatCapType.TypeSoftCap, 'Soft cap'], + [StatCapType.TypeThreshold, 'Threshold'], +]); diff --git a/ui/core/proto_utils/stats.ts b/ui/core/proto_utils/stats.ts index 3fa0a9c6e8..84c409a243 100644 --- a/ui/core/proto_utils/stats.ts +++ b/ui/core/proto_utils/stats.ts @@ -1,5 +1,4 @@ import * as Mechanics from '../constants/mechanics.js'; -import { Player } from '../player'; import { Class, PseudoStat, Stat, UnitStats } from '../proto/common.js'; import { getEnumValues } from '../utils.js'; import { getClassStatName, pseudoStatNames } from './names.js'; diff --git a/ui/mage/fire/sim.ts b/ui/mage/fire/sim.ts index 0aadfa6b9f..04df1b32fb 100644 --- a/ui/mage/fire/sim.ts +++ b/ui/mage/fire/sim.ts @@ -93,7 +93,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecFireMage, { stat: Stat.StatSpellHaste, breakpoints, capType: StatCapType.TypeSoftCap, - postCapEPs: [0.96, 0.86, 0.77, 0.77, 1.17, 0.76, 0.65], + postCapEPs: [0.86, 0.77, 0.77, 1.17, 0.76, 0.65, 0.64], }; return [hasteSoftCapConfig]; diff --git a/ui/scss/core/components/_suggest_reforges_action.scss b/ui/scss/core/components/_suggest_reforges_action.scss index 10b410b7c7..ebfa553f4d 100644 --- a/ui/scss/core/components/_suggest_reforges_action.scss +++ b/ui/scss/core/components/_suggest_reforges_action.scss @@ -5,6 +5,11 @@ margin-bottom: 0; } } +.tippy-box[data-theme='suggest-reforges-softcaps'] { + max-height: 40vh; + overflow: auto; +} + .suggest-reforges-settings-group { --settings-button-width: 36px; position: relative;