Esempio n. 1
0
        public void SendCSTreasureChestSpeed(CSTreasureChestSpeed cstreasurechestspeed, Action <SCTreasureChestSpeed> ResponseSCTreasureChestSpeedCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSTreasureChestSpeed> ();

            ProtoSendMethod.BusinessRequest <SCTreasureChestSpeed>(cstreasurechestspeed, opCodeType, ResponseSCTreasureChestSpeedCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 2
0
        public void SendCSRepulse(CSRepulse csrepulse, Action <SCEmptyRepluse> ResponseSCEmptyRepluseCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSRepulse> ();

            ProtoSendMethod.BusinessRequest <SCEmptyRepluse>(csrepulse, opCodeType, ResponseSCEmptyRepluseCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 3
0
        public void SendCSEnterMap(CSEnterMap csentermap, Action <SCSearch> ResponseSCSearchCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEnterMap> ();

            ProtoSendMethod.BusinessRequest <SCSearch>(csentermap, opCodeType, ResponseSCSearchCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 4
0
        public void SendCSFriendCostume(CSFriendCostume csfriendcostume, Action <SCFriendCostume> ResponseSCFriendCostumeCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSFriendCostume> ();

            ProtoSendMethod.BusinessRequest <SCFriendCostume>(csfriendcostume, opCodeType, ResponseSCFriendCostumeCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 5
0
        public void SendCSDerectUp(CSDerectUp csderectup, Action <SCEmptyDerectUp> ResponseSCEmptyDerectUpCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSDerectUp> ();

            ProtoSendMethod.BusinessRequest <SCEmptyDerectUp>(csderectup, opCodeType, ResponseSCEmptyDerectUpCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 6
0
        public void SendCSAdvSkipDeal(CSAdvSkipDeal csadvskipdeal, Action <SCEmptyAdvSkipDeal> ResponseSCEmptyAdvSkipDealCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSAdvSkipDeal> ();

            ProtoSendMethod.BusinessRequest <SCEmptyAdvSkipDeal>(csadvskipdeal, opCodeType, ResponseSCEmptyAdvSkipDealCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 7
0
        public void SendCSEmptyCropMature(CSEmptyCropMature csemptycropmature, Action <SCCropMature> ResponseSCCropMatureCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyCropMature> ();

            ProtoSendMethod.BusinessRequest <SCCropMature>(csemptycropmature, opCodeType, ResponseSCCropMatureCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 8
0
        public void SendCSEmptyRoomList(CSEmptyRoomList csemptyroomlist, Action <SCRoomListInfo> ResponseSCRoomListInfoCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyRoomList> ();

            ProtoSendMethod.BusinessRequest <SCRoomListInfo>(csemptyroomlist, opCodeType, ResponseSCRoomListInfoCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 9
0
        public void SendCSGetLoginFavorable(CSGetLoginFavorable csgetloginfavorable, Action <SCEmptyLoginGetFavorable> ResponseSCEmptyLoginGetFavorableCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSGetLoginFavorable> ();

            ProtoSendMethod.BusinessRequest <SCEmptyLoginGetFavorable>(csgetloginfavorable, opCodeType, ResponseSCEmptyLoginGetFavorableCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 10
0
        public void SendCSOneselfMarmot(CSOneselfMarmot csoneselfmarmot, Action <SCOneselfMarmot> ResponseSCOneselfMarmotCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSOneselfMarmot> ();

            ProtoSendMethod.BusinessRequest <SCOneselfMarmot>(csoneselfmarmot, opCodeType, ResponseSCOneselfMarmotCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 11
0
        public void SendCSAdvExtraStory(CSAdvExtraStory csadvextrastory, Action <SCEmtpyAdvExtraStory> ResponseSCEmtpyAdvExtraStoryCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSAdvExtraStory> ();

            ProtoSendMethod.BusinessRequest <SCEmtpyAdvExtraStory>(csadvextrastory, opCodeType, ResponseSCEmtpyAdvExtraStoryCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 12
0
        public void SendCSSwitchoverRole(CSSwitchoverRole csswitchoverrole, Action <SCEmptySwitchoverRole> ResponseSCEmptySwitchoverRoleCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSSwitchoverRole> ();

            ProtoSendMethod.BusinessRequest <SCEmptySwitchoverRole>(csswitchoverrole, opCodeType, ResponseSCEmptySwitchoverRoleCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 13
0
        public void SendCSEmptyManorLogs(CSEmptyManorLogs csemptymanorlogs, Action <SCManorLogs> ResponseSCManorLogsCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyManorLogs> ();

            ProtoSendMethod.BusinessRequest <SCManorLogs>(csemptymanorlogs, opCodeType, ResponseSCManorLogsCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 14
0
        public void SendCSUseWarehouseGoods(CSUseWarehouseGoods csusewarehousegoods, Action <SCUseWarehouseGoods> ResponseSCUseWarehouseGoodsCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSUseWarehouseGoods> ();

            ProtoSendMethod.BusinessRequest <SCUseWarehouseGoods>(csusewarehousegoods, opCodeType, ResponseSCUseWarehouseGoodsCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 15
0
        public void SendCSCdkAward(CSCdkAward cscdkaward, Action <SCCdkAward> ResponseSCCdkAwardCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSCdkAward> ();

            ProtoSendMethod.BusinessRequest <SCCdkAward>(cscdkaward, opCodeType, ResponseSCCdkAwardCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 16
0
        public void SendCSSectionAddFavorable(CSSectionAddFavorable cssectionaddfavorable, Action <SCEmtpySectionAddFavorable> ResponseSCEmtpySectionAddFavorableCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSSectionAddFavorable> ();

            ProtoSendMethod.BusinessRequest <SCEmtpySectionAddFavorable>(cssectionaddfavorable, opCodeType, ResponseSCEmtpySectionAddFavorableCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 17
0
        public void SendCSEmptyDealInfo(CSEmptyDealInfo csemptydealinfo, Action <SCDealInfo> ResponseSCDealInfoCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyDealInfo> ();

            ProtoSendMethod.BusinessRequest <SCDealInfo>(csemptydealinfo, opCodeType, ResponseSCDealInfoCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 18
0
        public void SendCSEmptyDepartureRoom(CSEmptyDepartureRoom csemptydepartureroom, Action <SCEmptyDepartureRoom> ResponseSCEmptyDepartureRoomCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyDepartureRoom> ();

            ProtoSendMethod.BusinessRequest <SCEmptyDepartureRoom>(csemptydepartureroom, opCodeType, ResponseSCEmptyDepartureRoomCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 19
0
        public void SendCSEntranceSection(CSEntranceSection csentrancesection, Action <SCEmptyEntranceSection> ResponseSCEmptyEntranceSectionCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEntranceSection> ();

            ProtoSendMethod.BusinessRequest <SCEmptyEntranceSection>(csentrancesection, opCodeType, ResponseSCEmptyEntranceSectionCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 20
0
        public void SendCSChangeMailState(CSChangeMailState cschangemailstate, Action <SCEmtpyChangeMailState> ResponseSCEmtpyChangeMailStateCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSChangeMailState> ();

            ProtoSendMethod.BusinessRequest <SCEmtpyChangeMailState>(cschangemailstate, opCodeType, ResponseSCEmtpyChangeMailStateCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 21
0
        public void SendCSManorDecorateRotate(CSManorDecorateRotate csmanordecoraterotate, Action <SCEmptyManorDecorateRotate> ResponseSCEmptyManorDecorateRotateCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSManorDecorateRotate> ();

            ProtoSendMethod.BusinessRequest <SCEmptyManorDecorateRotate>(csmanordecoraterotate, opCodeType, ResponseSCEmptyManorDecorateRotateCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 22
0
        public void SendCSBuyPropInfo(CSBuyPropInfo csbuypropinfo, Action <SCBuyProp> ResponseSCBuyPropCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSBuyPropInfo> ();

            ProtoSendMethod.BusinessRequest <SCBuyProp>(csbuypropinfo, opCodeType, ResponseSCBuyPropCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 23
0
        public void SendCSEmptyOnceWatering(CSEmptyOnceWatering csemptyoncewatering, Action <SCOnceWatering> ResponseSCOnceWateringCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyOnceWatering> ();

            ProtoSendMethod.BusinessRequest <SCOnceWatering>(csemptyoncewatering, opCodeType, ResponseSCOnceWateringCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 24
0
        public void SendCSEmptyHeartBeat(CSEmptyHeartBeat csemptyheartbeat, Action <SCEmtpyHeartBeat> ResponseSCEmtpyHeartBeatCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyHeartBeat> ();

            ProtoSendMethod.BusinessRequest <SCEmtpyHeartBeat>(csemptyheartbeat, opCodeType, ResponseSCEmtpyHeartBeatCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 25
0
        public void SendCSAccept(CSAccept csaccept, Action <SCEmptyAccept> ResponseSCEmptyAcceptCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSAccept> ();

            ProtoSendMethod.BusinessRequest <SCEmptyAccept>(csaccept, opCodeType, ResponseSCEmptyAcceptCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 26
0
        public void SendCSAccumulateSignIn(CSAccumulateSignIn csaccumulatesignin, Action <SCEmtpyAccumulateSignIn> ResponseSCEmtpyAccumulateSignInCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSAccumulateSignIn> ();

            ProtoSendMethod.BusinessRequest <SCEmtpyAccumulateSignIn>(csaccumulatesignin, opCodeType, ResponseSCEmtpyAccumulateSignInCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 27
0
        public void SendCSDelFriend(CSDelFriend csdelfriend, Action <SCEmtpyDelFriend> ResponseSCEmtpyDelFriendCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSDelFriend> ();

            ProtoSendMethod.BusinessRequest <SCEmtpyDelFriend>(csdelfriend, opCodeType, ResponseSCEmtpyDelFriendCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 28
0
        public void SendCSEmptyStealManorGuidance(CSEmptyStealManorGuidance csemptystealmanorguidance, Action <SCStealManorGuidance> ResponseSCStealManorGuidanceCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyStealManorGuidance> ();

            ProtoSendMethod.BusinessRequest <SCStealManorGuidance>(csemptystealmanorguidance, opCodeType, ResponseSCStealManorGuidanceCallBack, errorCallBack, isShowDefaultTip);
        }
Esempio n. 29
0
        private void ProcessUnSeriMsgs(byte[] data)
        {
            var        unSeriMsgs = ProtoSerAndUnSer.UnSerialize <SCServerRes>(data);
            OpCodeType opCode     = unSeriMsgs.RtCode;

            StaticData.DebugGreen($"WebSocket Receive opCode:{opCode.ToString()}");
            IMessage msg = ListOPRelation.GetRealMessageByOpCodeType(opCode, unSeriMsgs.Data.ToByteArray());

            Debug.Log("ProcessUnSeriMsgs opCode = " + (int)opCode);
            Debug.Log("unSeriMsgs.Code = " + unSeriMsgs.Code);
            int code = (int)opCode;

            if (code >= 50000)
            {
                //账号被挤掉了
                switch (code)
                {
                case 50020:    //账户被挤掉
                    PushSystemAccountWasSqueezed();
                    break;

                case 60000:    //服务器强制更新
                    ServerForcedUpdate();
                    break;

                default:    //服务器推送
                    RigisterCmdPush.PushMsgHandle(msg, (int)opCode);
                    break;
                }
            }
            else
            {
                //判定队列中是否有,如果没有,直接丢弃
                if (QueueMsgBuiness.Count > 0)
                {
                    if (QueueMsgBuiness.Peek().opCode != opCode)
                    {
                        return;
                    }
                }

                if (QueueMsgBuiness.Count <= 0) //队列中没有东西,但是收到了返回
                {                               //重置
                    SetOnceMessageCompelete();
                    return;
                }

                //出队
                if (msg != null)
                {
                    StaticData.DebugGreen($"WebSocket msg:{msg.ToString()} Dequeue");
                }
                else
                {
                    StaticData.DebugGreen($"==========消息返回:{QueueMsgBuiness.Peek().opCode}为null!");
                }

                var msgItem = QueueMsgBuiness.Dequeue();
                SetOnceMessageCompelete();

                //正常请求
                if (unSeriMsgs.Code != (int)WebErrorCode.Success)
                {
                    ErrorInfo error = new ErrorInfo()
                    {
                        webErrorCode = (WebErrorCode)unSeriMsgs.Code, ErrorMessage = $"服务器异常{unSeriMsgs.Code}"
                    };
                    msgItem.onFail(error);
                }
                else
                {
                    msgItem.onSuccess((msg));
                }
            }
        }
Esempio n. 30
0
        public void SendCSEmptyWarehouseUnlockInfo(CSEmptyWarehouseUnlockInfo csemptywarehouseunlockinfo, Action <SCTreasureChestUnlockInfo> ResponseSCTreasureChestUnlockInfoCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyWarehouseUnlockInfo> ();

            ProtoSendMethod.BusinessRequest <SCTreasureChestUnlockInfo>(csemptywarehouseunlockinfo, opCodeType, ResponseSCTreasureChestUnlockInfoCallBack, errorCallBack, isShowDefaultTip);
        }