Skip to content

Commit

Permalink
make renown reputation scale based on percentage
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdekrieger committed Jan 28, 2023
1 parent a5b41ce commit 52b8b4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/api/reputations.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function parseFactions(all_factions, my_reputations) {
// If it's a faction with renown such as Dragonflight factions
if (faction.maxRenown) {
f.levels = maxRenownToLevels(faction.maxRenown);
f.renown = true;
}

var stand = standing[faction.id];
Expand Down
4 changes: 3 additions & 1 deletion src/components/ReputationRow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
return levelColors[
Math.max(
0,
levelColors.length - (faction.levels.length - level)
faction.renown ?
Math.floor((level / faction.levels.length) * (levelColors.length - 1)) :
levelColors.length - (faction.levels.length - level)
)
];
}
Expand Down

0 comments on commit 52b8b4e

Please sign in to comment.