Browse Source

工作室单次购买提示有误

zhaoyang 3 years ago
parent
commit
8cf282b83a

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/LuckyBoxDataManager.cs

@@ -145,7 +145,7 @@ namespace GFGGame
                     ItemExchangeCfgArray.Instance.GetCostAndBuyNum(itemExchangeCfg, i, out int _costNum, out int _buyNum);
                     costItemNeedNum += _costNum;
                     costbuyNum += _buyNum;
-                    buyNum = itemExchangeCfg.num;
+                    buyNum += itemExchangeCfg.num;
                     if (buyNum >= needNum) break;
 
                 }

+ 18 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs

@@ -113,10 +113,26 @@ namespace GFGGame
             }
             else
             {
-                ItemUtil.AddPower("体力不足", OnClickBtnFightOnce);
+                // var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
+
+                if (RoleDataManager.power < levelCfg.power)
+                {
+
+                    ItemUtil.AddPower("体力不足", OnClickBtnStart);
+                }
+                else
+                {
+                    if (levelCfg.type == ConstInstanceZonesType.Studio)
+                    {
+                        ViewManager.Show<StudioBuyNumView>(levelCfg.chapterId);
+                    }
+                    else
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt("挑战次数不足");
+                    }
+                }
             }
         }
-
         private void OnClickBtnFightTimes()
         {
             int starCount = InstanceZonesDataManager.GetStarCountHistory(_levelID);