hch
107 分钟以前 87d5c46997d61523aed87fdb7ed0b07e9dded223
Main/System/BillboardRank/RankModel.cs
@@ -6,7 +6,7 @@
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>();
@@ -17,8 +17,6 @@
    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>>();
    Action completeEvent = null;    //查询完成事件
    //监听排行榜显示名次,用于分页查询,第一页查询由外部触发
    //使用场景 如界面排行榜滚动的时候每次查询30个排名名额,在显示大于m*30 +20名时,监听下一页,查询m+1页
@@ -98,15 +96,12 @@
    //
    //  startIndex 和 count 配对,与watchID无关联
    //  watchID;    //查看指定ID名次前后,查询范围服务端已固定,如果只要查指定目标,count可以设置1减少附加信息
    public void QueryRankByPage(int type, int startIndex = 0, int count = 20, int watchID = 0, bool forceQuery = false, int groupValue1 = 0, int groupValue2 = 0, Action complete = null)
    public void QueryRankByPage(int type, int startIndex = 0, int count = 20, int watchID = 0, bool forceQuery = false, int groupValue1 = 0, int groupValue2 = 0)
    {
        completeEvent = complete;
        if (queryRankCD.ContainsKey(type) && !forceQuery)
        {
            if (Time.time - queryRankCD[type] < 2f)
            {
                completeEvent?.Invoke();
                completeEvent = null;
                return;
            }
        }
@@ -270,15 +265,12 @@
                }
                ReSetRankData(m_RankPageDatas[rankType][orderIndex], package.ViewIDDataList[i], package.Type);
            }
            onMyRankRefresh?.Invoke(package.Type);
        }
        else
        {
            onRankRefresh?.Invoke(package.Type);
            //onMyRankRefresh?.Invoke(package.Type);    同时查询没有单独返回数据,暂时不要这个事件
        }
        completeEvent?.Invoke();
        completeEvent = null;
        onRankRefresh?.Invoke(package.Type);
    }
    //排名从1 开始
@@ -353,6 +345,9 @@
// Value3     -             头像
// Value4     -             头像框
// Value5     -             主角形象
// cmpValue     比较值亿
// cmpValue2    比较值小于亿
// cmpValue3    时间戳
// ---------------------------------------
// 仙盟榜
// ID            -             仙盟ID