Search in sources :

Example 1 with VirtuesContributionsMgr

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;
}
Also used : STAT(delta.games.lotro.character.stats.STAT) BasicStatsSet(delta.games.lotro.character.stats.BasicStatsSet) VirtuesContributionsMgr(delta.games.lotro.character.stats.virtues.VirtuesContributionsMgr)

Aggregations

BasicStatsSet (delta.games.lotro.character.stats.BasicStatsSet)1 STAT (delta.games.lotro.character.stats.STAT)1 VirtuesContributionsMgr (delta.games.lotro.character.stats.virtues.VirtuesContributionsMgr)1