mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
network play: fix for Commander and Tiny Leaders variants
This method is called numerous times, many before the Commander data has been populated on the PlayerView objects. This is reflected a few lines above where similar logic is applied to the current PlayerView. This simply applies similar logic to the player's opponents. Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
@@ -129,6 +129,12 @@ public class PlayerView extends GameEntityView {
|
||||
}
|
||||
|
||||
final FCollectionView<PlayerView> opponents = getOpponents();
|
||||
for (PlayerView opponent: opponents) {
|
||||
if (opponent.getCommanders() == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
final List<String> info = Lists.newArrayListWithExpectedSize(opponents.size());
|
||||
info.add(TextUtil.concatWithSpace("Commanders:", Lang.joinHomogenous(commanders)));
|
||||
for (final PlayerView p : Iterables.concat(Collections.singleton(this), opponents)) {
|
||||
|
||||
Reference in New Issue
Block a user