mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Fix issue with trial teams
This commit is contained in:
@@ -12,10 +12,14 @@ public class PacketAvatarTeamUpdateNotify extends BasePacket {
|
|||||||
|
|
||||||
AvatarTeamUpdateNotify.Builder proto = AvatarTeamUpdateNotify.newBuilder();
|
AvatarTeamUpdateNotify.Builder proto = AvatarTeamUpdateNotify.newBuilder();
|
||||||
|
|
||||||
player
|
var teamManager = player.getTeamManager();
|
||||||
.getTeamManager()
|
if (teamManager.isUsingTrialTeam()) {
|
||||||
.getTeams()
|
proto.addAllTempAvatarGuidList(teamManager.getActiveTeam().stream()
|
||||||
.forEach((id, teamInfo) -> proto.putAvatarTeamMap(id, teamInfo.toProto(player)));
|
.map(entity -> entity.getAvatar().getGuid()).toList());
|
||||||
|
} else {
|
||||||
|
teamManager.getTeams().forEach((key, value) ->
|
||||||
|
proto.putAvatarTeamMap(key, value.toProto(player)));
|
||||||
|
}
|
||||||
|
|
||||||
this.setData(proto);
|
this.setData(proto);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user