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
7189e370
Commit
7189e370
authored
Jul 21, 2022
by
Melledy
Browse files
Use `getOpenStateMap()` in PlayerOpenStateManager
parent
f87088f4
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/player/PlayerOpenStateManager.java
View file @
7189e370
...
...
@@ -44,11 +44,11 @@ public class PlayerOpenStateManager extends BasePlayerDataManager {
}
public
int
getOpenState
(
OpenState
openState
)
{
return
this
.
map
.
getOrDefault
(
openState
.
getValue
(),
0
);
return
getOpenStateMap
()
.
getOrDefault
(
openState
.
getValue
(),
0
);
}
public
void
setOpenState
(
OpenState
openState
,
Integer
value
)
{
Integer
previousValue
=
this
.
map
.
getOrDefault
(
openState
.
getValue
(),
0
);
Integer
previousValue
=
getOpenStateMap
()
.
getOrDefault
(
openState
.
getValue
(),
0
);
if
(
value
!=
previousValue
)
{
this
.
map
.
put
(
openState
.
getValue
(),
value
);
player
.
getSession
().
send
(
new
PacketOpenStateChangeNotify
(
openState
.
getValue
(),
value
));
...
...
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