Merge pull request #3234 from spjspj/master

Fix for the audio trigger of 'Player joined the table' not being fired.
This commit is contained in:
spjspj 2017-04-25 18:18:25 +10:00 committed by GitHub
commit fdd55e70e0

View file

@ -437,6 +437,7 @@ class UpdateSeatsTask extends SwingWorker<Void, TableView> {
AudioManager.playPlayerJoinedTable(); AudioManager.playPlayerJoinedTable();
} else { } else {
MageTray.instance.displayMessage("A player left your game."); MageTray.instance.displayMessage("A player left your game.");
AudioManager.playPlayerLeft();
} }
MageTray.instance.blink(); MageTray.instance.blink();
} }
@ -450,11 +451,13 @@ 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 && seatView.getPlayerType().equals("Human")) { if (seatView.getPlayerId() != null) {
if (seatView.getPlayerType().toString().equals("Human")) {
playerCount++; playerCount++;
} }
} }
} }
}
return playerCount; return playerCount;
} }