mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
Fixed cards db updates on auto-connection enabled;
This commit is contained in:
parent
d98a3eb30a
commit
152c354ec3
2 changed files with 114 additions and 129 deletions
|
|
@ -3,6 +3,7 @@ package mage.client;
|
|||
import mage.cards.action.ActionCallback;
|
||||
import mage.cards.decks.Deck;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.cards.repository.ExpansionRepository;
|
||||
import mage.cards.repository.RepositoryUtil;
|
||||
import mage.client.cards.BigCard;
|
||||
import mage.client.chat.ChatPanelBasic;
|
||||
|
|
@ -719,6 +720,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
boolean autoConnectParamValue = startUser != null || Boolean.parseBoolean(PREFS.get("autoConnect", "false"));
|
||||
boolean status = false;
|
||||
if (autoConnectParamValue) {
|
||||
LOGGER.info("Auto-connecting to " + MagePreferences.getServerAddress());
|
||||
status = performConnect(false);
|
||||
}
|
||||
return status;
|
||||
|
|
@ -741,6 +743,9 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
currentConnection.setPassword(password);
|
||||
currentConnection.setHost(server);
|
||||
currentConnection.setPort(port);
|
||||
// force to redownload db on updates
|
||||
boolean redownloadDatabase = (ExpansionRepository.instance.getSetByCode("GRN") == null || CardRepository.instance.findCard("Island") == null);
|
||||
currentConnection.setForceDBComparison(redownloadDatabase);
|
||||
String allMAC = "";
|
||||
try {
|
||||
allMAC = Connection.getMAC();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue