mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 08:25:21 +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();
|
||||
|
||||
player
|
||||
.getTeamManager()
|
||||
.getTeams()
|
||||
.forEach((id, teamInfo) -> proto.putAvatarTeamMap(id, teamInfo.toProto(player)));
|
||||
var teamManager = player.getTeamManager();
|
||||
if (teamManager.isUsingTrialTeam()) {
|
||||
proto.addAllTempAvatarGuidList(teamManager.getActiveTeam().stream()
|
||||
.map(entity -> entity.getAvatar().getGuid()).toList());
|
||||
} else {
|
||||
teamManager.getTeams().forEach((key, value) ->
|
||||
proto.putAvatarTeamMap(key, value.toProto(player)));
|
||||
}
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user