【七界试炼】无免费次数按钮逻辑修改

dev_chengFeng
ZhangBiao 2021-09-18 18:23:48 +08:00
parent 1ddc89ad54
commit 47485caeda
1 changed files with 16 additions and 3 deletions

View File

@ -106,10 +106,23 @@ function QiJieShiLianPanel:BindEvent()
end)
Util.AddClick(self.goBtn,function()
if PrivilegeManager.GetPrivilegeRemainValue(3201) <= 0 then
PopupTipPanel.ShowTip("今日已无挑战次数!")
return
if PrivilegeManager.GetPrivilegeRemainValue(3202) > 0 then
local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP,10042, 1)
local itemName = ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name
MsgPanel.ShowTwo(string.format( Language[10516],finalNum,itemName), nil, function()
--买东西
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,10042,1,function()
PopupTipPanel.ShowTip(Language[10517])
PrivilegeManager.RefreshPrivilegeUsedTimes(3202, 1)--更新特权
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.QIJIESHILIAN,self.configData)
end)
end)
else
PopupTipPanel.ShowTip("<color=red>今日已无挑战次数!</color>")
end
else
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.QIJIESHILIAN,self.configData)
end
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.QIJIESHILIAN,self.configData)
end)
Util.AddClick(self.buyBtn,function()
if PrivilegeManager.GetPrivilegeRemainValue(3202) > 0 then