- Fixed issue with being able to play more than allowed number of games in a league in certain circumstances.

This commit is contained in:
marcins78
2013-09-10 15:25:21 +00:00
parent cff34857f1
commit d52541aaca
2 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
<pre style="font-size:80%">
<b>10 Sep. 2013</b>
- Fixed issue with being able to play more than allowed number of games in a league in certain circumstances.
<b>5 Sep. 2013</b>
- "Terrible and Evil" now requires to exert at least once.

View File

@@ -222,14 +222,14 @@ public class HallServer extends AbstractServer {
private void verifyNotPlayingLeagueGame(Player player, League league) throws HallException {
for (AwaitingTable awaitingTable : _awaitingTables.values()) {
if (awaitingTable.getLeague() == league
if (league.equals(awaitingTable.getLeague())
&& awaitingTable.hasPlayer(player.getName())) {
throw new HallException("You can't play in multiple league games at the same time");
}
}
for (RunningTable runningTable : _runningTables.values()) {
if (runningTable.getLeague() == league) {
if (league.equals(runningTable.getLeague())) {
LotroGameMediator game = runningTable.getLotroGameMediator();
if (game != null && !game.isFinished() && game.getPlayersPlaying().contains(player.getName()))
throw new HallException("You can't play in multiple league games at the same time");