- Fixed issue with being able to play more than allowed number of games in a league in certain circumstances.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user