forked from Upstream/mmocore
SavedClassInformation changes to make skillTree class based. 2
This commit is contained in:
parent
b5c473c431
commit
bde947a877
@ -76,16 +76,16 @@ public class SavedClassInformation {
|
|||||||
|
|
||||||
public SavedClassInformation(PlayerData player) {
|
public SavedClassInformation(PlayerData player) {
|
||||||
this(player.getLevel(), player.getExperience(), player.getSkillPoints(), player.getAttributePoints(), player.getAttributeReallocationPoints()
|
this(player.getLevel(), player.getExperience(), player.getSkillPoints(), player.getAttributePoints(), player.getAttributeReallocationPoints()
|
||||||
,player.getSkillTreeReallocationPoints(),player.getSkillReallocationPoints(),
|
, player.getSkillTreeReallocationPoints(), player.getSkillReallocationPoints(),
|
||||||
player.getAttributes().mapPoints(), player.mapSkillLevels(), player.getSkillTreePoints(), player.getNodeLevels());
|
player.getAttributes().mapPoints(), player.mapSkillLevels(), player.getSkillTreePoints(), player.getNodeLevels());
|
||||||
}
|
}
|
||||||
|
|
||||||
public SavedClassInformation(PlayerDataManager.DefaultPlayerData data) {
|
public SavedClassInformation(PlayerDataManager.DefaultPlayerData data) {
|
||||||
this(data.getLevel(), 0, data.getSkillPoints(), data.getAttributePoints(), data.getAttrReallocPoints(),data.getSkillTreeReallocPoints(),data.getSkillReallocPoints());
|
this(data.getLevel(), 0, data.getSkillPoints(), data.getAttributePoints(), data.getAttrReallocPoints(), data.getSkillTreeReallocPoints(), data.getSkillReallocPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
public SavedClassInformation(int level, double experience, int skillPoints, int attributePoints, int attributeReallocationPoints,int skillTreeReallocationPoints,int skillReallocationPoints) {
|
public SavedClassInformation(int level, double experience, int skillPoints, int attributePoints, int attributeReallocationPoints, int skillTreeReallocationPoints, int skillReallocationPoints) {
|
||||||
this(level, experience, skillPoints, attributePoints, attributeReallocationPoints,skillTreeReallocationPoints,skillReallocationPoints, new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>());
|
this(level, experience, skillPoints, attributePoints, attributeReallocationPoints, skillTreeReallocationPoints, skillReallocationPoints, new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public SavedClassInformation(int level, double experience, int skillPoints, int attributePoints, int attributeReallocationPoints, int skillTreeReallocationPoints, int skillReallocationPoints,
|
public SavedClassInformation(int level, double experience, int skillPoints, int attributePoints, int attributeReallocationPoints, int skillTreeReallocationPoints, int skillReallocationPoints,
|
||||||
@ -139,16 +139,37 @@ public class SavedClassInformation {
|
|||||||
registerSkillLevel(skill.getHandler().getId(), level);
|
registerSkillLevel(skill.getHandler().getId(), level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getSkillTreeReallocationPoints() {
|
||||||
|
return skillTreeReallocationPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSkillReallocationPoints() {
|
||||||
|
return skillReallocationPoints;
|
||||||
|
}
|
||||||
|
|
||||||
public void registerSkillLevel(String attribute, int level) {
|
public void registerSkillLevel(String attribute, int level) {
|
||||||
skills.put(attribute, level);
|
skills.put(attribute, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<String> getAttributeKeys() {
|
|
||||||
return attributes.keySet();
|
public Set<SkillTreeNode> getNodeKeys() {
|
||||||
|
return nodeLevels.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAttributeLevel(PlayerAttribute attribute) {
|
public int getNodeLevel(SkillTreeNode node) {
|
||||||
return getAttributeLevel(attribute.getId());
|
return nodeLevels.get(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getSkillTreePointsKeys() {
|
||||||
|
return skillTreePoints.keySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSkillTreePoints(String skillTreeId) {
|
||||||
|
return skillTreePoints.get(skillTreeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getAttributeKeys() {
|
||||||
|
return attributes.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAttributeLevel(String id) {
|
public int getAttributeLevel(String id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user