From 6dd078b9ed38ff99a4912029cca2bd5c309f94fc Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 26 十一月 2025 16:54:52 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/HeroUI/HeroUIManager.OnTeam.cs |   23 +++++++++++
 Main/System/HeroUI/HeroCardCell.cs         |    1 
 Main/System/Battle/BaseBattleWin.cs        |   10 +++-
 Main/System/HeroUI/HeroPosHeadCell.cs      |    1 
 Main/System/NewBieGuidance/NewBieWin.cs    |   33 ++++++++++++++--
 5 files changed, 59 insertions(+), 9 deletions(-)

diff --git a/Main/System/Battle/BaseBattleWin.cs b/Main/System/Battle/BaseBattleWin.cs
index fa8c2ad..3df85a8 100644
--- a/Main/System/Battle/BaseBattleWin.cs
+++ b/Main/System/Battle/BaseBattleWin.cs
@@ -210,9 +210,13 @@
         int nextSpeedIndex = (BattleManager.Instance.speedIndex + 1) % BattleManager.Instance.speedGear.Length;
         // 妫�鏌ヤ笅涓�妗e�嶉�熷姛鑳芥槸鍚﹀紑鍚�
         int nextSpeedFuncId = BattleManager.Instance.speedIndexfuncIdArr[nextSpeedIndex];
-        if (!FuncOpen.Instance.IsFuncOpen(nextSpeedFuncId, true))
-            return;
-        BattleManager.Instance.speedIndex = (BattleManager.Instance.speedIndex + 1) % BattleManager.Instance.speedGear.Length;
+        bool isOpen = FuncOpen.Instance.IsFuncOpen(nextSpeedFuncId);
+        if (!isOpen && FuncOpenLVConfig.HasKey(nextSpeedFuncId))
+        {
+            var config = FuncOpenLVConfig.Get(nextSpeedFuncId);
+            SysNotifyMgr.Instance.ShowTip("BattleSpeedTip", TaskManager.Instance.GetNeedFinishTaskCount(config.LimitMissionID), nextSpeedIndex + 1);
+        }
+        BattleManager.Instance.speedIndex = !isOpen ? 0 : nextSpeedIndex;
         battleField.SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]);
         if (textSpeed != null)
             textSpeed.text = (BattleManager.Instance.speedIndex + 1).ToString();
diff --git a/Main/System/HeroUI/HeroCardCell.cs b/Main/System/HeroUI/HeroCardCell.cs
index 0f5d634..cd524b9 100644
--- a/Main/System/HeroUI/HeroCardCell.cs
+++ b/Main/System/HeroUI/HeroCardCell.cs
@@ -29,6 +29,7 @@
             this.gameObject.SetActive(false);
             return;
         }
+        this.gameObject.name = $"HeroCardCell_{hero.heroId}";
 
         this.gameObject.SetActive(true);
         heroCardBG.SetSprite("herocardbg" + hero.Quality);
diff --git a/Main/System/HeroUI/HeroPosHeadCell.cs b/Main/System/HeroUI/HeroPosHeadCell.cs
index ba6249a..d70783f 100644
--- a/Main/System/HeroUI/HeroPosHeadCell.cs
+++ b/Main/System/HeroUI/HeroPosHeadCell.cs
@@ -15,6 +15,7 @@
         var hero = HeroManager.Instance.GetHero(guid);
         var team = TeamManager.Instance.GetTeam(HeroUIManager.Instance.selectTeamType);
         selectRect.SetActive(team.GetHero(guid) != null);
+        this.gameObject.name = $"HeroPosHeadCell_{hero.heroId}";
 
         heroHeadBaseCell.Init(hero.heroId, hero.SkinID, hero.heroStar, hero.awakeLevel, hero.heroLevel, () =>
         {
diff --git a/Main/System/HeroUI/HeroUIManager.OnTeam.cs b/Main/System/HeroUI/HeroUIManager.OnTeam.cs
index 322a874..bfa2ed6 100644
--- a/Main/System/HeroUI/HeroUIManager.OnTeam.cs
+++ b/Main/System/HeroUI/HeroUIManager.OnTeam.cs
@@ -365,7 +365,7 @@
         {
             return 0;
         }
-        
+
         int indexA = Array.IndexOf(teamSortByJob, heroA.heroConfig.Class);
         int indexB = Array.IndexOf(teamSortByJob, heroB.heroConfig.Class);
 
@@ -529,5 +529,26 @@
     }
     #endregion
 
+
+    //涓婇樀涓殑姝﹀皢鎵惧嚭绛夌骇鏈�浣庣殑
+    public int GetHeroIDAtLowLV()
+    {
+        int minLV = int.MaxValue;
+        int minID = -1;
+        var team = TeamManager.Instance.GetTeam(TeamType.Story);
+        for (int i = 0; i < team.serverHeroes.Length; i++)
+        {
+            if (team.serverHeroes[i] != null)
+            {
+                if (team.serverHeroes[i].level < minLV)
+                {
+                    minLV = team.serverHeroes[i].level;
+                    minID = team.serverHeroes[i].heroId;
+                }
+            }
+        }
+        return minID;
+    }
+
 }
 
diff --git a/Main/System/NewBieGuidance/NewBieWin.cs b/Main/System/NewBieGuidance/NewBieWin.cs
index 80ea510..06efa85 100644
--- a/Main/System/NewBieGuidance/NewBieWin.cs
+++ b/Main/System/NewBieGuidance/NewBieWin.cs
@@ -381,21 +381,44 @@
 
     }
 
-    //BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content/Btn_@*
+    //BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content/Btn_@
     //鍒嗗壊鎴怋aseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content 鍜� Btn_
-    //鍦╓indowCenter.Instance.uiRoot鐨� BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content涓嬫煡鎵句互Btn_寮�澶寸殑绗竴涓瓙鐗╀綋
+    //鍦╓indowCenter.Instance.uiRoot鐨� BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content涓�
+    // 鏌ユ壘浠tn_寮�澶寸殑绗竴涓瓙鐗╀綋
 
-        //鏀寔璺緞鏈熬鍔燖*鍋氭ā绯婃煡鎵�
+    //鏀寔璺緞鏈熬鍔燖鍋氭ā绯婃煡鎵� 绗竴涓瓙鐗╀綋
     private Transform FindTransform(string path)
     {
-        if (!path.EndsWith("@*"))
+        if (!path.EndsWith("@"))
         {
             return UIManager.Instance.GetUIRoot().transform.Find(path);
         }
 
         var paths = path.Split('/');
         var newPath = string.Join("/", paths, 0, paths.Length - 1);
-        string findName = paths[paths.Length - 1].Replace("@*", "");
+
+        string findName = paths[paths.Length - 1];
+        //鍙湁涓�涓狜 鎵嶅仛妯$硦鏌ユ壘锛屼袱涓狜鍒欏彇鍑轰腑闂寸殑瀛楃涓蹭綔涓烘寚浠ゆ爣璇嗗啀鍋氶�昏緫
+        var arr = paths[paths.Length - 1].Split("@");
+        if (arr.Length == 3)
+        {
+            findName = arr[0];
+            var code = arr[1];
+            if (code == "herolv")
+            {
+                int heroID = HeroUIManager.Instance.GetHeroIDAtLowLV();
+                if (heroID == -1)
+                {
+                    //纭疄涓嶅瓨鍦� 鍒欎笉寮曞
+                    return null;
+                }
+                return UIManager.Instance.GetUIRoot().transform.Find($"{newPath}/{findName}{heroID}");
+            }
+            Debug.LogError("寮曞鏈煡鐨勬ā绯婃煡鎵炬寚浠わ細" + code);
+            return null;
+        }
+
+        findName = paths[paths.Length - 1].Replace("@", "");
         var parent = UIManager.Instance.GetUIRoot().transform.Find(newPath);
         if (parent == null)
         {

--
Gitblit v1.8.0