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
964e73f0
Commit
964e73f0
authored
Jul 26, 2022
by
ah
Browse files
small nullpointer fix in EntityGadget, in case meta gadget is not set
parent
bb8ae4c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/entity/EntityGadget.java
View file @
964e73f0
...
@@ -219,9 +219,12 @@ public class EntityGadget extends EntityBaseGadget {
...
@@ -219,9 +219,12 @@ public class EntityGadget extends EntityBaseGadget {
.
setConfigId
(
this
.
getConfigId
())
.
setConfigId
(
this
.
getConfigId
())
.
setGadgetState
(
this
.
getState
())
.
setGadgetState
(
this
.
getState
())
.
setIsEnableInteract
(
true
)
.
setIsEnableInteract
(
true
)
.
setDraftId
(
this
.
metaGadget
.
draft_id
)
.
setAuthorityPeerId
(
this
.
getScene
().
getWorld
().
getHostPeerId
());
.
setAuthorityPeerId
(
this
.
getScene
().
getWorld
().
getHostPeerId
());
if
(
this
.
metaGadget
!=
null
)
{
gadgetInfo
.
setDraftId
(
this
.
metaGadget
.
draft_id
);
}
if
(
this
.
getContent
()
!=
null
)
{
if
(
this
.
getContent
()
!=
null
)
{
this
.
getContent
().
onBuildProto
(
gadgetInfo
);
this
.
getContent
().
onBuildProto
(
gadgetInfo
);
}
}
...
...
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