Browse Source

飞花令道具计算

zhaoyang 2 years ago
parent
commit
534812c3b5
1 changed files with 8 additions and 2 deletions
  1. 8 2
      GameClient/Assets/Game/HotUpdate/Views/Store/ItemExchangeView.cs

+ 8 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/ItemExchangeView.cs

@@ -62,8 +62,14 @@ namespace GFGGame
             }
             else
             {
-                long curMoneyCanBuy = ItemDataManager.GetItemNum(_shopCfg.costId) / _shopCfg.price;
-
+                long itemCount = ItemDataManager.GetItemNum(_shopCfg.costId);
+                long curMoneyCanBuy = itemCount / _shopCfg.price;
+                if (_shopCfg.menu1 == ConstStoreTabId.STORE_ARENA)
+                {
+                    itemCount = ItemDataManager.GetItemNum(ConstItemID.ARENA_CUR_COST);
+                    long itemCountOther = ItemDataManager.GetItemNum(ConstItemID.ARENA_PAST_COST);
+                    curMoneyCanBuy = (itemCount + itemCountOther) / _shopCfg.price;
+                }
                 if (_shopCfg.maxBuyNum == 0)
                 {