mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Merge branch 'master' into Network_Upgrade
Conflicts: Mage.Client/src/main/java/mage/client/chat/ChatPanel.java Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java Mage.Client/src/main/java/mage/client/table/TablesPanel.java Mage.Common/src/mage/remote/SessionImpl.java Mage.Server/src/main/java/mage/server/Session.java
This commit is contained in:
commit
f4aff4a121
894 changed files with 23817 additions and 4981 deletions
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<version>1.4.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-common</artifactId>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import java.net.NetworkInterface;
|
|||
import java.net.SocketException;
|
||||
import java.util.Enumeration;
|
||||
import mage.players.net.UserSkipPrioritySteps;
|
||||
import mage.view.UserDataView;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -56,12 +57,14 @@ public class Connection implements Serializable {
|
|||
private int clientCardDatabaseVersion;
|
||||
private boolean forceDBComparison;
|
||||
|
||||
private int avatarId;
|
||||
private boolean showAbilityPickerForced;
|
||||
private boolean allowRequestShowHandCards;
|
||||
private boolean confirmEmptyManaPool;
|
||||
private String flagName;
|
||||
private UserSkipPrioritySteps userSkipPrioritySteps;
|
||||
private UserDataView userData;
|
||||
|
||||
// private int avatarId;
|
||||
// private boolean showAbilityPickerForced;
|
||||
// private boolean allowRequestShowHandCards;
|
||||
// private boolean confirmEmptyManaPool;
|
||||
// private String flagName;
|
||||
// private UserSkipPrioritySteps userSkipPrioritySteps;
|
||||
|
||||
// private static final String serialization = "?serializationtype=jboss";
|
||||
// private static final String transport = "bisocket";
|
||||
|
|
@ -231,45 +234,12 @@ public class Connection implements Serializable {
|
|||
return null;
|
||||
}
|
||||
|
||||
public int getAvatarId() {
|
||||
return avatarId;
|
||||
}
|
||||
|
||||
public void setAvatarId(int avatarId) {
|
||||
this.avatarId = avatarId;
|
||||
}
|
||||
|
||||
public boolean isShowAbilityPickerForced() {
|
||||
return showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public void setShowAbilityPickerForced(boolean showAbilityPickerForced) {
|
||||
this.showAbilityPickerForced = showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public boolean allowRequestShowHandCards() {
|
||||
return allowRequestShowHandCards;
|
||||
}
|
||||
|
||||
public void setAllowRequestShowHandCards(boolean allowRequestShowHandCards) {
|
||||
this.allowRequestShowHandCards = allowRequestShowHandCards;
|
||||
}
|
||||
|
||||
public boolean confirmEmptyManaPool() {
|
||||
return confirmEmptyManaPool;
|
||||
}
|
||||
|
||||
public void setConfirmEmptyManaPool(boolean confirmEmptyManaPool) {
|
||||
this.confirmEmptyManaPool = confirmEmptyManaPool;
|
||||
public void setUserData(UserDataView userData) {
|
||||
this.userData= userData;
|
||||
}
|
||||
|
||||
|
||||
public UserSkipPrioritySteps getUserSkipPrioritySteps() {
|
||||
return userSkipPrioritySteps;
|
||||
}
|
||||
|
||||
public void setUserSkipPrioritySteps(UserSkipPrioritySteps userSkipPrioritySteps) {
|
||||
this.userSkipPrioritySteps = userSkipPrioritySteps;
|
||||
public UserDataView getUserData() {
|
||||
return userData;
|
||||
}
|
||||
|
||||
public boolean isForceDBComparison() {
|
||||
|
|
@ -279,13 +249,4 @@ public class Connection implements Serializable {
|
|||
public void setForceDBComparison(boolean forceDBComparison) {
|
||||
this.forceDBComparison = forceDBComparison;
|
||||
}
|
||||
|
||||
public String getFlagName() {
|
||||
return flagName;
|
||||
}
|
||||
|
||||
public void setFlagName(String flagName) {
|
||||
this.flagName = flagName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
package mage.remote.interfaces;
|
||||
|
||||
import mage.players.net.UserSkipPrioritySteps;
|
||||
import mage.view.UserDataView;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
|
@ -36,5 +36,5 @@ public interface ClientData {
|
|||
|
||||
String getUserName();
|
||||
|
||||
boolean updatePreferencesForServer(int avatarId, boolean showAbilityPickerForced, boolean allowRequestShowHandCards, boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps, String flagName);
|
||||
boolean updatePreferencesForServer(UserDataView userData);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
|||
*/
|
||||
public final static int MAGE_VERSION_MAJOR = 1;
|
||||
public final static int MAGE_VERSION_MINOR = 4;
|
||||
public final static int MAGE_VERSION_PATCH = 0;
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "v2";
|
||||
public final static int MAGE_VERSION_PATCH = 1;
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "v3";
|
||||
public final static String MAGE_VERSION_INFO = "";
|
||||
|
||||
private final int major;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class PlayerView implements Serializable {
|
|||
if (player.getUserData() != null) {
|
||||
this.userDataView = new UserDataView(player.getUserData());
|
||||
} else {
|
||||
this.userDataView = new UserDataView(0, false, false, true, null,"world.png");
|
||||
this.userDataView = UserDataView.getDefaultUserDataView();
|
||||
}
|
||||
|
||||
for (CommandObject commandObject : game.getState().getCommand()) {
|
||||
|
|
|
|||
|
|
@ -18,15 +18,22 @@ public class UserDataView implements Serializable {
|
|||
protected boolean confirmEmptyManaPool;
|
||||
protected UserSkipPrioritySteps userSkipPrioritySteps;
|
||||
String flagName;
|
||||
protected boolean askMoveToGraveOrder;
|
||||
|
||||
static UserDataView getDefaultUserDataView() {
|
||||
return new UserDataView(0, false, false, true, null,"world.png", false);
|
||||
}
|
||||
|
||||
public UserDataView(int avatarId, boolean showAbilityPickerForced, boolean allowRequestShowHandCards,
|
||||
boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps, String flagName) {
|
||||
boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps, String flagName, boolean askMoveToGraveOrder) {
|
||||
this.avatarId = avatarId;
|
||||
this.showAbilityPickerForced = showAbilityPickerForced;
|
||||
this.allowRequestShowHandCards = allowRequestShowHandCards;
|
||||
this.userSkipPrioritySteps = userSkipPrioritySteps;
|
||||
this.confirmEmptyManaPool = confirmEmptyManaPool;
|
||||
this.flagName = flagName;
|
||||
this.askMoveToGraveOrder = askMoveToGraveOrder;
|
||||
|
||||
}
|
||||
|
||||
public UserDataView(UserData userData) {
|
||||
|
|
@ -37,6 +44,7 @@ public class UserDataView implements Serializable {
|
|||
this.userSkipPrioritySteps = userData.getUserSkipPrioritySteps();
|
||||
this.confirmEmptyManaPool = userData.confirmEmptyManaPool();
|
||||
this.flagName = userData.getFlagName();
|
||||
this.askMoveToGraveOrder = userData.askMoveToGraveOrder();
|
||||
}
|
||||
|
||||
public int getAvatarId() {
|
||||
|
|
@ -62,5 +70,9 @@ public class UserDataView implements Serializable {
|
|||
public String getFlagName() {
|
||||
return flagName;
|
||||
}
|
||||
|
||||
public boolean askMoveToGraveOrder() {
|
||||
return askMoveToGraveOrder;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue