| | |
| | | } |
| | | } |
| | | |
| | | public static string GetBaseFullDescription(int id, long value, string format="{0}+{1}") |
| | | { |
| | | var config = Get(id); |
| | | if (config == null) |
| | | { |
| | | return string.Empty; |
| | | } |
| | | string showName = config.ShowName; |
| | | if (id == 6 || id == 16) |
| | | { |
| | | showName = Language.Get("herocard59"); |
| | | } |
| | | else if (id == 7 || id == 17) |
| | | { |
| | | showName = Language.Get("herocard60"); |
| | | } |
| | | else if (id == 8 || id == 18) |
| | | { |
| | | showName = Language.Get("herocard61"); |
| | | } |
| | | return string.Format(format, showName, GetValueDescription(id, value)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //largeNumFormat 大数值格式:0 默认原数值 1 按万或者(K)显示 2 按6位数以上(才转换大数值,根据情况可统一调整) |
| | | public static string GetValueDescription(int id, long value, int largeNumFormat = 2) |
| | | { |
| | |
| | | for (int i = 0; i < addAttrTexts.Length; i++) |
| | | { |
| | | int id = PlayerPropertyConfig.basePerAttrs[i]; |
| | | addAttrTexts[i].text = PlayerPropertyConfig.GetFullDescription(id, hero.qualityConfig.StarAddPer, |
| | | addAttrTexts[i].text = PlayerPropertyConfig.GetBaseFullDescription(id, hero.qualityConfig.StarAddPer, |
| | | "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}", true)); |
| | | } |
| | | addGiftTip.SetActive(!hero.IsFullGift()); |