降妖夺宝十连抽修改

dev_chengFeng
wangzhenxing 2023-02-10 14:48:20 +08:00
parent 9f005990d4
commit 8177a8d6cb
1 changed files with 15 additions and 0 deletions

View File

@ -46,6 +46,13 @@ function TenRecruitPanel:BindEvent()
end)
Util.AddClick(self.againBtn, function()
local d=RecruitManager.GetExpendData(type)
local MoneyTimes=lotterySetting[type].MoneyTimes
local needCostTime=PrivilegeManager.GetPrivilegeUsedTimes(MoneyTimes)+10
if d[1] == 16 and needCostTime>privilegeConfig[MoneyTimes].Condition[1][2] then
local lotterySettingConfig = ConfigManager.GetConfigData(ConfigName.LotterySetting,type)
local costLength=#lotterySettingConfig.CostItem
d=lotterySettingConfig.CostItem[costLength]
end
if BagManager.GetItemCountById(d[1])<d[2] then
PopupTipPanel.ShowTip(GetLanguageStrById(itemConfig[d[1]].Name)..Language[10486])
return
@ -122,7 +129,15 @@ function TenRecruitPanel:OnOpen(...)
d=RecruitManager.GetExpendDataByCostItem(Setting.CostItemMul,2,num)
else
d=RecruitManager.GetExpendData(type)
local MoneyTimes=lotterySetting[type].MoneyTimes
local needCostTime=PrivilegeManager.GetPrivilegeUsedTimes(MoneyTimes)+10
if d[1] == 16 and needCostTime>privilegeConfig[MoneyTimes].Condition[1][2] then
local lotterySettingConfig = ConfigManager.GetConfigData(ConfigName.LotterySetting,type)
local costLength=#lotterySettingConfig.CostItem
d=lotterySettingConfig.CostItem[costLength]
end
end
this.againIcon.sprite=this.spLoader:LoadSprite(artResourcesConfig[itemConfig[d[1]].ResourceID].Name)
this.againNum.text="×"..d[2]
maxTimesId=lotterySetting[type].MaxTimes --特权上限ID