Example #1
0
        /// <summary>
        /// 客户端发起请求
        /// </summary>
        /// <param name="operationRequest"></param>
        /// <param name="sendParameters"></param>
        protected override void OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters)
        {
            MobaApplication.LogInfo((account.cache == player.accountCache) + "是否相同");
            byte opCode  = operationRequest.OperationCode;
            byte subCode = (byte)operationRequest[80];

            switch (opCode)
            {
            case OpCode.AccountCode:
                account.OnRequest(this, subCode, operationRequest);
                break;

            case OpCode.PlayerCode:
                player.OnRequest(this, subCode, operationRequest);
                break;

            case OpCode.SelectCode:
                select.OnRequest(this, subCode, operationRequest);
                break;

            case OpCode.FightCode:
                fight.OnRequest(this, subCode, operationRequest);
                break;

            default:
                break;
            }
        }
Example #2
0
        //客户端发来的请求
        protected override void OnOperationRequest(OperationRequest request, SendParameters sendParameters)
        {
            //按照共同规定的操作码来处理信息
            switch ((OpCode)request.OperationCode)
            {
            //操作用户组
            case OpCode.Account:
                accountHandler.OnRequest(this, (byte)request.Parameters[80], request);
                break;

            //操作聊天室
            case OpCode.Room:
                roomHandler.OnRequest(this, (byte)request.Parameters[80], request);
                break;
            }
        }
Example #3
0
        /// <summary>
        /// 客户发起请求
        /// </summary>
        /// <param name="operationRequest"></param>
        /// <param name="sendParameters"></param>
        protected override void OnOperationRequest(OperationRequest request, SendParameters sendParameters)
        {
            switch ((OpCode)request.OperationCode)
            {
            case OpCode.Account:
                account.OnRequest(this, (byte)request.Parameters[80], request);
                break;

            case OpCode.Chat:
                chat.OnRequest(this, (byte)request.Parameters[80], request);
                break;

            default:
                break;
            }
        }
Example #4
0
        /// <summary>
        /// 客户端请求
        /// </summary>
        /// <param name="operationRequest"></param>
        /// <param name="sendParameters"></param>
        protected override void OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters)
        {
            byte opCode  = operationRequest.OperationCode;
            byte subCode = (byte)operationRequest[80];

            switch (opCode)
            {
            case OperationCode.AccountCode:
                accountHandler.OnRequest(this, subCode, operationRequest);
                break;

            case OperationCode.PlayerCode:
                playerHandler.OnRequest(this, subCode, operationRequest);
                break;

            case OperationCode.SelectCode:
                selectHandler.OnRequest(this, subCode, operationRequest);
                break;

            case OperationCode.BattleCode:
                battleHandler.OnRequest(this, subCode, operationRequest);
                break;
            }
        }