lcy
3 天以前 29671eb1c3ca9a42d083c2bb986a00a3c887007c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Collections.Generic;
public partial class ModelConfig : ConfigBase<int, ModelConfig>
{
    //<TabType,List<TitleID>>
    static Dictionary<int, List<int>> tabTypeDict = new Dictionary<int, List<int>>();
 
    protected override void OnConfigParseCompleted()
    {
        if (!tabTypeDict.ContainsKey(TabType))
        {
            tabTypeDict[TabType] = new List<int>();
        }
        tabTypeDict[TabType].Add(ID);
    }
 
    public static List<int> GetTabTypeTitles(int tabType)
    {
        if (!tabTypeDict.ContainsKey(tabType))
        {
            return new List<int>();
        }
 
        List<int> allKeys = tabTypeDict[tabType];
        List<int> validKeys = new List<int>();
 
        for (int i = 0; i < allKeys.Count; i++)
        {
            int id = allKeys[i];
            var cfg = Get(id);
            // 过滤未达到开服天数的武将和皮肤头像
            if (PhantasmPavilionManager.Instance.IsFaceOrModelVisible(cfg.UnlockWay, cfg.UnlockValue))
            {
                validKeys.Add(id);
            }
        }
 
        return validKeys;
    }
}