Custom Teams (#1731)

* Add support for creating and deleting custom teams.

* Add support for creating and deleting custom teams.

* Move some logic to TeamInfo::toProto
This commit is contained in:
GanyusLeftHorn
2022-09-01 02:21:47 +02:00
committed by GitHub
Unverified
parent 4f015c1077
commit 712d17631f
17 changed files with 3678 additions and 125 deletions
@@ -19,15 +19,7 @@ public class PacketAvatarTeamUpdateNotify extends BasePacket {
for (Entry<Integer, TeamInfo> entry : player.getTeamManager().getTeams().entrySet()) {
TeamInfo teamInfo = entry.getValue();
AvatarTeam.Builder avatarTeam = AvatarTeam.newBuilder()
.setTeamName(teamInfo.getName());
for (int i = 0; i < teamInfo.getAvatars().size(); i++) {
Avatar avatar = player.getAvatars().getAvatarById(teamInfo.getAvatars().get(i));
avatarTeam.addAvatarGuidList(avatar.getGuid());
}
proto.putAvatarTeamMap(entry.getKey(), avatarTeam.build());
proto.putAvatarTeamMap(entry.getKey(), teamInfo.toProto(player));
}
this.setData(proto);