From 4abb1072cc9051aa7a836603e3d9df3199e33877 Mon Sep 17 00:00:00 2001 From: spjspj Date: Sun, 16 Apr 2017 18:14:14 +1000 Subject: [PATCH 1/2] Minor fix --- Utils/mtg-cards-data.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index a49b5f11a8f..a81880571de 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -30928,7 +30928,7 @@ Lay Bare the Heart|Amonkhet|96|U|{1}{B}|Sorcery|||Target opponent reveals his or Liliana, Death's Majesty|Amonkhet|97|M|{3}{B}{B}|Planeswalker - Liliana|||+1: Create a 2/2 black Zombie creature token. Put the top two cards of your library into your graveyard.$-3: Return target creature card from your graveyard to the battlefield. That creature is a black Zombie in addition to its other colors and types.$-7: Destroy all non-Zombie creatures.| Liliana's Mastery|Amonkhet|98|R|{3}{B}{B}|Enchantment|||Zombies you control get +1/+1.When Liliana's Mastery enters the battlefield, create two 2/2 black Zombie creature tokens.| Lord of the Accursed|Amonkhet|99|U|{2}{B}|Creature - Zombie|2|3|Other Zombies you control get +1/+1.${1}{B}, {T}: All Zombies gain menace until end of turn.| -Miasma Mummy|Amonkhet|100|C|{1}{B}|Creature - Zombie Jackal|2|2|When Miasma Mummy enters the battlefield, each player discards a card.| +Miasmic Mummy|Amonkhet|100|C|{1}{B}|Creature - Zombie Jackal|2|2|When Miasmic Mummy enters the battlefield, each player discards a card.| Nest of Scarabs|Amonkhet|101|U|{2}{B}|Enchantment|||Whenever you put one or more -1/-1 counters on a creature, create that many 1/1 black Insect tokens.| Painful Lesson|Amonkhet|102|C|{2}{B}|Sorcery|||Target player draws two cards and loses 2 life.| Pitiless Vizier|Amonkhet|103|C|{3}{B}|Creature - Minotaur Cleric|4|2|Whenever you cycle or discard a card, Pitiless Vizier gains indestructible until end of turn.| From 7937bcda9ea84bb9601a02ca0996bb06e18357fa Mon Sep 17 00:00:00 2001 From: spjspj Date: Sun, 16 Apr 2017 20:06:27 +1000 Subject: [PATCH 2/2] Revert --- .../mage/client/dialog/ConnectDialog.java | 7 +++++++ Mage.Common/src/mage/remote/Connection.java | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java b/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java index aecb45d15f6..843d1b518dd 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java @@ -45,6 +45,7 @@ import java.io.InputStreamReader; import java.io.Writer; import java.net.InetSocketAddress; import java.net.Proxy; +import java.net.SocketException; import java.net.SocketTimeoutException; import java.net.URL; import java.net.UnknownHostException; @@ -391,6 +392,12 @@ public class ConnectDialog extends MageDialog { connection.setUsername(this.txtUserName.getText().trim()); connection.setPassword(this.txtPassword.getText().trim()); connection.setForceDBComparison(this.chkForceUpdateDB.isSelected()); + String allMAC = ""; + try { + allMAC = connection.getMAC(); + } catch (SocketException ex) { + } + connection.setUserIdStr(System.getProperty("user.name") + ":" + System.getProperty("os.name") + ":" + MagePreferences.getUserNames() + ":" + allMAC); connection.setUserIdStr(System.getProperty("user.name") + ':' + MagePreferences.getUserNames()); MageFrame.getPreferences().put(KEY_CONNECT_FLAG, ((CountryItemEditor) cbFlag.getEditor()).getImageItem()); PreferencesDialog.setProxyInformation(connection); diff --git a/Mage.Common/src/mage/remote/Connection.java b/Mage.Common/src/mage/remote/Connection.java index a5cac723360..3dca8ebdfdd 100644 --- a/Mage.Common/src/mage/remote/Connection.java +++ b/Mage.Common/src/mage/remote/Connection.java @@ -258,6 +258,25 @@ public class Connection { return null; } + public static String getMAC() throws SocketException { + StringBuilder allMACs = new StringBuilder(); + for (Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); interfaces.hasMoreElements();) { + NetworkInterface iface = interfaces.nextElement(); + byte[] mac = iface.getHardwareAddress(); + + if (mac != null) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < mac.length; i++) { + sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : "")); + } + sb.append(';'); + allMACs.append(sb.toString()); + } + } + return allMACs.toString(); + } + + public void setUserData(UserData userData) { this.userData = userData; }