From 5763a1749196e8ea4afd519f268ce59e2727f1f0 Mon Sep 17 00:00:00 2001 From: efefury <69400149+efefury@users.noreply.github.com> Date: Sat, 18 Mar 2023 15:04:01 +0000 Subject: Profile Viewer fix class average counting classes above 50 (#666) --- .../io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') 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; } -- cgit