Exemplo n.º 1
0
        public override void RunImpl()
        {
            if (_client.State != LoginClientState.Connected)
            {
                _client.Send(LoginFail.ToPacket(LoginFailReason.ReasonAccessFailed));
                _client.Close();
                return;
            }

            if (_sessionId == _client.SessionId)
            {
                _client.State = LoginClientState.AuthedGG;
                _client.Send(GGAuth.ToPacket(_client));
            }
            else
            {
                _client.Send(LoginFail.ToPacket(LoginFailReason.ReasonAccessFailed));
                _client.Close();
            }
        }
Exemplo n.º 2
0
        public override async Task RunImpl()
        {
            await Task.Run(() =>
            {
                if (_client.State != LoginClientState.Connected)
                {
                    _client.SendAsync(LoginFail.ToPacket(LoginFailReason.ReasonAccessFailed));
                    _client.Close();
                    return;
                }

                if (_sessionId == _client.SessionId)
                {
                    _client.State = LoginClientState.AuthedGG;
                    _client.SendAsync(GGAuth.ToPacket(_client));
                }
                else
                {
                    _client.SendAsync(LoginFail.ToPacket(LoginFailReason.ReasonAccessFailed));
                    _client.Close();
                }
            });
        }
Exemplo n.º 3
0
 public override void RunImpl()
 {
     _client.Send(GGAuth.ToPacket(_client));
 }