Search in sources :

Example 1 with CharacterSummary

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

the class MainTestTraitPointsWindow method doIt.

private void doIt() {
    CharacterFile file = new LotroTestUtils().getToonByName("Meva");
    TraitPointsStatus status = new TraitPointsStatus();
    CharacterSummary summary = file.getSummary();
    TraitPointsEditionWindowController windowController = new TraitPointsEditionWindowController(null, summary, status);
    windowController.show(true);
    System.out.println(status);
}
Also used : CharacterSummary(delta.games.lotro.character.CharacterSummary) TraitPointsStatus(delta.games.lotro.stats.traitPoints.TraitPointsStatus) LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 2 with CharacterSummary

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

the class MainTestQuestCompletionStats method main.

/**
 * Basic main method for test.
 * @param args Not used.
 */
public static void main(String[] args) {
    LotroTestUtils utils = new LotroTestUtils();
    // CharacterFile mainToon=utils.getMainToon();
    CharacterFile mainToon = utils.getToonByName("Feroce");
    CharacterSummary summary = mainToon.getSummary();
    CharacterLog log = mainToon.getLastCharacterLog();
    if (log != null) {
        QuestsManager qm = QuestsManager.getInstance();
        QuestsIndex index = qm.getIndex();
        String[] categories = index.getCategories();
        for (String category : categories) {
            // String category="Epic - Vol. I, Book 1: Stirrings in the Darkness";
            QuestsCompletionStats stats = new QuestsCompletionStats(category, summary, log);
            stats.dump(System.out, true);
        }
    }
}
Also used : CharacterSummary(delta.games.lotro.character.CharacterSummary) LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) QuestsManager(delta.games.lotro.lore.quests.QuestsManager) CharacterFile(delta.games.lotro.character.CharacterFile) QuestsIndex(delta.games.lotro.lore.quests.index.QuestsIndex) CharacterLog(delta.games.lotro.character.log.CharacterLog)

Example 3 with CharacterSummary

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

the class CharacterFileWindowController method startNewCharacterData.

private void startNewCharacterData() {
    CharacterInfosManager infos = _toon.getInfosManager();
    CharacterData lastInfos = infos.getLastCharacterDescription();
    CharacterData newInfos = new CharacterData();
    CharacterSummary newSummary;
    if (lastInfos != null) {
        newSummary = new CharacterSummary(lastInfos.getSummary());
    } else {
        newSummary = new CharacterSummary(_toon.getSummary());
    }
    newInfos.setSummary(newSummary);
    newInfos.setDate(Long.valueOf(System.currentTimeMillis()));
    // Compute stats
    CharacterStatsComputer computer = new CharacterStatsComputer();
    newInfos.getStats().setStats(computer.getStats(newInfos));
    boolean ok = _toon.getInfosManager().writeNewCharacterData(newInfos);
    if (ok) {
        CharacterEvent event = new CharacterEvent(CharacterEventType.CHARACTER_DATA_ADDED, _toon, newInfos);
        EventsManager.invokeEvent(event);
        showCharacterData(newInfos);
    }
}
Also used : CharacterSummary(delta.games.lotro.character.CharacterSummary) CharacterEvent(delta.games.lotro.character.events.CharacterEvent) CharacterData(delta.games.lotro.character.CharacterData) CharacterStatsComputer(delta.games.lotro.character.stats.CharacterStatsComputer) CharacterInfosManager(delta.games.lotro.character.CharacterInfosManager)

Example 4 with CharacterSummary

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

the class CharacterFileWindowController method editTraitPoints.

private void editTraitPoints() {
    CharacterSummary summary = _toon.getSummary();
    TraitPointsStatus pointsStatus = TraitPoints.get().load(_toon);
    TraitPointsEditionWindowController controller = new TraitPointsEditionWindowController(this, summary, pointsStatus);
    TraitPointsStatus newStatus = controller.editModal();
    if (newStatus != null) {
        TraitPoints.get().save(_toon, newStatus);
    }
}
Also used : CharacterSummary(delta.games.lotro.character.CharacterSummary) TraitPointsStatus(delta.games.lotro.stats.traitPoints.TraitPointsStatus) TraitPointsEditionWindowController(delta.games.lotro.gui.stats.traitPoints.TraitPointsEditionWindowController)

Example 5 with CharacterSummary

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

the class CharacterSummaryPanelController method editSummary.

private void editSummary() {
    CharacterSummaryDialogController dialog = new CharacterSummaryDialogController(_parent, _summary);
    CharacterSummary summary = dialog.editModal();
    if (summary != null) {
        _toon.saveSummary(_summary);
        CharacterEvent event = new CharacterEvent(CharacterEventType.CHARACTER_SUMMARY_UPDATED, _toon, null);
        EventsManager.invokeEvent(event);
    }
}
Also used : CharacterSummary(delta.games.lotro.character.CharacterSummary) CharacterEvent(delta.games.lotro.character.events.CharacterEvent) CharacterSummaryDialogController(delta.games.lotro.gui.character.summary.CharacterSummaryDialogController)

Aggregations

CharacterSummary (delta.games.lotro.character.CharacterSummary)8 CharacterFile (delta.games.lotro.character.CharacterFile)2 CharacterEvent (delta.games.lotro.character.events.CharacterEvent)2 LotroTestUtils (delta.games.lotro.character.log.LotroTestUtils)2 CharacterClass (delta.games.lotro.common.CharacterClass)2 TraitPointsStatus (delta.games.lotro.stats.traitPoints.TraitPointsStatus)2 GridBagConstraints (java.awt.GridBagConstraints)2 GridBagLayout (java.awt.GridBagLayout)2 Insets (java.awt.Insets)2 ImageIcon (javax.swing.ImageIcon)2 JLabel (javax.swing.JLabel)2 JPanel (javax.swing.JPanel)2 CharacterData (delta.games.lotro.character.CharacterData)1 CharacterInfosManager (delta.games.lotro.character.CharacterInfosManager)1 CharacterLog (delta.games.lotro.character.log.CharacterLog)1 CharacterStatsComputer (delta.games.lotro.character.stats.CharacterStatsComputer)1 CharacterSummaryDialogController (delta.games.lotro.gui.character.summary.CharacterSummaryDialogController)1 TraitPointsEditionWindowController (delta.games.lotro.gui.stats.traitPoints.TraitPointsEditionWindowController)1 QuestsManager (delta.games.lotro.lore.quests.QuestsManager)1 QuestsIndex (delta.games.lotro.lore.quests.index.QuestsIndex)1