Search in sources :

Example 1 with CharacterData

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

the class MainTestStashWindow method main.

/**
 * Basic main method for test.
 * @param args Not used.
 */
public static void main(String[] args) {
    LotroTestUtils utils = new LotroTestUtils();
    CharacterFile toon = utils.getMainToon();
    // Copy gear to stash
    ItemsStash stash = toon.getStash();
    CharacterData data = toon.getInfosManager().getLastCharacterDescription();
    CharacterEquipment gear = data.getEquipment();
    for (EQUIMENT_SLOT slot : EQUIMENT_SLOT.values()) {
        Item item = gear.getItemForSlot(slot);
        if (item != null) {
            Item clone = ItemFactory.clone(item);
            stash.addItem(clone);
        }
    }
    StashWindowController controller = new StashWindowController(toon);
    controller.show();
}
Also used : Item(delta.games.lotro.lore.items.Item) CharacterEquipment(delta.games.lotro.character.CharacterEquipment) ItemsStash(delta.games.lotro.character.storage.ItemsStash) CharacterData(delta.games.lotro.character.CharacterData) EQUIMENT_SLOT(delta.games.lotro.character.CharacterEquipment.EQUIMENT_SLOT) LotroTestUtils(delta.games.lotro.character.log.LotroTestUtils) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 2 with CharacterData

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

the class MainTestDetailedCharacterStatsPanelController method doIt.

private void doIt() {
    CharacterData meva = loadCharacter("meva");
    CharacterData giswald = loadCharacter("giswald");
    BasicStatsSet stats = giswald.getStats();
    BasicStatsSet reference = meva.getStats();
    DetailedCharacterStatsPanelController panelCtrl = new DetailedCharacterStatsPanelController(null);
    JPanel panel = panelCtrl.getPanel();
    panelCtrl.setStats(reference, stats);
    JFrame frame = new JFrame();
    frame.add(panel);
    frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
}
Also used : JPanel(javax.swing.JPanel) CharacterData(delta.games.lotro.character.CharacterData) JFrame(javax.swing.JFrame) BasicStatsSet(delta.games.lotro.character.stats.BasicStatsSet) DetailedCharacterStatsPanelController(delta.games.lotro.gui.character.stats.details.DetailedCharacterStatsPanelController)

Example 3 with CharacterData

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

the class MainTestStatCurveChart method doIt.

private void doIt() {
    CharacterGenerationTools tools = new CharacterGenerationTools();
    CharacterGeneratorMeva generator = new CharacterGeneratorMeva(tools);
    CharacterData c = generator.buildCharacter();
    doIt(c);
}
Also used : CharacterData(delta.games.lotro.character.CharacterData) CharacterGeneratorMeva(delta.games.lotro.character.stats.CharacterGeneratorMeva) CharacterGenerationTools(delta.games.lotro.character.stats.CharacterGenerationTools)

Example 4 with CharacterData

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

the class NewToonDialogController method okImpl.

@Override
protected void okImpl() {
    String toonName = _toonName.getText();
    String server = _server.getSelectedItem();
    CharacterClass cClass = _class.getComboBoxController().getSelectedItem();
    Race race = _race.getSelectedItem();
    CharacterSex sex = _sex.getSelectedItem();
    CharacterData info = new CharacterData();
    info.setName(toonName);
    info.setServer(server);
    info.setCharacterClass(cClass);
    info.setCharacterSex(sex);
    info.setRace(race);
    info.setLevel(1);
    info.setDate(Long.valueOf(System.currentTimeMillis()));
    // Compute stats
    CharacterStatsComputer computer = new CharacterStatsComputer();
    info.getStats().setStats(computer.getStats(info));
    CharactersManager manager = CharactersManager.getInstance();
    CharacterFile toon = manager.addToon(info);
    if (toon == null) {
        showErrorMessage("Character creation failed!");
    }
}
Also used : CharactersManager(delta.games.lotro.character.CharactersManager) CharacterData(delta.games.lotro.character.CharacterData) CharacterStatsComputer(delta.games.lotro.character.stats.CharacterStatsComputer) Race(delta.games.lotro.common.Race) CharacterSex(delta.games.lotro.common.CharacterSex) CharacterFile(delta.games.lotro.character.CharacterFile) CharacterClass(delta.games.lotro.common.CharacterClass)

Example 5 with CharacterData

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

the class MainTestCharacterMainAttrsEditionPanel method main.

/**
 * Basic main method for test.
 * @param args Not used.
 */
public static void main(String[] args) {
    CharacterGenerationTools tools = new CharacterGenerationTools();
    CharacterGeneratorMeva mevaGenerator = new CharacterGeneratorMeva(tools);
    CharacterData meva = mevaGenerator.buildCharacter();
    meva.setDate(Long.valueOf(System.currentTimeMillis()));
    CharacterMainAttrsEditionPanelController panelCtrl = new CharacterMainAttrsEditionPanelController(null, meva);
    panelCtrl.set();
    JFrame frame = new JFrame();
    frame.add(panelCtrl.getPanel());
    frame.pack();
    frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    frame.setVisible(true);
}
Also used : CharacterData(delta.games.lotro.character.CharacterData) CharacterGeneratorMeva(delta.games.lotro.character.stats.CharacterGeneratorMeva) JFrame(javax.swing.JFrame) CharacterGenerationTools(delta.games.lotro.character.stats.CharacterGenerationTools)

Aggregations

CharacterData (delta.games.lotro.character.CharacterData)31 CharacterGenerationTools (delta.games.lotro.character.stats.CharacterGenerationTools)8 JFrame (javax.swing.JFrame)7 CharacterFile (delta.games.lotro.character.CharacterFile)6 CharacterGeneratorMeva (delta.games.lotro.character.stats.CharacterGeneratorMeva)6 BasicStatsSet (delta.games.lotro.character.stats.BasicStatsSet)5 CharacterStatsComputer (delta.games.lotro.character.stats.CharacterStatsComputer)5 CharacterInfosManager (delta.games.lotro.character.CharacterInfosManager)4 CharacterEvent (delta.games.lotro.character.events.CharacterEvent)4 CharacterEventType (delta.games.lotro.character.events.CharacterEventType)4 DefaultWindowController (delta.common.ui.swing.windows.DefaultWindowController)3 EQUIMENT_SLOT (delta.games.lotro.character.CharacterEquipment.EQUIMENT_SLOT)3 CharacterClass (delta.games.lotro.common.CharacterClass)3 File (java.io.File)3 JPanel (javax.swing.JPanel)3 WindowController (delta.common.ui.swing.windows.WindowController)2 CharacterEquipment (delta.games.lotro.character.CharacterEquipment)2 CharactersManager (delta.games.lotro.character.CharactersManager)2 LotroTestUtils (delta.games.lotro.character.log.LotroTestUtils)2 CharacterGeneratorGiswald (delta.games.lotro.character.stats.CharacterGeneratorGiswald)2