use of delta.games.lotro.character.stats.virtues.VirtuesContributionsMgr in project lotro-companion by dmorcellet.
the class VirtueIconController method buildToolTip.
private String buildToolTip(VirtueId virtueId, int tier) {
VirtuesContributionsMgr virtuesMgr = VirtuesContributionsMgr.get();
BasicStatsSet stats = virtuesMgr.getContribution(virtueId, tier);
StringBuilder sb = new StringBuilder();
sb.append(virtueId.name()).append(EndOfLine.NATIVE_EOL);
for (STAT stat : stats.getStats()) {
String name = stat.getName();
String value = stats.getStat(stat).toString();
sb.append(name).append(": ").append(value).append(EndOfLine.NATIVE_EOL);
}
String text = sb.toString().trim();
String html = "<html>" + text.replace(EndOfLine.NATIVE_EOL, "<br>") + "</html>";
return html;
}
Aggregations