示例#1
0
    /// <summary>
    /// 从服务器获取好友列表数据
    /// </summary>
    private void GetFriendList()
    {
        StaticData.isGetFriendList = true;
        StaticData.DebugGreen("请求好友列表数据~~~");
        StaticData.playerInfoData.listFriendInfo.Clear();
        // 正式请求
        CSEmptySCFriendList csemptyscfriendlist = new CSEmptySCFriendList();

        ProtocalManager.Instance().SendCSEmptySCFriendList(csemptyscfriendlist, (friendList) =>
        {
            //isFirstRequestFriendInfo = true;
            if (friendList == null)
            {
                GenerateFriendListUI();
                return;
            }

            StaticData.playerInfoData.listFriendInfo.AddRange(friendList.FriendListInfo);
            limitAmountFriend = friendList.FriendAmountLimit;
            SortFriendList();
            GenerateFriendListUI();
        }, (error) => { });
    }
示例#2
0
        public void SendCSEmptySCFriendList(CSEmptySCFriendList csemptyscfriendlist, Action <SCFriendList> ResponseSCFriendListCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptySCFriendList> ();

            ProtoSendMethod.BusinessRequest <SCFriendList>(csemptyscfriendlist, opCodeType, ResponseSCFriendListCallBack, errorCallBack, isShowDefaultTip);
        }