yyl
2026-01-27 ac93e899d5c6331e89ccae552ecbb502a9652d01
Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
34个文件已修改
4个文件已添加
762 ■■■■ 已修改文件
Main/System/Arena/ArenaChallengeWin.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Arena/ArenaManager.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Arena/ArenaWin.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleConst.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleField/StoryBattleField.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/BoneField/BoneFieldWin.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetChangeNameWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetChooseCell.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetChooseCells.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetChooseMoreCell.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetManager.cs 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetUnLockWin.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetUnLockWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetWin.cs 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HappyXB/HeroSmallHeadCell.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroInfo.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroFates/HeroFatesManager.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroPosWin.cs 109 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroTrainWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.Reborn.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/ItemTip/ItemTipUtility.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/AutoFightModel.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/HomeWin.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/MainLevel/MainBossEnterWin.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggeEquipCell.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggeEquipChangeCell.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggeEquipWin.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggeItemCell.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggeManager.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggePrayWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggeSmallTipWin.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Mingge/MinggeWin.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/OtherPlayerDetail/OtherPlayerDetailWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Team/TeamManager.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/TianziBillborad/TianziBillboradWin.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/WarlordPavilion/WarlordPavilionWin.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/EnumHelper.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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.Story);
        });
    }
@@ -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());
    }
}
Main/System/Arena/ArenaManager.cs
@@ -311,7 +311,7 @@
        var arenaDefenseTeam = TeamManager.Instance.GetTeam(BattlePreSetType.Arena);
        return arenaDefenseTeam.IsEmpty() || arenaDefenseTeam.GetTeamHeroCount() <= 0 ?
            PlayerDatas.Instance.baseData.FightPower :
            FightPowerManager.Instance.GetTeamFightPower(TeamManager.Instance.GetTeamID((int)BattlePreSetType.Arena), false);
            FightPowerManager.Instance.GetTeamFightPower(TeamManager.Instance.GetTeamID(BattlePreSetType.Arena), false);
    }
}
Main/System/Arena/ArenaWin.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ArenaWin : UIBase
{
@@ -8,11 +9,13 @@
    [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;
    [SerializeField] ArenaChallengeVoucher voucher;
    [SerializeField] Button funPresetBtn;
    [HideInInspector] public int groupValue1 = 0;   //一般用于跨服
    [HideInInspector] public int groupValue2 = 0;   //一般用于跨服
    [HideInInspector] public string valueFormat = "{0}";
@@ -31,10 +34,9 @@
            ArenaManager.Instance.SendArenaMatch();
            UIManager.Instance.OpenWindow<ArenaChallengeWin>();
        });
        btnDeployTroops.SetListener(() =>
        funPresetBtn.AddListener(()=>
        {
            HeroUIManager.Instance.selectTeamType = TeamManager.Instance.GetTeamID((int)BattlePreSetType.Arena);
            UIManager.Instance.OpenWindow<HeroPosWin>(1); // 竞技场标签页
            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Arena);
        });
    }
@@ -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()
@@ -81,7 +84,7 @@
    void DisplayDeployTroop()
    {
        bool isOpen = FuncOpen.Instance.IsFuncOpen(ArenaManager.Instance.DeployTroopsFuncId);
        btnDeployTroops.SetActive(isOpen);
        // btnDeployTroops.SetActive(isOpen);
    }
@@ -121,6 +124,8 @@
        DisplayMyRank();
        DisplayTop3();
        DisplayDeployTroop();
        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
    }
    void CreateScroller()
Main/System/Battle/BattleConst.cs
@@ -30,7 +30,7 @@
        { ArenaBattleField, "ArenaBattleWin" },
        { BoneBattleField, "BoneFieldBattleWin" },
        { TianziBillboradBattleField, "TianziBillboradBattleWin" },
        { WarlordPavilionBattleField, "WarlordPavilionBattleField" },
        { WarlordPavilionBattleField, "WarlordPavilionBattleWin" },
    };
    public static Dictionary<string, int> FieldNameToIndex = new Dictionary<string, int>()
Main/System/Battle/BattleField/StoryBattleField.cs
@@ -30,6 +30,8 @@
    public StoryBattleState battleState;
    int lastPresetID = 0;
    public StoryBattleField() : base(string.Empty)
    {
@@ -59,12 +61,9 @@
        }
        // LoadBattleMode();
        lastPresetID = TeamManager.Instance.GetMainTeamID();
        TeamManager.Instance.OnTeamChange += OnTeamChange;
        FuncPresetManager.Instance.OnFuncPresetUseDataEvent += OnFuncPresetUseDataEvent;
    }
    protected override void LoadMap(int mapID)
@@ -80,6 +79,7 @@
    {
        base.Release();
        TeamManager.Instance.OnTeamChange -= OnTeamChange;
        FuncPresetManager.Instance.OnFuncPresetUseDataEvent -= OnFuncPresetUseDataEvent;
    }
    protected void LoadBattleMode()
@@ -149,6 +149,19 @@
        }
    }
    void OnFuncPresetUseDataEvent(int type)
    {
        var presetID = TeamManager.Instance.GetMainTeamID();
        if (presetID != lastPresetID)
        {
            lastPresetID = presetID;
            if (battleState == StoryBattleState.Break)
            {
                ReloadTeam();
            }
        }
    }
    protected override void OnSettlement(JsonData turnFightStateData)
    {
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)
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();
    }
}
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);
    }
    
Main/System/FuncPreset/FuncPresetChooseCells.cs
@@ -14,13 +14,19 @@
public class FuncPresetChooseCells : MonoBehaviour
{
    [SerializeField] HorizontalLayoutGroup layoutGroup;
    [SerializeField] FuncPresetChooseCell[] cells;
    [SerializeField] Button unFoldBtn;   //展开更多
    //被选中的方案会显示在外层,如果不是第四个则第四个会显示在最上面
    [SerializeField] Transform moreCellObj;
    [SerializeField] FuncPresetChooseMoreCell[] moreCells;
    [SerializeField] Canvas canvas;
    bool forceUnFold = false; //强制展开,不能收缩; 流派界面的需求
    [NonSerialized] public int unFoldID = 0;    //当前展开的方案ID,在选中的情况下才生效
    int curBattleType;
    int curFuncType;
    /// <summary>
    /// 显示方案预设
@@ -33,10 +39,15 @@
    {
        forceUnFold = _forceUnFold;
        curBattleType = battleType;
        curFuncType = funcType;
        var selectID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, funcType);
        var showCount = FuncPresetManager.Instance.GetShowFuncPresetCount(funcType);
        unFoldBtn.SetActive(showCount > 4);
        unFoldBtn.AddListener(() =>
        {
            moreCellObj.SetActive(true);
        });
        for (int i = 0; i < cells.Length; i++)
        {
@@ -45,12 +56,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);
                }
@@ -62,7 +73,7 @@
        }
        var showMoreCount = showCount - 4;
        for (int i = 0; i < showMoreCount; i++)
        for (int i = 0; i < moreCells.Length; i++)
        {
            if (i < showMoreCount)
            {
@@ -85,6 +96,7 @@
    void OnEnable()
    {
        canvas.sortingLayerName = "UI";
        FuncPresetManager.Instance.OnSelectPresetEvent += OnSelectPresetEvent;
    }
@@ -94,8 +106,17 @@
        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);
    }
    //默认是居中靠右
    public void ChangeAlignment(TextAnchor type)
    {
        layoutGroup.childAlignment = type;
    }
}
Main/System/FuncPreset/FuncPresetChooseMoreCell.cs
@@ -10,8 +10,8 @@
    [SerializeField] Button chooseBtn;
    [SerializeField] Transform selectObj;   //流派名才有选中,方案名选中后就显示在外层第四个
    [SerializeField] FuncPresetChooseCells pareant;
    [SerializeField] FuncPresetChooseCells pareant; //记录展开的方案ID用于表现
    [SerializeField] Transform moreCellObj;
    
    public void Display(int battleType, int funcType, int id)
    {
@@ -20,8 +20,9 @@
        {
            return;
        }
        var selectID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, funcType);
        caseNameText.text = Language.Get("FuncPreset11", id, UIHelper.AppendColor(selectID == id ? TextColType.titleSelectColor : TextColType.titleUnSelectColor, data.PresetName));
        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)
        {
            lockBtn.SetActive(false);
@@ -29,20 +30,26 @@
            changeNameBtn.AddListener(()=>
            {
                ChangeName(funcType, id);
                moreCellObj.SetActive(false);
            });
            chooseBtn.AddListener(() =>
            {
                if (pareant)
                if (pareant != null)
                {
                    pareant.unFoldID = id;
                }
                FuncPresetManager.Instance.ClickFuncPreset(battleType, funcType, id);
                moreCellObj.SetActive(false);
            });
        }
        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();
        }
Main/System/FuncPreset/FuncPresetManager.cs
@@ -12,18 +12,17 @@
    //对应 BattlePreSetType 战斗类型 : 全局方案ID
    Dictionary<int, int> battlePreSetDict = new Dictionary<int, int>();
    public event Action OnBattelePresetEvent;
    //所有预设方案的保存信息 全局方案ID :子功能类型(配表):子方案ID
    Dictionary<int, Dictionary<int, int>> m_FuncPresetSaveDict = new Dictionary<int, Dictionary<int, int>>();
    public event Action OnFuncPresetUseDataEvent;
    public event Action<int> OnFuncPresetUseDataEvent;  //0 更换子方案,1 更换全局方案,2 解锁/更改名
    public const int GlobalDefaultPresetID = 1; //默认全局方案ID
    public const int FuncDefaultPresetID = 1;   //默认子功能方案ID
    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()
    {
@@ -54,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)
@@ -79,7 +78,7 @@
    //提前显示
    public bool IsPreShow()
    {
        return FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Mingge);
        return FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.FuncPreset);
    }
    void InitFuncPreset()
@@ -100,7 +99,7 @@
            m_FuncPresetDict[config.PresetType][config.PresetID] = new FuncPreset()
            {
                unLock = config.UnlockType == 0,
                PresetName = Language.Get("Mingge13", config.PresetID)
                PresetName = Language.Get(config.PresetType == 1 ? "FuncPreset10" : "Mingge13", config.PresetID)
            };
        }
    }
@@ -122,12 +121,13 @@
                m_FuncPresetDict[funcPresetInfo.FuncPresetType][preset.PresetID] = new FuncPreset()
                {
                    unLock = _unlock,
                    PresetName = string.IsNullOrEmpty(preset.PresetName) ? Language.Get("Mingge13", preset.PresetID) : preset.PresetName,
                    PresetName = string.IsNullOrEmpty(preset.PresetName) ?
                        Language.Get(funcPresetInfo.FuncPresetType == 1 ? "FuncPreset10" : "Mingge13", preset.PresetID) : preset.PresetName,
                };
            }
        }
        OnFuncPresetUseDataEvent?.Invoke();
        OnFuncPresetUseDataEvent?.Invoke(2);
    }
    //每个全局方案的存储信息
@@ -146,7 +146,7 @@
                m_FuncPresetSaveDict[batPreset.BatPresetID][funcPreset.FuncPresetType] = funcPreset.FuncPresetID;
            }
        }
        OnFuncPresetUseDataEvent?.Invoke();
        OnFuncPresetUseDataEvent?.Invoke(0);
    }
    //当前战斗功能的全局方案ID使用情况
@@ -156,7 +156,7 @@
        {
            battlePreSetDict[netPack.BatPresetList[i].BatPresetType] = netPack.BatPresetList[i].BatPresetID;
        }
        OnBattelePresetEvent?.Invoke();
        OnFuncPresetUseDataEvent?.Invoke(1);
    }
    //根据战斗获取全局方案ID,如果取不到默认方案1
@@ -222,7 +222,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);
    }
@@ -240,6 +240,7 @@
        pack.FuncPresetType = (byte)funcType;
        pack.PresetID = (byte)presetID;
        GameNetSystem.Instance.SendInfo(pack);
        SysNotifyMgr.Instance.ShowTip("FuncPreset2");
    }
    //要显示的方案数量; 根据情况会包含未解锁
@@ -249,14 +250,14 @@
    {
        var unlockCnt = GetUnlockCnt(funcType);
        var maxCount = PresetUnlockConfig.GetFuncPresetMaxCount(funcType);
        var unlockType = PresetUnlockConfig.GetUnlockType((int)FuncPresetType.Mingge);
        var unlockType = PresetUnlockConfig.GetUnlockType(funcType);
        if (unlockType == 2)
        {
            //命格按推演境界解锁
            //只有1个方案则不显示,大于1个则全显示
            if (unlockCnt == 1)
            {
                var config = PresetUnlockConfig.GetPresetUnlockConfig((int)FuncPresetType.Mingge, 2);
                var config = PresetUnlockConfig.GetPresetUnlockConfig(funcType, 2);
                if (MinggeManager.Instance.m_GanwuLV >= config.UnlockValue)
                {
                    return maxCount;
@@ -325,7 +326,26 @@
        SaveFuncPresetID(battleType, funcType, id);
        return true;
    }
    }
    // 点击流派/防守预设按钮
    public void ClickBattlePreset(int battleType)
    {
        if (battleType > 1)
        {
            UIManager.Instance.OpenWindow<FuncPresetWin>(battleType);
            return;
        }
        if (!IsOpen())
        {
            UIManager.Instance.OpenWindow<FuncPresetUnLockWin>(battleType);
        }
        else
        {
            UIManager.Instance.OpenWindow<FuncPresetWin>(battleType);
        }
    }
}
Main/System/FuncPreset/FuncPresetUnLockWin.cs
New file
@@ -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);
    }
}
Main/System/FuncPreset/FuncPresetUnLockWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f516f10c5b150874dad8b1e15f17c6e0
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/FuncPreset/FuncPresetWin.cs
New file
@@ -0,0 +1,160 @@
using System.Linq;
using Cysharp.Threading.Tasks;
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(() =>
        {
            if (FuncPresetManager.Instance.GetShowFuncPresetCount((int)FuncPresetType.Global) == 0)
            {
                return;
            }
            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();
        UIUtility.ForceRefreshLayout(layout).Forget();
    }
    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((BattlePreSetType)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 + dict[skillID] - 1).Description + " " + Language.Get("HeroFates11", dict[skillID], MinggeManager.Instance.maxSuiteSkillCount);
                }
                else
                {
                    suiteDescs[i].SetActive(false);
                }
            }
        }
        else
        {
            minggeObj.SetActive(false);
        }
    }
}
Main/System/FuncPreset/FuncPresetWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 15fab3d9935d0854281b763e0ce68324
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
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));
    }
}
Main/System/Hero/HeroInfo.cs
@@ -49,14 +49,24 @@
        get
        {
            var _list = itemHero.GetUseData(83);
            // 默认没有预设的话就是生效的
            if (_list == null || _list.Count == 0)
                return true;
                return false;
            var id = FuncPresetManager.Instance.GetFuncPresetID((int)FuncPresetType.Team);
            return _list.Contains(id);
        }
    }
    //只要在预设中则代表有激活,但不一定激活属性
    public bool isActive
    {
        get
        {
            var _list = itemHero.GetUseData(83);
            if (_list == null || _list.Count == 0)
                return false;
            return true;
        }
    }
    public bool isLock
    {
@@ -125,7 +135,7 @@
    //是否上任何阵容
    public bool IsInAnyTeam()
    {
        var maxCnt = FuncPresetManager.Instance.GetUnlockCnt((int)FuncPresetType.Mingge);
        var maxCnt = FuncPresetManager.Instance.GetUnlockCnt((int)FuncPresetType.Team);
        for (int i = 1; i < maxCnt + 1; i++)
        {
            if (TeamManager.Instance.GetTeam(i).HasHeroInServer(itemHero.guid))
@@ -139,7 +149,7 @@
    //是否上任何阵容,且只有一只
    public bool IsInAnyTeamJustOne()
    {
        var maxCnt = FuncPresetManager.Instance.GetUnlockCnt((int)FuncPresetType.Mingge);
        var maxCnt = FuncPresetManager.Instance.GetUnlockCnt((int)FuncPresetType.Team);
        for (int i = 1; i < maxCnt + 1; i++)
        {
            var team = TeamManager.Instance.GetTeam(i);
@@ -155,7 +165,7 @@
    //下阵所有阵容
    public void LeaveAllTeam()
    {
        var maxCnt = FuncPresetManager.Instance.GetUnlockCnt((int)FuncPresetType.Mingge);
        var maxCnt = FuncPresetManager.Instance.GetUnlockCnt((int)FuncPresetType.Team);
        for (int i = 1; i < maxCnt + 1; i++)
        {
            int pos;
Main/System/HeroFates/HeroFatesManager.cs
@@ -240,8 +240,8 @@
            //不是所需品质
            if (item.Quality != fatesQuality)
                continue;
            // 生效中的武将
            if (item.isAttrActive)
            // 激活中的武将
            if (item.isActive)
                continue;
            // 在任何阵容中上阵
            bool isInAnyTeam = item.IsInAnyTeam();
Main/System/HeroUI/HeroPosWin.cs
@@ -20,9 +20,6 @@
    [SerializeField] List<Image> scenePosImgs;  //场景布阵位置
    [SerializeField] HeroScenePosCell[] sceneHero;
    [SerializeField] GroupButtonEx attackTeamBtn;
    [SerializeField] GroupButtonEx defendTeamBtn;
    [SerializeField] Text fightPowerText;   //由客户端自己预算的战力
    [SerializeField] ScrollerController heroListScroller;
    [SerializeField] Transform heroListEmpty;
@@ -34,8 +31,6 @@
    [SerializeField] Button oneKeyOnBtn;     //一键上阵
    [SerializeField] Button saveBtn;        //保存阵型
    [SerializeField] Button backBtn;      //退出界面
    [SerializeField] GroupButtonEx jjcBtn;       //竞技场
    // [SerializeField] GroupButtonEx tttBtn;        //通天塔
    [SerializeField] GroupButtonEx mainFBBtn;     //主线副本
    //羁绊
@@ -43,8 +38,13 @@
    [SerializeField] HeroHeadBaseCell flyHead;
    [SerializeField] CanvasGroup flyAlphaTween;
    [SerializeField] ButtonEx lineupRecommendBtn; //阵容推荐
    [SerializeField] Transform caseesObj;
    FuncPresetChooseCells presetChooseCells;
    [SerializeField] Button funPresetBtn;
    Sequence sequence;
    CancellationTokenSource _cts;
@@ -66,20 +66,6 @@
    protected override void InitComponent()
    {
        mainFBBtn.AddListener(() =>
        {
            SelectTeamFunc(TeamManager.Instance.GetMainTeamID());
        });
        jjcBtn.AddListener(() =>
        {
            SelectTeamFunc(TeamManager.Instance.GetTeamID((int)BattlePreSetType.Arena));
        });
        // tttBtn.AddListener(() =>
        // {
        //     SelectTeamFunc(TeamType.Tower);
        // });
        showConnTipToggleBtn.AddListener((value) =>
        {
@@ -107,6 +93,16 @@
        m_IsToggleOn = LocalSave.GetBool("ShowConn" + PlayerDatas.Instance.baseData.PlayerID, false);
        fiterManager = HeroSelectBehaviour.Create(heroSelectBehaviour);
        var presetObj = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells");
        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);
        });
    }
@@ -117,9 +113,8 @@
        HeroUIManager.Instance.OnTeamPosChangeEvent += TeamChangeEvent;
        TeamManager.Instance.OnTeamChange += OnTeamChange;
        FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
        ShowFuncBtn();
        FuncPresetManager.Instance.OnFuncPresetUseDataEvent += OnFuncPresetUseDataEvent;
        SelectTiltleBtn();
        // CreateScroller();
        Display();
        DisplayLineupRecommend();
    }
@@ -131,6 +126,7 @@
        HeroUIManager.Instance.OnTeamPosChangeEvent -= TeamChangeEvent;
        TeamManager.Instance.OnTeamChange -= OnTeamChange;
        FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
        FuncPresetManager.Instance.OnFuncPresetUseDataEvent -= OnFuncPresetUseDataEvent;
        TeamManager.Instance.GetTeam(HeroUIManager.Instance.selectTeamType).RestoreTeam();
    }
@@ -147,44 +143,35 @@
        lineupRecommendBtn.SetActive(isOpen);
    }
    void ShowFuncBtn()
    {
        jjcBtn.SetActive(FuncOpen.Instance.IsFuncOpen(ArenaManager.Instance.DeployTroopsFuncId));
    }
    void SelectTiltleBtn()
    {
        if (functionOrder == 0)
        {
            mainFBBtn.SelectBtn();
        }
        else if (functionOrder == 1)
        {
            jjcBtn.SelectBtn();
        }
        //方案变更 只有主战
        mainFBBtn.SelectBtn();
    }
    void OnFuncPresetUseDataEvent(int type)
    {
        HeroUIManager.Instance.selectTeamType = TeamManager.Instance.GetMainTeamID();
        Display();
    }
    public void Display()
    {
        OnBattleTeamAttrPer();
        RefreshOnTeamCountry();
        RefreshOnTeamBtn();
        RefreshTeamHero();
        RefreshFlyHead();
        RefreshConn();
        RefreshEmptyTip();
        showConnTipToggleBtn.isOn = isToggleOn;
        fiterManager.Display(0, SelectJobCountry);
        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()
@@ -247,33 +234,7 @@
        heroListScroller.Restart();
    }
    //上阵加成
    void OnBattleTeamAttrPer()
    {
        var valuePer = 0;
        var team = TeamManager.Instance.GetTeam(HeroUIManager.Instance.selectTeamType);
        if (team != null)
        {
            for (int i = 0; i < team.tempHeroes.Length; i++)
            {
                if (team.tempHeroes[i] == null)
                    continue;
                var hero = HeroManager.Instance.GetHero(team.tempHeroes[i].guid);
                if (hero != null)
                {
                    valuePer += hero.GetAddPer();
                }
            }
        }
        // //上阵属性
        // for (int i = 0; i < attrOnList.Length; i++)
        // {
        //     string format = valuePer == 0 ? "{0}+{1}" : "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}", false);
        //     attrOnList[i].text = PlayerPropertyConfig.GetFullDescription(PlayerPropertyConfig.basePerAttrs[i], valuePer, format);
        // }
    }
    //上阵武将国家光环激活
    void RefreshOnTeamCountry(bool playEffect = false)
    {
@@ -374,7 +335,6 @@
        RefreshPosScale();
        heroListScroller.m_Scorller.RefreshActiveCellViews();
        RefreshOnTeamCountry(true);
        OnBattleTeamAttrPer();
        //表现飞入,连续点击不同头像触发的话则重置
        if (flyFrom > -1)
@@ -499,19 +459,6 @@
    {
        var team = TeamManager.Instance.GetTeam(HeroUIManager.Instance.selectTeamType);
        team.SaveTeam();
    }
    void SelectTeamFunc(int type)
    {
        if (HeroUIManager.Instance.selectTeamType == type)
        {
            return;
        }
        HeroUIManager.Instance.selectTeamType = type;
        HeroUIManager.Instance.SortHeroOnTeamList();
        Display();
        heroListScroller.m_Scorller.RefreshActiveCellViews();
    }
    protected void OnTeamChange(int teamType)
Main/System/HeroUI/HeroTrainWin.cs
@@ -420,7 +420,7 @@
    bool CanDelete()
    {
        if (hero.isAttrActive)
        if (hero.isActive)
            return false;
        return HeroUIManager.Instance.IsTheSameHeroFullStar(hero.heroId);
Main/System/HeroUI/HeroUIManager.Reborn.cs
@@ -139,7 +139,7 @@
        foreach (var heroInfo in _list)
        {
            if (heroInfo.isAttrActive)
            if (heroInfo.isActive)
                continue;
            if (!fullStarHeroIDList.Contains(heroInfo.heroId))
Main/System/ItemTip/ItemTipUtility.cs
@@ -33,19 +33,9 @@
        public BaseInfo baseInfo;
        public BaseProperty baseProperty;
        public BaseProperty petMountBaseProperty;
        public SpiritWeaponProperty spiritWeaponProperty;
        public ShenProperty shenProperty;
        public LegendProperty legendProperty;
        public SkillInfo skillInfo;
        public SuitInfo suitInfo;
        public StarInfo starInfo;
        public StrengthenProperty strengthenProperty;
        public GemInfo gemInfo;
        public TrainProperty trainProperty;
        public List<ItemOperateType> operates;
        public WingRefineMaterials refineMaterials;
        public GetWay getWay;
        public bool showAll;
    }
    public struct BaseInfo
@@ -341,7 +331,8 @@
        }
    }
    public static void Show(string guid, bool operatable = true)
    // showAll 默认正常全部显示,命格点套装特殊不显示物品信息
    public static void Show(string guid, bool _showAll = true)
    {
        var item = PackManager.Instance.GetItemByGuid(guid);
        if (item == null)
@@ -368,10 +359,14 @@
                }
                break;
            case TipType.Mingge:
                mainTipData = new TipData() { guid = guid };
                mainTipData = new TipData()
                {
                    guid = guid,
                    showAll = _showAll
                };
                break;
            default:
                mainTipData = CreateItemData(guid, operatable);
                mainTipData = CreateItemData(guid);
                break;
        }
@@ -699,7 +694,7 @@
    //     };
    // }
    static TipData CreateItemData(string guid, bool operatable)
    static TipData CreateItemData(string guid)
    {
        var item = PackManager.Instance.GetItemByGuid(guid);
        if (item == null)
Main/System/Main/AutoFightModel.cs
@@ -37,7 +37,7 @@
    //自动模式, 真正点击战锤消耗开启,和休息(或无材料)停止
    public bool isPause = false;    //如打BOSS的情况,暂停自动战斗 后续可以补充每X秒检测下是否有异常
    public event Action AutoAttackEvent;
    bool m_IsAutoAttack = false;
    public bool isAutoAttack
    {
@@ -51,6 +51,7 @@
                return;
            m_IsAutoAttack = value;
            Debug.Log("isAutoAttack:" + m_IsAutoAttack);
            AutoAttackEvent?.Invoke();
        }
    }
@@ -110,7 +111,7 @@
            }
        }
    }
    bool m_IsAutoExchangeDecomposeOld = false;
    public bool isAutoExchangeDecomposeOld    //是否替换后自动分解原装备
    {
@@ -131,7 +132,6 @@
    }
    public event Action<bool> OnAutoChallengeBossEvent;
    //自动挑战首领
    public bool isAutoChallengeBoss
    {
@@ -142,7 +142,6 @@
        set
        {
            QuickSetting.Instance.SetQuickSetting(QuickSettingType.AutoFight_ChallengeBoss, value);
            OnAutoChallengeBossEvent?.Invoke(value);
        }
    }
Main/System/Main/HomeWin.cs
@@ -250,6 +250,7 @@
        TaskManager.Instance.OnTaskUpdate += UpdateTask;
        BlessLVManager.Instance.OnBlessLVUpdateEvent += ShowBlessLV;
        AutoFightModel.Instance.ChangeAutoEvent += DisplayAutoFight;
        AutoFightModel.Instance.AutoAttackEvent += OnAutoAttackEvent;
        AutoFightModel.Instance.OnFightEvent += ChangeMode;
        TeamManager.Instance.OnTeamChange += DisplayCard;
        UIManager.Instance.OnCloseWindow += OnCloseWindow;
@@ -266,7 +267,6 @@
        TimeMgr.Instance.OnDayEvent += OnDayEvent;
        ChatManager.Instance.OnUpdateTalkEvent += OnUpdateTalkEvent;
        UIManager.Instance.OnOpenWindow += OnOpenWindow;
        AutoFightModel.Instance.OnAutoChallengeBossEvent += OnAutoChallengeBossEvent;
        TryPlayAutoFightBoss();
        Display();
        DisplayFirstChargeBtn();
@@ -285,6 +285,7 @@
        TaskManager.Instance.OnTaskUpdate -= UpdateTask;
        BlessLVManager.Instance.OnBlessLVUpdateEvent -= ShowBlessLV;
        AutoFightModel.Instance.ChangeAutoEvent -= DisplayAutoFight;
        AutoFightModel.Instance.AutoAttackEvent -= OnAutoAttackEvent;
        AutoFightModel.Instance.OnFightEvent -= ChangeMode;
        TeamManager.Instance.OnTeamChange -= DisplayCard;
        UIManager.Instance.OnCloseWindow -= OnCloseWindow;
@@ -301,22 +302,13 @@
        TimeMgr.Instance.OnDayEvent -= OnDayEvent;
        ChatManager.Instance.OnUpdateTalkEvent -= OnUpdateTalkEvent;
        UIManager.Instance.OnOpenWindow -= OnOpenWindow;
        AutoFightModel.Instance.OnAutoChallengeBossEvent += OnAutoChallengeBossEvent;
        //  关闭的时候把战斗界面也给关了 虽然是在外面开的
        UIManager.Instance.CloseWindow<BattleWin>();
    }
    private void OnAutoChallengeBossEvent(bool isStart)
    private void OnAutoAttackEvent()
    {
        if (isStart)
        {
            autoFightBossUIEffectPlayer.Play();
        }
        else
        {
            autoFightBossUIEffectPlayer.Stop();
        }
        TryPlayAutoFightBoss();
    }
    private void OnOpenWindow(UIBase win)
@@ -527,7 +519,7 @@
    void TryPlayAutoFightBoss()
    {
        autoFightBossUIEffectPlayer.Stop();
        if (AutoFightModel.Instance.isAutoAttackSet && AutoFightModel.Instance.isAutoChallengeBoss)
        if (AutoFightModel.Instance.isAutoAttackSet && AutoFightModel.Instance.isAutoAttack && AutoFightModel.Instance.isAutoChallengeBoss)
        {
            autoFightBossUIEffectPlayer.Play();
        }
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());
    }
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)
@@ -38,7 +38,7 @@
        iconImage.SetActive(true);
        int itemID = item.config.ID;
        iconImage.SetItemSprite(itemID);
        if (packIndex <= 4 && skillImage != null)
        if (equipIndex <= 4 && skillImage != null)
        {
            skillImage.SetActive(true);
            var skillID = EquipModel.Instance.GetEquipSkillID(item);
Main/System/Mingge/MinggeEquipChangeCell.cs
@@ -152,12 +152,14 @@
        }
        else
        {
            var dict = MinggeManager.Instance.GetMinggeSkillTypeIDDict();
            var dict = MinggeManager.Instance.GetMinggeSkillCountDictByPresetID(selectMinggePresetID);
            //如果是旧装备 显示当前数量;新装备不同技能数量+1,同技能不变
            var hasCnt = dict.ContainsKey(skillID) ? dict[skillID].Count : 0;
            var hasCnt = dict.ContainsKey(skillID) ? dict[skillID] : 0;
            var oldSkillID = isNewEquip && oldEquip != null ? EquipModel.Instance.GetEquipSkillID(oldEquip) : 0;
            var showCnt = isNewEquip ? (oldSkillID == skillID ? hasCnt : hasCnt + 1) : hasCnt;
            skillDesc.text = SkillConfig.Get(skillID).Description + " " + Language.Get("HeroFates11", showCnt, MinggeManager.Instance.maxSuiteSkillCount);
            skillDesc.text = Language.Get("L1039", Language.Get($"MinggeSkillType_{skillID}")) +
            SkillConfig.Get(skillID + showCnt - 1).Description + " " + Language.Get("HeroFates11", showCnt, MinggeManager.Instance.maxSuiteSkillCount);
        }
    }
@@ -220,7 +222,15 @@
        }
        else
        {
            MinggeManager.Instance.SendDecompose(new byte[] { (byte)MinggeManager.Instance.selectFloorEquip.gridIndex });
            var item = PackManager.Instance.GetItemByIndex(PackType.MinggeDrop, MinggeManager.Instance.selectFloorEquip.gridIndex);
            if (item != null)
            {
                MinggeManager.Instance.SendDecompose(new byte[] { (byte)MinggeManager.Instance.selectFloorEquip.gridIndex });
            }
            else
            {
                Debug.LogError("命格掉落物品已被删除" + MinggeManager.Instance.selectFloorEquip.gridIndex);
            }
        }
    }
Main/System/Mingge/MinggeEquipWin.cs
@@ -1,4 +1,5 @@
using System;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
public class MinggeEquipWin : UIBase
@@ -75,7 +76,12 @@
        {
            presetObj.SetActive(false);
        }
        if (MinggeManager.Instance.selectFloorEquip == null || MinggeManager.Instance.selectFloorEquip.config == null)
        {
            DelayCloseWindow().Forget();
            Debug.Log("掉落命格不存在");
            return;
        }
        var packIndex = MinggeManager.Instance.GetPackIndex(selectPresetID, MinggeManager.Instance.selectFloorEquip.config.EquipPlace);
        var oldEquip = PackManager.Instance.GetItemByIndex(PackType.Mingge, packIndex);
        if (oldEquip == null)
Main/System/Mingge/MinggeItemCell.cs
@@ -49,14 +49,15 @@
        {
            loopEffect.effectId = 1026;
            loopEffect.PlayByArrIndex(config.ItemColor - 6, true, true);
            loopEffect.PlayByArrIndex(config.ItemColor - 6, true);
        }
        else
        {
            loopEffect.Stop();
        }
        //特效参考尺寸106*150 同比例缩放
        loopEffect.transform.localScale = new Vector3(1, 0.76f, 1);
        var rect = bgIcon.GetComponent<RectTransform>();
        loopEffect.transform.localScale = new Vector3(rect.sizeDelta.x / 106f, rect.sizeDelta.y / 150f, 1);
    }
}
Main/System/Mingge/MinggeManager.cs
@@ -14,7 +14,7 @@
    public int equipShowPresetID;   // 显示装备时,当前的子方案ID
    public ItemModel selectFloorEquip;
    bool waitTYOPPack;
    public bool waitTYOPPack;
    public event Action<int> OnOPCallbackEvent;
    public Dictionary<int, long> minggeAttrDict = new Dictionary<int, long>();
@@ -115,6 +115,7 @@
    public bool CalcEquip()
    {
        var items = PackManager.Instance.GetItems(PackType.MinggeDrop);
        Debug.Log("命格掉落背包中的物品数量:" + items.Count);
        if (items.IsNullOrEmpty())
        {
            if (UIManager.Instance.IsOpened<MinggeEquipWin>())
@@ -146,10 +147,10 @@
    }
    //意向技能ID:【guid..】
    //获取当前在使用方案的技能信息 意向技能类型ID:【物品guid..】
    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 +171,7 @@
        return dict;
    }
    //获取指定方案的技能信息 意向技能类型ID:数量
    public Dictionary<int, int> GetMinggeSkillCountDictByPresetID(int presetID)
    {
        var startIndex = (presetID - 1) * TotleEquip;//对应卦玉背包索引 = (套编号-1)*12+装备位-1
@@ -204,15 +206,11 @@
            return false;
        }
        if (UIManager.Instance.IsOpened<MinggeEquipWin>())
        {
            return false;
        }
        //自动处理: 判断分解 和战力高低 和决定是哪个方案下的装备对比
        //非自动情况下,默认当前方案
        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>())
        {
@@ -221,7 +219,10 @@
                Debug.LogError($"配置错误物品 {selectFloorEquip.itemId} 装备位为0");
                return true;
            }
            UIManager.Instance.OpenWindow<MinggeEquipWin>();
            if (!UIManager.Instance.IsOpened<MinggeEquipWin>())
            {
                UIManager.Instance.OpenWindow<MinggeEquipWin>();
            }
        }
        return true;
@@ -234,16 +235,20 @@
    public void SendTY(int count)
    {
        if (CalcEquip())
        {
            return;
        }
        if (waitTYOPPack)
        {
            return;
        }
        // if (CalcEquip())
        // {
        //     return;
        // }
        // if (waitTYOPPack)
        // {
        //     return;
        // }
        if (!ItemLogicUtility.CheckItemCount(PackType.Item, tyItemID, count, 2))
        // if (!ItemLogicUtility.CheckItemCount(PackType.Item, tyItemID, count, 2))
        // {
        //     return;
        // }
        if (waitTYOPPack)
        {
            return;
        }
@@ -276,7 +281,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++)
Main/System/Mingge/MinggePrayWin.cs
@@ -147,8 +147,8 @@
        {
            var littleRateValue = littleRateList[i];
            var bigRateValue = bigRateList[i];
            var diffRate = littleRateValue + (bigRateValue - littleRateValue) / (bigValue - littleValue) * (value - littleValue);
            rateList.Add(diffRate);
            var diffRate = littleRateValue + (bigRateValue - littleRateValue) / (float)(bigValue - littleValue) * (value - littleValue);
            rateList.Add((int)diffRate);
        }
        
        return rateList;
Main/System/Mingge/MinggeSmallTipWin.cs
@@ -14,6 +14,7 @@
    [SerializeField] List<TextEx> fightAttrValues;
    [SerializeField] TextEx[] skillDesces;
    [SerializeField] Transform topObj;
    protected override void OnPreOpen()
    {
@@ -49,6 +50,9 @@
            DelayCloseWindow().Forget();
            return;
        }
        topObj.SetActive(ItemTipUtility.mainTipData.showAll);
        var equip = PackManager.Instance.GetItemByGuid(guid);
        itemCell.Display(equip.guid);
@@ -100,7 +104,8 @@
                skillDesces[i].SetActive(true);
                skillDesces[i].colorType = i == hasCnt - 1 ? TextColType.lightYellow : TextColType.NavyGray;
                var showCnt = Math.Min(hasCnt, i + 1);
                skillDesces[i].text = SkillConfig.Get(skillID).Description + " " + Language.Get("HeroFates11", showCnt, i + 1);
                skillDesces[i].text = Language.Get("L1039", Language.Get($"MinggeSkillType_{skillID}")) +
                        SkillConfig.Get(skillID + i).Description + " " + Language.Get("HeroFates11", showCnt, i + 1);
            }
        }
    }
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;
@@ -37,6 +38,7 @@
        var presetObj = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells");
        presetObj.transform.SetParentEx(caseesObj, Vector3.zero, Quaternion.identity, Vector3.one);
        presetChooseCells = presetObj.GetComponent<FuncPresetChooseCells>();
        presetChooseCells.ChangeAlignment(TextAnchor.MiddleCenter);
        seeAttrBtn.AddListener(() =>
        {
            AttributeManager.Instance.OpenTotalAttributeWin(MinggeManager.Instance.minggeAttrDict);
@@ -50,15 +52,21 @@
                ClickSuite(index);
            });
        }
        prayBtn.AddListener(()=>
        prayBtn.AddListener(() =>
        {
            UIManager.Instance.OpenWindow<MinggePrayWin>();
        });
        autoBtn.AddListener(AutoTY);
        funPresetBtn.AddListener(()=>
        {
            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
        });
    }
    protected override void OnPreOpen()
    {
        MinggeManager.Instance.RefrehMinggeAttrs();
        PackManager.Instance.RefreshItemEvent += RefreshItemEvent;
        PackManager.Instance.DeleteItemEvent += DeleteDropItem;
        MinggeManager.Instance.OnMinggeInfoUpdate += OnMinggeInfoUpdate;
@@ -92,7 +100,7 @@
        }
    }
    void OnFuncPresetUseDataEvent()
    void OnFuncPresetUseDataEvent(int type)
    {
        MinggeManager.Instance.RefrehMinggeAttrs();
        Display();
@@ -107,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)
    {
@@ -135,6 +145,7 @@
    void DisplaySlotEquip()
    {
        MinggeManager.Instance.RefrehMinggeAttrs();
        for (int i = 0; i < equipCells.Length; i++)
        {
            equipCells[i].Display();
@@ -203,6 +214,17 @@
        {
            return;
        }
        if (MinggeManager.Instance.waitTYOPPack)
        {
            return;
        }
        if (!ItemLogicUtility.CheckItemCount(PackType.Item, MinggeManager.Instance.tyItemID, 1, 2))
        {
            return;
        }
        tyEffect.onComplete += () =>
        {
            MinggeManager.Instance.SendTY(1);
@@ -261,8 +283,13 @@
        keys.Sort();
        if (index >= keys.Count)
            return;
        ItemTipUtility.Show(dict[keys[index]][0], false);
    }
    void AutoTY()
    {
        
        ItemTipUtility.Show(dict[keys[index]][0]);
    }
}
Main/System/OtherPlayerDetail/OtherPlayerDetailWin.cs
@@ -169,9 +169,10 @@
        imgHorseBG.SetActive(horseData != null);
        if (horseData != null)
        {
            txtHorseLV.text = Language.Get("Horse8", horseData == null ? 0 : horseData.ClassLV, horseData == null ? 0 : horseData.LV);
            horseController.Create(horseSkinID, 0, 0.6f);
            txtHorseLV.text = Language.Get("Horse8", horseData.ClassLV, horseData.LV);
            horseController.Create(horseSkinID <= 0 ? 1 : horseSkinID, scale: 0.6f);
        }
    }
    private void DisplayCard(List<OtherPlayerDetailManager.RolePlusData.HeroData> heros)
Main/System/Team/TeamManager.cs
@@ -90,7 +90,7 @@
    //通过战斗类型获取阵容
    public TeamBase GetTeam(BattlePreSetType battlePassType)
    {
        int presetID = GetTeamID((int)battlePassType);
        int presetID = GetTeamID(battlePassType);
        TeamBase team = null;
        if (!teamDict.TryGetValue(presetID, out team))
@@ -106,12 +106,12 @@
    // 获取主阵容方案ID
    public int GetMainTeamID()
    {
        return FuncPresetManager.Instance.GetFuncPresetID((int)BattlePreSetType.Story, (int)FuncPresetType.Team);
        return FuncPresetManager.Instance.GetFuncPresetIDByBattleType((int)BattlePreSetType.Story, (int)FuncPresetType.Team);
    }
    // 获取指定的方案ID
    public int GetTeamID(int battleType)
    public int GetTeamID(BattlePreSetType battleType)
    {
        return FuncPresetManager.Instance.GetFuncPresetID(battleType, (int)FuncPresetType.Team);
        return FuncPresetManager.Instance.GetFuncPresetIDByBattleType((int)battleType, (int)FuncPresetType.Team);
    }
}
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)
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()
    {
Main/Utility/EnumHelper.cs
@@ -846,6 +846,7 @@
    Mail = 52, //邮箱
    Mingge = 54, //命格
    WarlordPavilion = 55, //定军阁
    FuncPreset = 56, //流派预设
}