Search in sources :

Example 16 with DeedProxy

use of delta.games.lotro.lore.deeds.DeedProxy in project lotro-tools by dmorcellet.

the class DeedLinksResolver method checkNext2PreviousSymetry.

private void checkNext2PreviousSymetry(DeedDescription deed) {
    DeedProxy nextProxy = deed.getNextDeedProxy();
    if (nextProxy != null) {
        String nextKey = nextProxy.getKey();
        DeedDescription nextDeed = _mapByKey.get(nextKey);
        if (nextDeed != null) {
            DeedProxy previousProxy = nextDeed.getPreviousDeedProxy();
            if (previousProxy == null) {
                previousProxy = new DeedProxy();
                previousProxy.setDeed(deed);
                previousProxy.setKey(deed.getKey());
                previousProxy.setName(deed.getName());
                nextDeed.setPreviousDeedProxy(previousProxy);
            }
        }
    }
}
Also used : DeedDescription(delta.games.lotro.lore.deeds.DeedDescription) DeedProxy(delta.games.lotro.lore.deeds.DeedProxy)

Example 17 with DeedProxy

use of delta.games.lotro.lore.deeds.DeedProxy in project lotro-tools by dmorcellet.

the class DeedLinksResolver method checkParent2ChildSymetry.

private void checkParent2ChildSymetry(DeedDescription deed) {
    for (DeedProxy parentProxy : deed.getParentDeedProxies().getDeedProxies()) {
        String parentKey = parentProxy.getKey();
        DeedDescription parentDeed = _mapByKey.get(parentKey);
        if (parentDeed != null) {
            addChildDeed(parentDeed, deed);
        }
    }
}
Also used : DeedDescription(delta.games.lotro.lore.deeds.DeedDescription) DeedProxy(delta.games.lotro.lore.deeds.DeedProxy)

Example 18 with DeedProxy

use of delta.games.lotro.lore.deeds.DeedProxy in project lotro-tools by dmorcellet.

the class DeedLinksResolver method resolveDeed.

private void resolveDeed(DeedDescription deed) {
    for (DeedProxy parentProxy : deed.getParentDeedProxies().getDeedProxies()) {
        resolveDeedProxy(parentProxy);
    }
    resolveDeedProxy(deed.getNextDeedProxy());
    resolveDeedProxy(deed.getPreviousDeedProxy());
    for (DeedProxy childProxy : deed.getChildDeedProxies().getDeedProxies()) {
        resolveDeedProxy(childProxy);
    }
}
Also used : DeedProxy(delta.games.lotro.lore.deeds.DeedProxy)

Example 19 with DeedProxy

use of delta.games.lotro.lore.deeds.DeedProxy in project lotro-tools by dmorcellet.

the class DeedLinksResolver method removeChildByName.

private void removeChildByName(DeedDescription deed, String name) {
    DeedProxies children = deed.getChildDeedProxies();
    DeedProxy toRemove = children.getByName(name);
    if (toRemove != null) {
        children.remove(toRemove);
        toRemove.getDeed().getParentDeedProxies().remove(toRemove.getKey());
    }
}
Also used : DeedProxies(delta.games.lotro.lore.deeds.DeedProxies) DeedProxy(delta.games.lotro.lore.deeds.DeedProxy)

Aggregations

DeedProxy (delta.games.lotro.lore.deeds.DeedProxy)19 DeedDescription (delta.games.lotro.lore.deeds.DeedDescription)13 ArrayList (java.util.ArrayList)4 Rewards (delta.games.lotro.common.Rewards)2 Title (delta.games.lotro.common.Title)2 ObjectItem (delta.games.lotro.common.objects.ObjectItem)2 DeedProxies (delta.games.lotro.lore.deeds.DeedProxies)2 HashSet (java.util.HashSet)2 Emote (delta.games.lotro.common.Emote)1 ReputationItem (delta.games.lotro.common.ReputationItem)1 Trait (delta.games.lotro.common.Trait)1 Virtue (delta.games.lotro.common.Virtue)1 VirtueId (delta.games.lotro.common.VirtueId)1 ObjectsSet (delta.games.lotro.common.objects.ObjectsSet)1 Faction (delta.games.lotro.lore.reputation.Faction)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1