hch
2026-01-27 c5ca1ac30b1d36ce736a5fad9de8424f19a9b884
437 子 【方案】方案预设 / 【方案】方案预设-客户端
5个文件已修改
34 ■■■■■ 已修改文件
Main/System/Arena/ArenaChallengeWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Arena/ArenaWin.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetChooseCell.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetChooseCells.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/FuncPreset/FuncPresetManager.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Arena/ArenaChallengeWin.cs
@@ -25,7 +25,7 @@
        funPresetBtn.AddListener(()=>
        {
            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Arena);
            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
        });
    }
Main/System/Arena/ArenaWin.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ArenaWin : UIBase
{
@@ -13,6 +14,8 @@
    [SerializeField] ScrollerController scrollerController;
    [SerializeField] ArenaPlayerRankCell myRankCell;
    [SerializeField] ArenaChallengeVoucher voucher;
    [SerializeField] Button funPresetBtn;
    [HideInInspector] public int groupValue1 = 0;   //一般用于跨服
    [HideInInspector] public int groupValue2 = 0;   //一般用于跨服
    [HideInInspector] public string valueFormat = "{0}";
@@ -31,11 +34,10 @@
            ArenaManager.Instance.SendArenaMatch();
            UIManager.Instance.OpenWindow<ArenaChallengeWin>();
        });
        // btnDeployTroops.SetListener(() =>
        // {
        //     HeroUIManager.Instance.selectTeamType = TeamManager.Instance.GetTeamID((int)BattlePreSetType.Arena);
        //     UIManager.Instance.OpenWindow<HeroPosWin>(1); // 竞技场标签页
        // });
        funPresetBtn.AddListener(()=>
        {
            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Arena);
        });
    }
    protected override void OnPreOpen()
@@ -44,6 +46,7 @@
        RankModel.Instance.ResetQueryParam();
        RankModel.Instance.QueryRankByPage(ArenaManager.Instance.rankType, watchID: (int)PlayerDatas.Instance.baseData.PlayerID);
        rpChallage.redpointId = ArenaManager.Instance.GetRedPonitId(1);
    }
    protected override void NextFrameAfterOpen()
@@ -121,6 +124,8 @@
        DisplayMyRank();
        DisplayTop3();
        DisplayDeployTroop();
        funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow());
    }
    void CreateScroller()
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
@@ -25,6 +25,7 @@
    bool forceUnFold = false; //强制展开,不能收缩; 流派界面的需求
    [NonSerialized] public int unFoldID = 0;    //当前展开的方案ID,在选中的情况下才生效
    int curBattleType;
    int curFuncType;
    /// <summary>
@@ -38,6 +39,7 @@
    {
        forceUnFold = _forceUnFold;
        curBattleType = battleType;
        curFuncType = funcType;
        var selectID = FuncPresetManager.Instance.GetFuncPresetIDByBattleType(battleType, funcType);
        var showCount = FuncPresetManager.Instance.GetShowFuncPresetCount(funcType);
@@ -104,9 +106,11 @@
        FuncPresetManager.Instance.OnSelectPresetEvent -= OnSelectPresetEvent;
    }
    void OnSelectPresetEvent(int funcType, int id, bool isUnFold)
    void OnSelectPresetEvent(int battleType, int _funcType, int id, bool isUnFold)
    {
        Display(curBattleType, funcType, forceUnFold);
        if (battleType != curBattleType || curFuncType != _funcType)
            return;
        Display(curBattleType, _funcType, forceUnFold);
    }
    //默认是居中靠右
Main/System/FuncPreset/FuncPresetManager.cs
@@ -22,7 +22,7 @@
    public int[] openConditions; //流派预设(也叫全局方案/战斗方案) 开启条件【开服第N天,主线通关X-Y,定军阁达到N层】
    public Action<int, int, bool> OnSelectPresetEvent; //选择功能预设方案事件 功能类型 方案ID 是否展开
    public Action<int, int, int, bool> OnSelectPresetEvent; //选择功能预设方案事件 功能类型 方案ID 是否展开
    public override void Init()
    {