From f9f2711f44e45021b4d69ca701bd25704578eef4 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 25 十一月 2025 17:20:34 +0800
Subject: [PATCH] 121 【武将】武将系统 - 同步武将升级增加固定属性
---
Main/System/HeroUI/HeroTrainAddAttrCell.cs | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Main/System/HeroUI/HeroTrainAddAttrCell.cs b/Main/System/HeroUI/HeroTrainAddAttrCell.cs
index 142df5f..91b1209 100644
--- a/Main/System/HeroUI/HeroTrainAddAttrCell.cs
+++ b/Main/System/HeroUI/HeroTrainAddAttrCell.cs
@@ -14,12 +14,21 @@
[SerializeField] PositionTween addPerObject;
- public void Display(int value, Action func)
+ public void Display(HeroInfo hero, Action func)
{
+ int value = hero.qualityConfig.LVAddPer;
addPerObject.SetActive(true);
+ var lvConfig = HeroQualityLVConfig.GetQualityLVConfig(hero.Quality, hero.heroLevel + 1);
+ var beforeLVConfig = HeroQualityLVConfig.GetQualityLVConfig(hero.Quality, hero.heroLevel);
for (int i = 0; i < addPerText.Length; i++)
{
- addPerText[i].text = "+" + PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], value);
+ var addValue = lvConfig.AttrValueList[i] - beforeLVConfig.AttrValueList[i];
+ string addString = "";
+ if (addValue != 0)
+ {
+ addString = $"+{addValue}\n";
+ }
+ addPerText[i].text = addString + "+" + PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], value);
}
addPerObject.Play(() =>
{
--
Gitblit v1.8.0