Search in sources :

Example 1 with TraitPointsStatusXMLParser

use of delta.games.lotro.stats.traitPoints.io.xml.TraitPointsStatusXMLParser in project lotro-companion by dmorcellet.

the class TraitPoints method load.

/**
 * Load the trait points for a character.
 * @param character Targeted character.
 * @return A trait point status.
 */
public TraitPointsStatus load(CharacterFile character) {
    File fromFile = getStatusFile(character);
    TraitPointsStatus status = null;
    if (fromFile.exists()) {
        TraitPointsStatusXMLParser parser = new TraitPointsStatusXMLParser();
        status = parser.parseXML(fromFile);
    }
    if (status == null) {
        status = new TraitPointsStatus();
    }
    return status;
}
Also used : TraitPointsStatusXMLParser(delta.games.lotro.stats.traitPoints.io.xml.TraitPointsStatusXMLParser) CharacterFile(delta.games.lotro.character.CharacterFile) File(java.io.File)

Aggregations

CharacterFile (delta.games.lotro.character.CharacterFile)1 TraitPointsStatusXMLParser (delta.games.lotro.stats.traitPoints.io.xml.TraitPointsStatusXMLParser)1 File (java.io.File)1