mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 18:12:53 +08:00
Should be OK
This commit is contained in:
parent
02ce62422f
commit
0cbfcddae4
@ -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 {
|
|||||||
.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())
|
||||||
|
Loading…
Reference in New Issue
Block a user