Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
513924af
Unverified
Commit
513924af
authored
Aug 21, 2022
by
Melledy
Browse files
Fix null pointer in `Avatar` if skill level map didnt already contain skill id
parent
1e649cd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/avatar/Avatar.java
View file @
513924af
...
@@ -302,7 +302,7 @@ public class Avatar {
...
@@ -302,7 +302,7 @@ public class Avatar {
public
Map
<
Integer
,
Integer
>
getSkillLevelMap
()
{
// Returns a copy of the skill levels for the current skillDepot.
public
Map
<
Integer
,
Integer
>
getSkillLevelMap
()
{
// Returns a copy of the skill levels for the current skillDepot.
var
map
=
new
Int2IntOpenHashMap
();
var
map
=
new
Int2IntOpenHashMap
();
this
.
skillDepot
.
getSkillsAndEnergySkill
()
this
.
skillDepot
.
getSkillsAndEnergySkill
()
.
forEach
(
skillId
->
map
.
computeIfAbsen
t
(
skillId
,
this
.
skillLevelMap
::
get
));
.
forEach
(
skillId
->
map
.
pu
t
(
skillId
,
this
.
skillLevelMap
.
computeIfAbsent
(
skillId
,
id
->
1
).
intValue
()
));
return
map
;
return
map
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment