mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 20:03:21 +00:00
Check for an invalid avatar in a team
This commit is contained in:
parent
20f0cda3e0
commit
43f3494073
@ -1,12 +1,12 @@
|
||||
package emu.grasscutter.game.player;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
||||
|
||||
import dev.morphia.annotations.Entity;
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.net.proto.AvatarTeamOuterClass.AvatarTeam;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
||||
|
||||
@Entity
|
||||
public final class TeamInfo {
|
||||
@ -87,6 +87,8 @@ public final class TeamInfo {
|
||||
|
||||
for (int i = 0; i < this.getAvatars().size(); i++) {
|
||||
Avatar avatar = player.getAvatars().getAvatarById(this.getAvatars().get(i));
|
||||
if (avatar == null) continue;
|
||||
|
||||
avatarTeam.addAvatarGuidList(avatar.getGuid());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user