| | |
| | | {
|
| | | public event Action<int> onRankRefresh;
|
| | | //public event Action<int> onMyRankRefresh;
|
| | | |
| | |
|
| | | //排行榜滚动显示的最大数量 类型
|
| | | Dictionary<int, int> ranksShowMaxCnt = new Dictionary<int, int>();
|
| | |
|
| | | //分页查询
|
| | | Dictionary<int, int> queryRankCD = new Dictionary<int, int>(); //首次查询CD,不影响后续的分页查询
|
| | | //分页查询 排名索引按字段存储 1代表第一名
|
| | | Dictionary<int, Dictionary<int, RankData>> m_RankPageDatas = new Dictionary<int, Dictionary<int, RankData>>(); |
| | | Dictionary<int, Dictionary<int, RankData>> m_RankPageDatas = new Dictionary<int, Dictionary<int, RankData>>();
|
| | | //类型:ID -排名索引,通过ID进行排重删除 不同名次 同ID的数据
|
| | | Dictionary<int, Dictionary<int, int>> m_RankIDToIndex = new Dictionary<int, Dictionary<int, int>>();
|
| | |
|
| | |
| | | if (queryPageTimes.ContainsKey(page) && Time.realtimeSinceStartup - queryPageTimes[page] < queryPageCD)
|
| | | return;
|
| | | if (ranksServerMaxCnt.ContainsKey(type))
|
| | | { |
| | | if(index >= ranksServerMaxCnt[type])
|
| | | {
|
| | | if (index >= ranksServerMaxCnt[type])
|
| | | {
|
| | | //超过服务器已上榜的总数量,比如总榜单是100名,当前只有8名玩家上榜,往下滚动就不再查询
|
| | | return;
|
| | |
| | | }
|
| | |
|
| | | if (!ranksServerMaxCnt.ContainsKey(rankType))
|
| | | { |
| | | {
|
| | | ranksServerMaxCnt.Add(rankType, package.DataTotal);
|
| | | }
|
| | | ranksServerMaxCnt[rankType] = package.DataTotal;
|
| | |
| | | return null;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | public string GetStoryInfo(uint cmpValue)
|
| | | {
|
| | | int value = (int)cmpValue;
|
| | | if (!MainLevelConfig.HasKey(value))
|
| | | return string.Empty;
|
| | | MainLevelConfig config = MainLevelConfig.Get(value);
|
| | | return Language.Get("Arena15", config.ChapterID, config.LevelNum);
|
| | | }
|
| | | }
|
| | |
|
| | | // 默认情况,各个榜可能有所变化
|