mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Fixed a problem with NPE and match start. Chanes to handling of logging.
This commit is contained in:
parent
f670cb3977
commit
9c1f69983b
4 changed files with 18 additions and 15 deletions
|
|
@ -821,19 +821,18 @@ public class TableController {
|
|||
int humanPlayers = 0;
|
||||
int aiPlayers = 0 ;
|
||||
int validHumanPlayers = 0;
|
||||
if (match == null && !(table.getState().equals(TableState.WAITING) ||
|
||||
table.getState().equals(TableState.STARTING) ||
|
||||
table.getState().equals(TableState.READY_TO_START) )) {
|
||||
logger.debug("- Match table with no match:");
|
||||
logger.debug("-- matchId:" + match.getId() + " [" + match.getName() + "]");
|
||||
// return false;
|
||||
}
|
||||
if (match.isDoneSideboarding()) {
|
||||
if (match.getGame() == null) {
|
||||
// no sideboarding and not active game -> match seems to hang (maybe the Draw bug)
|
||||
logger.debug("- Match with no active game and not in sideboard state:");
|
||||
if (!(table.getState().equals(TableState.WAITING) || table.getState().equals(TableState.STARTING) || table.getState().equals(TableState.READY_TO_START))) {
|
||||
if (match == null) {
|
||||
logger.debug("- Match table with no match:");
|
||||
logger.debug("-- matchId:" + match.getId() + " [" + match.getName() + "]");
|
||||
// return false;
|
||||
} else {
|
||||
if (match.isDoneSideboarding() && match.getGame() == null) {
|
||||
// no sideboarding and not active game -> match seems to hang (maybe the Draw bug)
|
||||
logger.debug("- Match with no active game and not in sideboard state:");
|
||||
logger.debug("-- matchId:" + match.getId() + " [" + match.getName() + "]");
|
||||
// return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// check for active players
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue