mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
Merge branch 'master' into Network_Upgrade
Conflicts: Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java Mage.Client/src/main/java/mage/client/game/GamePanel.java Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java Mage.Server/src/main/java/mage/server/Session.java Mage.Server/src/main/java/mage/server/User.java Mage.Server/src/main/java/mage/server/game/GameController.java Mage.Server/src/main/java/mage/server/game/GameSessionPlayer.java Mage.Server/src/main/java/mage/server/game/GamesRoomImpl.java
This commit is contained in:
commit
5c829b79d5
552 changed files with 30213 additions and 6146 deletions
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.4.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-common</artifactId>
|
||||
|
|
|
|||
|
|
@ -1,39 +1,38 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.constants;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public final class Constants {
|
||||
|
||||
private Constants() {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
|
@ -74,13 +73,16 @@ public final class Constants {
|
|||
public static final int PRIORITY_TIME_SEC = 1200;
|
||||
|
||||
public enum SessionState {
|
||||
|
||||
DISCONNECTED, CONNECTED, CONNECTING, DISCONNECTING, SERVER_STARTING;
|
||||
}
|
||||
|
||||
public enum Option {
|
||||
|
||||
;
|
||||
|
||||
public static final String POSSIBLE_ATTACKERS = "possibleAttackers";
|
||||
public static final String SPECIAL_BUTTON = "specialButton";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +1,30 @@
|
|||
/*
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.utils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -41,10 +40,10 @@ 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 = 1;
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "v3";
|
||||
public final static int MAGE_VERSION_PATCH = 2;
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "v2";
|
||||
public final static String MAGE_VERSION_INFO = "";
|
||||
|
||||
|
||||
private final int major;
|
||||
private final int minor;
|
||||
private final int patch;
|
||||
|
|
|
|||
|
|
@ -12,21 +12,25 @@ import mage.players.net.UserSkipPrioritySteps;
|
|||
*/
|
||||
public class UserDataView implements Serializable {
|
||||
|
||||
protected int groupId;
|
||||
protected int avatarId;
|
||||
protected int userGroup;
|
||||
protected boolean showAbilityPickerForced;
|
||||
protected boolean allowRequestShowHandCards;
|
||||
protected boolean confirmEmptyManaPool;
|
||||
protected UserSkipPrioritySteps userSkipPrioritySteps;
|
||||
String flagName;
|
||||
protected String flagName;
|
||||
protected boolean askMoveToGraveOrder;
|
||||
protected boolean manaPoolAutomatic;
|
||||
protected boolean manaPoolAutomaticRestricted;
|
||||
|
||||
static UserData getDefaultUserDataView() {
|
||||
return new UserData(UserGroup.DEFAULT, 0, false, false, true, null, "world.png", false);
|
||||
return UserData.getDefaultUserDataView();
|
||||
}
|
||||
|
||||
public UserDataView(int avatarId, boolean showAbilityPickerForced, boolean allowRequestShowHandCards,
|
||||
boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps, String flagName, boolean askMoveToGraveOrder) {
|
||||
public UserDataView(UserGroup userGroup, int avatarId, boolean showAbilityPickerForced,
|
||||
boolean allowRequestShowHandCards, boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps,
|
||||
String flagName, boolean askMoveToGraveOrder, boolean manaPoolAutomatic, boolean manaPoolAutomaticRestricted) {
|
||||
this.groupId = userGroup.getGroupId();
|
||||
this.avatarId = avatarId;
|
||||
this.showAbilityPickerForced = showAbilityPickerForced;
|
||||
this.allowRequestShowHandCards = allowRequestShowHandCards;
|
||||
|
|
@ -34,46 +38,101 @@ public class UserDataView implements Serializable {
|
|||
this.confirmEmptyManaPool = confirmEmptyManaPool;
|
||||
this.flagName = flagName;
|
||||
this.askMoveToGraveOrder = askMoveToGraveOrder;
|
||||
|
||||
this.manaPoolAutomatic = manaPoolAutomatic;
|
||||
this.manaPoolAutomaticRestricted = manaPoolAutomaticRestricted;
|
||||
}
|
||||
|
||||
public UserDataView(UserData userData) {
|
||||
public void update(UserData userData) {
|
||||
this.groupId = userData.getGroupId();
|
||||
this.avatarId = userData.getAvatarId();
|
||||
this.userGroup = userData.getGroupId();
|
||||
this.allowRequestShowHandCards = userData.isAllowRequestShowHandCards();
|
||||
this.showAbilityPickerForced = userData.isShowAbilityPickerForced();
|
||||
this.allowRequestShowHandCards = userData.isAllowRequestShowHandCards();
|
||||
this.userSkipPrioritySteps = userData.getUserSkipPrioritySteps();
|
||||
this.confirmEmptyManaPool = userData.confirmEmptyManaPool();
|
||||
this.flagName = userData.getFlagName();
|
||||
this.askMoveToGraveOrder = userData.askMoveToGraveOrder();
|
||||
this.manaPoolAutomatic = userData.isManaPoolAutomatic();
|
||||
this.manaPoolAutomaticRestricted = userData.isManaPoolAutomaticRestricted();
|
||||
}
|
||||
|
||||
public void setGroupId(int groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public int getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public int getAvatarId() {
|
||||
return avatarId;
|
||||
}
|
||||
|
||||
public void setAvatarId(int avatarId) {
|
||||
this.avatarId = avatarId;
|
||||
}
|
||||
|
||||
public boolean isShowAbilityPickerForced() {
|
||||
return showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public boolean allowRequestShowHandCards() {
|
||||
public void setShowAbilityPickerForced(boolean showAbilityPickerForced) {
|
||||
this.showAbilityPickerForced = showAbilityPickerForced;
|
||||
}
|
||||
|
||||
public boolean isAllowRequestShowHandCards() {
|
||||
return allowRequestShowHandCards;
|
||||
}
|
||||
|
||||
public void setAllowRequestShowHandCards(boolean allowRequestShowHandCards) {
|
||||
this.allowRequestShowHandCards = allowRequestShowHandCards;
|
||||
}
|
||||
|
||||
public UserSkipPrioritySteps getUserSkipPrioritySteps() {
|
||||
return userSkipPrioritySteps;
|
||||
}
|
||||
|
||||
public void setUserSkipPrioritySteps(UserSkipPrioritySteps userSkipPrioritySteps) {
|
||||
this.userSkipPrioritySteps = userSkipPrioritySteps;
|
||||
}
|
||||
|
||||
public boolean confirmEmptyManaPool() {
|
||||
return confirmEmptyManaPool;
|
||||
}
|
||||
|
||||
public void setConfirmEmptyManaPool(boolean confirmEmptyManaPool) {
|
||||
this.confirmEmptyManaPool = confirmEmptyManaPool;
|
||||
}
|
||||
|
||||
public String getFlagName() {
|
||||
return flagName;
|
||||
}
|
||||
|
||||
public void setFlagName(String flagName) {
|
||||
this.flagName = flagName;
|
||||
}
|
||||
|
||||
public boolean askMoveToGraveOrder() {
|
||||
return askMoveToGraveOrder;
|
||||
}
|
||||
|
||||
public void setAskMoveToGraveOrder(boolean askMoveToGraveOrder) {
|
||||
this.askMoveToGraveOrder = askMoveToGraveOrder;
|
||||
}
|
||||
|
||||
public boolean isManaPoolAutomatic() {
|
||||
return manaPoolAutomatic;
|
||||
}
|
||||
|
||||
public void setManaPoolAutomatic(boolean manaPoolAutomatic) {
|
||||
this.manaPoolAutomatic = manaPoolAutomatic;
|
||||
}
|
||||
|
||||
public boolean isManaPoolAutomaticRestricted() {
|
||||
return manaPoolAutomaticRestricted;
|
||||
}
|
||||
|
||||
public void setManaPoolAutomaticRestricted(boolean manaPoolAutomaticRestricted) {
|
||||
this.manaPoolAutomaticRestricted = manaPoolAutomaticRestricted;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue