From c5ca1ac30b1d36ce736a5fad9de8424f19a9b884 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 27 一月 2026 10:51:49 +0800
Subject: [PATCH] 437 子 【方案】方案预设 / 【方案】方案预设-客户端

---
 Main/System/Arena/ArenaWin.cs                   |   15 ++++++++++-----
 Main/System/FuncPreset/FuncPresetChooseCell.cs  |    7 ++++---
 Main/System/FuncPreset/FuncPresetChooseCells.cs |    8 ++++++--
 Main/System/Arena/ArenaChallengeWin.cs          |    2 +-
 Main/System/FuncPreset/FuncPresetManager.cs     |    2 +-
 5 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/Main/System/Arena/ArenaChallengeWin.cs b/Main/System/Arena/ArenaChallengeWin.cs
index ce5d879..d751387 100644
--- a/Main/System/Arena/ArenaChallengeWin.cs
+++ b/Main/System/Arena/ArenaChallengeWin.cs
@@ -25,7 +25,7 @@
 
         funPresetBtn.AddListener(()=>
         {
-            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Arena);
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
         });
 
     }
diff --git a/Main/System/Arena/ArenaWin.cs b/Main/System/Arena/ArenaWin.cs
index 1521a64..c5da720 100644
--- a/Main/System/Arena/ArenaWin.cs
+++ b/Main/System/Arena/ArenaWin.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using UnityEngine;
+using UnityEngine.UI;
 
 public class ArenaWin : UIBase
 {
@@ -13,6 +14,8 @@
     [SerializeField] ScrollerController scrollerController;
     [SerializeField] ArenaPlayerRankCell myRankCell;
     [SerializeField] ArenaChallengeVoucher voucher;
+    [SerializeField] Button funPresetBtn;
+    
     [HideInInspector] public int groupValue1 = 0;   //涓�鑸敤浜庤法鏈�
     [HideInInspector] public int groupValue2 = 0;   //涓�鑸敤浜庤法鏈�
     [HideInInspector] public string valueFormat = "{0}";
@@ -31,11 +34,10 @@
             ArenaManager.Instance.SendArenaMatch();
             UIManager.Instance.OpenWindow<ArenaChallengeWin>();
         });
-        // btnDeployTroops.SetListener(() =>
-        // {
-        //     HeroUIManager.Instance.selectTeamType = TeamManager.Instance.GetTeamID((int)BattlePreSetType.Arena);
-        //     UIManager.Instance.OpenWindow<HeroPosWin>(1); // 绔炴妧鍦烘爣绛鹃〉
-        // });
+        funPresetBtn.AddListener(()=>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Arena);
+        });
     }
 
     protected override void OnPreOpen()
@@ -44,6 +46,7 @@
         RankModel.Instance.ResetQueryParam();
         RankModel.Instance.QueryRankByPage(ArenaManager.Instance.rankType, watchID: (int)PlayerDatas.Instance.baseData.PlayerID);
         rpChallage.redpointId = ArenaManager.Instance.GetRedPonitId(1);
+        
     }
 
     protected override void NextFrameAfterOpen()
@@ -121,6 +124,8 @@
         DisplayMyRank();
         DisplayTop3();
         DisplayDeployTroop();
+
+        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
     }
 
     void CreateScroller()
diff --git a/Main/System/FuncPreset/FuncPresetChooseCell.cs b/Main/System/FuncPreset/FuncPresetChooseCell.cs
index fbd7f5b..a78667d 100644
--- a/Main/System/FuncPreset/FuncPresetChooseCell.cs
+++ b/Main/System/FuncPreset/FuncPresetChooseCell.cs
@@ -18,9 +18,10 @@
 
     [SerializeField] FuncPresetChooseCells pareant;
 
-    
+    int curBattleType;
     public void Display(int battleType, int funcType, int id, bool isUnFold)
     {
+        curBattleType = battleType;
         var data = FuncPresetManager.Instance.GetFuncPreset(funcType, id);
         if (data == null)
         {
@@ -51,7 +52,7 @@
                 }
                 if (pareant.unFoldID == id)
                 {
-                    FuncPresetManager.Instance.OnSelectPresetEvent?.Invoke(funcType, id, true);
+                    FuncPresetManager.Instance.OnSelectPresetEvent?.Invoke(curBattleType, funcType, id, true);
                 }
                 else
                 {
@@ -79,7 +80,7 @@
     void Fold(int funcType, int id)
     {
         pareant.unFoldID = 0;
-        FuncPresetManager.Instance.OnSelectPresetEvent?.Invoke(funcType, id, false);
+        FuncPresetManager.Instance.OnSelectPresetEvent?.Invoke(curBattleType, funcType, id, false);
     }
 
     
diff --git a/Main/System/FuncPreset/FuncPresetChooseCells.cs b/Main/System/FuncPreset/FuncPresetChooseCells.cs
index 089d603..3bd43e9 100644
--- a/Main/System/FuncPreset/FuncPresetChooseCells.cs
+++ b/Main/System/FuncPreset/FuncPresetChooseCells.cs
@@ -25,6 +25,7 @@
     bool forceUnFold = false; //寮哄埗灞曞紑锛屼笉鑳芥敹缂�; 娴佹淳鐣岄潰鐨勯渶姹�
     [NonSerialized] public int unFoldID = 0;    //褰撳墠灞曞紑鐨勬柟妗圛D锛屽湪閫変腑鐨勬儏鍐典笅鎵嶇敓鏁�
     int curBattleType;
+    int curFuncType;
 
 
     /// <summary>
@@ -38,6 +39,7 @@
     {
         forceUnFold = _forceUnFold;
         curBattleType = battleType;
+        curFuncType = funcType;
 
         var selectID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, funcType);
         var showCount = FuncPresetManager.Instance.GetShowFuncPresetCount(funcType);
@@ -104,9 +106,11 @@
         FuncPresetManager.Instance.OnSelectPresetEvent -= OnSelectPresetEvent;
     }
 
-    void OnSelectPresetEvent(int funcType, int id, bool isUnFold)
+    void OnSelectPresetEvent(int battleType, int _funcType, int id, bool isUnFold)
     {
-        Display(curBattleType, funcType, forceUnFold);
+        if (battleType != curBattleType || curFuncType != _funcType)
+            return;
+        Display(curBattleType, _funcType, forceUnFold);
     }
 
     //榛樿鏄眳涓潬鍙�
diff --git a/Main/System/FuncPreset/FuncPresetManager.cs b/Main/System/FuncPreset/FuncPresetManager.cs
index 928505a..4ad782b 100644
--- a/Main/System/FuncPreset/FuncPresetManager.cs
+++ b/Main/System/FuncPreset/FuncPresetManager.cs
@@ -22,7 +22,7 @@
 
     public int[] openConditions; //娴佹淳棰勮锛堜篃鍙叏灞�鏂规/鎴樻枟鏂规锛� 寮�鍚潯浠躲�愬紑鏈嶇N澶╋紝涓荤嚎閫氬叧X-Y锛屽畾鍐涢榿杈惧埌N灞傘��
 
-    public Action<int, int, bool> OnSelectPresetEvent; //閫夋嫨鍔熻兘棰勮鏂规浜嬩欢 鍔熻兘绫诲瀷 鏂规ID 鏄惁灞曞紑
+    public Action<int, int, int, bool> OnSelectPresetEvent; //閫夋嫨鍔熻兘棰勮鏂规浜嬩欢 鍔熻兘绫诲瀷 鏂规ID 鏄惁灞曞紑
 
     public override void Init()
     {

--
Gitblit v1.8.0