mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-30 19:48:51 +00:00
Should be OK
This commit is contained in:
parent
ba95637dd3
commit
c2a159be13
@ -853,15 +853,35 @@ public class Player {
|
|||||||
|
|
||||||
public SocialDetail.Builder getSocialDetail() {
|
public SocialDetail.Builder getSocialDetail() {
|
||||||
List<SocialShowAvatarInfoOuterClass.SocialShowAvatarInfo> socialShowAvatarInfoList = new ArrayList<>();
|
List<SocialShowAvatarInfoOuterClass.SocialShowAvatarInfo> socialShowAvatarInfoList = new ArrayList<>();
|
||||||
for (int avatarId : this.getShowAvatarList()) {
|
if (this.isOnline()) {
|
||||||
socialShowAvatarInfoList.add(
|
if (this.getShowAvatarList() != null) {
|
||||||
socialShowAvatarInfoList.size(),
|
for (int avatarId : this.getShowAvatarList()) {
|
||||||
SocialShowAvatarInfoOuterClass.SocialShowAvatarInfo.newBuilder()
|
socialShowAvatarInfoList.add(
|
||||||
.setAvatarId(avatarId)
|
socialShowAvatarInfoList.size(),
|
||||||
.setLevel(getAvatars().getAvatarById(avatarId).getLevel())
|
SocialShowAvatarInfoOuterClass.SocialShowAvatarInfo.newBuilder()
|
||||||
.setCostumeId(getAvatars().getAvatarById(avatarId).getCostume())
|
.setAvatarId(avatarId)
|
||||||
.build()
|
.setLevel(getAvatars().getAvatarById(avatarId).getLevel())
|
||||||
);
|
.setCostumeId(getAvatars().getAvatarById(avatarId).getCostume())
|
||||||
|
.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()
|
||||||
|
Loading…
Reference in New Issue
Block a user