forked from External/mage
* Added possibility to allow other players to see hand cards of player.
This commit is contained in:
parent
d0e1107a3e
commit
7e145d2cfd
33 changed files with 1093 additions and 190 deletions
|
|
@ -273,6 +273,7 @@ public class SessionImpl implements Session {
|
|||
if (connection.getPassword() == null) {
|
||||
UserDataView userDataView = new UserDataView(connection.getAvatarId(),
|
||||
connection.isShowAbilityPickerForced(),
|
||||
connection.allowRequestShowHandCards(),
|
||||
connection.getUserSkipPrioritySteps());
|
||||
// for backward compatibility. don't remove twice call - first one does nothing but for version checking
|
||||
registerResult = server.registerClient(connection.getUsername(), sessionId, client.getVersion());
|
||||
|
|
@ -1151,10 +1152,10 @@ public class SessionImpl implements Session {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean sendPlayerAction(PlayerAction passPriorityAction, UUID gameId) {
|
||||
public boolean sendPlayerAction(PlayerAction passPriorityAction, UUID gameId, Object data) {
|
||||
try {
|
||||
if (isConnected()) {
|
||||
server.sendPlayerAction(passPriorityAction, gameId, sessionId);
|
||||
server.sendPlayerAction(passPriorityAction, gameId, sessionId, data);
|
||||
return true;
|
||||
}
|
||||
} catch (MageException ex) {
|
||||
|
|
@ -1355,10 +1356,10 @@ public class SessionImpl implements Session {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean updatePreferencesForServer(int avatarId, boolean showAbilityPickerForced, UserSkipPrioritySteps userSkipPrioritySteps) {
|
||||
public boolean updatePreferencesForServer(int avatarId, boolean showAbilityPickerForced, boolean allowRequestShowHandCards, UserSkipPrioritySteps userSkipPrioritySteps) {
|
||||
try {
|
||||
if (isConnected()) {
|
||||
UserDataView userDataView = new UserDataView(avatarId, showAbilityPickerForced, userSkipPrioritySteps);
|
||||
UserDataView userDataView = new UserDataView(avatarId, showAbilityPickerForced, allowRequestShowHandCards, userSkipPrioritySteps);
|
||||
server.setUserData(connection.getUsername(), sessionId, userDataView);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue