Fix level 126 next goal to be max XP (200,000,000) instead of -1 xp
This commit is contained in:
@@ -40,6 +40,7 @@ public class Experience
|
||||
* The maximum virtual skill level for any skill (200M experience).
|
||||
*/
|
||||
public static final int MAX_VIRT_LEVEL = 126;
|
||||
public static final int MAX_SKILL_XP = 200_000_000;
|
||||
|
||||
/**
|
||||
* The total experience required for each skill level.
|
||||
|
||||
@@ -41,6 +41,7 @@ import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Experience;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.client.game.SkillIconManager;
|
||||
import net.runelite.client.ui.ColorScheme;
|
||||
@@ -200,7 +201,9 @@ class XpInfoBox extends JPanel
|
||||
progressBar.setValue(xpSnapshotSingle.getSkillProgressToGoal());
|
||||
progressBar.setCenterLabel(xpSnapshotSingle.getSkillProgressToGoal() + "%");
|
||||
progressBar.setLeftLabel("Lvl. " + xpSnapshotSingle.getStartLevel());
|
||||
progressBar.setRightLabel("Lvl. " + xpSnapshotSingle.getEndLevel());
|
||||
progressBar.setRightLabel(xpSnapshotSingle.getEndGoalXp() == Experience.MAX_SKILL_XP
|
||||
? "200M"
|
||||
: "Lvl. " + xpSnapshotSingle.getEndLevel());
|
||||
|
||||
progressBar.setToolTipText(String.format(
|
||||
HTML_TOOL_TIP_TEMPLATE,
|
||||
|
||||
@@ -33,6 +33,8 @@ class XpSnapshotSingle
|
||||
{
|
||||
private int startLevel;
|
||||
private int endLevel;
|
||||
private int startGoalXp;
|
||||
private int endGoalXp;
|
||||
private int xpGainedInSession;
|
||||
private int xpRemainingToGoal;
|
||||
private int xpPerHour;
|
||||
|
||||
@@ -220,7 +220,9 @@ class XpStateSingle
|
||||
if (goalEndXp <= 0 || currentXp > goalEndXp)
|
||||
{
|
||||
int currentLevel = Experience.getLevelForXp(currentXp);
|
||||
endLevelExp = currentLevel + 1 <= Experience.MAX_VIRT_LEVEL ? Experience.getXpForLevel(currentLevel + 1) : -1;
|
||||
endLevelExp = currentLevel + 1 <= Experience.MAX_VIRT_LEVEL
|
||||
? Experience.getXpForLevel(currentLevel + 1)
|
||||
: Experience.MAX_SKILL_XP;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -248,6 +250,8 @@ class XpStateSingle
|
||||
.actionsRemainingToGoal(getActionsRemaining())
|
||||
.actionsPerHour(getActionsHr())
|
||||
.timeTillGoal(getTimeTillLevel())
|
||||
.startGoalXp(startLevelExp)
|
||||
.endGoalXp(endLevelExp)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user