mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-25 11:57:35 +00:00
Fix null pointer in Avatar
if skill level map didnt already contain skill id
This commit is contained in:
parent
1e649cd804
commit
513924af7c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user