forked from Upstream/mmocore
Modification to have the skillSlots seen has as a Map<Integer,ClassSkill> rather than a List<ClassSkill>
This commit is contained in:
parent
2ec66e92ef
commit
7538b66673
@ -220,6 +220,14 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
return new HashMap(skillTreePoints);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ClassSkill> mapBoundSkills() {
|
||||
Map<Integer,ClassSkill> result= new HashMap<>();
|
||||
for(int slot:boundSkills.keySet())
|
||||
result.put(slot,boundSkills.get(slot).getClassSkill());
|
||||
return result;
|
||||
}
|
||||
|
||||
public void clearSkillTreePoints() {
|
||||
skillTreePoints.clear();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public interface ClassDataContainer {
|
||||
|
||||
Map<String, Integer> mapSkillTreePoints();
|
||||
|
||||
List<ClassSkill> getBoundSkills();
|
||||
Map<Integer,ClassSkill> mapBoundSkills();
|
||||
|
||||
Map<SkillTreeNode, Integer> getNodeLevels();
|
||||
|
||||
|
@ -128,8 +128,8 @@ public class DefaultPlayerData implements ClassDataContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ClassSkill> getBoundSkills() {
|
||||
return new ArrayList<>();
|
||||
public Map<Integer,ClassSkill> mapBoundSkills() {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
public void apply(PlayerData player) {
|
||||
|
Loading…
Reference in New Issue
Block a user