From b6f94e013be7edc0aa3de2440dd52d2c7e6d9d38 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 27 十月 2025 18:37:18 +0800
Subject: [PATCH] 125 竞技场+伤害展示跟技能名字弹出

---
 Main/System/Store/StoreModel.cs |  101 +++++++++++++++++---------------------------------
 1 files changed, 35 insertions(+), 66 deletions(-)

diff --git a/Main/System/Store/StoreModel.cs b/Main/System/Store/StoreModel.cs
index 17c4166..19b99d2 100644
--- a/Main/System/Store/StoreModel.cs
+++ b/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)
         {
@@ -1153,9 +1117,9 @@
                 UpdateMustBuyRedpoint();
                 UpdateDailyRedpoinit();
                 break;
-            case FuncOpenEnum.BlastFurnace:
-                ControllerRedPoint();
-                break;
+            // case FuncOpenEnum.BlastFurnace:
+            //     ControllerRedPoint();
+            //     break;
         }
     }
 
@@ -1304,11 +1268,11 @@
     public void ControllerRedPoint(bool isLook = false)
     {
         fairyStoreRemindRedpoint.state = RedPointState.None;
-        if (!FairyModel.Instance.fairyStoreOpen
-            || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace))
-        {
-            return;
-        }
+        // if (!FairyModel.Instance.fairyStoreOpen
+        //     || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace))
+        // {
+        //     return;
+        // }
 
         int familyLv = PlayerDatas.Instance.fairyData.fairy.FamilyLV;
         if (!isLook)
@@ -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;
                         }

--
Gitblit v1.8.0