From a989ca821cf45dd3e44fb4da0a058fa99acaa615 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 1 May 2021 15:04:26 +0900 Subject: fix xps --- src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java index ed23cd7e..d06e0ccc 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java @@ -168,7 +168,7 @@ public class XPUtils { xpCalcResult.remainingXp = totalXp - totalXpEn.getKey(); } Map.Entry asdasd = catacombXp.ceilingEntry(totalXp); - xpCalcResult.nextLvXp = asdasd == null ? 0 : asdasd.getKey(); + xpCalcResult.nextLvXp = asdasd == null ? 0 : (asdasd.getKey() - (totalXpEn != null ? totalXpEn.getKey() : 0)); return xpCalcResult; } public static XPCalcResult getSkillXp(Skill skill, double totalXp) { @@ -184,7 +184,7 @@ public class XPUtils { xpCalcResult.remainingXp = totalXp - totalXpEn.getKey(); } Map.Entry asdasd = catacombXp.ceilingEntry(totalXp); - xpCalcResult.nextLvXp = asdasd == null ? 0 : asdasd.getKey(); + xpCalcResult.nextLvXp = asdasd == null ? 0 : (asdasd.getKey() - (totalXpEn != null ? totalXpEn.getKey() : 0)); return xpCalcResult; default: totalXpEn = skillXp.floorEntry(totalXp); @@ -197,7 +197,7 @@ public class XPUtils { xpCalcResult.remainingXp = totalXp - totalXpEn.getKey(); } asdasd = catacombXp.ceilingEntry(totalXp); - xpCalcResult.nextLvXp = asdasd == null ? 0 : asdasd.getKey(); + xpCalcResult.nextLvXp = asdasd == null ? 0 : (asdasd.getKey() - (totalXpEn != null ? totalXpEn.getKey() : 0)); return xpCalcResult; } } -- cgit