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
5aaa1bda
Commit
5aaa1bda
authored
Aug 23, 2022
by
AnimeGitB
Browse files
Avoid potential NPE on WL0 (#1693)
parent
6e35625f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/managers/blossom/BlossomManager.java
View file @
5aaa1bda
...
...
@@ -20,8 +20,6 @@ import emu.grasscutter.net.proto.BlossomBriefInfoOuterClass;
import
emu.grasscutter.net.proto.VisionTypeOuterClass
;
import
emu.grasscutter.server.packet.send.PacketBlossomBriefInfoNotify
;
import
emu.grasscutter.utils.Utils
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.IntArrayList
;
import
it.unimi.dsi.fastutil.ints.IntList
;
...
...
@@ -127,7 +125,8 @@ public class BlossomManager {
public
void
notifyIcon
()
{
final
int
wl
=
getWorldLevel
();
final
int
worldLevel
=
(
wl
<
0
)
?
0
:
((
wl
>
8
)
?
8
:
wl
);
final
int
monsterLevel
=
GameData
.
getWorldLevelDataMap
().
get
(
worldLevel
).
getMonsterLevel
();
final
var
worldLevelData
=
GameData
.
getWorldLevelDataMap
().
get
(
worldLevel
);
final
int
monsterLevel
=
(
worldLevelData
!=
null
)
?
worldLevelData
.
getMonsterLevel
()
:
1
;
List
<
BlossomBriefInfoOuterClass
.
BlossomBriefInfo
>
blossoms
=
new
ArrayList
<>();
GameDepot
.
getSpawnLists
().
forEach
((
gridBlockId
,
spawnDataEntryList
)
->
{
int
sceneId
=
gridBlockId
.
getSceneId
();
...
...
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