少年修仙传客户端代码仓库
client_linchunjie
2019-04-17 b0718b0ff46e1d337c28bb91105b67b66f93bee3
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
40
41
42
43
44
45
using System.Collections.Generic;
using System.Text;
 
public partial class EquipWashSpecConfig : IConfigPostProcess
{
    private static Dictionary<int, List<EquipWashSpecData>> _washSpecDict = new Dictionary<int, List<EquipWashSpecData>>();
 
    public void OnConfigParseCompleted()
    {
        EquipWashSpecData washSpecData = new EquipWashSpecData();
        washSpecData.washSpecType = typeNeed;
        washSpecData.specConfig = this;
        washSpecData.activeIds = ConfigParse.GetMultipleStr<int>(attByLevel);
        washSpecData.activeValues = ConfigParse.GetMultipleStr<int>(attByLevelValue);
 
        if (!_washSpecDict.ContainsKey(typeNeed))
        {
            List<EquipWashSpecData> washSpeclist = new List<EquipWashSpecData>();
            washSpeclist.Add(washSpecData);
            _washSpecDict.Add(typeNeed, washSpeclist);
        }
        else
        {
            _washSpecDict[typeNeed].Add(washSpecData);
        }
    }
 
    //得到相同洗练类型对应的所有套装属性
    public static List<EquipWashSpecData> GetWashSpecModel(int type)
    {
        if (_washSpecDict.ContainsKey(type))
            return _washSpecDict[type];
        else
            return null;
    }
 
    public class EquipWashSpecData
    {
        public int washSpecType;
        public EquipWashSpecConfig specConfig;
        public int[] activeIds;
        public int[] activeValues;
    }
 
}