Search in sources :

Example 1 with LotroTestUtils

use of delta.games.lotro.character.log.LotroTestUtils 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 LotroTestUtils

use of delta.games.lotro.character.log.LotroTestUtils 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 LotroTestUtils

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

the class MainTestLevellingStats method main.

/**
 * Basic main method for test.
 * @param args Not used.
 */
public static void main(String[] args) {
    LotroTestUtils utils = new LotroTestUtils();
    List<CharacterFile> toons = utils.getAllFiles();
    MultipleToonsLevellingStats stats = new MultipleToonsLevellingStats();
    // CharacterFile toon=utils.getMainToon();
    for (CharacterFile toon : toons) {
        stats.addToon(toon);
    }
    JFrame f = new JFrame();
    CharacterLevelChartController controller = new CharacterLevelChartController(stats);
    JPanel panel = controller.getPanel();
    f.getContentPane().add(panel);
    f.pack();
    f.setVisible(true);
    f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}
Also used : JPanel(javax.swing.JPanel) CharacterLevelChartController(delta.games.lotro.gui.stats.levelling.CharacterLevelChartController) LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) JFrame(javax.swing.JFrame) MultipleToonsLevellingStats(delta.games.lotro.stats.level.MultipleToonsLevellingStats) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 4 with LotroTestUtils

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

the class MainTestVirtuesStats 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");
    CharacterLog log = mainToon.getLastCharacterLog();
    VirtuesStats stats = null;
    if (log != null) {
        stats = new VirtuesStats(log);
        stats.dump(System.out, true);
    }
    HashMap<VirtueId, List<String>> virtuesMap = new HashMap<VirtueId, List<String>>();
    {
        DeedsManager dm = DeedsManager.getInstance();
        List<DeedDescription> deeds = dm.getAll();
        for (DeedDescription deed : deeds) {
            String name = deed.getName();
            Rewards rewards = deed.getRewards();
            Virtue[] virtues = rewards.getVirtues();
            if (virtues != null) {
                for (Virtue virtue : virtues) {
                    VirtueId virtueId = virtue.getIdentifier();
                    List<String> items = virtuesMap.get(virtueId);
                    if (items == null) {
                        items = new ArrayList<String>();
                        virtuesMap.put(virtueId, items);
                    }
                    items.add("Deed:" + name);
                }
            }
        }
    }
    List<String> toShow = new ArrayList<String>();
    toShow.add("Valour");
    toShow.add("Loyalty");
    toShow.add("Justice");
    toShow.add("Honour");
    toShow.add("Innocence");
    toShow.add("Zeal");
    List<VirtueId> virtueIds = new ArrayList<VirtueId>(virtuesMap.keySet());
    Collections.sort(virtueIds);
    for (VirtueId virtueId : virtueIds) {
        if (toShow.contains(virtueId)) {
            List<String> deeds = virtuesMap.get(virtueId);
            System.out.println(virtueId + " (" + deeds.size() + "): " + deeds);
            String[] got = stats.getIDsForAVirtue(virtueId);
            if (got != null) {
                System.out.println("GOT:" + virtueId + " (" + got.length + "): " + Arrays.toString(got));
                for (String id : got) deeds.remove(id);
            }
            System.out.println("MISSING: " + virtueId + " (" + deeds.size() + "): " + deeds);
        }
    }
}
Also used : DeedDescription(delta.games.lotro.lore.deeds.DeedDescription) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) CharacterFile(delta.games.lotro.character.CharacterFile) DeedsManager(delta.games.lotro.lore.deeds.DeedsManager) LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) VirtueId(delta.games.lotro.common.VirtueId) Rewards(delta.games.lotro.common.Rewards) Virtue(delta.games.lotro.common.Virtue) ArrayList(java.util.ArrayList) List(java.util.List) CharacterLog(delta.games.lotro.character.log.CharacterLog)

Example 5 with LotroTestUtils

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

the class MainTestCharactersSelector method main.

/**
 * Basic main method for test.
 * @param args Not used.
 */
public static void main(String[] args) {
    LotroTestUtils utils = new LotroTestUtils();
    List<CharacterFile> toons = utils.getAllFiles();
    List<CharacterFile> selectedToons = new ArrayList<CharacterFile>();
    selectedToons = CharactersSelectorWindowController.selectToons(null, toons, selectedToons, toons);
    if (selectedToons != null) {
        for (CharacterFile toon : selectedToons) {
            System.out.println(toon.getIdentifier());
        }
    }
}
Also used : LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) ArrayList(java.util.ArrayList) CharacterFile(delta.games.lotro.character.CharacterFile)

Aggregations

CharacterFile (delta.games.lotro.character.CharacterFile)13 LotroTestUtils (delta.games.lotro.character.log.LotroTestUtils)13 CharacterLog (delta.games.lotro.character.log.CharacterLog)5 ArrayList (java.util.ArrayList)3 JFrame (javax.swing.JFrame)3 JPanel (javax.swing.JPanel)3 CharacterData (delta.games.lotro.character.CharacterData)2 CharacterSummary (delta.games.lotro.character.CharacterSummary)2 CraftingStatus (delta.games.lotro.character.crafting.CraftingStatus)2 List (java.util.List)2 MyLotroConfig (delta.games.lotro.MyLotroConfig)1 CharacterEquipment (delta.games.lotro.character.CharacterEquipment)1 EQUIMENT_SLOT (delta.games.lotro.character.CharacterEquipment.EQUIMENT_SLOT)1 CharacterInfosManager (delta.games.lotro.character.CharacterInfosManager)1 ProfessionStatus (delta.games.lotro.character.crafting.ProfessionStatus)1 CharacterLogsManager (delta.games.lotro.character.log.CharacterLogsManager)1 ItemsStash (delta.games.lotro.character.storage.ItemsStash)1 Rewards (delta.games.lotro.common.Rewards)1 Virtue (delta.games.lotro.common.Virtue)1 VirtueId (delta.games.lotro.common.VirtueId)1