msgLoginNACK.setProtocolVersion(msg.getProtocolVersion());
netMan.sendMessage(msgLoginNACK);
return;
}
MessageC2SLoginSendPromise msgLoginSendPromise = (MessageC2SLoginSendPromise) msg;
PlayerEntry entry = playerContainer.add(msgLoginSendPromise.getSocketChannel());
entry.setProtocolVersion(msg.getProtocolVersion());
byte[] serverNonce = Hash.random(Hash.hashLength());
byte[] clientNonceHash = msgLoginSendPromise.getHash();
entry.loginInformations = new PlayerEntry.SecuredLoginInfo(key, clientNonceHash,
serverNonce, msgLoginSendPromise.getAddress());
MessageS2CLoginSendNonce msgLoginSendNonce = new MessageS2CLoginSendNonce(msg
.getSocketChannel(), serverNonce);
msgLoginSendNonce.setClientID(entry.clientid);
msgLoginSendNonce.setProtocolVersion(msg.getProtocolVersion());