Unverified Commit 513924af authored by Melledy's avatar Melledy
Browse files

Fix null pointer in `Avatar` if skill level map didnt already contain skill id

parent 1e649cd8
......@@ -302,7 +302,7 @@ public class Avatar {
public Map<Integer, Integer> getSkillLevelMap() { // Returns a copy of the skill levels for the current skillDepot.
var map = new Int2IntOpenHashMap();
this.skillDepot.getSkillsAndEnergySkill()
.forEach(skillId -> map.computeIfAbsent(skillId, this.skillLevelMap::get));
.forEach(skillId -> map.put(skillId, this.skillLevelMap.computeIfAbsent(skillId, id -> 1).intValue()));
return map;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment