using System.Collections.Generic; using System.Text; public partial class EquipWashSpecConfig : IConfigPostProcess { private static Dictionary> _washSpecDict = new Dictionary>(); public void OnConfigParseCompleted() { EquipWashSpecData washSpecData = new EquipWashSpecData(); washSpecData.washSpecType = typeNeed; washSpecData.specConfig = this; washSpecData.activeIds = ConfigParse.GetMultipleStr(attByLevel); washSpecData.activeValues = ConfigParse.GetMultipleStr(attByLevelValue); if (!_washSpecDict.ContainsKey(typeNeed)) { List washSpeclist = new List(); washSpeclist.Add(washSpecData); _washSpecDict.Add(typeNeed, washSpeclist); } else { _washSpecDict[typeNeed].Add(washSpecData); } } //得到相同洗练类型对应的所有套装属性 public static List 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; } }