using System.Collections.Generic; using System.Text; namespace TableConfig { public partial class ItemConfig : ConfigBase, IConfigPostProcess { public static Dictionary tag_DicID = new Dictionary();//用于灵兽 public static Dictionary tag_ZJSH = new Dictionary();//用于坐骑兽魂 public static Dictionary tag_Type27 = new Dictionary();//灵兽口粮 public static Dictionary tag_DicIDCM = new Dictionary(); public static Dictionary tag_Wings = new Dictionary();//用来存储所有翅膀所需的Tpye #region 宝石数据 private static StringBuilder _textBuilder = new StringBuilder(); private static Dictionary m_GemCfgs = new Dictionary(); private const int GEM_TYPE_VALUE = 225; private const int GEM_TYPE = 25; #endregion public void OnConfigParseCompleted() { #region 宝石数据 _textBuilder.Length = 0; if (Type == GEM_TYPE && Effect1 == GEM_TYPE_VALUE) { _textBuilder.Append(EffectValueB1.ToString()); _textBuilder.Append(EffectValueA1.ToString()); m_GemCfgs.Add(_textBuilder.ToString(), this); } #endregion if (Type == 28) { tag_DicID.Add(ID, this); } else if (Type == 29) { tag_DicIDCM.Add(ID, this); } else if (Type == 22) { tag_ZJSH.Add(ID, this); } else if (Type == 27) { tag_Type27.Add(ID, this); } else if (Type == 111 || Type == 39 || Type == 52) { tag_Wings.Add(ID, this); } } #region 宝石数据 /// /// 根据宝石等级以及类型取到宝石数据 /// /// /// /// public static ItemConfig GetGemDataByLevelAndType(int level, int type) { _textBuilder.Length = 0; _textBuilder.Append(level.ToString() + type.ToString()); ItemConfig item = null; m_GemCfgs.TryGetValue(_textBuilder.ToString(), out item); return item; } #endregion } }