Show xp globe goal only if goal > current xp

Closes #7066

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2019-01-28 22:03:44 +01:00
parent b671b4cd4e
commit 91f34d74d9

View File

@@ -175,6 +175,11 @@ public class XpGlobesOverlay extends Overlay
private void drawProgressLabel(Graphics2D graphics, XpGlobe globe, int startXp, int goalXp, int x, int y) private void drawProgressLabel(Graphics2D graphics, XpGlobe globe, int startXp, int goalXp, int x, int y)
{ {
if (goalXp <= globe.getCurrentXp())
{
return;
}
// Convert to int just to limit the decimal cases // Convert to int just to limit the decimal cases
String progress = (int) (getSkillProgress(startXp, globe.getCurrentXp(), goalXp)) + "%"; String progress = (int) (getSkillProgress(startXp, globe.getCurrentXp(), goalXp)) + "%";
@@ -254,7 +259,7 @@ public class XpGlobesOverlay extends Overlay
.right(skillCurrentXp) .right(skillCurrentXp)
.build()); .build());
if (goalXp != -1) if (goalXp > mouseOverSkill.getCurrentXp())
{ {
XpActionType xpActionType = xpTrackerService.getActionType(mouseOverSkill.getSkill()); XpActionType xpActionType = xpTrackerService.getActionType(mouseOverSkill.getSkill());