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