少年修仙传客户端代码仓库
client_Zxw
2018-11-10 2b32c1203f307905b0b5e646291137c44d067f4a
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
46
47
using System.Collections.Generic;
using System.Text;
namespace TableConfig
{
    public partial class EquipWashSpecConfig : ConfigBase, 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;
        }
 
    }
}