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);
}
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);
}
}
}
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);
}
}
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);
}
}
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);
}
}
Aggregations