use of delta.games.lotro.lore.items.legendary.relics.Relic in project lotro-companion by dmorcellet.
the class RelicsEditionPanelController method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
// Relic icon button
int index = _buttons.indexOf(source);
if (index != -1) {
Relic initialRelic = _legAttrs.getRelics().get(index);
RelicType type = RELIC_TYPES[index];
Relic relic = RelicChoiceWindowController.selectRelic(_parent, type, initialRelic);
if (relic != null) {
_legAttrs.slotRelic(relic);
update();
}
} else {
index = _deleteButtons.indexOf(source);
if (index != -1) {
RelicType type = RELIC_TYPES[index];
if (type == RelicType.SETTING)
_legAttrs.setSetting(null);
if (type == RelicType.GEM)
_legAttrs.setGem(null);
if (type == RelicType.RUNE)
_legAttrs.setRune(null);
if (type == RelicType.CRAFTED_RELIC)
_legAttrs.setCraftedRelic(null);
update();
}
}
}
use of delta.games.lotro.lore.items.legendary.relics.Relic in project lotro-tools by dmorcellet.
the class RelicsIndexPageParser method handleTable.
private void handleTable(String categoryName, Segment source, String id, Integer level, RelicType defaultType) {
Element table = findRelicsTable(source, id);
if (table != null) {
RelicsCategory category = _relicsMgr.getRelicCategory(categoryName, true);
List<Element> trs = JerichoHtmlUtils.findElementsByTagName(table, HTMLElementName.TR);
for (Element tr : trs) {
Relic relic = handleTableRow(tr, level, defaultType);
if (relic != null) {
category.addRelic(relic);
}
}
} else {
System.err.println("Cannot find table: " + id);
}
}
use of delta.games.lotro.lore.items.legendary.relics.Relic in project lotro-tools by dmorcellet.
the class LotroPlanMordorRelicsLoader method itemToRelic.
private Relic itemToRelic(Item item) {
String name = item.getName();
if (name.startsWith("-"))
name = name.substring(1);
name = name.trim();
Integer requiredLevel = item.getItemLevel();
RelicType type = getRelicTypeFromName(name);
Relic relic = new Relic(name, type, requiredLevel);
BasicStatsSet stats = relic.getStats();
stats.setStats(item.getStats());
return relic;
}
Aggregations