public static void ShowEquipStrengthText(UILabel label, int equipID, int strengthLevel) { if (label == null) { return; } DEquipStreng strengthDB = ReadCfgEquipStreng.GetDataById(equipID); label.text = string.Empty; for (int i = 0; i < strengthDB.Propertys.Count; i++) { DStrengthValue data = strengthDB.Propertys[i]; if (data.Value <= 0 || data.Property == 0) { continue; } DProperty propertyDB = ReadCfgProperty.GetDataById(data.Property); string desc = GTTools.Format(propertyDB.Desc, data.Value); string v = string.Empty; if (data.UnlockLevel <= strengthLevel) { v = GTTools.Format("[00ff00]{0}[-]", desc); } else { v = GTTools.Format("[777777]{0} (强化至{1}级生效)[-]", desc, data.UnlockLevel); } label.Append(v); } }
static void CalCfgStrengthValuethLevel(Dictionary <EAttr, int> dict, XEquip equip) { int lv = equip.StrengthenLevel; DEquip equipDB = ReadCfgEquip.GetDataById(equip.Id); dict[EAttr.HP] += lv * equipDB.StrengthGrow1; dict[EAttr.AP] += lv * equipDB.StrengthGrow2; dict[EAttr.DF] += lv * equipDB.StrengthGrow3; DEquipStreng strengthDB = ReadCfgEquipStreng.GetDataById(equip.Id); for (int i = 0; i < strengthDB.Propertys.Count; i++) { DStrengthValue es = strengthDB.Propertys[i]; if (lv >= es.UnlockLevel) { dict[es.Property] += es.Value; } else { break; } } }