diff options
author | efefury <69400149+efefury@users.noreply.github.com> | 2023-03-18 15:04:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-18 16:04:01 +0100 |
commit | 5763a1749196e8ea4afd519f268ce59e2727f1f0 (patch) | |
tree | ec822ffda044c9c28d3d6a377dd6c3380c37e039 /src/main/java | |
parent | 941525e2ec5d42e098f364ddeafcfced87df5918 (diff) | |
download | NotEnoughUpdates-5763a1749196e8ea4afd519f268ce59e2727f1f0.tar.gz NotEnoughUpdates-5763a1749196e8ea4afd519f268ce59e2727f1f0.tar.bz2 NotEnoughUpdates-5763a1749196e8ea4afd519f268ce59e2727f1f0.zip |
Profile Viewer fix class average counting classes above 50 (#666)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java index 9d227daf..4b49d053 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java @@ -628,7 +628,7 @@ public class DungeonPage extends GuiProfileViewerPage { levelObjClasses.put(skillName, levelObj); } - classAverage.level = (float) (levelObjClasses.values().stream().mapToDouble(l -> l.level).sum() / 5); + classAverage.level = (float) (levelObjClasses.values().stream().mapToDouble(l -> Math.min(50, l.level)).sum() / 5); if (classAverage.level >= 50) { classAverage.maxed = true; } |