Merge pull request #3114 from spjspj/master

Minor fix
This commit is contained in:
spjspj 2017-04-16 20:07:20 +10:00 committed by GitHub
commit 5ed434ce8c
3 changed files with 27 additions and 1 deletions

View file

@ -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);

View file

@ -258,6 +258,25 @@ public class Connection {
return null;
}
public static String getMAC() throws SocketException {
StringBuilder allMACs = new StringBuilder();
for (Enumeration<NetworkInterface> 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;
}

View file

@ -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.|