コード例 #1
0
 // Construction
 public CJoinChatChannelResponseServerMessage( EMessageRequestID request_id, EChannelJoinError error )
     : base(request_id)
 {
     Error = error;
 }
コード例 #2
0
        private void Handle_Join_Channel_Error( EChannelJoinError error )
        {
            switch ( error )
            {
                case EChannelJoinError.AlreadyJoined:
                    CClientResource.Output_Text( EClientTextID.Client_Chat_Channel_Join_Error_Already_In_Channel );
                    break;

                case EChannelJoinError.Banned:
                    CClientResource.Output_Text( EClientTextID.Client_Chat_Channel_Join_Error_Banned );
                    break;

                case EChannelJoinError.ChannelDoesNotExist:
                    CClientResource.Output_Text( EClientTextID.Client_Chat_Channel_Join_Error_Channel_Does_Not_Exist );
                    break;

                case EChannelJoinError.ChannelFull:
                    CClientResource.Output_Text( EClientTextID.Client_Chat_Channel_Join_Error_Channel_Full );
                    break;

                case EChannelJoinError.NoPermission:
                    CClientResource.Output_Text( EClientTextID.Client_Chat_Channel_Join_Error_No_Permission );
                    break;
            }
        }
コード例 #3
0
        public void On_Join_General_Channel_Response( EChannelJoinError error, EMessageRequestID client_request_id )
        {
            if ( error != EChannelJoinError.None && error != EChannelJoinError.AlreadyJoined )
            {
                CServerMessageRouter.Send_Message_To_Session( new CConnectionDroppedMessage( EConnectRefusalReason.Unable_To_Join_Required_Chat_Channel ), SessionID );
                CServerLogicalThread.Instance.Add_Network_Operation( new CDisconnectRequestOperation( SessionID, EDisconnectReason.Server_Request ) );
            }
            else
            {
                if ( ConnectionState == EConnectedPlayerConnectionState.Connecting )
                {
                    // send client hello and set state to connected
                    ConnectionState = EConnectedPlayerConnectionState.Connected;
                    CServerMessageRouter.Send_Message_To_Session( new CClientHelloResponse( client_request_id, CDatabaseProxy.Instance.Get_Player_Data( PersistenceID ) ), SessionID );
                }

                State = EConnectedPlayerState.Chat_Idle;
            }
        }