forked from External/mage
* C17 Enchantment Curses - Fixed a bug that could create game errors (index out of bounds).
This commit is contained in:
parent
0affb45264
commit
db93e3f672
16 changed files with 179 additions and 159 deletions
|
|
@ -168,8 +168,13 @@ public abstract class MatchImpl implements Match {
|
|||
MatchPlayer matchWinner = null;
|
||||
for (MatchPlayer matchPlayer : players) {
|
||||
if (!matchPlayer.hasQuit()) {
|
||||
activePlayers++;
|
||||
matchWinner = matchPlayer;
|
||||
if (matchPlayer.getDeck() == null) {
|
||||
logger.error("MatchPlayer's deck was null - matchId " + this.getId() + " - " + matchPlayer.getName());
|
||||
matchPlayer.setQuit(true);
|
||||
} else {
|
||||
activePlayers++;
|
||||
matchWinner = matchPlayer;
|
||||
}
|
||||
}
|
||||
if (matchPlayer.getWins() >= options.getWinsNeeded()) {
|
||||
matchPlayer.setMatchWinner(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue