private void SendConnectionError()
        {
            var msg = new SpAlertMessage(AlertMessageType.Connection, MenuResetType.Login);

            msg.Send(_Connection);

            _Connection.Disconnect();
        }
示例#2
0
        private void Disconnect(IConnection connection, AlertMessageType alertMessageType)
        {
            var msg = new SpAlertMessage(alertMessageType, MenuResetType.Login);

            msg.Send(connection);

            connection.Disconnect();
        }
        private void Disconnect()
        {
            var msg = new SpAlertMessage(AlertMessageType.Kicked, MenuResetType.Login, true);

            msg.Send(player.Connection);

            player.Connection.Disconnect();
        }
        private void SendMessage(AuthenticationResult authenticationResult)
        {
            SpAlertMessage msg = null;

            switch (authenticationResult)
            {
            case AuthenticationResult.Error:
                msg = new SpAlertMessage(AlertMessageType.Database, MenuResetType.None);
                break;

            case AuthenticationResult.Maintenance:
                msg = new SpAlertMessage(AlertMessageType.Maintenance, MenuResetType.None);
                break;

            case AuthenticationResult.AccountIsBanned:
                msg = new SpAlertMessage(AlertMessageType.Banned, MenuResetType.None);
                break;

            case AuthenticationResult.AccountIsNotActivated:
                msg = new SpAlertMessage(AlertMessageType.UserNotActivated, MenuResetType.None);
                break;

            case AuthenticationResult.WrongUserData:
                msg = new SpAlertMessage(AlertMessageType.WrongPassword, MenuResetType.Login);
                break;

            case AuthenticationResult.VersionOutdated:
                msg = new SpAlertMessage(AlertMessageType.Outdated, MenuResetType.None);
                break;

            case AuthenticationResult.StringLength:
                msg = new SpAlertMessage(AlertMessageType.StringLength, MenuResetType.Login);
                break;
            }

            msg.Send(_Connection);
        }
示例#5
0
        protected void SendMessage(CharacterValidationResult validationResult)
        {
            var msg = new SpAlertMessage(validationResult.AlertMessageType, validationResult.MenuResetType);

            msg.Send(Player.Connection);
        }