From 8f1e4dc19a0664e6a8ee4fdad2065efb5c16d053 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 31 十月 2025 16:08:09 +0800
Subject: [PATCH] 0312 购买物品 拥有数量如果是能自动转换货币的显示货币值否则显示物品数量;物品图标下标显示购买的总数量;强制刷新武将界面的排版

---
 Main/System/Store/BuyItemWin.cs |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Main/System/Store/BuyItemWin.cs b/Main/System/Store/BuyItemWin.cs
index 649f0d0..c4c99b9 100644
--- a/Main/System/Store/BuyItemWin.cs
+++ b/Main/System/Store/BuyItemWin.cs
@@ -37,10 +37,10 @@
         var shopConfig = StoreConfig.Get(StoreModel.Instance.buyShopID);
         var itemID = shopConfig.ItemID;
         var itemCount = shopConfig.ItemCnt;
-        itemCell.Init(new ItemCellModel(itemID, false, itemCount));
+        itemCell.Init(new ItemCellModel(itemID, false, itemCount*useCnt));
         var itemConfig = ItemConfig.Get(itemID);
         nameText.text = itemConfig.ItemName;
-        countText.text = Language.Get("storename12", PackManager.Instance.GetItemCountByID(PackType.Item, itemID));
+        countText.text = Language.Get("storename12", GetItemCount(itemID));
         descText.text = itemConfig.Description;
 
         var buyCnt = StoreModel.Instance.GetShopLimitBuyCount(StoreModel.Instance.buyShopID);
@@ -59,7 +59,7 @@
     {
         var shopConfig = StoreConfig.Get(StoreModel.Instance.buyShopID);
         useCnt = value;
-        itemCell.countText.text = value.ToString();
+        itemCell.countText.text = UIHelper.ReplaceLargeNum(value*shopConfig.ItemCnt);
 
         string limitStr = "";
         if (shopConfig.LimitCnt == 0)
@@ -93,4 +93,16 @@
         CloseWindow();
         StoreModel.Instance.SendBuyShopItem(StoreConfig.Get(StoreModel.Instance.buyShopID), useCnt);
     }
+
+    //濡傛灉鐗╁搧鏄嚜鍔ㄨ浆鎹㈣揣甯佺被鍨嬬殑锛屽垯杩斿洖璐у竵鏁伴噺锛屽惁鍒欒繑鍥炵墿鍝佹暟閲�
+    long GetItemCount(int id)
+    {
+        var config = ItemConfig.Get(id);
+        if (config.Effect1 == 264)
+        {
+            return UIHelper.GetMoneyCnt(config.EffectValueB1);
+        }
+
+        return PackManager.Instance.GetItemCountByID(PackType.Item, id);
+    }
 }

--
Gitblit v1.8.0