Add xp per hour to xp globes mouse-over tooltip
This commit is contained in:
@@ -263,6 +263,10 @@ public class XpGlobesOverlay extends Overlay
|
||||
.right(skillXpToLvl)
|
||||
.build());
|
||||
|
||||
int xpHr = xpTrackerService.getXpHr(mouseOverSkill.getSkill());
|
||||
String xpHrString = decimalFormat.format(xpHr);
|
||||
lines.add(new PanelComponent.Line("Xp per hour:", Color.ORANGE, xpHrString, Color.WHITE));
|
||||
|
||||
//Create progress bar for skill.
|
||||
ProgressBarComponent progressBar = new ProgressBarComponent();
|
||||
double progress = mouseOverSkill.getSkillProgress(Experience.getXpForLevel(mouseOverSkill.getCurrentLevel()),
|
||||
|
||||
@@ -48,4 +48,11 @@ public interface XpTrackerService
|
||||
* @return
|
||||
*/
|
||||
int getActionsLeft(Skill skill);
|
||||
|
||||
/**
|
||||
* Get the amount of xp per hour
|
||||
* @param skill
|
||||
* @return
|
||||
*/
|
||||
int getXpHr(Skill skill);
|
||||
}
|
||||
|
||||
@@ -56,4 +56,10 @@ class XpTrackerServiceImpl implements XpTrackerService
|
||||
{
|
||||
return plugin.getSkillSnapshot(skill).getActionsRemainingToGoal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getXpHr(Skill skill)
|
||||
{
|
||||
return plugin.getSkillSnapshot(skill).getXpPerHour();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user