Search in sources :

Example 1 with BonusType

use of delta.games.lotro.tools.lore.items.lorebook.bonus.BonusType in project lotro-tools by dmorcellet.

the class BonusConverter method parseBonus.

private void parseBonus(Bonus bonus, BasicStatsSet stats) {
    BONUS_OCCURRENCE occurrence = bonus.getBonusOccurrence();
    if (occurrence == BONUS_OCCURRENCE.ALWAYS) {
        BonusType type = bonus.getBonusType();
        if (type != BonusType.OTHER) {
            STAT stat = getStatFromBonusType(type);
            if (stat != null) {
                Object value = bonus.getValue();
                FixedDecimalsInteger statValue = TulkasValuesUtils.fromObjectValue(value);
                stats.addStat(stat, statValue);
            // TODO remove bonus from manager
            } else {
                System.out.println("Ignored: " + bonus);
            }
        }
    } else {
    // System.out.println("Ignored: "+bonus);
    }
}
Also used : BONUS_OCCURRENCE(delta.games.lotro.tools.lore.items.lorebook.bonus.Bonus.BONUS_OCCURRENCE) BonusType(delta.games.lotro.tools.lore.items.lorebook.bonus.BonusType) STAT(delta.games.lotro.character.stats.STAT) FixedDecimalsInteger(delta.games.lotro.utils.FixedDecimalsInteger)

Aggregations

STAT (delta.games.lotro.character.stats.STAT)1 BONUS_OCCURRENCE (delta.games.lotro.tools.lore.items.lorebook.bonus.Bonus.BONUS_OCCURRENCE)1 BonusType (delta.games.lotro.tools.lore.items.lorebook.bonus.BonusType)1 FixedDecimalsInteger (delta.games.lotro.utils.FixedDecimalsInteger)1