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
0cbfcdda
Commit
0cbfcdda
authored
Apr 28, 2022
by
Yazawazi
Committed by
GitHub
Apr 28, 2022
Browse files
Should be OK
parent
02ce6242
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/player/Player.java
View file @
0cbfcdda
...
@@ -853,6 +853,8 @@ public class Player {
...
@@ -853,6 +853,8 @@ public class Player {
public
SocialDetail
.
Builder
getSocialDetail
()
{
public
SocialDetail
.
Builder
getSocialDetail
()
{
List
<
SocialShowAvatarInfoOuterClass
.
SocialShowAvatarInfo
>
socialShowAvatarInfoList
=
new
ArrayList
<>();
List
<
SocialShowAvatarInfoOuterClass
.
SocialShowAvatarInfo
>
socialShowAvatarInfoList
=
new
ArrayList
<>();
if
(
this
.
isOnline
())
{
if
(
this
.
getShowAvatarList
()
!=
null
)
{
for
(
int
avatarId
:
this
.
getShowAvatarList
())
{
for
(
int
avatarId
:
this
.
getShowAvatarList
())
{
socialShowAvatarInfoList
.
add
(
socialShowAvatarInfoList
.
add
(
socialShowAvatarInfoList
.
size
(),
socialShowAvatarInfoList
.
size
(),
...
@@ -863,6 +865,24 @@ public class Player {
...
@@ -863,6 +865,24 @@ public class Player {
.
build
()
.
build
()
);
);
}
}
}
}
else
{
List
<
Integer
>
showAvatarList
=
DatabaseHelper
.
getPlayerById
(
id
).
getShowAvatarList
();
AvatarStorage
avatars
=
DatabaseHelper
.
getPlayerById
(
id
).
getAvatars
();
avatars
.
loadFromDatabase
();
if
(
showAvatarList
!=
null
)
{
for
(
int
avatarId
:
showAvatarList
)
{
socialShowAvatarInfoList
.
add
(
socialShowAvatarInfoList
.
size
(),
SocialShowAvatarInfoOuterClass
.
SocialShowAvatarInfo
.
newBuilder
()
.
setAvatarId
(
avatarId
)
.
setLevel
(
avatars
.
getAvatarById
(
avatarId
).
getLevel
())
.
setCostumeId
(
avatars
.
getAvatarById
(
avatarId
).
getCostume
())
.
build
()
);
}
}
}
SocialDetail
.
Builder
social
=
SocialDetail
.
newBuilder
()
SocialDetail
.
Builder
social
=
SocialDetail
.
newBuilder
()
.
setUid
(
this
.
getUid
())
.
setUid
(
this
.
getUid
())
...
...
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