forked from External/mage
* GUI: new reworked GUI and card render engine, card icons and dozens of other fixes (see full list in related PR);
This commit is contained in:
parent
df98cc3e62
commit
a1da5ef437
304 changed files with 7266 additions and 5093 deletions
|
|
@ -19,6 +19,7 @@ import org.jboss.remoting.callback.InvokerCallbackHandler;
|
|||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
|
@ -38,7 +39,7 @@ public class Session {
|
|||
private final String sessionId;
|
||||
private UUID userId;
|
||||
private String host;
|
||||
private int messageId = 0;
|
||||
private final AtomicInteger messageId = new AtomicInteger(0);
|
||||
private final Date timeConnected;
|
||||
private boolean isAdmin = false;
|
||||
private final AsynchInvokerCallbackHandler callbackHandler;
|
||||
|
|
@ -357,17 +358,9 @@ public class Session {
|
|||
boolean lockSet = false;
|
||||
try {
|
||||
if (valid && callBackLock.tryLock(50, TimeUnit.MILLISECONDS)) {
|
||||
call.setMessageId(messageId++);
|
||||
call.setMessageId(messageId.incrementAndGet());
|
||||
lockSet = true;
|
||||
Callback callback = new Callback(call);
|
||||
// if (call.getMethod().equals(ClientCallbackMethod.GAME_TARGET)) {
|
||||
// Object object = call.getData();
|
||||
// if (object instanceof GameClientMessage) {
|
||||
// String message = ((GameClientMessage) object).getMessage();
|
||||
// logger.info("Server Session Event->" + call.getMethod() + " (id:" + call.getMessageId() + ") " + message);
|
||||
// logger.info(callback.toString());
|
||||
// }
|
||||
// }
|
||||
callbackHandler.handleCallbackOneway(callback);
|
||||
}
|
||||
} catch (InterruptedException ex) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Planes;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameCommanderImpl;
|
||||
|
|
@ -395,13 +396,13 @@ public final class SystemUtil {
|
|||
break;
|
||||
|
||||
case COMMAND_SHOW_MY_HAND:
|
||||
info = getCardsListForSpecialInform(game, feedbackPlayer.getHand(), runGroup.commands);
|
||||
game.informPlayer(feedbackPlayer, info);
|
||||
info = getCardsListForSpecialInform(game, feedbackPlayer.getHand(), runGroup.commands);
|
||||
game.informPlayer(feedbackPlayer, info);
|
||||
break;
|
||||
|
||||
case COMMAND_SHOW_MY_LIBRARY:
|
||||
info = getCardsListForSpecialInform(game, feedbackPlayer.getLibrary().getCardList(), runGroup.commands);
|
||||
game.informPlayer(feedbackPlayer, info);
|
||||
info = getCardsListForSpecialInform(game, feedbackPlayer.getLibrary().getCardList(), runGroup.commands);
|
||||
game.informPlayer(feedbackPlayer, info);
|
||||
break;
|
||||
|
||||
case COMMAND_ACTIVATE_OPPONENT_ABILITY:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue