Skip to content

Commit

Permalink
Fix null pointer in Avatar if skill level map didnt already contain…
Browse files Browse the repository at this point in the history
… skill id
  • Loading branch information
Melledy authored and Melledy committed Aug 22, 2022
1 parent 1e649cd commit 513924a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/emu/grasscutter/game/avatar/Avatar.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public float getFightProperty(FightProperty prop) {
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;
}

Expand Down

0 comments on commit 513924a

Please sign in to comment.