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/Utility/UIHelper.cs | 41 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index db04251..6757b45 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -69,14 +69,15 @@
public static void SetIconWithMoneyType(this Image _image, int moneyType)
{
if (_image == null) return;
- // string iconKey = StringUtility.Contact("Money_Type_", moneyType);
if (GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType))
{
_image.SetOrgSprite(ItemConfig.Get(GeneralDefine.MoneyDisplayModel[moneyType]).IconKey);
}
else
{
- Debug.LogError("MoneyDisplayModel 涓洪厤缃揣甯佺被鍨嬶細" + moneyType);
+ // 涓嶉渶瑕佺墿鍝佺殑鎯呭喌琛ュ厖
+ // string iconKey = StringUtility.Contact("Money_Type_", moneyType);
+ Debug.LogError("MoneyDisplayModel 鏈厤缃揣甯佺被鍨嬶細" + moneyType);
}
}
@@ -88,7 +89,7 @@
}
else
{
- Debug.LogError("MoneyDisplayModel 涓洪厤缃揣甯佺被鍨嬶細" + moneyType);
+ Debug.LogError("MoneyDisplayModel 鏈厤缃揣甯佺被鍨嬶細" + moneyType);
return "";
}
}
@@ -1105,6 +1106,11 @@
//姝﹀皢鎷涘嫙绉垎
return PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.default44);
}
+ case 52:
+ {
+ //娣橀噾浠�
+ return PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.GoldRush);
+ }
case 98:
{
//杩囨湡鍨嬩唬閲戝埜
@@ -1138,6 +1144,35 @@
return AppendColor(useCnt <= cnt ? engoughColor : TextColType.Red, $"{ReplaceLargeNum(cnt)}/{ReplaceLargeNum(useCnt)}");
}
+
+ /// <param name="needTips">0 涓嶅搷搴� 1 寮规彁绀� 2 寮硅幏鍙栭�斿緞tips</param>
+ public static bool CheckMoneyCount(int moneyType, long needCount, int needTips = 0)
+ {
+ if (needCount <= 0)
+ {
+ return true;
+ }
+
+ long haveCount = GetMoneyCnt(moneyType);
+
+ bool isEnough = haveCount >= needCount;
+
+ if (!isEnough)
+ {
+ if (needTips == 1)
+ {
+ SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
+ }
+ else if (needTips == 2)
+ {
+ ItemTipUtility.ShowMoneyTip(moneyType);
+ }
+ }
+
+ return isEnough;
+ }
+
+
#endregion
#region 寰楀埌瑁呭浣嶆垨鑰呯绂忔爲鍝佽川鍚嶇О 甯﹂鑹�
--
Gitblit v1.8.0