From 871594462e82d6bc1341918d39e11ab036d59563 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 18 九月 2025 19:26:28 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Store/StoreModel.cs | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/Main/System/Store/StoreModel.cs b/Main/System/Store/StoreModel.cs
index 93d17e5..96dfc34 100644
--- a/Main/System/Store/StoreModel.cs
+++ b/Main/System/Store/StoreModel.cs
@@ -63,7 +63,7 @@
//鎺掕姒滄椿鍔ㄧ殑鍟嗗簵
public int rankActStore_MoneyType;
public int rankActStore_StoreType;
- public Operation rankActStore_ActType;
+ public OperationType rankActStore_ActType;
public override void Init()
{
@@ -922,11 +922,11 @@
#endregion
- private ulong _price;
+ private long _price;
public void SendBuyShopItem(StoreConfig model, int count)
{
- _price = (ulong)(model.MoneyNumber * count);
+ _price = model.MoneyNumber * count;
if (MoneyIsEnough(model.MoneyType, _price))
{
@@ -968,9 +968,9 @@
}
//浠欑帀璐拱鐗╁搧鐨勪簩娆$‘璁ゆ锛屼竴绾ц揣甯佸彧鏈変粰鐜� 榛樿涓轰粰鐜夊嵆鍙�
- Dictionary<int, bool> buyItemCheckDict = new Dictionary<int, bool>();
- //type 瀵瑰簲鏋氫妇 BuyStoreItemCheckType 鏂逛究璁板繂
- public void SendBuyShopItemWithPopCheck(StoreConfig model, int count, int type = 0)
+ Dictionary<int, bool> buyItemCheckDict = new Dictionary<int, bool>(); //璁板綍鍕鹃�変俊鎭�
+ //eventType 浜屾纭妗嗙被鍨嬶紝瀵瑰簲鏋氫妇 BuyStoreItemCheckType
+ public void SendBuyShopItemWithPopCheck(StoreConfig model, int count, int eventType = 0)
{
if (model.MoneyNumber == 0)
{
@@ -979,7 +979,7 @@
return;
}
- if (buyItemCheckDict.ContainsKey(type) && buyItemCheckDict[type])
+ if (buyItemCheckDict.ContainsKey(eventType) && buyItemCheckDict[eventType])
{
SendBuyShopItem(model, count);
return;
@@ -991,15 +991,15 @@
if (isOk)
{
SendBuyShopItem(model, count);
- buyItemCheckDict[type] = isToggle;
+ buyItemCheckDict[eventType] = isToggle;
}
}));
}
- //鑺变粰鐜夎喘涔扮殑浜屾纭妗�(鏈鐧诲綍) 榛樿鎻愮ず MysticalQG104 鏄惁鑺辫垂<color=#109d06>{0}</color>浠欑帀杩涜璐拱锛�
- //type 瀵瑰簲鏋氫妇 BuyStoreItemCheckType 鏂逛究璁板繂
- public void UseMoneyCheck(int money, Action func, int type = 0, string tip = "MysticalQG104", string fullTip = "")
+ //鑺变粰鐜夎喘涔扮殑浜屾纭妗�(鏈鐧诲綍)
+ //eventType 浜屾纭妗嗙被鍨嬶紝瀵瑰簲鏋氫妇 BuyStoreItemCheckType
+ public void UseMoneyCheck(int money, int moneyType, Action func, int eventType = 0, string tip = "CostMoney", string fullTip = "")
{
if (money == 0)
{
@@ -1008,19 +1008,19 @@
return;
}
- if (buyItemCheckDict.ContainsKey(type) && buyItemCheckDict[type])
+ if (buyItemCheckDict.ContainsKey(eventType) && buyItemCheckDict[eventType])
{
func?.Invoke();
return;
}
- ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), fullTip == "" ? Language.Get(tip, money) : fullTip,
+ ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), fullTip == "" ? Language.Get(tip, money, moneyType) : fullTip,
Language.Get("ConfirmCancel102"), (bool isOk, bool isToggle) =>
{
if (isOk)
{
func?.Invoke();
- buyItemCheckDict[type] = isToggle;
+ buyItemCheckDict[eventType] = isToggle;
}
});
@@ -1052,7 +1052,7 @@
}
- public bool MoneyIsEnough(int moneyType, ulong money)
+ public bool MoneyIsEnough(int moneyType, long money)
{
if (UIHelper.GetMoneyCnt(moneyType) < money)
{
@@ -1409,7 +1409,7 @@
{
if (!TryGetIsSellOut(storeConfig, out remainNum))
{
- if (UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= (ulong)storeConfig.MoneyNumber)
+ if (UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= storeConfig.MoneyNumber)
{
shopRedDict[storeConfig.ID].state = RedPointState.Simple;
}
@@ -1496,7 +1496,7 @@
{
break;
}
- if (!MoneyIsEnough(config.MoneyType, (ulong)config.MoneyNumber))
+ if (!MoneyIsEnough(config.MoneyType, config.MoneyNumber))
{
break;
}
--
Gitblit v1.8.0