Search in sources :

Example 11 with LotroTestUtils

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

the class MainTestEquipmentLoading 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();
    CharacterFile toon = utils.getMainToon();
    // for(CharacterFile toon : toons)
    {
        String name = toon.getName();
        System.out.println("Loading toon [" + name + "]");
        CharacterInfosManager manager = new CharacterInfosManager(toon);
        CharacterData infos = manager.getLastCharacterDescription();
        if (infos != null) {
            EquipmentPanelController ctrl = new EquipmentPanelController(null, toon, infos);
            JPanel panel = ctrl.getPanel();
            JFrame frame = new JFrame("Equipment for " + toon.getName());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // Create and set up the content pane.
            frame.setContentPane(panel);
            // Display the window.
            frame.pack();
            frame.setVisible(true);
        }
    }
}
Also used : JPanel(javax.swing.JPanel) EquipmentPanelController(delta.games.lotro.gui.character.gear.EquipmentPanelController) CharacterData(delta.games.lotro.character.CharacterData) LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) JFrame(javax.swing.JFrame) CharacterInfosManager(delta.games.lotro.character.CharacterInfosManager) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 12 with LotroTestUtils

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

the class MainTestCraftingStats 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();
    for (CharacterFile toon : toons) {
        // CharacterFile toon=utils.getMainToon();
        // CharacterFile toon=utils.getToonByName("Feroce");
        CraftingStatus stats = toon.getCraftingStatus();
        stats.dump(System.out);
    }
}
Also used : LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) CraftingStatus(delta.games.lotro.character.crafting.CraftingStatus) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 13 with LotroTestUtils

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

the class MainTestCharacterActivityLogIO method main.

/**
 * Basic main method for test.
 * @param args Not used.
 */
public static void main(String[] args) {
    List<CharacterFile> toons = new ArrayList<CharacterFile>();
    LotroTestUtils utils = new LotroTestUtils();
    CharacterFile glumlug = utils.getMainToon();
    toons.add(glumlug);
    MyLotroConfig cfg = MyLotroConfig.getInstance();
    CharacterLogPageParser parser = new CharacterLogPageParser();
    for (CharacterFile toon : toons) {
        String url = cfg.getCharacterURL(toon.getServerName(), toon.getName());
        CharacterLog log = parser.parseLogPages(url, null);
        if (log != null) {
            System.out.println(log);
            CharacterLogsManager manager = toon.getLogsManager();
            boolean ok = manager.writeNewLog(log);
            if (ok) {
                System.out.println("OK");
            }
        }
    }
}
Also used : LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) ArrayList(java.util.ArrayList) MyLotroConfig(delta.games.lotro.MyLotroConfig) CharacterFile(delta.games.lotro.character.CharacterFile) CharacterLogsManager(delta.games.lotro.character.log.CharacterLogsManager) CharacterLog(delta.games.lotro.character.log.CharacterLog)

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