From 485db99b5c51a971c173664cf6e808dc8424b0a0 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期五, 17 十月 2025 17:19:51 +0800
Subject: [PATCH] 136 子 【挑战】战锤秘境 / 【挑战】战锤秘境-客户端 移除错误接入
---
Main/System/HeroUI/GiftBaseCell.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 48 insertions(+), 12 deletions(-)
diff --git a/Main/System/HeroUI/GiftBaseCell.cs b/Main/System/HeroUI/GiftBaseCell.cs
index 8370f3e..cf7b6cc 100644
--- a/Main/System/HeroUI/GiftBaseCell.cs
+++ b/Main/System/HeroUI/GiftBaseCell.cs
@@ -97,6 +97,19 @@
}
}
+ Image m_AwakeLockImg; //閲嶇敓闄嶄綆瑙夐啋绛夌骇閿佸畾鐨勫浘鐗�
+ Image awakeLockImg
+ {
+ get
+ {
+ if (m_AwakeLockImg == null)
+ {
+ m_AwakeLockImg = this.transform.GetComponent<Image>("Container_GiftCell/lock");
+ }
+ return m_AwakeLockImg;
+ }
+ }
+
void Awake()
@@ -106,8 +119,9 @@
//showState 0锛氫笉鏄剧ず 1锛氭柊澧� 2锛氭彁鍗�
//giftID 0 :浠h〃鐏拌壊闇�鍗囨槦婵�娲� -1锛氫唬琛ㄦ鑹查渶瑙夐啋婵�娲伙紝鍏朵粬鏍规嵁閰嶈〃锛屾病鏈夊ぉ璧嬬殑澶栧眰鎺у埗鏄鹃殣
- public void Init(int giftID, int lv, UnityAction onclick = null, int showState = 0, int heroID = 0, int index = 0)
+ public void Init(int giftID, int lv, int showState = 0, int heroID = 0, int index = 0, int awakeLevel = 0)
{
+ LoadPrefab(); //瀛樺湪琚嵏杞界殑鍙兘锛岄噸鏂板姞杞�
if (HeroTalentConfig.HasKey(giftID))
{
var config = HeroTalentConfig.Get(giftID);
@@ -120,6 +134,16 @@
stateImg.SetActive(showState > 0);
stateImg.SetSprite("GiftState" + showState);
stateImg.SetNativeSize();
+
+ //鐗规畩澶勭悊閲嶇敓闄嶄綆瑙夐啋绛夌骇閿佸畾鐨勫ぉ璧�
+ if (index >= HeroUIManager.Instance.normalGiftMaxCnt)
+ {
+ awakeLockImg.SetActive(HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(heroID, index) > awakeLevel);
+ }
+ else
+ {
+ awakeLockImg.SetActive(false);
+ }
}
else
{
@@ -127,18 +151,30 @@
giftName.text = string.Empty;
lvRect.SetActive(false);
stateImg.SetActive(false);
+ awakeLockImg.SetActive(false);
}
- giftBtn.AddListener(onclick != null ? onclick : () => { ShowSmallTip(giftID, lv, heroID, index); });
+ giftBtn.AddListener(() => { ShowSmallTip(giftID, lv, heroID, index, awakeLevel); });
}
- void ShowSmallTip(int giftID, int giftLV, int heroID, int index)
+ void ShowSmallTip(int giftID, int giftLV, int heroID, int index, int awakeLevel)
{
SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
if (giftID > 0)
{
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)));
+ Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue*giftLV)));
+
+ if (index >= HeroUIManager.Instance.normalGiftMaxCnt)
+ {
+ int needAwakeLV = HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(heroID, index);
+ if (needAwakeLV > awakeLevel)
+ {
+ SmallTipWin.showText += "\n" + Language.Get("HeroAwake18", needAwakeLV);
+ }
+ }
+
+
UIManager.Instance.OpenWindow<SmallTipWin>();
}
@@ -184,23 +220,23 @@
{
if (quality == 1)
{
- //1D0029
- return new Color32(29, 0, 41, 128);
+ //692088
+ return new Color32(105, 32, 136, 128);
}
else if (quality == 2)
{
- //372300
- return new Color32(55, 35, 0, 128);
+ //886220
+ return new Color32(136, 98, 32, 128);
}
else if (quality == 3)
{
- //3A1800
- return new Color32(58, 24, 0, 128);
+ //884a20
+ return new Color32(136, 74, 32, 128);
}
else if (quality == 4)
{
- //3A0000
- return new Color32(58, 0, 0, 128);
+ //882020
+ return new Color32(136, 32, 32, 128);
}
return new Color32(0, 0, 0, 128);
}
--
Gitblit v1.8.0