public static void ShowEquipAdvanceText(UILabel label, int equipID, int advanceLevel) { if (label == null) { return; } DEquipAdvance advanceDB = ReadCfgEquipAdvance.GetDataById(equipID); label.text = string.Empty; for (int i = 0; i < advanceDB.Propertys.Count; i++) { KeyValuePair <EAttr, int> data = advanceDB.Propertys[i]; if (data.Value <= 0 || data.Key == 0) { continue; } DProperty propertyDB = ReadCfgProperty.GetDataById(data.Key); string desc = GTTools.Format(propertyDB.Desc, data.Value); string v = string.Empty; if (advanceLevel >= (i + 1)) { v = GTTools.Format("[00ff00]{0}[-]", desc); } else { v = GTTools.Format("[777777]{0} (进阶至{1}级生效)[-]", desc, i + 1); } label.Append(v); } }
static void CalcEquipAdvanceLevel(Dictionary <EAttr, int> dict, XEquip equip) { int lv = equip.AdvanceLevel; DEquipAdvance db = ReadCfgEquipAdvance.GetDataById(equip.Id); for (int i = 0; i < db.Propertys.Count; i++) { if (i < lv) { KeyValuePair <EAttr, int> ep = db.Propertys[i]; dict[ep.Key] += ep.Value; } else { break; } } }
public int GetMaxEquipAdvanceLevel(int equipID) { DEquipAdvance db = ReadCfgEquipAdvance.GetDataById(equipID); return(db.Propertys.Count); }