hch
2025-11-21 eb27e5fd31f73b998a4bbd85511a31e40b8c61b7
Main/System/BillboardRank/RankModel.cs
@@ -6,15 +6,15 @@
public class RankModel : GameSystemManager<RankModel>
{
    public event Action<int> onRankRefresh;
    public event Action<int> onMyRankRefresh;
    //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>>();
@@ -73,7 +73,7 @@
        data.value2 = serverData.Value2;
        data.value3 = serverData.Value3;
        data.value4 = serverData.Value4;
        data.value5 = serverData.Value5;
        data.value5 = (uint)PhantasmPavilionManager.Instance.GetModelSkinID((int)serverData.Value5);//转成皮肤ID
        data.value6 = serverData.Value6;
        data.value7 = serverData.Value7;
        data.value8 = serverData.Value8;
@@ -127,8 +127,8 @@
            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;
@@ -170,7 +170,7 @@
        data.value2 = serverData.Value2;
        data.value3 = serverData.Value3;
        data.value4 = serverData.Value4;
        data.value5 = serverData.Value5;
        data.value5 = (uint)PhantasmPavilionManager.Instance.GetModelSkinID((int)serverData.Value5);//转成皮肤ID
        data.value6 = serverData.Value6;
        data.value7 = serverData.Value7;
        data.value8 = serverData.Value8;
@@ -205,7 +205,7 @@
        }
        if (!ranksServerMaxCnt.ContainsKey(rankType))
        {
        {
            ranksServerMaxCnt.Add(rankType, package.DataTotal);
        }
        ranksServerMaxCnt[rankType] = package.DataTotal;
@@ -265,12 +265,11 @@
                }
                ReSetRankData(m_RankPageDatas[rankType][orderIndex], package.ViewIDDataList[i], package.Type);
            }
            onMyRankRefresh?.Invoke(package.Type);
            //onMyRankRefresh?.Invoke(package.Type);    同时查询没有单独返回数据,暂时不要这个事件
        }
        else
        {
            onRankRefresh?.Invoke(package.Type);
        }
        onRankRefresh?.Invoke(package.Type);
    }
@@ -333,6 +332,15 @@
        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);
    }
}
// 默认情况,各个榜可能有所变化
@@ -346,6 +354,9 @@
// Value3     -             头像
// Value4     -             头像框
// Value5     -             主角形象
// cmpValue     比较值亿
// cmpValue2    比较值小于亿
// cmpValue3    时间戳
// ---------------------------------------
// 仙盟榜
// ID            -             仙盟ID