fix player stats display issue

This commit is contained in:
Indyuce 2019-09-01 18:28:14 +02:00
parent e528cc925a
commit a3a7a05fea

View File

@ -112,8 +112,7 @@ public class PlayerStats extends EditableInventory {
Placeholders holders = new Placeholders(); Placeholders holders = new Placeholders();
for (StatType stat : StatType.values()) { for (StatType stat : StatType.values()) {
double extra = stats.getExtraStat(stat); double base = stats.getBase(stat), total = stats.getInstance(stat).getTotal(base), extra = total - base;
double base = stats.getBase(stat);
holders.register(stat.name().toLowerCase(), stat.format(extra + base)); holders.register(stat.name().toLowerCase(), stat.format(extra + base));
holders.register(stat.name().toLowerCase() + "_base", stat.format(base)); holders.register(stat.name().toLowerCase() + "_base", stat.format(base));
holders.register(stat.name().toLowerCase() + "_extra", stat.format(extra)); holders.register(stat.name().toLowerCase() + "_extra", stat.format(extra));