using System.Collections; using System.Collections.Generic; using System.Text; namespace TableConfig { public partial class PetClassCostConfig : ConfigBase, IConfigPostProcess { private static Dictionary t_petClssCost = new Dictionary(); private static Dictionary> t_petClssCostDict = new Dictionary>(); public void OnConfigParseCompleted() { t_petClssCost.Add(StringUtility.Contact(PetID, Rank).ToString(), this); if (!t_petClssCostDict.ContainsKey(PetID)) { List list = new List(); list.Add(this); t_petClssCostDict.Add(PetID, list); } else { t_petClssCostDict[PetID].Add(this); } } public static PetClassCostConfig GetPetIdAndRank(int _PetID, int _Rank) { PetClassCostConfig _petIdAndRank = null; t_petClssCost.TryGetValue(StringUtility.Contact(_PetID, _Rank).ToString(), out _petIdAndRank); return _petIdAndRank; } } }