Skip to content

Commit

Permalink
Display preset Reforge cap selections as % rather than Rating for
Browse files Browse the repository at this point in the history
clarity.

 On branch stats_refactor
 Changes to be committed:
	modified:   ui/core/components/suggest_reforges_action.tsx
  • Loading branch information
NerdEgghead committed Aug 16, 2024
1 parent 161576c commit dcefef7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui/core/components/suggest_reforges_action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,10 +525,12 @@ export class ReforgeOptimizer {
values: [
{ name: 'Select preset', value: 0 },
...[...statPresets.keys()].map(key => {
const rating = statPresets.get(key)!;
const ratingValue = statPresets.get(key)!;
const percentOrPointsValue = unitStat.convertRatingToPercent(ratingValue)!;
const percentValue = unitStat.equalsStat(Stat.StatMasteryRating) ? (percentOrPointsValue * this.player.getMasteryPerPointModifier()) : percentOrPointsValue;
return {
name: `${key} - ${rating}`,
value: rating,
name: `${key} - ${percentValue.toFixed(2)}%`,
value: ratingValue,
};
}),
].sort((a, b) => a.value - b.value),
Expand Down

0 comments on commit dcefef7

Please sign in to comment.