Added missing change for quit match.

This commit is contained in:
LevelX2 2013-07-02 23:49:07 +02:00
parent c28bdf8a02
commit 83ad29b0a9

View file

@ -496,6 +496,7 @@ public class MageServerImpl implements MageServer {
public void execute() {
User user = SessionManager.getInstance().getUser(sessionId);
if (user != null) {
// logger.warn("sendPlayerUUID gameId=" + gameId + " sessionId=" + sessionId + " username=" + user.getName());
user.sendPlayerUUID(gameId, data);
} else {
logger.warn("Your session expired: gameId=" + gameId + ", sessionId=" + sessionId);
@ -571,6 +572,17 @@ public class MageServerImpl implements MageServer {
});
}
@Override
public void quitMatch(final UUID gameId, final String sessionId) throws MageException {
execute("quitMatch", sessionId, new Action() {
@Override
public void execute() {
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
GameManager.getInstance().quitMatch(gameId, userId);
}
});
}
@Override
public void undo(final UUID gameId, final String sessionId) throws MageException {
execute("undo", sessionId, new Action() {