forked from Upstream/mmocore
Bug Fixing related to Skill Tree not working properly with MMOProfiles.
This commit is contained in:
parent
178bb35d59
commit
fb0dbad80f
@ -267,7 +267,7 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
|
|||||||
NodeStatus nodeStatus = nodeStates.get(node);
|
NodeStatus nodeStatus = nodeStates.get(node);
|
||||||
//Check the State of the node
|
//Check the State of the node
|
||||||
if (nodeStatus != NodeStatus.UNLOCKED && nodeStatus != NodeStatus.UNLOCKABLE) return false;
|
if (nodeStatus != NodeStatus.UNLOCKED && nodeStatus != NodeStatus.UNLOCKABLE) return false;
|
||||||
return node.hasPermissionRequirement(this)&&getNodeLevel(node) < node.getMaxLevel() && (skillTreePoints.getOrDefault(node.getTree().getId(), 0) + skillTreePoints.getOrDefault("global", 0) >= node.getSkillTreePointsConsumed());
|
return node.hasPermissionRequirement(this) && getNodeLevel(node) < node.getMaxLevel() && (skillTreePoints.getOrDefault(node.getTree().getId(), 0) + skillTreePoints.getOrDefault("global", 0) >= node.getSkillTreePointsConsumed());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1086,7 +1086,7 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
|
|||||||
*
|
*
|
||||||
* @return If the player unlocked the skill
|
* @return If the player unlocked the skill
|
||||||
*/
|
*/
|
||||||
public boolean hasUnlockedLevel(ClassSkill skill){
|
public boolean hasUnlockedLevel(ClassSkill skill) {
|
||||||
return getLevel() >= skill.getUnlockLevel();
|
return getLevel() >= skill.getUnlockLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1129,6 +1129,8 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
|
|||||||
boundSkills.forEach((slot, info) -> info.close());
|
boundSkills.forEach((slot, info) -> info.close());
|
||||||
boundSkills.clear();
|
boundSkills.clear();
|
||||||
|
|
||||||
|
//Update skill tree.
|
||||||
|
setupSkillTree();
|
||||||
// Update stats
|
// Update stats
|
||||||
if (isOnline()) getStats().updateStats();
|
if (isOnline()) getStats().updateStats();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user