mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Added missing change for quit match.
This commit is contained in:
parent
c28bdf8a02
commit
83ad29b0a9
1 changed files with 12 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue