Remove 'Actions left' and 'Xp per hour' from Xp Globes when Xp Tracker is disabled

This commit is contained in:
Marshall Briggs
2018-06-08 12:04:37 -07:00
committed by Adam
parent 5663baea30
commit 5f5b75da06
2 changed files with 19 additions and 12 deletions

View File

@@ -248,12 +248,15 @@ public class XpGlobesOverlay extends Overlay
if (mouseOverSkill.getGoalXp() != -1)
{
int actionsLeft = xpTrackerService.getActionsLeft(mouseOverSkill.getSkill());
String actionsLeftString = decimalFormat.format(actionsLeft);
xpTooltip.getChildren().add(LineComponent.builder()
.left("Actions left:")
.leftColor(Color.ORANGE)
.right(actionsLeftString)
.build());
if (actionsLeft != Integer.MAX_VALUE)
{
String actionsLeftString = decimalFormat.format(actionsLeft);
xpTooltip.getChildren().add(LineComponent.builder()
.left("Actions left:")
.leftColor(Color.ORANGE)
.right(actionsLeftString)
.build());
}
int xpLeft = mouseOverSkill.getGoalXp() - mouseOverSkill.getCurrentXp();
String skillXpToLvl = decimalFormat.format(xpLeft);
@@ -264,12 +267,15 @@ public class XpGlobesOverlay extends Overlay
.build());
int xpHr = xpTrackerService.getXpHr(mouseOverSkill.getSkill());
String xpHrString = decimalFormat.format(xpHr);
xpTooltip.getChildren().add(LineComponent.builder()
.left("Xp per hour:")
.leftColor(Color.ORANGE)
.right(xpHrString)
.build());
if (xpHr != 0)
{
String xpHrString = decimalFormat.format(xpHr);
xpTooltip.getChildren().add(LineComponent.builder()
.left("Xp per hour:")
.leftColor(Color.ORANGE)
.right(xpHrString)
.build());
}
//Create progress bar for skill.
ProgressBarComponent progressBar = new ProgressBarComponent();

View File

@@ -129,6 +129,7 @@ public class XpTrackerPlugin extends Plugin
@Override
protected void shutDown() throws Exception
{
xpState.reset();
pluginToolbar.removeNavigation(navButton);
}