From 62188b271cce5e3aec5ca40d58c30f08643e2f60 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 04 九月 2025 23:20:17 +0800
Subject: [PATCH] 117 【武将】武将系统 - 天赋部分,优化自动战斗
---
Main/System/HeroUI/HeroTrainWin.cs | 88 +++++++++++++++++---------------------------
1 files changed, 34 insertions(+), 54 deletions(-)
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index bcadf4d..ea342e1 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -135,6 +135,7 @@
});
starUPBtn.AddListener(StarUP);
+ washBtn.AddListener(Wash);
}
@@ -584,9 +585,9 @@
void RefreshGift()
{
- RefreshGiftCell();
+ HeroUIManager.Instance.RefreshGiftCell(giftBaseCells, hero);
- if (hero.GetTotalStarCount() >= hero.GetMaxStarCount())
+ if (hero.heroStar >= HeroUIManager.Instance.GetMaxStarCount(hero.heroId, hero.Quality))
{
starUPBtn.interactable = false;
starUPBtn.SetColorful(null, false);
@@ -604,63 +605,22 @@
starUPBtn.SetColorful(null, true);
starUPBtnText.text = Language.Get("HeroGift3");
}
- }
- void RefreshGiftCell()
- {
- //浼犺浠ヤ笅鍙湁4涓�
- int showCount = hero.Quality < 4 ? HeroUIManager.normalGiftMaxCnt : HeroUIManager.giftMaxCnt;
- for (int i = 0; i < giftBaseCells.Length; i++)
+ if (hero.heroStar < HeroUIManager.Instance.canWashStarLevel)
{
- if (i >= showCount)
- {
- giftBaseCells[i].SetActive(false);
- continue;
- }
-
- giftBaseCells[i].SetActive(true);
- if (i < hero.talentIDList.Count)
- {
- int giftID = hero.talentIDList[i];
- int giftLV = hero.talentLvList[i];
- giftBaseCells[i].Init(giftID, giftLV, () =>
- {
- var giftConfig = HeroTalentConfig.Get(giftID);
- SmallTipWin.showText = Language.Get("SmallTipFomat", giftConfig.Name + " " + Language.Get("L1113", giftLV),
- Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue)));
- SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
- UIManager.Instance.OpenWindow<SmallTipWin>();
- });
- }
- else
- {
- if (i < HeroUIManager.normalGiftMaxCnt)
- {
- giftBaseCells[i].Init(0, 0, () =>
- {
- SmallTipWin.showText = Language.Get("HeroGift1");
- SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
- UIManager.Instance.OpenWindow<SmallTipWin>();
- });
- }
- else
- {
- int index = i;
- giftBaseCells[i].Init(-1, 0, () =>
- {
- SmallTipWin.showText = Language.Get("HeroGift2", HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(hero.heroId, index));
- SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
- UIManager.Instance.OpenWindow<SmallTipWin>();
- });
- }
- }
-
+ washBtn.SetColorful(washBtn.GetComponentInChildren<Text>(), false);
+ }
+ else
+ {
+ washBtn.SetColorful(washBtn.GetComponentInChildren<Text>(), true);
}
}
+
+
void StarUP()
- {
- if (hero.GetTotalStarCount() >= hero.GetMaxStarCount())
+ {
+ if (hero.heroStar >= HeroUIManager.Instance.GetMaxStarCount(hero.heroId, hero.Quality))
{
return;
}
@@ -674,7 +634,27 @@
{
starUPBtn.interactable = true;
starUPBtn.SetColorful(null, true);
- starUPBtnText.text = Language.Get("HeroGift3");
+ HeroUIManager.Instance.selectHeroGuidForGiftFunc = hero.itemHero.guid;
+ UIManager.Instance.OpenWindow<HeroGiftEatWin>();
}
}
+
+ void Wash()
+ {
+ if (hero.heroStar < HeroUIManager.Instance.canWashStarLevel)
+ {
+ SysNotifyMgr.Instance.ShowTip("HeroGift2", HeroUIManager.Instance.canWashStarLevel);
+ return;
+ }
+ // //鏍规嵁閿佺姸鎬佸垽鏂潗鏂欐槸鍚﹁冻澶�
+ // if (!ItemLogicUtility.CheckItemCount(PackType.Item, HeroUIManager.Instance.washItemID,
+ // HeroUIManager.Instance.GetTalentLockUseWashCount(hero), 2))
+ // {
+ // return;
+ // }
+
+
+ // UIManager.Instance.OpenWindow<HeroGiftWashWin>();
+
+ }
}
\ No newline at end of file
--
Gitblit v1.8.0