mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
Debug for MMOCore skill Tree. When creating nodes and using /mmocore reload
This commit is contained in:
parent
2adca395c0
commit
6965ebafcf
@ -382,6 +382,11 @@ public class MMOCore extends JavaPlugin {
|
|||||||
|
|
||||||
if (clearBefore)
|
if (clearBefore)
|
||||||
PlayerData.getAll().forEach(PlayerData::update);
|
PlayerData.getAll().forEach(PlayerData::update);
|
||||||
|
else
|
||||||
|
//We update the skill tree data if some new skill tree has been
|
||||||
|
// created and updated with the /mmocore reload command.
|
||||||
|
PlayerData.getAll().forEach(PlayerData::updateSkillTree);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void log(String message) {
|
public static void log(String message) {
|
||||||
|
@ -187,6 +187,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
|||||||
node.getExperienceTable().claimStatTriggers(this, node);
|
node.getExperienceTable().claimStatTriggers(this, node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
statLoaded=true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,6 +345,18 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
|||||||
skillTree.setupNodeState(this);
|
skillTree.setupNodeState(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void updateSkillTree() {
|
||||||
|
nodeStates.clear();
|
||||||
|
for (SkillTree tree : profess.getSkillTrees()) {
|
||||||
|
for (SkillTreeNode node : tree.getNodes()) {
|
||||||
|
if (!nodeLevels.containsKey(node))
|
||||||
|
nodeLevels.put(node, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setupSkillTree();
|
||||||
|
}
|
||||||
|
|
||||||
public Map<SkillTreeNode, NodeState> getNodeStates() {
|
public Map<SkillTreeNode, NodeState> getNodeStates() {
|
||||||
return new HashMap<>(nodeStates);
|
return new HashMap<>(nodeStates);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user