Search in sources :

Example 1 with LotroCoreConfig

use of delta.games.lotro.LotroCoreConfig in project lotro-companion by dmorcellet.

the class TraitPoints method loadRegistry.

private TraitPointsRegistry loadRegistry() {
    LotroCoreConfig cfg = LotroCoreConfig.getInstance();
    File loreDir = cfg.getLoreDir();
    File registryFile = new File(loreDir, "traitPoints.xml");
    TraitPointsRegistryXMLParser parser = new TraitPointsRegistryXMLParser();
    TraitPointsRegistry registry = parser.parseXML(registryFile);
    if (registry == null) {
        registry = new TraitPointsRegistry();
    }
    return registry;
}
Also used : LotroCoreConfig(delta.games.lotro.LotroCoreConfig) TraitPointsRegistryXMLParser(delta.games.lotro.stats.traitPoints.io.xml.TraitPointsRegistryXMLParser) CharacterFile(delta.games.lotro.character.CharacterFile) File(java.io.File)

Example 2 with LotroCoreConfig

use of delta.games.lotro.LotroCoreConfig in project lotro-tools by dmorcellet.

the class WarbandsGenerator method doIt.

private void doIt() {
    LotroCoreConfig cfg = LotroCoreConfig.getInstance();
    File loreDir = cfg.getLoreDir();
    File warbandsFile = new File(loreDir, "warbands.xml");
    WarbandsRegistry r = buildRegistry();
    WarbandsRegistryXMLWriter w = new WarbandsRegistryXMLWriter();
    w.write(warbandsFile, r, EncodingNames.UTF_8);
}
Also used : WarbandsRegistryXMLWriter(delta.games.lotro.lore.warbands.io.xml.WarbandsRegistryXMLWriter) WarbandsRegistry(delta.games.lotro.lore.warbands.WarbandsRegistry) LotroCoreConfig(delta.games.lotro.LotroCoreConfig) File(java.io.File)

Aggregations

LotroCoreConfig (delta.games.lotro.LotroCoreConfig)2 File (java.io.File)2 CharacterFile (delta.games.lotro.character.CharacterFile)1 WarbandsRegistry (delta.games.lotro.lore.warbands.WarbandsRegistry)1 WarbandsRegistryXMLWriter (delta.games.lotro.lore.warbands.io.xml.WarbandsRegistryXMLWriter)1 TraitPointsRegistryXMLParser (delta.games.lotro.stats.traitPoints.io.xml.TraitPointsRegistryXMLParser)1