From 3a7126b4f32c8770e59e0cc48266bb3fec06ccc4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期二, 09 十二月 2025 14:02:02 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/HeroUI/HeroUIManager.cs |   27 +++++++++------------------
 1 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
index e8f86b2..5f556fc 100644
--- a/Main/System/HeroUI/HeroUIManager.cs
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -178,7 +178,7 @@
 
     public int GetMaxLV(int quality)
     {
-        return HeroQualityBreakConfig.maxlvDic[quality];
+        return HeroQualityLVConfig.maxlvDic[quality];
     }
 
     //鏄惁杈惧埌鏈�楂樼骇
@@ -187,25 +187,16 @@
         return hero.heroLevel >= GetMaxLV(hero.Quality);
 
     }
-    //绐佺牬闄愬埗鐨勬渶楂樼瓑绾�; 濡傛灉瀛樺湪绐佺牬绛夌骇鍚庝笉鑳藉啀鍗囩骇鏄瓥鍒掗厤缃棶棰�
-    public int GetMaxLVByBreakLV(int quality, int breakLevel)
+    //绐佺牬鎵�闇�绛夌骇
+    public int GetNeedLVByBreakLV(int quality, int breakLevel)
     {
-        // for (int i = breakLevel; i >= 0; i--)
-        // {
-        //     var config = HeroQualityBreakConfig.GetQualityBreakConfig(quality, i);
-        //     if (config == null)
-        //     {
-        //         continue;
-        //     }
-        //     return config.LVMax;
-        // }
-        return HeroQualityBreakConfig.GetQualityBreakConfig(quality, breakLevel).LVMax;
+        return HeroQualityBreakConfig.GetQualityBreakConfig(quality, breakLevel).UPLVNeed;
     }
 
-    //鏄惁杈惧埌鍥犵獊鐮撮檺鍒剁殑鏈�楂樼骇
-    public bool IsLVMaxByBreakLevel(HeroInfo hero)
+    //鏄惁杈惧埌鍙獊鐮寸殑鏉′欢
+    public bool IsCanBreak(HeroInfo hero)
     {
-        return hero.heroLevel == GetMaxLVByBreakLV(hero.Quality, hero.breakLevel);
+        return hero.heroLevel >= GetNeedLVByBreakLV(hero.Quality, hero.breakLevel);
     }
 
     public int GetAllHeroPer()
@@ -508,10 +499,10 @@
         var maxBreakLV = HeroBreakConfig.GetMaxBreakLv(hero.heroId);
         if (hero.breakLevel < maxBreakLV)
         {
-            if (IsLVMaxByBreakLevel(hero))
+            if (IsCanBreak(hero))
             {
                 var breakConfig = HeroQualityBreakConfig.GetQualityBreakConfig(hero.Quality, hero.breakLevel);
-                if (itemPack.GetCountById(breakConfig.UPCostItem[0]) >= breakConfig.UPCostItem[1])
+                if (itemPack.GetCountById(breakConfig.UPCostItemList[0][0]) >= breakConfig.UPCostItemList[0][1])
                 {
                     return 3;
                 }

--
Gitblit v1.8.0