aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorefefury <69400149+efefury@users.noreply.github.com>2023-03-18 15:04:01 +0000
committerGitHub <noreply@github.com>2023-03-18 16:04:01 +0100
commit5763a1749196e8ea4afd519f268ce59e2727f1f0 (patch)
treeec822ffda044c9c28d3d6a377dd6c3380c37e039
parent941525e2ec5d42e098f364ddeafcfced87df5918 (diff)
downloadNotEnoughUpdates-5763a1749196e8ea4afd519f268ce59e2727f1f0.tar.gz
NotEnoughUpdates-5763a1749196e8ea4afd519f268ce59e2727f1f0.tar.bz2
NotEnoughUpdates-5763a1749196e8ea4afd519f268ce59e2727f1f0.zip
Profile Viewer fix class average counting classes above 50 (#666)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java2
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;
}