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 |   57 +++++++++++++++++++++++++++++++--------------------------
 1 files changed, 31 insertions(+), 26 deletions(-)

diff --git a/Main/System/Store/StoreModel.cs b/Main/System/Store/StoreModel.cs
index 4b98aaa..19b99d2 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()
     {
@@ -911,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; }
@@ -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)
         {
@@ -1117,9 +1117,9 @@
                 UpdateMustBuyRedpoint();
                 UpdateDailyRedpoinit();
                 break;
-            case FuncOpenEnum.BlastFurnace:
-                ControllerRedPoint();
-                break;
+            // case FuncOpenEnum.BlastFurnace:
+            //     ControllerRedPoint();
+            //     break;
         }
     }
 
@@ -1268,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)
@@ -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;
                             }
@@ -1471,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:
@@ -1491,7 +1496,7 @@
                         {
                             break;
                         }
-                        if (!MoneyIsEnough(config.MoneyType, (ulong)config.MoneyNumber))
+                        if (!MoneyIsEnough(config.MoneyType, config.MoneyNumber))
                         {
                             break;
                         }

--
Gitblit v1.8.0