Search in sources :

Example 6 with ObjectsSet

use of delta.games.lotro.common.objects.ObjectsSet in project lotro-tools by dmorcellet.

the class CheckItemRewardsInDeeds method handleDeed.

private void handleDeed(DeedDescription deed) {
    Rewards rewards = deed.getRewards();
    ObjectsSet objects = rewards.getObjects();
    int nbItems = objects.getNbObjectItems();
    for (int i = 0; i < nbItems; i++) {
        ObjectItem objectItem = objects.getItem(i);
        int id = objectItem.getItemId();
        String name = objectItem.getName();
        Item item = ItemsManager.getInstance().getItem(id);
        if (item == null) {
            System.out.println("Item not found: id=" + id + ", name=" + name);
        } else {
            String itemName = item.getName();
            if (!Objects.equals(name, itemName)) {
                System.out.println("Fix item reward name from [" + name + "] to [" + itemName + "]");
                objectItem.setName(itemName);
            }
        }
    }
}
Also used : ObjectItem(delta.games.lotro.common.objects.ObjectItem) Item(delta.games.lotro.lore.items.Item) ObjectItem(delta.games.lotro.common.objects.ObjectItem) Rewards(delta.games.lotro.common.Rewards) ObjectsSet(delta.games.lotro.common.objects.ObjectsSet)

Example 7 with ObjectsSet

use of delta.games.lotro.common.objects.ObjectsSet in project lotro-tools by dmorcellet.

the class LotroWikiDeedCategoryPageParser method resolveItemRewards.

private void resolveItemRewards(DeedDescription deed) {
    Rewards rewards = deed.getRewards();
    ObjectsSet objects = rewards.getObjects();
    int nbItems = objects.getNbObjectItems();
    for (int i = 0; i < nbItems; i++) {
        ObjectItem objectItem = objects.getItem(i);
        resolveItem(objectItem);
    }
}
Also used : ObjectItem(delta.games.lotro.common.objects.ObjectItem) Rewards(delta.games.lotro.common.Rewards) ObjectsSet(delta.games.lotro.common.objects.ObjectsSet)

Example 8 with ObjectsSet

use of delta.games.lotro.common.objects.ObjectsSet in project lotro-tools by dmorcellet.

the class QuestsItemsLoader method handleQuest.

private void handleQuest(int index, QuestDescription q) {
    try {
        // String key=q.getKey();
        // System.out.println("#"+index+", quest: "+key);
        Rewards r = q.getQuestRewards();
        ObjectsSet set = r.getObjects();
        handleSet(set);
        ObjectsSet set2 = r.getSelectObjects();
        handleSet(set2);
    } catch (Throwable t) {
        t.printStackTrace();
    }
}
Also used : Rewards(delta.games.lotro.common.Rewards) ObjectsSet(delta.games.lotro.common.objects.ObjectsSet)

Aggregations

ObjectsSet (delta.games.lotro.common.objects.ObjectsSet)8 Rewards (delta.games.lotro.common.Rewards)6 ObjectItem (delta.games.lotro.common.objects.ObjectItem)6 DeedDescription (delta.games.lotro.lore.deeds.DeedDescription)2 Item (delta.games.lotro.lore.items.Item)2 ReputationItem (delta.games.lotro.common.ReputationItem)1 Title (delta.games.lotro.common.Title)1 Virtue (delta.games.lotro.common.Virtue)1 VirtueId (delta.games.lotro.common.VirtueId)1 DeedProxy (delta.games.lotro.lore.deeds.DeedProxy)1 DeedsManager (delta.games.lotro.lore.deeds.DeedsManager)1 Faction (delta.games.lotro.lore.reputation.Faction)1 BorderLayout (java.awt.BorderLayout)1 ArrayList (java.util.ArrayList)1 JFrame (javax.swing.JFrame)1 JPanel (javax.swing.JPanel)1 Element (net.htmlparser.jericho.Element)1 TextExtractor (net.htmlparser.jericho.TextExtractor)1