Improved player quits / leaves mage handling for tournaments (not perfect yet, will more improve it).

This commit is contained in:
LevelX2 2013-07-18 17:40:06 +02:00
parent 0d1e45fff6
commit 85b8edf630
12 changed files with 155 additions and 34 deletions

View file

@ -584,6 +584,17 @@ public class MageServerImpl implements MageServer {
});
}
@Override
public void quitTournament(final UUID tournamentId, final String sessionId) throws MageException {
execute("quitTournament", sessionId, new Action() {
@Override
public void execute() {
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
TournamentManager.getInstance().quit(tournamentId, userId);
}
});
}
@Override
public void undo(final UUID gameId, final String sessionId) throws MageException {
execute("undo", sessionId, new Action() {