* Fixed bug of player handling if player left during sideboarding. Added player info to show if tournament player is in sideboarding state.

This commit is contained in:
LevelX2 2014-10-25 16:03:29 +02:00
parent 791cc828c4
commit 6db39452cd
4 changed files with 42 additions and 16 deletions

View file

@ -191,13 +191,8 @@ public class TableManager {
public void userQuitTournamentSubTables(UUID tournamentId, UUID userId) {
for (TableController controller: controllers.values()) {
if (controller.getTable().isTournamentSubTable() && controller.getTable().getTournament().getId().equals(tournamentId)) {
if (controller.isPlayer(userId)) {
Match match = controller.getTable().getMatch();
if (match != null) {
if (!match.hasEnded() && match.getGame() != null) {
GameManager.getInstance().quitMatch(match.getGame().getId(), userId);
}
}
if (controller.hasPlayer(userId)) {
controller.leaveTable(userId);
}
}
}