Main/System/Store/StoreModel.cs
@@ -28,13 +28,11 @@
public class StoreModel : GameSystemManager<StoreModel>
{
    public int[] normalBuyCoinsTypes { get; private set; }
    public string UNIONSTORESAVE_KEY { get; private set; }
    public string MUSTBUYSAVE_KEY { get; private set; }
    public string StoreEffectRecord_Key { get; private set; }
    public Dictionary<int, Dictionary<int, int>> JobReplaceIdDict = new Dictionary<int, Dictionary<int, int>>();
    public Dictionary<int, string> resetTimeDict { get; private set; }
    public Dictionary<int, int> showCoinsUIDict { get; private set; }
    public Dictionary<int, int> showCoinUIDict { get; private set; }
    public int storeTrailerLv { get; private set; }
@@ -65,22 +63,13 @@
    //排行榜活动的商店
    public int rankActStore_MoneyType;
    public int rankActStore_StoreType;
    public Operation rankActStore_ActType;
    public OperationType rankActStore_ActType;
    public override void Init()
    {
        ParseFuncConfig();
        ParseStoreConfig();
        SetShopRedpoint();
        FuncConfigConfig buyItemHinit = FuncConfigConfig.Get("BuyItemHinit");
        normalBuyCoinsTypes = ConfigParse.GetMultipleStr<int>(buyItemHinit.Numerical1);
        FuncConfigConfig restTimeConfig = FuncConfigConfig.Get("RefreshText");
        resetTimeDict = ConfigParse.GetDic<int, string>(restTimeConfig.Numerical1);
        FuncConfigConfig mallCurrency = FuncConfigConfig.Get("MallCurrency");
        showCoinsUIDict = ConfigParse.GetDic<int, int>(mallCurrency.Numerical1);
        FuncConfigConfig mallPush = FuncConfigConfig.Get("MallPush");
        storeTrailerLv = int.Parse(mallPush.Numerical1);
    }
    public void OnBeforePlayerDataInitialize()
@@ -677,19 +666,7 @@
    }
    #endregion
    public string GetStoreRefreshTimeByType(int type)
    {
        if (resetTimeDict == null || !resetTimeDict.ContainsKey(type)) return string.Empty;
        switch (type)
        {
            case 7:
                int willRefreshTime = GetWillRefreshTime();
                return Language.Get(resetTimeDict[type], UIHelper.AppendColor(TextColType.Green, TimeUtility.SecondsToHMS(willRefreshTime), true));
            default:
                return Language.Get(resetTimeDict[type]);
        }
    }
    public string GetMysteryStoreRefreshTime()
    {
@@ -934,7 +911,7 @@
    public void OnClickShopCell(StoreConfig shopInfo)
    {
        int itemId = GetReplaceId(shopInfo.ID, shopInfo.ItemID);
        ItemTipUtility.ShowGood(shopInfo.ID, itemId);
        ItemTipUtility.Show(itemId);
    }
    public int BuyCnt { get; private set; }
@@ -945,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))
        {
@@ -991,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)
        {
@@ -1002,7 +979,7 @@
            return;
        }
        if (buyItemCheckDict.ContainsKey(type) && buyItemCheckDict[type])
        if (buyItemCheckDict.ContainsKey(eventType) && buyItemCheckDict[eventType])
        {
            SendBuyShopItem(model, count);
            return;
@@ -1014,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)
        {
@@ -1031,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;
                }
            });
@@ -1056,28 +1033,15 @@
    public void GetBuyResult(HA811_tagMCShoppingResult result)
    {
        Debug.Log("GetBuyResult");
        //Debug.Log("GetBuyResult");
        StoreConfig tagStore = StoreConfig.Get((int)result.ItemIndex);
        if (tagStore != null)
        {
            ItemConfig chinModel = ItemConfig.Get(GetReplaceId(tagStore.ID, tagStore.ItemID));
            if (!normalBuyCoinsTypes.Contains(tagStore.MoneyType))
            if (tagStore.RemindSuccess == 0)
            {
                if (tagStore.RemindSuccess == 0)
                {
                    return;
                }
                // BuySuccessModel.Instance.SetBuySuccessModel(chinModel.ID, (int)result.ItemCnt);
                // if (!WindowCenter.Instance.IsOpen<BuySuccessWin>())
                // {
                //     WindowCenter.Instance.Open<BuySuccessWin>();
                // }
            }
            else
            {
                float costMoney = tagStore.MoneyNumber;
                SysNotifyMgr.Instance.ShowTip("BuyItemHinit", costMoney, tagStore.MoneyType, chinModel.ItemName);
                return;
            }
            if (RefreshBuyResultEvent != null)
@@ -1088,7 +1052,7 @@
    }
    public bool MoneyIsEnough(int moneyType, ulong money)
    public bool MoneyIsEnough(int moneyType, long money)
    {
        if (UIHelper.GetMoneyCnt(moneyType) < money)
        {
@@ -1445,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;
                            }
@@ -1507,6 +1471,11 @@
            {
                var redable = false;
                var config = StoreConfig.Get(shopId);
                if (config == null)
                {
                    Debug.LogError($"StoreConfig {shopId} is null");
                    continue;
                }
                switch (config.ShopType)
                {
                    case 8:
@@ -1527,7 +1496,7 @@
                        {
                            break;
                        }
                        if (!MoneyIsEnough(config.MoneyType, (ulong)config.MoneyNumber))
                        if (!MoneyIsEnough(config.MoneyType, config.MoneyNumber))
                        {
                            break;
                        }