示例#1
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;
            }
        }