mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:32:53 +08: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;
|
package emu.grasscutter.game.player;
|
||||||
|
|
||||||
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
|
||||||
|
|
||||||
import dev.morphia.annotations.Entity;
|
import dev.morphia.annotations.Entity;
|
||||||
import emu.grasscutter.game.avatar.Avatar;
|
import emu.grasscutter.game.avatar.Avatar;
|
||||||
import emu.grasscutter.net.proto.AvatarTeamOuterClass.AvatarTeam;
|
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
|
@Entity
|
||||||
public final class TeamInfo {
|
public final class TeamInfo {
|
||||||
@ -87,6 +87,8 @@ public final class TeamInfo {
|
|||||||
|
|
||||||
for (int i = 0; i < this.getAvatars().size(); i++) {
|
for (int i = 0; i < this.getAvatars().size(); i++) {
|
||||||
Avatar avatar = player.getAvatars().getAvatarById(this.getAvatars().get(i));
|
Avatar avatar = player.getAvatars().getAvatarById(this.getAvatars().get(i));
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
avatarTeam.addAvatarGuidList(avatar.getGuid());
|
avatarTeam.addAvatarGuidList(avatar.getGuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user