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
f00db7b7
Commit
f00db7b7
authored
Jun 25, 2022
by
AnimeGitB
Committed by
Melledy
Jun 25, 2022
Browse files
Allow offline Player objects to return their Account
parent
a3b4a118
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/player/Player.java
View file @
f00db7b7
...
...
@@ -7,6 +7,7 @@ import emu.grasscutter.data.GameData;
import
emu.grasscutter.data.excels.PlayerLevelData
;
import
emu.grasscutter.data.excels.WeatherData
;
import
emu.grasscutter.database.DatabaseHelper
;
import
emu.grasscutter.database.DatabaseManager
;
import
emu.grasscutter.game.Account
;
import
emu.grasscutter.game.CoopRequest
;
import
emu.grasscutter.game.ability.AbilityManager
;
...
...
@@ -295,7 +296,9 @@ public class Player {
}
public
Account
getAccount
()
{
return
account
;
if
(
this
.
account
==
null
)
this
.
account
=
DatabaseHelper
.
getAccountById
(
Integer
.
toString
(
this
.
id
));
return
this
.
account
;
}
public
void
setAccount
(
Account
account
)
{
...
...
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