Beispiel #1
0
        public void Initialize(EncryptionBase encryptor, Type packetHandler, bool isWorldServer)
        {
            _encryptor = encryptor;
            _client.Initialize(encryptor);

            //dynamically create packethandler references
            GenerateHandlerReferences(packetHandler, isWorldServer);
        }
Beispiel #2
0
        protected override ClientSession IntializeNewSession(INetworkClient client)
        {
            if (!CheckGeneralLog(client))
            {
                Logger.Warn(string.Format(Language.Instance.GetMessageFromKey("FORCED_DISCONNECT"), client.ClientId));
                client.Initialize(_fallbackEncryptor);
                client.SendPacket($"fail {Language.Instance.GetMessageFromKey("CONNECTION_LOST")}");
                client.Disconnect();
                return(null);
            }
            ClientSession session = new ClientSession(client);

            session.Initialize(_encryptor, IsWorldServer);
            return(session);
        }