Exemplo n.º 1
0
    private async Task HandleReconnectChallenge(byte[] packet)
    {
        this.isReconnect = true;
        var request = new ClientLoginChallenge(packet);

        this.Build = request.Build;
        await this.Send(ServerReconnectChallenge.Success());
    }
Exemplo n.º 2
0
    private async Task HandleLoginChallenge(byte[] packet)
    {
        var request = new ClientLoginChallenge(packet);

        if (request.Build > ClientBuild.WotLK)
        {
            // Send failed event
            this.Log($"Login with unsupported build {Build}");
            return;
        }

        this.Build = request.Build;

        this.srp = new SecureRemotePasswordProtocol(request.Identifier, request.Identifier); // TODO: Quick hack
        this.accountService.AddClientBuildForAddress(this.Address, this.Port, this.Build);

        // Create and send a ServerLogonChallenge as response.
        await this.Send(ServerLoginChallenge.Success(this.srp));
    }