From ac93e899d5c6331e89ccae552ecbb502a9652d01 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期二, 27 一月 2026 18:49:43 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/FuncPreset/FuncPresetChooseCell.cs | 7
Main/System/Battle/BattleConst.cs | 2
Main/System/MainLevel/MainBossEnterWin.cs | 8
Main/System/Mingge/MinggeSmallTipWin.cs | 7
Main/System/Battle/BattleField/StoryBattleField.cs | 23 +
Main/System/FuncPreset/FuncPresetManager.cs | 48 ++-
Main/System/OtherPlayerDetail/OtherPlayerDetailWin.cs | 5
Main/System/HeroFates/HeroFatesManager.cs | 4
Main/System/Team/TeamManager.cs | 8
Main/System/Mingge/MinggeEquipCell.cs | 4
Main/System/Main/HomeWin.cs | 18 -
Main/System/FuncPreset/FuncPresetChooseCells.cs | 31 ++
Main/System/Mingge/MinggeEquipWin.cs | 8
Main/System/Mingge/MinggeManager.cs | 43 +-
Main/System/Arena/ArenaChallengeWin.cs | 9
Main/System/HappyXB/HeroSmallHeadCell.cs | 7
Main/System/WarlordPavilion/WarlordPavilionWin.cs | 9
Main/System/TianziBillborad/TianziBillboradWin.cs | 9
Main/System/HeroUI/HeroTrainWin.cs | 2
Main/System/Main/AutoFightModel.cs | 7
Main/Utility/EnumHelper.cs | 1
Main/System/Mingge/MinggeWin.cs | 35 ++
Main/System/Mingge/MinggePrayWin.cs | 4
Main/System/FuncPreset/FuncPresetChangeNameWin.cs | 1
Main/System/Mingge/MinggeEquipChangeCell.cs | 18 +
Main/System/BoneField/BoneFieldWin.cs | 9
Main/System/FuncPreset/FuncPresetUnLockWin.cs | 56 ++++
Main/System/ItemTip/ItemTipUtility.cs | 25 -
Main/System/Arena/ArenaManager.cs | 2
Main/System/FuncPreset/FuncPresetWin.cs.meta | 11
Main/System/HeroUI/HeroUIManager.Reborn.cs | 2
Main/System/Arena/ArenaWin.cs | 15
Main/System/Hero/HeroInfo.cs | 20 +
Main/System/FuncPreset/FuncPresetWin.cs | 160 ++++++++++++
Main/System/Mingge/MinggeItemCell.cs | 5
Main/System/HeroUI/HeroPosWin.cs | 109 ++------
Main/System/FuncPreset/FuncPresetChooseMoreCell.cs | 19 +
Main/System/FuncPreset/FuncPresetUnLockWin.cs.meta | 11
38 files changed, 557 insertions(+), 205 deletions(-)
diff --git a/Main/System/Arena/ArenaChallengeWin.cs b/Main/System/Arena/ArenaChallengeWin.cs
index 93381b2..d751387 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.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());
}
}
diff --git a/Main/System/Arena/ArenaManager.cs b/Main/System/Arena/ArenaManager.cs
index 6dcbc73..cd9cdaa 100644
--- a/Main/System/Arena/ArenaManager.cs
+++ b/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);
}
}
diff --git a/Main/System/Arena/ArenaWin.cs b/Main/System/Arena/ArenaWin.cs
index 1b3e140..c5da720 100644
--- a/Main/System/Arena/ArenaWin.cs
+++ b/Main/System/Arena/ArenaWin.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using UnityEngine;
+using UnityEngine.UI;
public class ArenaWin : UIBase
{
@@ -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()
diff --git a/Main/System/Battle/BattleConst.cs b/Main/System/Battle/BattleConst.cs
index 4ca5b66..c37db6f 100644
--- a/Main/System/Battle/BattleConst.cs
+++ b/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>()
diff --git a/Main/System/Battle/BattleField/StoryBattleField.cs b/Main/System/Battle/BattleField/StoryBattleField.cs
index ea24d09..20d9f95 100644
--- a/Main/System/Battle/BattleField/StoryBattleField.cs
+++ b/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)
{
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/FuncPresetChooseCell.cs b/Main/System/FuncPreset/FuncPresetChooseCell.cs
index fbd7f5b..a78667d 100644
--- a/Main/System/FuncPreset/FuncPresetChooseCell.cs
+++ b/Main/System/FuncPreset/FuncPresetChooseCell.cs
@@ -18,9 +18,10 @@
[SerializeField] FuncPresetChooseCells pareant;
-
+ int curBattleType;
public void Display(int battleType, int funcType, int id, bool isUnFold)
{
+ curBattleType = battleType;
var data = FuncPresetManager.Instance.GetFuncPreset(funcType, id);
if (data == null)
{
@@ -51,7 +52,7 @@
}
if (pareant.unFoldID == id)
{
- FuncPresetManager.Instance.OnSelectPresetEvent?.Invoke(funcType, id, true);
+ FuncPresetManager.Instance.OnSelectPresetEvent?.Invoke(curBattleType, funcType, id, true);
}
else
{
@@ -79,7 +80,7 @@
void Fold(int funcType, int id)
{
pareant.unFoldID = 0;
- FuncPresetManager.Instance.OnSelectPresetEvent?.Invoke(funcType, id, false);
+ FuncPresetManager.Instance.OnSelectPresetEvent?.Invoke(curBattleType, funcType, id, false);
}
diff --git a/Main/System/FuncPreset/FuncPresetChooseCells.cs b/Main/System/FuncPreset/FuncPresetChooseCells.cs
index 9b360a0..3bd43e9 100644
--- a/Main/System/FuncPreset/FuncPresetChooseCells.cs
+++ b/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; //褰撳墠灞曞紑鐨勬柟妗圛D锛屽湪閫変腑鐨勬儏鍐典笅鎵嶇敓鏁�
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;
+ }
+
}
diff --git a/Main/System/FuncPreset/FuncPresetChooseMoreCell.cs b/Main/System/FuncPreset/FuncPresetChooseMoreCell.cs
index 38b4284..e55a177 100644
--- a/Main/System/FuncPreset/FuncPresetChooseMoreCell.cs
+++ b/Main/System/FuncPreset/FuncPresetChooseMoreCell.cs
@@ -10,8 +10,8 @@
[SerializeField] Button chooseBtn;
[SerializeField] Transform selectObj; //娴佹淳鍚嶆墠鏈夐�変腑锛屾柟妗堝悕閫変腑鍚庡氨鏄剧ず鍦ㄥ灞傜鍥涗釜
- [SerializeField] FuncPresetChooseCells pareant;
-
+ [SerializeField] FuncPresetChooseCells pareant; //璁板綍灞曞紑鐨勬柟妗圛D鐢ㄤ簬琛ㄧ幇
+ [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();
}
diff --git a/Main/System/FuncPreset/FuncPresetManager.cs b/Main/System/FuncPreset/FuncPresetManager.cs
index 70045fb..a5c661b 100644
--- a/Main/System/FuncPreset/FuncPresetManager.cs
+++ b/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 瑙i攣/鏇存敼鍚�
public const int GlobalDefaultPresetID = 1; //榛樿鍏ㄥ眬鏂规ID
public const int FuncDefaultPresetID = 1; //榛樿瀛愬姛鑳芥柟妗圛D
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");
}
//瑕佹樉绀虹殑鏂规鏁伴噺; 鏍规嵁鎯呭喌浼氬寘鍚湭瑙i攣
@@ -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);
+ }
+ }
}
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..fadde68
--- /dev/null
+++ b/Main/System/FuncPreset/FuncPresetWin.cs
@@ -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);
+ }
+ }
+
+
+}
+
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/Hero/HeroInfo.cs b/Main/System/Hero/HeroInfo.cs
index 1a83b6c..36df488 100644
--- a/Main/System/Hero/HeroInfo.cs
+++ b/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;
diff --git a/Main/System/HeroFates/HeroFatesManager.cs b/Main/System/HeroFates/HeroFatesManager.cs
index 9962472..6bbffef 100644
--- a/Main/System/HeroFates/HeroFatesManager.cs
+++ b/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();
diff --git a/Main/System/HeroUI/HeroPosWin.cs b/Main/System/HeroUI/HeroPosWin.cs
index e0c3eb5..7ed586b 100644
--- a/Main/System/HeroUI/HeroPosWin.cs
+++ b/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)
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index 741a254..6a9f393 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/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);
diff --git a/Main/System/HeroUI/HeroUIManager.Reborn.cs b/Main/System/HeroUI/HeroUIManager.Reborn.cs
index 1a9c292..ad3aa62 100644
--- a/Main/System/HeroUI/HeroUIManager.Reborn.cs
+++ b/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))
diff --git a/Main/System/ItemTip/ItemTipUtility.cs b/Main/System/ItemTip/ItemTipUtility.cs
index df122a7..5ed511a 100644
--- a/Main/System/ItemTip/ItemTipUtility.cs
+++ b/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 榛樿姝e父鍏ㄩ儴鏄剧ず锛屽懡鏍肩偣濂楄鐗规畩涓嶆樉绀虹墿鍝佷俊鎭�
+ 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)
diff --git a/Main/System/Main/AutoFightModel.cs b/Main/System/Main/AutoFightModel.cs
index 203ec8a..9a8c84f 100644
--- a/Main/System/Main/AutoFightModel.cs
+++ b/Main/System/Main/AutoFightModel.cs
@@ -37,7 +37,7 @@
//鑷姩妯″紡, 鐪熸鐐瑰嚮鎴橀敜娑堣�楀紑鍚紝鍜屼紤鎭紙鎴栨棤鏉愭枡锛夊仠姝�
public bool isPause = false; //濡傛墦BOSS鐨勬儏鍐碉紝鏆傚仠鑷姩鎴樻枟 鍚庣画鍙互琛ュ厖姣廥绉掓娴嬩笅鏄惁鏈夊紓甯�
-
+ 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 //鏄惁鏇挎崲鍚庤嚜鍔ㄥ垎瑙e師瑁呭
{
@@ -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);
}
}
diff --git a/Main/System/Main/HomeWin.cs b/Main/System/Main/HomeWin.cs
index 91d98ff..734d192 100644
--- a/Main/System/Main/HomeWin.cs
+++ b/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();
}
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 bec1b09..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)
@@ -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);
diff --git a/Main/System/Mingge/MinggeEquipChangeCell.cs b/Main/System/Mingge/MinggeEquipChangeCell.cs
index 7875af7..f19585f 100644
--- a/Main/System/Mingge/MinggeEquipChangeCell.cs
+++ b/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);
+ }
}
}
diff --git a/Main/System/Mingge/MinggeEquipWin.cs b/Main/System/Mingge/MinggeEquipWin.cs
index 2a43dab..22567fb 100644
--- a/Main/System/Mingge/MinggeEquipWin.cs
+++ b/Main/System/Mingge/MinggeEquipWin.cs
@@ -1,4 +1,5 @@
锘縰sing 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)
diff --git a/Main/System/Mingge/MinggeItemCell.cs b/Main/System/Mingge/MinggeItemCell.cs
index c57fb12..e464253 100644
--- a/Main/System/Mingge/MinggeItemCell.cs
+++ b/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);
}
}
diff --git a/Main/System/Mingge/MinggeManager.cs b/Main/System/Mingge/MinggeManager.cs
index 361fbeb..02c1557 100644
--- a/Main/System/Mingge/MinggeManager.cs
+++ b/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 @@
}
- //鎰忓悜鎶�鑳絀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 +171,7 @@
return dict;
}
+ //鑾峰彇鎸囧畾鏂规鐨勬妧鑳戒俊鎭� 鎰忓悜鎶�鑳界被鍨婭D锛氭暟閲�
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++)
diff --git a/Main/System/Mingge/MinggePrayWin.cs b/Main/System/Mingge/MinggePrayWin.cs
index 7b57c1a..cb54675 100644
--- a/Main/System/Mingge/MinggePrayWin.cs
+++ b/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;
diff --git a/Main/System/Mingge/MinggeSmallTipWin.cs b/Main/System/Mingge/MinggeSmallTipWin.cs
index 235c25b..da9b090 100644
--- a/Main/System/Mingge/MinggeSmallTipWin.cs
+++ b/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);
}
}
}
diff --git a/Main/System/Mingge/MinggeWin.cs b/Main/System/Mingge/MinggeWin.cs
index 2f3da22..2308b3d 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;
@@ -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]);
}
}
diff --git a/Main/System/OtherPlayerDetail/OtherPlayerDetailWin.cs b/Main/System/OtherPlayerDetail/OtherPlayerDetailWin.cs
index 7af6bad..109e112 100644
--- a/Main/System/OtherPlayerDetail/OtherPlayerDetailWin.cs
+++ b/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)
diff --git a/Main/System/Team/TeamManager.cs b/Main/System/Team/TeamManager.cs
index 1fd3e90..1fc32a3 100644
--- a/Main/System/Team/TeamManager.cs
+++ b/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 @@
// 鑾峰彇涓婚樀瀹规柟妗圛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)
+ public int GetTeamID(BattlePreSetType battleType)
{
- return FuncPresetManager.Instance.GetFuncPresetID(battleType, (int)FuncPresetType.Team);
+ return FuncPresetManager.Instance.GetFuncPresetIDByBattleType((int)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