Fix for the audio trigger of 'Player joined the table' not being fired.

This commit is contained in:
spjspj 2017-04-25 20:12:21 +10:00
parent a4e7c2b407
commit 4c85d89b64

View file

@ -54,6 +54,7 @@ import mage.client.util.GUISizeHelper;
import mage.client.util.audio.AudioManager; import mage.client.util.audio.AudioManager;
import mage.client.util.gui.TableUtil; import mage.client.util.gui.TableUtil;
import mage.client.util.gui.countryBox.CountryCellRenderer; import mage.client.util.gui.countryBox.CountryCellRenderer;
import mage.players.PlayerType;
import mage.remote.Session; import mage.remote.Session;
import mage.view.SeatView; import mage.view.SeatView;
import mage.view.TableView; import mage.view.TableView;
@ -451,13 +452,11 @@ class UpdateSeatsTask extends SwingWorker<Void, TableView> {
int playerCount = 0; int playerCount = 0;
if (tableView != null) { if (tableView != null) {
for (SeatView seatView : tableView.getSeats()) { for (SeatView seatView : tableView.getSeats()) {
if (seatView.getPlayerId() != null) { if (seatView.getPlayerId() != null && seatView.getPlayerType() == PlayerType.HUMAN) {
if (seatView.getPlayerType().toString().equals("Human")) {
playerCount++; playerCount++;
} }
} }
} }
}
return playerCount; return playerCount;
} }