diff --git a/Mage.Client/pom.xml b/Mage.Client/pom.xml index f1d28473b5..f7bd8e184d 100644 --- a/Mage.Client/pom.xml +++ b/Mage.Client/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 org.mage diff --git a/Mage.Common/pom.xml b/Mage.Common/pom.xml index 303bbbf223..156b33b124 100644 --- a/Mage.Common/pom.xml +++ b/Mage.Common/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 mage-common diff --git a/Mage.Common/src/mage/interfaces/MageServer.java b/Mage.Common/src/mage/interfaces/MageServer.java index 762c7323e2..947cc83531 100644 --- a/Mage.Common/src/mage/interfaces/MageServer.java +++ b/Mage.Common/src/mage/interfaces/MageServer.java @@ -79,7 +79,7 @@ public interface MageServer { List getMissingCardsData(List classNames); // user methods - boolean setUserData(String userName, String sessionId, UserData userData) throws MageException; + boolean setUserData(String userName, String sessionId, UserData userData, String clientVersion) throws MageException; void sendFeedbackMessage(String sessionId, String username, String title, String type, String message, String email) throws MageException; diff --git a/Mage.Common/src/mage/remote/SessionImpl.java b/Mage.Common/src/mage/remote/SessionImpl.java index ebf40c3888..b3a43bdf38 100644 --- a/Mage.Common/src/mage/remote/SessionImpl.java +++ b/Mage.Common/src/mage/remote/SessionImpl.java @@ -223,7 +223,7 @@ public class SessionImpl implements Session { // for backward compatibility. don't remove twice call - first one does nothing but for version checking registerResult = server.connectUser(connection.getUsername(), connection.getPassword(), sessionId, client.getVersion()); if (registerResult) { - server.setUserData(connection.getUsername(), sessionId, connection.getUserData()); + server.setUserData(connection.getUsername(), sessionId, connection.getUserData(), client.getVersion().toString()); } } else { registerResult = server.connectAdmin(connection.getAdminPassword(), sessionId, client.getVersion()); @@ -1544,7 +1544,7 @@ public class SessionImpl implements Session { public boolean updatePreferencesForServer(UserData userData) { try { if (isConnected()) { - server.setUserData(connection.getUsername(), sessionId, userData); + server.setUserData(connection.getUsername(), sessionId, userData, null); } return true; } catch (MageException ex) { diff --git a/Mage.Common/src/mage/utils/MageVersion.java b/Mage.Common/src/mage/utils/MageVersion.java index 70173cb480..e94afb5767 100644 --- a/Mage.Common/src/mage/utils/MageVersion.java +++ b/Mage.Common/src/mage/utils/MageVersion.java @@ -40,8 +40,8 @@ public class MageVersion implements Serializable, Comparable { */ public final static int MAGE_VERSION_MAJOR = 1; public final static int MAGE_VERSION_MINOR = 4; - public final static int MAGE_VERSION_PATCH = 16; - public final static String MAGE_VERSION_MINOR_PATCH = "v4"; + public final static int MAGE_VERSION_PATCH = 17; + public final static String MAGE_VERSION_MINOR_PATCH = "V0"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage.Common/src/mage/view/UserView.java b/Mage.Common/src/mage/view/UserView.java index 1946985789..e1118d32a0 100644 --- a/Mage.Common/src/mage/view/UserView.java +++ b/Mage.Common/src/mage/view/UserView.java @@ -44,8 +44,9 @@ public class UserView implements Serializable { private final String gameInfo; private final String userState; private final Date muteChatUntil; + private final String clientVersion; - public UserView(String userName, String host, String sessionId, Date timeConnected, String gameInfo, String userState, Date muteChatUntil) { + public UserView(String userName, String host, String sessionId, Date timeConnected, String gameInfo, String userState, Date muteChatUntil, String clientVersion) { this.userName = userName; this.host = host; this.sessionId = sessionId; @@ -53,6 +54,7 @@ public class UserView implements Serializable { this.gameInfo = gameInfo; this.userState = userState; this.muteChatUntil = muteChatUntil; + this.clientVersion = clientVersion; } public String getUserName() { @@ -67,10 +69,6 @@ public class UserView implements Serializable { return sessionId; } - public Date getConnectionTime() { - return timeConnected; - } - public String getGameInfo() { return gameInfo; } @@ -83,4 +81,12 @@ public class UserView implements Serializable { return muteChatUntil; } + public String getClientVersion() { + return clientVersion; + } + + public Date getTimeConnected() { + return timeConnected; + } + } diff --git a/Mage.Plugins/Mage.Counter.Plugin/pom.xml b/Mage.Plugins/Mage.Counter.Plugin/pom.xml index 7f12f6d02b..5b00949552 100644 --- a/Mage.Plugins/Mage.Counter.Plugin/pom.xml +++ b/Mage.Plugins/Mage.Counter.Plugin/pom.xml @@ -7,7 +7,7 @@ org.mage mage-plugins - 1.4.16 + 1.4.17 mage-counter-plugin diff --git a/Mage.Plugins/pom.xml b/Mage.Plugins/pom.xml index 0e9f6be6ed..cc28593316 100644 --- a/Mage.Plugins/pom.xml +++ b/Mage.Plugins/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 mage-plugins diff --git a/Mage.Server.Console/pom.xml b/Mage.Server.Console/pom.xml index 6d3094fd04..fe8c62527d 100644 --- a/Mage.Server.Console/pom.xml +++ b/Mage.Server.Console/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 org.mage diff --git a/Mage.Server.Console/src/main/java/mage/server/console/ConsolePanel.java b/Mage.Server.Console/src/main/java/mage/server/console/ConsolePanel.java index 460d19a7f3..c69bc5f055 100644 --- a/Mage.Server.Console/src/main/java/mage/server/console/ConsolePanel.java +++ b/Mage.Server.Console/src/main/java/mage/server/console/ConsolePanel.java @@ -388,8 +388,9 @@ class TableUserModel extends AbstractTableModel { public static final int POS_GAME_INFO = 4; public static final int POS_USER_STATE = 5; public static final int POS_CHAT_MUTE = 6; + public static final int POS_CLIENT_VERSION = 7; - private final String[] columnNames = new String[]{"User Name", "Host", "Time Connected", "SessionId", "Gameinfo", "User state", "Chat mute"}; + private final String[] columnNames = new String[]{"User Name", "Host", "Time Connected", "SessionId", "Gameinfo", "User state", "Chat mute", "Client Version"}; private UserView[] users = new UserView[0]; private static final DateFormat formatterTime = new SimpleDateFormat("HH:mm:ss"); private static final DateFormat formatterTimeStamp = new SimpleDateFormat("yy-M-dd HH:mm:ss"); @@ -417,7 +418,7 @@ class TableUserModel extends AbstractTableModel { case POS_HOST: return users[arg0].getHost(); case POS_TIME_CONNECTED: - return formatterTime.format(users[arg0].getConnectionTime()); + return formatterTime.format(users[arg0].getTimeConnected()); case POS_SESSION_ID: return users[arg0].getSessionId(); case POS_GAME_INFO: @@ -429,6 +430,8 @@ class TableUserModel extends AbstractTableModel { return ""; } return formatterTimeStamp.format(users[arg0].getMuteChatUntil()); + case POS_CLIENT_VERSION: + return users[arg0].getClientVersion(); } return ""; } diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml index f242121690..68bea69ace 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-deck-constructed diff --git a/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml b/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml index 1daff9bf8f..fd64d75b64 100644 --- a/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml +++ b/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-deck-limited diff --git a/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml index 367dfcb26d..42bac77a1f 100644 --- a/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-game-commanderduel diff --git a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml index 784a7c1ff5..990b0eb237 100644 --- a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml @@ -6,7 +6,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-game-commanderfreeforall diff --git a/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml b/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml index 9131170443..fb139c63a7 100644 --- a/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-game-freeforall diff --git a/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml index cb839dfebf..dcdcbba031 100644 --- a/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-game-momirduel diff --git a/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml index c85d3f2e5f..762298b939 100644 --- a/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-game-tinyleadersduel diff --git a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml index 9249ef0cc2..11cb61f421 100644 --- a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml +++ b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-game-twoplayerduel diff --git a/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml b/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml index 6be5b35daa..f0a0c5e521 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-player-ai-draftbot diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml b/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml index f8a803e993..1a15f62edc 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-player-ai-ma diff --git a/Mage.Server.Plugins/Mage.Player.AI/pom.xml b/Mage.Server.Plugins/Mage.Player.AI/pom.xml index a6801f0be6..3ad9ac72fc 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AI/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-player-ai diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml b/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml index 417b7ac48d..fbba0eb3d6 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-player-ai-mcts diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml b/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml index 2b78efbe21..389688395f 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-player-aiminimax diff --git a/Mage.Server.Plugins/Mage.Player.Human/pom.xml b/Mage.Server.Plugins/Mage.Player.Human/pom.xml index f0ced64c3e..55e3c1c33d 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/pom.xml +++ b/Mage.Server.Plugins/Mage.Player.Human/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-player-human diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml index dd97b999e5..bc07b32704 100644 --- a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-tournament-boosterdraft diff --git a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml index 77e462238e..ba9695563b 100644 --- a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-tournament-constructed diff --git a/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml index 2db05dfe6c..4d705ff1a4 100644 --- a/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml +++ b/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml @@ -7,7 +7,7 @@ org.mage mage-server-plugins - 1.4.16 + 1.4.17 mage-tournament-sealed diff --git a/Mage.Server.Plugins/pom.xml b/Mage.Server.Plugins/pom.xml index f9617e6715..17a3ad8059 100644 --- a/Mage.Server.Plugins/pom.xml +++ b/Mage.Server.Plugins/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 mage-server-plugins diff --git a/Mage.Server/pom.xml b/Mage.Server/pom.xml index 81677cd945..c7d41081c6 100644 --- a/Mage.Server/pom.xml +++ b/Mage.Server/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 mage-server diff --git a/Mage.Server/src/main/java/mage/server/ChatSession.java b/Mage.Server/src/main/java/mage/server/ChatSession.java index 3f011f7a0f..14f003b10b 100644 --- a/Mage.Server/src/main/java/mage/server/ChatSession.java +++ b/Mage.Server/src/main/java/mage/server/ChatSession.java @@ -65,7 +65,7 @@ public class ChatSession { if (user != null && !clients.containsKey(userId)) { String userName = user.getName(); clients.put(userId, userName); - broadcast(null, userName + " has joined", MessageColor.BLUE, true, MessageType.STATUS, null); + broadcast(null, userName + " has joined (" + user.getClientVersion() + ")", MessageColor.BLUE, true, MessageType.STATUS, null); logger.trace(userName + " joined chat " + chatId); } } diff --git a/Mage.Server/src/main/java/mage/server/MageServerImpl.java b/Mage.Server/src/main/java/mage/server/MageServerImpl.java index 2a0ca6fe11..c27f009b25 100644 --- a/Mage.Server/src/main/java/mage/server/MageServerImpl.java +++ b/Mage.Server/src/main/java/mage/server/MageServerImpl.java @@ -211,11 +211,11 @@ public class MageServerImpl implements MageServer { } @Override - public boolean setUserData(final String userName, final String sessionId, final UserData userData) throws MageException { + public boolean setUserData(final String userName, final String sessionId, final UserData userData, final String clientVersion) throws MageException { return executeWithResult("setUserData", sessionId, new ActionWithBooleanResult() { @Override public Boolean execute() throws MageException { - return SessionManager.getInstance().setUserData(userName, sessionId, userData); + return SessionManager.getInstance().setUserData(userName, sessionId, userData, clientVersion); } }); } @@ -1073,7 +1073,8 @@ public class MageServerImpl implements MageServer { user.getConnectionTime(), user.getGameInfo(), user.getUserState().toString(), - user.getChatLockedUntil() + user.getChatLockedUntil(), + user.getClientVersion() )); } return users; diff --git a/Mage.Server/src/main/java/mage/server/Session.java b/Mage.Server/src/main/java/mage/server/Session.java index 4482732226..23c8080471 100644 --- a/Mage.Server/src/main/java/mage/server/Session.java +++ b/Mage.Server/src/main/java/mage/server/Session.java @@ -251,9 +251,12 @@ public class Session { this.userId = user.getId(); } - public boolean setUserData(String userName, UserData userData) { + public boolean setUserData(String userName, UserData userData, String clientVersion) { User user = UserManager.getInstance().getUserByName(userName); if (user != null) { + if (clientVersion != null) { + user.setClientVersion(clientVersion); + } if (user.getUserData() == null || user.getUserData().getGroupId() == UserGroup.DEFAULT.getGroupId()) { user.setUserData(userData); } else { diff --git a/Mage.Server/src/main/java/mage/server/SessionManager.java b/Mage.Server/src/main/java/mage/server/SessionManager.java index f52a138a4e..20c7d3ab47 100644 --- a/Mage.Server/src/main/java/mage/server/SessionManager.java +++ b/Mage.Server/src/main/java/mage/server/SessionManager.java @@ -122,10 +122,10 @@ public class SessionManager { return false; } - public boolean setUserData(String userName, String sessionId, UserData userData) throws MageException { + public boolean setUserData(String userName, String sessionId, UserData userData, String clientVersion) throws MageException { Session session = sessions.get(sessionId); if (session != null) { - session.setUserData(userName, userData); + session.setUserData(userName, userData, clientVersion); return true; } return false; diff --git a/Mage.Server/src/main/java/mage/server/User.java b/Mage.Server/src/main/java/mage/server/User.java index 5f6c1e90ef..af9677dec5 100644 --- a/Mage.Server/src/main/java/mage/server/User.java +++ b/Mage.Server/src/main/java/mage/server/User.java @@ -95,6 +95,7 @@ public class User { private boolean active; private Date lockedUntil; private final AuthorizedUser authorizedUser; + private String clientVersion; public User(String userName, String host, AuthorizedUser authorizedUser) { this.userId = UUID.randomUUID(); @@ -125,6 +126,7 @@ public class User { this.watchedGames = new ArrayList<>(); this.tablesToDelete = new ArrayList<>(); this.sessionId = ""; + this.clientVersion = ""; } public String getName() { @@ -172,6 +174,14 @@ public class User { } } + public void setClientVersion(String clientVersion) { + this.clientVersion = clientVersion; + } + + public String getClientVersion() { + return clientVersion; + } + public void setChatLockedUntil(Date chatLockedUntil) { this.chatLockedUntil = chatLockedUntil; updateAuthorizedUser(); diff --git a/Mage.Sets/pom.xml b/Mage.Sets/pom.xml index ff273df408..5a3354b735 100644 --- a/Mage.Sets/pom.xml +++ b/Mage.Sets/pom.xml @@ -7,7 +7,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 org.mage diff --git a/Mage.Stats/pom.xml b/Mage.Stats/pom.xml index 5531d2efd7..334a10aa50 100644 --- a/Mage.Stats/pom.xml +++ b/Mage.Stats/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 org.mage diff --git a/Mage.Tests/pom.xml b/Mage.Tests/pom.xml index f4e0f2e101..e86c07fe5b 100644 --- a/Mage.Tests/pom.xml +++ b/Mage.Tests/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 mage-tests diff --git a/Mage.Tests/src/frozen/org/mage/test/clientside/base/MageBase.java b/Mage.Tests/src/frozen/org/mage/test/clientside/base/MageBase.java index 18e0d955ca..e5721a4b38 100644 --- a/Mage.Tests/src/frozen/org/mage/test/clientside/base/MageBase.java +++ b/Mage.Tests/src/frozen/org/mage/test/clientside/base/MageBase.java @@ -1,16 +1,5 @@ package org.mage.test.clientside.base; -import mage.interfaces.MageException; -import mage.interfaces.Server; -import mage.interfaces.ServerState; -import mage.interfaces.callback.CallbackClient; -import mage.interfaces.callback.CallbackClientDaemon; -import mage.interfaces.callback.ClientCallback; -import mage.server.Main; -import mage.sets.Sets; -import mage.util.Logging; -import mage.view.*; - import java.rmi.NotBoundException; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; @@ -22,14 +11,25 @@ import java.util.logging.Logger; import mage.constants.MultiplayerAttackOption; import mage.constants.RangeOfInfluence; import mage.game.match.MatchOptions; +import mage.interfaces.MageException; +import mage.interfaces.Server; +import mage.interfaces.ServerState; +import mage.interfaces.callback.CallbackClient; +import mage.interfaces.callback.CallbackClientDaemon; +import mage.interfaces.callback.ClientCallback; +import mage.server.Main; +import mage.sets.Sets; +import mage.util.Logging; +import mage.view.*; /** - * Base for starting Mage server. - * Controls interactions between MageAPI and Mage Server. + * Base for starting Mage server. Controls interactions between MageAPI and Mage + * Server. * * @author nantuko */ public class MageBase { + /** * MageBase single instance */ @@ -96,10 +96,10 @@ public class MageBase { Registry reg = LocateRegistry.getRegistry(serverName, port); server = (Server) reg.lookup("mage-server"); sessionId = server.registerClient(userName, UUID.randomUUID()); - CallbackClient client = new CallbackClient(){ + CallbackClient client = new CallbackClient() { @Override public void processCallback(ClientCallback callback) { - logger.info("IN >> " + callback.getMessageId() + " - " + callback.getMethod()); + logger.log(Level.INFO, "IN >> {0} - {1}", new Object[]{callback.getMessageId(), callback.getMethod()}); try { if (callback.getMethod().equals("startGame")) { TableClientMessage data = (TableClientMessage) callback.getData(); @@ -119,14 +119,14 @@ public class MageBase { } } else if (callback.getMethod().equals("gameTarget")) { GameClientMessage message = (GameClientMessage) callback.getData(); - logger.info("TARGET >> " + message.getMessage() + " >> " + message.getTargets()); + logger.log(Level.INFO, "TARGET >> {0} >> {1}", new Object[]{message.getMessage(), message.getTargets()}); if (message.getMessage().equals("Select a starting player")) { - logger.info(" Sending >> " + playerId); + logger.log(Level.INFO, " Sending >> {0}", playerId); server.sendPlayerUUID(gameId, sessionId, playerId); } } else if (callback.getMethod().equals("gameSelect")) { GameClientMessage message = (GameClientMessage) callback.getData(); - logger.info("SELECT >> " + message.getMessage()); + logger.log(Level.INFO, "SELECT >> {0}", message.getMessage()); if (phaseToWait == null) { synchronized (sync) { sync.wait(); @@ -195,7 +195,6 @@ public class MageBase { } } - public boolean giveme(String cardName) throws Exception { return server.cheat(gameId, sessionId, playerId, cardName); } @@ -239,9 +238,9 @@ public class MageBase { } } - public boolean checkBattlefield(String cardName) throws Exception { - gameView = server.getGameView(gameId, sessionId, playerId); - for (PlayerView player: gameView.getPlayers()) { + public boolean checkBattlefield(String cardName) throws Exception { + gameView = server.getGameView(gameId, sessionId, playerId); + for (PlayerView player : gameView.getPlayers()) { if (player.getPlayerId().equals(playerId)) { for (PermanentView permanent : player.getBattlefield().values()) { if (permanent.getName().equals(cardName)) { @@ -249,17 +248,17 @@ public class MageBase { } } } - } - return false; - } + } + return false; + } - public boolean checkGraveyardsEmpty() throws Exception { - gameView = server.getGameView(gameId, sessionId, playerId); - for (PlayerView player: gameView.getPlayers()) { + public boolean checkGraveyardsEmpty() throws Exception { + gameView = server.getGameView(gameId, sessionId, playerId); + for (PlayerView player : gameView.getPlayers()) { if (player.getGraveyard().size() > 0) { return false; } - } - return true; - } + } + return true; + } } diff --git a/Mage.Updater/pom.xml b/Mage.Updater/pom.xml index 3d097a2f16..27435a0db3 100644 --- a/Mage.Updater/pom.xml +++ b/Mage.Updater/pom.xml @@ -5,7 +5,7 @@ mage-root org.mage - 1.4.16 + 1.4.17 4.0.0 diff --git a/Mage.Verify/pom.xml b/Mage.Verify/pom.xml index 64e0d4c0e9..52ec5869af 100644 --- a/Mage.Verify/pom.xml +++ b/Mage.Verify/pom.xml @@ -1,76 +1,76 @@ - - - 4.0.0 - - - org.mage - mage-root - 1.4.16 - - - mage-verify - jar - Mage Verify - - - - ${project.groupId} - mage - ${mage-version} - - - ${project.groupId} - mage-sets - ${mage-version} - - - junit - junit - test - - - com.fasterxml.jackson.core - jackson-databind - 2.6.3 - - - - log4j - log4j - jar - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Dfile.encoding=UTF-8 - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - maven-resources-plugin - - UTF-8 - - - - - mage-verify - - - - - + + + 4.0.0 + + + org.mage + mage-root + 1.4.17 + + + mage-verify + jar + Mage Verify + + + + ${project.groupId} + mage + ${mage-version} + + + ${project.groupId} + mage-sets + ${mage-version} + + + junit + junit + test + + + com.fasterxml.jackson.core + jackson-databind + 2.6.3 + + + + log4j + log4j + jar + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Dfile.encoding=UTF-8 + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + maven-resources-plugin + + UTF-8 + + + + + mage-verify + + + + + diff --git a/Mage/pom.xml b/Mage/pom.xml index 93a4e19e77..6d618c5525 100644 --- a/Mage/pom.xml +++ b/Mage/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 mage diff --git a/Utils/release/getting_implemented_cards.txt b/Utils/release/getting_implemented_cards.txt index 79258e84fc..e7617edfce 100644 --- a/Utils/release/getting_implemented_cards.txt +++ b/Utils/release/getting_implemented_cards.txt @@ -108,6 +108,9 @@ git log 73a2ccda9b36552a09cb2b6a5aef37559866d7fc..head --diff-filter=A --name-st since 1.4.16v0 git log a6747590b336329404d34f3b1780b5fe9aab7340..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt +since 1.4.17V0 +git log b2bd7f5e24db9a1e5c07c64e66583ec183bb5bd8..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt + 3. Copy added_cards.txt to trunk\Utils folder 4. Run script: > perl extract_in_wiki_format.perl diff --git a/pom.xml b/pom.xml index 65e49f22b2..502c6be018 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.mage mage-root - 1.4.16 + 1.4.17 pom Mage Root Mage Root POM @@ -84,7 +84,7 @@ - 1.4.16 + 1.4.17 UTF-8