Example #1
0
    /// <summary>
    /// 从服务器获取玩家推荐列表数据
    /// </summary>
    private void GetRecommendList()
    {
        StaticData.DebugGreen("请求玩家推荐列表数据~~~");
        StaticData.playerInfoData.listRecommendInfo.Clear();
        // 正式请求
        CSEmptyRecommendList csEmptyRecommendList = new CSEmptyRecommendList();

        ProtocalManager.Instance().SendCSEmptyRecommendList(csEmptyRecommendList, (recommendList) =>
        {
            if (recommendList == null)
            {
                GenerateRecommendListUI();
                return;
            }
            StaticData.DebugGreen("收到推荐回复~~~");
            StaticData.playerInfoData.listRecommendInfo.AddRange(recommendList.RecommendListInfo);
            SortRecommendList();
            GenerateRecommendListUI();
        }, (error) =>
        {
            StaticData.DebugGreen($"{error}");
        }, false);
    }
Example #2
0
        public void SendCSEmptyRecommendList(CSEmptyRecommendList csemptyrecommendlist, Action <SCRecommendList> ResponseSCRecommendListCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyRecommendList> ();

            ProtoSendMethod.BusinessRequest <SCRecommendList>(csemptyrecommendlist, opCodeType, ResponseSCRecommendListCallBack, errorCallBack, isShowDefaultTip);
        }