| | |
| | |
|
| | | config = FuncConfigConfig.Get("FamilyNote");
|
| | | familyRecordMaxCount = int.Parse(config.Numerical1);
|
| | |
|
| | |
|
| | | config = FuncConfigConfig.Get("FamilyBillboardSet");
|
| | | rankShowMaxCnt = int.Parse(config.Numerical1);
|
| | | pageCnt = int.Parse(config.Numerical2);
|
| | | queryPointNum = int.Parse(config.Numerical3);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | public List<int> pageIndexList = new List<int>(); //正常是按页查询,顺序添加即可
|
| | | public int curPageIndex;
|
| | | public int totalPageCount;
|
| | |
|
| | | public int lastPage = -1;
|
| | | public int pageCnt; //每页查询条数
|
| | | int queryPointNum; //查询点
|
| | | public int rankShowMaxCnt;
|
| | |
|
| | | public FairyData GetFairyDataByRank(int rank)
|
| | | {
|
| | | if (rank < 1)
|
| | | return null;
|
| | | int index = rank - 1;
|
| | | FairyData fairyData = GetFairyDataByIndex(index);
|
| | | return fairyData;
|
| | | }
|
| | |
|
| | | public FairyData GetFairyDataByIndex(int index)
|
| | | {
|
| | | if (pageIndexList.IsNullOrEmpty() || index < 0 || index >= pageIndexList.Count)
|
| | | return null;
|
| | | int fairyID = pageIndexList[index];
|
| | | FairyData fairyData = GetFairyData(fairyID);
|
| | | return fairyData;
|
| | | }
|
| | |
|
| | | public FairyData GetFairyData(int fairyID)
|
| | | {
|
| | | return guildsDict.TryGetValue(fairyID, out var data) ? data : null;
|
| | | }
|
| | |
|
| | | public void ResetQueryParam()
|
| | | {
|
| | | pageCnt = 20;
|
| | | lastPage = -1;
|
| | | queryPointNum = 12;
|
| | | }
|
| | |
|
| | | public void ListenRankPage(int index)
|
| | | {
|
| | | int page = index / pageCnt;
|
| | | if (index > page * pageCnt + queryPointNum)
|
| | | {
|
| | | if (lastPage >= page)
|
| | | return;
|
| | | lastPage = page;
|
| | |
|
| | | if (index >= rankShowMaxCnt)
|
| | | {
|
| | | //超过服务器已上榜的总数量,比如总榜单是100名,当前只有8名玩家上榜,往下滚动就不再查询
|
| | | return;
|
| | | }
|
| | | //Debug.LogFormat("分页查询:请求第 {0} 页 (当前index:{1})", page + 1, index);
|
| | | SendFindGuild(string.Empty, page + 1, pageCnt);
|
| | | }
|
| | | }
|
| | |
|
| | | //查找公会列表
|
| | | public void OnRefreshGuildViewList(HA523_tagMCFamilyViewList vNetData)
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | |
|
| | | #region 红点
|
| | |
|