mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-01-06 07:07:38 +01:00
Bug Fixing for Skill Tree
This commit is contained in:
parent
8e504e1a10
commit
a64faa02fd
@ -19,15 +19,16 @@ public class CustomSkillTree extends SkillTree {
|
|||||||
|
|
||||||
// Setup the children and parents for each node.
|
// Setup the children and parents for each node.
|
||||||
for (SkillTreeNode node : nodes.values()) {
|
for (SkillTreeNode node : nodes.values()) {
|
||||||
for (String key : config.getConfigurationSection("nodes." + node.getId() + "parents").getKeys(false)) {
|
if (config.isConfigurationSection("nodes." + node.getId() + ".children"))
|
||||||
ConfigurationSection section = config.getConfigurationSection("nodes." + node.getId() + ".parents." + key);
|
for (String key : config.getConfigurationSection("nodes." + node.getId() + "parents").getKeys(false)) {
|
||||||
if (section != null) {
|
ConfigurationSection section = config.getConfigurationSection("nodes." + node.getId() + ".parents." + key);
|
||||||
for (String parent : section.getKeys(false)) {
|
if (section != null) {
|
||||||
node.addParent(getNode(parent), section.getInt(parent), ParentType.valueOf(UtilityMethods.enumName(key)));
|
for (String parent : section.getKeys(false)) {
|
||||||
getNode(parent).addChild(node);
|
node.addParent(getNode(parent), section.getInt(parent), ParentType.valueOf(UtilityMethods.enumName(key)));
|
||||||
|
getNode(parent).addChild(node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
setupRoots();
|
setupRoots();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user