hiscore panel: pass result to detailsHtml and remove reduncant null check
This commit is contained in:
@@ -474,7 +474,7 @@ public class HiscorePanel extends PluginPanel
|
||||
label.setText(Integer.toString(level));
|
||||
}
|
||||
|
||||
label.setToolTipText(detailsHtml(skill));
|
||||
label.setToolTipText(detailsHtml(result, skill));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
@@ -521,15 +521,13 @@ public class HiscorePanel extends PluginPanel
|
||||
/*
|
||||
Builds a html string to display on tooltip (when hovering a skill).
|
||||
*/
|
||||
private String detailsHtml(HiscoreSkill skill)
|
||||
private String detailsHtml(HiscoreResult result, HiscoreSkill skill)
|
||||
{
|
||||
String openingTags = "<html><body style = 'padding: 5px;color:#989898'>";
|
||||
String closingTags = "</html><body>";
|
||||
|
||||
String content = "";
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
if (skill == null)
|
||||
{
|
||||
double combatLevel = Experience.getCombatLevelPrecise(
|
||||
@@ -632,7 +630,6 @@ public class HiscorePanel extends PluginPanel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a html progress bar to the hover information
|
||||
|
||||
Reference in New Issue
Block a user