Search in sources :

Example 1 with DeedProxies

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

the class CheckDeedLinks method checkParentDeed.

private void checkParentDeed(DeedDescription deed) {
    List<DeedProxy> childProxies = deed.getChildDeedProxies().getDeedProxies();
    for (DeedProxy childProxy : childProxies) {
        DeedDescription childDeed = childProxy.getDeed();
        DeedProxies parentProxies = childDeed.getParentDeedProxies();
        DeedProxy parentProxy = parentProxies.getByKey(deed.getKey());
        if (parentProxy == null) {
            parentProxy = new DeedProxy();
            parentProxy.setDeed(deed);
            parentProxy.setKey(deed.getKey());
            parentProxy.setName(deed.getName());
            parentProxies.add(parentProxy);
        // System.out.println("Added link from "+childDeed.getKey()+" to "+deed.getKey());
        }
    }
}
Also used : DeedProxies(delta.games.lotro.lore.deeds.DeedProxies) DeedDescription(delta.games.lotro.lore.deeds.DeedDescription) DeedProxy(delta.games.lotro.lore.deeds.DeedProxy)

Example 2 with DeedProxies

use of delta.games.lotro.lore.deeds.DeedProxies 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

DeedProxies (delta.games.lotro.lore.deeds.DeedProxies)2 DeedProxy (delta.games.lotro.lore.deeds.DeedProxy)2 DeedDescription (delta.games.lotro.lore.deeds.DeedDescription)1