* 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:
Oleg Agafonov 2021-01-30 16:38:55 +04:00
parent df98cc3e62
commit a1da5ef437
304 changed files with 7266 additions and 5093 deletions

View file

@ -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) {