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

---
 Main/Utility/EnumHelper.cs                         |    1 
 Main/System/Mingge/MinggeWin.cs                    |    7 +
 Main/System/FuncPreset/FuncPresetChangeNameWin.cs  |    1 
 Main/System/MainLevel/MainBossEnterWin.cs          |    8 +
 Main/System/BoneField/BoneFieldWin.cs              |    9 +
 Main/System/FuncPreset/FuncPresetUnLockWin.cs      |   56 ++++++++
 Main/System/FuncPreset/FuncPresetManager.cs        |   22 ++
 Main/System/FuncPreset/FuncPresetWin.cs.meta       |   11 +
 Main/System/Arena/ArenaWin.cs                      |   14 +-
 Main/System/FuncPreset/FuncPresetWin.cs            |  153 +++++++++++++++++++++
 Main/System/HeroUI/HeroPosWin.cs                   |   10 +
 Main/System/Team/TeamManager.cs                    |    4 
 Main/System/Mingge/MinggeEquipCell.cs              |    2 
 Main/System/FuncPreset/FuncPresetChooseCells.cs    |    6 
 Main/System/FuncPreset/FuncPresetChooseMoreCell.cs |   11 +
 Main/System/FuncPreset/FuncPresetUnLockWin.cs.meta |   11 +
 Main/System/Mingge/MinggeManager.cs                |    9 
 Main/System/Arena/ArenaChallengeWin.cs             |    9 +
 Main/System/HappyXB/HeroSmallHeadCell.cs           |    7 
 Main/System/WarlordPavilion/WarlordPavilionWin.cs  |    9 +
 Main/System/TianziBillborad/TianziBillboradWin.cs  |    9 +
 21 files changed, 344 insertions(+), 25 deletions(-)

diff --git a/Main/System/Arena/ArenaChallengeWin.cs b/Main/System/Arena/ArenaChallengeWin.cs
index 93381b2..ce5d879 100644
--- a/Main/System/Arena/ArenaChallengeWin.cs
+++ b/Main/System/Arena/ArenaChallengeWin.cs
@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using UnityEngine;
+using UnityEngine.UI;
 
 public class ArenaChallengeWin : UIBase
 {
@@ -9,6 +10,7 @@
     [SerializeField] ImageEx imgMoneyIcon;
     [SerializeField] TextEx txtMoneyCount;
     [SerializeField] ScrollerController scrollerController;
+    [SerializeField] Button funPresetBtn;
 
     protected override void InitComponent()
     {
@@ -19,6 +21,11 @@
             if (!UIHelper.CheckMoneyCount(ArenaManager.Instance.currencyType, ArenaManager.Instance.currencyValue, 1))
                 return;
             ArenaManager.Instance.SendArenaMatch(true);
+        });
+
+        funPresetBtn.AddListener(()=>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Arena);
         });
 
     }
@@ -81,5 +88,7 @@
         txtFightPoint.text = UIHelper.ReplaceLargeArtNum(myFightPower);
         imgMoneyIcon.SetIconWithMoneyType(ArenaManager.Instance.currencyType);
         txtMoneyCount.text = UIHelper.ShowUseMoney(ArenaManager.Instance.currencyType, ArenaManager.Instance.currencyValue);
+
+        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
     }
 }
diff --git a/Main/System/Arena/ArenaWin.cs b/Main/System/Arena/ArenaWin.cs
index 1b3e140..1521a64 100644
--- a/Main/System/Arena/ArenaWin.cs
+++ b/Main/System/Arena/ArenaWin.cs
@@ -8,7 +8,7 @@
     [SerializeField] ButtonEx btnAward;
     [SerializeField] ButtonEx btnChallage;
     [SerializeField] RedpointBehaviour rpChallage;
-    [SerializeField] ButtonEx btnDeployTroops;
+    // [SerializeField] ButtonEx btnDeployTroops;
     [SerializeField] List<ArenaPlayerTop3Cell> playerTop3Cells;
     [SerializeField] ScrollerController scrollerController;
     [SerializeField] ArenaPlayerRankCell myRankCell;
@@ -31,11 +31,11 @@
             ArenaManager.Instance.SendArenaMatch();
             UIManager.Instance.OpenWindow<ArenaChallengeWin>();
         });
-        btnDeployTroops.SetListener(() =>
-        {
-            HeroUIManager.Instance.selectTeamType = TeamManager.Instance.GetTeamID((int)BattlePreSetType.Arena);
-            UIManager.Instance.OpenWindow<HeroPosWin>(1); // 绔炴妧鍦烘爣绛鹃〉
-        });
+        // btnDeployTroops.SetListener(() =>
+        // {
+        //     HeroUIManager.Instance.selectTeamType = TeamManager.Instance.GetTeamID((int)BattlePreSetType.Arena);
+        //     UIManager.Instance.OpenWindow<HeroPosWin>(1); // 绔炴妧鍦烘爣绛鹃〉
+        // });
     }
 
     protected override void OnPreOpen()
@@ -81,7 +81,7 @@
     void DisplayDeployTroop()
     {
         bool isOpen = FuncOpen.Instance.IsFuncOpen(ArenaManager.Instance.DeployTroopsFuncId);
-        btnDeployTroops.SetActive(isOpen);
+        // btnDeployTroops.SetActive(isOpen);
     }
 
 
diff --git a/Main/System/BoneField/BoneFieldWin.cs b/Main/System/BoneField/BoneFieldWin.cs
index 3c01fc2..47ec57b 100644
--- a/Main/System/BoneField/BoneFieldWin.cs
+++ b/Main/System/BoneField/BoneFieldWin.cs
@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using UnityEngine;
+using UnityEngine.UI;
 public class BoneFieldWin : UIBase
 {
     [SerializeField] float modelSize;
@@ -27,6 +28,8 @@
     [SerializeField] ButtonEx btnAds;
     [SerializeField] ImageEx imgSweepRed;
     [SerializeField] UIHeroController bossModel;
+    [SerializeField] Button funPresetBtn;
+    
     bool isHasNextLineID;
     int adID;
 
@@ -38,6 +41,10 @@
         btnClose.SetListener(OnClickClose);
         btnSweep.SetListener(OnClickSweep);
         btnAds.SetListener(OnClickAds);
+        funPresetBtn.AddListener(()=>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
+        });
     }
 
     protected override void OnPreOpen()
@@ -174,7 +181,7 @@
             DungeonConfig sweepDungeonConfig = DungeonConfig.Get(sweepDungeonID);
             DisplayItemCellList(sweepItemCells, sweepDungeonConfig.SweepAwardList);
         }
-
+        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
     }
 
     public void DisplayFBInfo(NPCConfig nPCConfig, DungeonConfig dungeonConfig, int nowPassLineID)
diff --git a/Main/System/FuncPreset/FuncPresetChangeNameWin.cs b/Main/System/FuncPreset/FuncPresetChangeNameWin.cs
index b7bb3f5..26f8d87 100644
--- a/Main/System/FuncPreset/FuncPresetChangeNameWin.cs
+++ b/Main/System/FuncPreset/FuncPresetChangeNameWin.cs
@@ -26,6 +26,7 @@
         pack.NameLen = len;
         pack.PresetName = nameText.text;
         GameNetSystem.Instance.SendInfo(pack);
+        SysNotifyMgr.Instance.ShowTip("FuncPreset3");
         CloseWindow();
     }
 }
diff --git a/Main/System/FuncPreset/FuncPresetChooseCells.cs b/Main/System/FuncPreset/FuncPresetChooseCells.cs
index fc0ff1e..089d603 100644
--- a/Main/System/FuncPreset/FuncPresetChooseCells.cs
+++ b/Main/System/FuncPreset/FuncPresetChooseCells.cs
@@ -21,6 +21,7 @@
 
     [SerializeField] Transform moreCellObj;
     [SerializeField] FuncPresetChooseMoreCell[] moreCells;
+    [SerializeField] Canvas canvas;
     bool forceUnFold = false; //寮哄埗灞曞紑锛屼笉鑳芥敹缂�; 娴佹淳鐣岄潰鐨勯渶姹�
     [NonSerialized] public int unFoldID = 0;    //褰撳墠灞曞紑鐨勬柟妗圛D锛屽湪閫変腑鐨勬儏鍐典笅鎵嶇敓鏁�
     int curBattleType;
@@ -53,12 +54,12 @@
                 cells[i].SetActive(true);
                 if (i < 3)
                 {
-                    var _unFoldState = forceUnFold ? true : i + 1 == unFoldID;
+                    var _unFoldState = forceUnFold ? i + 1 == selectID : i + 1 == unFoldID;
                     cells[i].Display(battleType, funcType, i + 1, _unFoldState);
                 }
                 else
                 {
-                    var _unFoldState = forceUnFold ? true : (selectID > 4 ? selectID : 4) == unFoldID;
+                    var _unFoldState = forceUnFold ? selectID >= 4: (selectID > 4 ? selectID : 4) == unFoldID;
                     //绗洓涓姩鎬佸彉鍖�
                     cells[i].Display(battleType, funcType, selectID > 4 ? selectID : 4, _unFoldState);
                 }
@@ -93,6 +94,7 @@
 
     void OnEnable()
     {
+        canvas.sortingLayerName = "UI";
         FuncPresetManager.Instance.OnSelectPresetEvent += OnSelectPresetEvent;
     }
 
diff --git a/Main/System/FuncPreset/FuncPresetChooseMoreCell.cs b/Main/System/FuncPreset/FuncPresetChooseMoreCell.cs
index 5c1eb03..e55a177 100644
--- a/Main/System/FuncPreset/FuncPresetChooseMoreCell.cs
+++ b/Main/System/FuncPreset/FuncPresetChooseMoreCell.cs
@@ -20,7 +20,7 @@
         {
             return;
         }
-        var selectID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, funcType);
+        var selectID = funcType == 1 ? FuncPresetManager.Instance.GetGlobalPresetID(battleType) : FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, funcType);
         caseNameText.text = UIHelper.AppendColor(selectID == id ? TextColType.titleSelectColor : TextColType.titleUnSelectColor,
                             Language.Get("FuncPreset11", id, data.PresetName));
         if (data.unLock)
@@ -30,10 +30,11 @@
             changeNameBtn.AddListener(()=>
             {
                 ChangeName(funcType, id);
+                moreCellObj.SetActive(false);
             });
             chooseBtn.AddListener(() =>
             {
-                if (pareant)
+                if (pareant != null)
                 {
                     pareant.unFoldID = id;
                 }
@@ -44,7 +45,11 @@
         else
         {
             lockBtn.SetActive(true);
-            lockBtn.AddListener(() => FuncPresetManager.Instance.ClickFuncPreset(battleType, funcType, id));
+            lockBtn.AddListener(() =>
+            {
+                FuncPresetManager.Instance.ClickFuncPreset(battleType, funcType, id);
+                moreCellObj.SetActive(false);
+            });
             changeNameBtn.SetActive(false);
             chooseBtn.RemoveAllListeners();
         }
diff --git a/Main/System/FuncPreset/FuncPresetManager.cs b/Main/System/FuncPreset/FuncPresetManager.cs
index d722b9b..928505a 100644
--- a/Main/System/FuncPreset/FuncPresetManager.cs
+++ b/Main/System/FuncPreset/FuncPresetManager.cs
@@ -53,7 +53,7 @@
     public bool IsOpen()
     {
         //鐗规畩绾﹀畾
-        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Mingge))
+        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.FuncPreset))
             return false;
 
         if (TimeUtility.OpenDay < openConditions[0] - 1)
@@ -78,7 +78,7 @@
     //鎻愬墠鏄剧ず
     public bool IsPreShow()
     {
-        return FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Mingge);
+        return FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.FuncPreset);
     }
 
     void InitFuncPreset()
@@ -221,7 +221,7 @@
         var pack = new CB262_tagCSFuncPresetSwitch();
         pack.FuncPresetType = (byte)funcType;
         pack.PresetID = (byte)presetID;
-        pack.BatPresetID = (byte)battleType;
+        pack.BatPresetID = (byte)GetGlobalPresetID(battleType);
         GameNetSystem.Instance.SendInfo(pack);
     }
 
@@ -239,6 +239,7 @@
         pack.FuncPresetType = (byte)funcType;
         pack.PresetID = (byte)presetID;
         GameNetSystem.Instance.SendInfo(pack);
+        SysNotifyMgr.Instance.ShowTip("FuncPreset2");
     }
 
     //瑕佹樉绀虹殑鏂规鏁伴噺; 鏍规嵁鎯呭喌浼氬寘鍚湭瑙i攣
@@ -324,7 +325,20 @@
 
         SaveFuncPresetID(battleType, funcType, id);
         return true;
-    } 
+    }
+
+    // 鐐瑰嚮娴佹淳/闃插畧棰勮鎸夐挳
+    public void ClickBattlePreset(int battleType)
+    {
+        if (!IsOpen())
+        {
+            UIManager.Instance.OpenWindow<FuncPresetUnLockWin>(battleType);
+        }
+        else
+        {
+			UIManager.Instance.OpenWindow<FuncPresetWin>(battleType);
+		}
+    }
 
 }
 
diff --git a/Main/System/FuncPreset/FuncPresetUnLockWin.cs b/Main/System/FuncPreset/FuncPresetUnLockWin.cs
new file mode 100644
index 0000000..ab7a69f
--- /dev/null
+++ b/Main/System/FuncPreset/FuncPresetUnLockWin.cs
@@ -0,0 +1,56 @@
+using System.Text;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class FuncPresetUnLockWin : UIBase
+{
+    [SerializeField] Text processText;
+    [SerializeField] Text[] conditionTexts;
+    [SerializeField] Text[] stateTexts;
+
+    protected override void OnPreOpen()
+    {
+        conditionTexts[0].text = Language.Get("FuncPreset3", FuncPresetManager.Instance.openConditions[0]);
+        conditionTexts[1].text = Language.Get("FuncPreset4", FuncPresetManager.Instance.openConditions[1] / 100,
+        FuncPresetManager.Instance.openConditions[1] % 100);
+        conditionTexts[2].text = Language.Get("FuncPreset5", FuncPresetManager.Instance.openConditions[2] / 100,
+        FuncPresetManager.Instance.openConditions[2] % 100);
+        int unLockCnt = 0;
+
+        if (TimeUtility.OpenDay + 1 >= FuncPresetManager.Instance.openConditions[0])
+        {
+            stateTexts[0].text = UIHelper.AppendColor(TextColType.Green, Language.Get("FuncPreset6"));
+            unLockCnt++;
+        }
+        else
+        {
+            stateTexts[0].text = UIHelper.AppendColor(TextColType.Red, Language.Get("WarlordPavilion14"));
+        }
+
+        if (PlayerDatas.Instance.baseData.ExAttr1 / 100 > FuncPresetManager.Instance.openConditions[1])
+        {
+            stateTexts[1].text = UIHelper.AppendColor(TextColType.Green, Language.Get("FuncPreset6"));
+            unLockCnt++;
+        }
+        else
+        {
+            stateTexts[1].text = UIHelper.AppendColor(TextColType.Red, Language.Get("WarlordPavilion14"));
+        }
+
+        WarlordPavilionManager.Instance.TryGetHistoryMaxFinishProgress(out int layerNum, out int levelNum);
+        var passLayerNum = layerNum * 100 + levelNum;
+        if (passLayerNum >= FuncPresetManager.Instance.openConditions[2])
+        {
+            stateTexts[2].text = UIHelper.AppendColor(TextColType.Green, Language.Get("FuncPreset6"));
+            unLockCnt++;
+        }
+        else
+        {
+            stateTexts[2].text = UIHelper.AppendColor(TextColType.Red, Language.Get("WarlordPavilion14"));
+        }
+
+        processText.text = Language.Get("FuncPreset2") + Language.Get("HeroFates11", unLockCnt, FuncPresetManager.Instance.openConditions.Length);
+
+    }
+}
+
diff --git a/Main/System/FuncPreset/FuncPresetUnLockWin.cs.meta b/Main/System/FuncPreset/FuncPresetUnLockWin.cs.meta
new file mode 100644
index 0000000..3fd900b
--- /dev/null
+++ b/Main/System/FuncPreset/FuncPresetUnLockWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f516f10c5b150874dad8b1e15f17c6e0
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/FuncPreset/FuncPresetWin.cs b/Main/System/FuncPreset/FuncPresetWin.cs
new file mode 100644
index 0000000..f297401
--- /dev/null
+++ b/Main/System/FuncPreset/FuncPresetWin.cs
@@ -0,0 +1,153 @@
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class FuncPresetWin : UIBase
+{
+    [SerializeField] Text tileText;
+    [SerializeField] Button globalPresetBtn;
+    [SerializeField] Text globalPresetNameText;
+    [SerializeField] Transform globalPresetObj;
+    [SerializeField] FuncPresetChooseMoreCell[] morecells;  //鍏ㄥ眬
+    [SerializeField] Transform heroCases;
+    FuncPresetChooseCells heroPresetCells;
+    [SerializeField] HeroSmallHeadCell[] heroHeads;
+
+    //鍛芥牸
+    [SerializeField] Transform minggeObj;
+    [SerializeField] Transform minggeCases;
+    FuncPresetChooseCells minggePresetCells;
+    [SerializeField] MinggeItemCell[] minggeItems;
+    [SerializeField] Text[] suiteDescs;
+
+
+
+    int battleType;
+    protected override void InitComponent()
+    {
+        globalPresetBtn.AddListener(() =>
+        {
+            globalPresetObj.SetActive(true);
+        });
+        var presetObj = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells");
+        presetObj.transform.SetParentEx(heroCases, Vector3.zero, Quaternion.identity, Vector3.one);
+        heroPresetCells = presetObj.GetComponent<FuncPresetChooseCells>();
+
+        var presetObj1 = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells");
+        presetObj1.transform.SetParentEx(minggeCases, Vector3.zero, Quaternion.identity, Vector3.one);
+        minggePresetCells = presetObj1.GetComponent<FuncPresetChooseCells>();
+    }
+
+    protected override void OnPreOpen()
+    {
+        FuncPresetManager.Instance.OnFuncPresetUseDataEvent += OnFuncPresetUseDataEvent;
+        Display();
+    }
+
+    protected override void OnPreClose()
+    {
+        FuncPresetManager.Instance.OnFuncPresetUseDataEvent -= OnFuncPresetUseDataEvent;
+    }
+
+    void OnFuncPresetUseDataEvent(int type)
+    {
+        Display();
+    }
+
+    void Display()
+    {
+        battleType = functionOrder;
+
+        tileText.text = battleType == (int)BattlePreSetType.Story ? Language.Get("FuncPreset7") : Language.Get("FuncPreset13");
+        var globalePresetID = FuncPresetManager.Instance.GetGlobalPresetID(battleType);
+        var globalePreset = FuncPresetManager.Instance.GetFuncPreset((int)FuncPresetType.Global, globalePresetID);
+        globalPresetNameText.text = globalePreset.PresetName;
+
+        var showCnt = FuncPresetManager.Instance.GetShowFuncPresetCount((int)FuncPresetType.Global);
+        for (int i = 0; i < morecells.Length; i++)
+        {
+            if (i < showCnt)
+            {
+                morecells[i].SetActive(true);
+                morecells[i].Display(battleType, (int)FuncPresetType.Global, i + 1);
+            }
+            else
+            {
+                morecells[i].SetActive(false);
+            }
+        }
+
+        heroPresetCells.unFoldID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, (int)FuncPresetType.Team);
+        heroPresetCells.Display(battleType, (int)FuncPresetType.Team, true);
+        var teamID = TeamManager.Instance.GetTeamID(battleType);
+        var team = TeamManager.Instance.GetTeam(teamID);
+        int heroIndex = 0;
+        foreach (var teamHero in team.serverHeroes)
+        {
+            if (teamHero == null)
+            {
+                continue;
+            }
+            HeroInfo heroInfo = HeroManager.Instance.GetHero(teamHero.guid);
+            if (heroInfo == null)
+            {
+                continue;
+            }
+            heroHeads[heroIndex].SetActive(true);
+            heroHeads[heroIndex].Display(heroInfo);
+            heroIndex++;
+        }
+        for (int i = heroIndex; i < heroHeads.Length; i++)
+        {
+            heroHeads[i].SetActive(false);
+        }
+
+        if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Mingge))
+        {
+            minggeObj.SetActive(true);
+            minggePresetCells.unFoldID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, (int)FuncPresetType.Mingge);
+            minggePresetCells.Display(battleType, (int)FuncPresetType.Mingge, true);
+
+
+            var presetID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, (int)FuncPresetType.Mingge);
+            for (int i = 0; i < minggeItems.Length; i++)
+            {
+                var packIndex = MinggeManager.Instance.GetPackIndex(presetID, i + 1);//瀵瑰簲鍗︾帀鑳屽寘绱㈠紩 
+                var item = PackManager.Instance.GetItemByIndex(PackType.Mingge, packIndex);
+                if (item == null)
+                {
+                    minggeItems[i].SetActive(false);
+                    continue;
+                }
+                minggeItems[i].SetActive(true);
+                minggeItems[i].Display(item.guid);
+            }
+
+            var dict = MinggeManager.Instance.GetMinggeSkillCountDictByPresetID(presetID);
+            var keys = dict.Keys.ToList();
+            keys.Sort();
+            for (int i = 0; i < suiteDescs.Length; i++)
+            {
+                if (i < keys.Count)
+                {
+                    var skillID = keys[i];
+                    suiteDescs[i].SetActive(true);
+                    suiteDescs[i].text = Language.Get("L1039", Language.Get($"MinggeSkillType_{skillID}")) +
+                        SkillConfig.Get(skillID + showCnt - 1).Description + " " + Language.Get("HeroFates11", showCnt, MinggeManager.Instance.maxSuiteSkillCount);
+       
+                }
+                else
+                {
+                    suiteDescs[i].SetActive(false);
+                }
+            }
+        }
+        else
+        {
+            minggeObj.SetActive(false);
+        }
+    }
+
+
+}
+
diff --git a/Main/System/FuncPreset/FuncPresetWin.cs.meta b/Main/System/FuncPreset/FuncPresetWin.cs.meta
new file mode 100644
index 0000000..f143681
--- /dev/null
+++ b/Main/System/FuncPreset/FuncPresetWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 15fab3d9935d0854281b763e0ce68324
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/HappyXB/HeroSmallHeadCell.cs b/Main/System/HappyXB/HeroSmallHeadCell.cs
index 594cbd1..5f8f5df 100644
--- a/Main/System/HappyXB/HeroSmallHeadCell.cs
+++ b/Main/System/HappyXB/HeroSmallHeadCell.cs
@@ -16,6 +16,11 @@
         jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(hero.Class));
     }
 
-
+    public void Display(HeroInfo hero)
+    {
+        heroHeadBaseCell.Init(hero.heroId, hero.SkinID, hero.heroStar, hero.awakeLevel, hero.heroLevel);
+        nameText.text = hero.breakLevel == 0 ? hero.heroConfig.Name : Language.Get("herocardbreaklv", hero.heroConfig.Name, hero.breakLevel);
+        jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(hero.heroConfig.Class));
+    }
 }
 
diff --git a/Main/System/HeroUI/HeroPosWin.cs b/Main/System/HeroUI/HeroPosWin.cs
index c911e34..7ed586b 100644
--- a/Main/System/HeroUI/HeroPosWin.cs
+++ b/Main/System/HeroUI/HeroPosWin.cs
@@ -43,6 +43,9 @@
     [SerializeField] Transform caseesObj;
     FuncPresetChooseCells presetChooseCells;
 
+    [SerializeField] Button funPresetBtn;
+
+
     Sequence sequence;
     CancellationTokenSource _cts;
     Queue<int> showConnectTipQueue = new Queue<int>();
@@ -95,6 +98,11 @@
         presetObj.transform.SetParentEx(caseesObj, Vector3.zero, Quaternion.identity, Vector3.one);
         presetChooseCells = presetObj.GetComponent<FuncPresetChooseCells>();
         presetChooseCells.ChangeAlignment(TextAnchor.MiddleCenter);
+
+        funPresetBtn.AddListener(()=>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
+        });
     }
 
 
@@ -162,6 +170,8 @@
         fightPowerText.text = UIHelper.ReplaceLargeArtNum(FightPowerManager.Instance.GetTeamFightPower(HeroUIManager.Instance.selectTeamType, true));
 
         presetChooseCells.Display((int)BattlePreSetType.Story, (int)FuncPresetType.Team);
+
+        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
     }
 
     void RefreshFlyHead()
diff --git a/Main/System/MainLevel/MainBossEnterWin.cs b/Main/System/MainLevel/MainBossEnterWin.cs
index 627c9b2..634ef81 100644
--- a/Main/System/MainLevel/MainBossEnterWin.cs
+++ b/Main/System/MainLevel/MainBossEnterWin.cs
@@ -25,6 +25,7 @@
     [SerializeField] Image fightIcon;
     [SerializeField] ScrollerController dropItemScroller;
     [SerializeField] Button heroRoadBtn;
+    [SerializeField] Button funPresetBtn;
 
 
     protected override void InitComponent()
@@ -43,6 +44,11 @@
         heroRoadBtn.AddListener(() =>
         {
             UIManager.Instance.OpenWindow<DayMissionBaseWin>(2);
+        });
+
+        funPresetBtn.AddListener(()=>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
         });
     }
 
@@ -136,6 +142,8 @@
         bossBG.SetOrgSprite(chapterConfig.BG, "MainLevel");
 
         heroRoadBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DayMission));
+
+        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
     }
 
 
diff --git a/Main/System/Mingge/MinggeEquipCell.cs b/Main/System/Mingge/MinggeEquipCell.cs
index 788e485..c01235a 100644
--- a/Main/System/Mingge/MinggeEquipCell.cs
+++ b/Main/System/Mingge/MinggeEquipCell.cs
@@ -22,7 +22,7 @@
     string lastGuid = "uninit";
     public void Display()
     {
-        var presetID = FuncPresetManager.Instance.GetFuncPresetID((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
+        var presetID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
         var packIndex = MinggeManager.Instance.GetPackIndex(presetID, equipIndex);//瀵瑰簲鍗︾帀鑳屽寘绱㈠紩 
         var item = PackManager.Instance.GetItemByIndex(PackType.Mingge, packIndex);
         if (item == null)
diff --git a/Main/System/Mingge/MinggeManager.cs b/Main/System/Mingge/MinggeManager.cs
index 361fbeb..fdf0dd7 100644
--- a/Main/System/Mingge/MinggeManager.cs
+++ b/Main/System/Mingge/MinggeManager.cs
@@ -146,10 +146,10 @@
     }
 
 
-    //鎰忓悜鎶�鑳絀D锛氥�恎uid..銆�
+    //鑾峰彇褰撳墠鍦ㄤ娇鐢ㄦ柟妗堢殑鎶�鑳戒俊鎭� 鎰忓悜鎶�鑳界被鍨婭D锛氥�愮墿鍝乬uid..銆�
     public Dictionary<int, List<string>> GetMinggeSkillTypeIDDict()
     {
-        var presetID = FuncPresetManager.Instance.GetFuncPresetID((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
+        var presetID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
         var startIndex = (presetID - 1) * TotleEquip;//瀵瑰簲鍗︾帀鑳屽寘绱㈠紩 = (濂楃紪鍙�-1)*12+瑁呭浣�-1
 
         var dict = new Dictionary<int, List<string>>();
@@ -170,6 +170,7 @@
         return dict;
     }
 
+    //鑾峰彇鎸囧畾鏂规鐨勬妧鑳戒俊鎭� 鎰忓悜鎶�鑳界被鍨婭D锛氭暟閲�
     public Dictionary<int, int> GetMinggeSkillCountDictByPresetID(int presetID)
     {
         var startIndex = (presetID - 1) * TotleEquip;//瀵瑰簲鍗︾帀鑳屽寘绱㈠紩 = (濂楃紪鍙�-1)*12+瑁呭浣�-1
@@ -212,7 +213,7 @@
 
 
         //闈炶嚜鍔ㄦ儏鍐典笅锛岄粯璁ゅ綋鍓嶆柟妗�
-        equipShowPresetID = FuncPresetManager.Instance.GetFuncPresetID((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
+        equipShowPresetID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
         selectFloorEquip = equip;
         if (UIManager.Instance.IsOpened<MinggeWin>())
         {
@@ -276,7 +277,7 @@
     {
         minggeAttrDict.Clear();  //韬笂鍛芥牸灞炴�ч噸缃�
 
-        var minggePresetID = FuncPresetManager.Instance.GetFuncPresetID((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
+        var minggePresetID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
         var starIndex = (minggePresetID - 1) * TotleEquip;
 
         for (int i = starIndex; i < starIndex + TotleEquip; i++)
diff --git a/Main/System/Mingge/MinggeWin.cs b/Main/System/Mingge/MinggeWin.cs
index 9441da9..fa6dcf3 100644
--- a/Main/System/Mingge/MinggeWin.cs
+++ b/Main/System/Mingge/MinggeWin.cs
@@ -28,6 +28,7 @@
     [SerializeField] Button tyBtn;
     [SerializeField] Image tyItemImg;
     [SerializeField] Text tyItemCntText;
+    [SerializeField] Button funPresetBtn;
 
     FuncPresetChooseCells presetChooseCells;
     int lastLV = 0;
@@ -57,6 +58,10 @@
         });
 
         autoBtn.AddListener(AutoTY);
+        funPresetBtn.AddListener(()=>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
+        });
     }
 
     protected override void OnPreOpen()
@@ -110,6 +115,8 @@
         DisplayCostItem();
         moneyMoveByPathCell.SetActive(false);
         presetChooseCells.Display((int)BattlePreSetType.Story, (int)FuncPresetType.Mingge);
+
+        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
     }
     void RefreshItemEvent(PackType type, int index, int itemID)
     {
diff --git a/Main/System/Team/TeamManager.cs b/Main/System/Team/TeamManager.cs
index 1fd3e90..26131f1 100644
--- a/Main/System/Team/TeamManager.cs
+++ b/Main/System/Team/TeamManager.cs
@@ -106,12 +106,12 @@
 	// 鑾峰彇涓婚樀瀹规柟妗圛D
 	public int GetMainTeamID()
 	{
-		return FuncPresetManager.Instance.GetFuncPresetID((int)BattlePreSetType.Story, (int)FuncPresetType.Team);
+		return FuncPresetManager.Instance.GetFuncPresetIDByBattleType((int)BattlePreSetType.Story, (int)FuncPresetType.Team);
 	}
 
 	// 鑾峰彇鎸囧畾鐨勬柟妗圛D
 	public int GetTeamID(int battleType)
 	{
-		return FuncPresetManager.Instance.GetFuncPresetID(battleType, (int)FuncPresetType.Team);
+		return FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, (int)FuncPresetType.Team);
 	}
 }
\ No newline at end of file
diff --git a/Main/System/TianziBillborad/TianziBillboradWin.cs b/Main/System/TianziBillborad/TianziBillboradWin.cs
index c8943c1..f03ce8f 100644
--- a/Main/System/TianziBillborad/TianziBillboradWin.cs
+++ b/Main/System/TianziBillborad/TianziBillboradWin.cs
@@ -26,6 +26,9 @@
     [SerializeField] TextEx txtTodayHurt;
     [SerializeField] List<TianziBillboradBossHead> bossHeads;
     [SerializeField] RectTransform layoutGroupRect;
+    [SerializeField] Button funPresetBtn;
+
+
     TianziBillboradManager model { get { return TianziBillboradManager.Instance; } }
     DungeonManager dungeonModel { get { return DungeonManager.Instance; } }
     AdsManager adsModel { get { return AdsManager.Instance; } }
@@ -60,6 +63,10 @@
             {
                 UIManager.Instance.OpenWindow<TianziBillboradSweepTipWin>();
             }
+        });
+        funPresetBtn.AddListener(()=>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
         });
     }
 
@@ -151,6 +158,8 @@
         DisplaySkillWordsList(npcLineupConfig);
         DisplayItemCellList(possibleRewards, model.GetPossibleRewards(npcConfig.NPCID));
         DisplayBossHeadList(bossHeads, model.GetBossIDList(model.DataMapID));
+
+        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
     }
 
     private void DisplayButton(ADAwardConfig adAwardConfig, FBInfo fbInfo)
diff --git a/Main/System/WarlordPavilion/WarlordPavilionWin.cs b/Main/System/WarlordPavilion/WarlordPavilionWin.cs
index a75ff76..3ec5ac1 100644
--- a/Main/System/WarlordPavilion/WarlordPavilionWin.cs
+++ b/Main/System/WarlordPavilion/WarlordPavilionWin.cs
@@ -26,6 +26,9 @@
     [SerializeField] ButtonEx btnSelectBonus;               //閫夋嫨鍔犳垚
     [SerializeField] Image imgSelectBonusRed;              //鍔犳垚棰勮绾㈢偣
     [SerializeField] UIEffectPlayer uIEffectPlayer;         //閫夋嫨鍔犳垚寮�鍚壒鏁�
+    [SerializeField] Button funPresetBtn;
+
+
     WarlordPavilionManager manager { get { return WarlordPavilionManager.Instance; } }
     protected override void InitComponent()
     {
@@ -77,6 +80,11 @@
             if (!manager.IsFuncOpen(true))
                 return;
             UIManager.Instance.OpenWindow<WarlordPavilionBonusPresetWin>();
+        });
+
+        funPresetBtn.AddListener(()=>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
         });
     }
 
@@ -167,6 +175,7 @@
         {
             uIEffectPlayer.Play();
         }
+        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
     }
     private void DisplayButtons()
     {
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index b0f4845..a6159c1 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -846,6 +846,7 @@
     Mail = 52, //閭
     Mingge = 54, //鍛芥牸
     WarlordPavilion = 55, //瀹氬啗闃�
+    FuncPreset = 56, //娴佹淳棰勮
 }
 
 

--
Gitblit v1.8.0