hch
2025-09-17 f306d23e461ab236ed88173f7b4a5bc35a3e9bc9
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;
                        }