降妖夺宝修改

dev_chengFeng
yuanshuai 2022-12-21 16:11:55 +08:00
parent 99a65d573a
commit b836038a31
2 changed files with 39 additions and 0 deletions

View File

@ -239,6 +239,17 @@ function XiangYaoDuoBao:refreshBtnShow()
type = n == bType.Btn1 and singleRecruit.Id or tenRecruit.Id
local d = RecruitManager.GetExpendData(type)
local needCostTime=0
if n==bType.Btn1 then
needCostTime=PrivilegeManager.GetPrivilegeUsedTimes(tenRecruit.MoneyTimes)+1
elseif n==bType.Btn10 then
needCostTime=PrivilegeManager.GetPrivilegeUsedTimes(tenRecruit.MoneyTimes)+10
end
if d[1] == 16 and needCostTime>privilegeConfig[tenRecruit.MoneyTimes].Condition[1][2] then
local lotterySettingConfig = ConfigManager.GetConfigData(ConfigName.LotterySetting,type)
local costLength=#lotterySettingConfig.CostItem
d=lotterySettingConfig.CostItem[costLength]
end
if isFree then
info.text=" "..Language[10493]

View File

@ -95,6 +95,20 @@ function SingleRecruitPanel:BindEvent()
return
end
local d=RecruitManager.GetExpendData(type)
if recruitType and (recruitType[1]==RecruitType.XiangYaoSingle or recruitType[1]==RecruitType.XiangYaoTen) then
local needCostTime=0
local Privilege=2023
if recruitType[1]==RecruitType.XiangYaoSingle then
needCostTime=PrivilegeManager.GetPrivilegeUsedTimes(Privilege)+1
elseif recruitType[1]==RecruitType.XiangYaoTen then
needCostTime=PrivilegeManager.GetPrivilegeUsedTimes(Privilege)+10
end
if d[1] == 16 and needCostTime>privilegeConfig[Privilege].Condition[1][2] then
local lotterySettingConfig = ConfigManager.GetConfigData(ConfigName.LotterySetting,type)
local costLength=#lotterySettingConfig.CostItem
d=lotterySettingConfig.CostItem[costLength]
end
end
if BagManager.GetItemCountById(d[1])<d[2] then
PopupTipPanel.ShowTip(GetLanguageStrById(itemConfig[d[1]].Name)..Language[10486])
return
@ -437,6 +451,20 @@ function SingleRecruitPanel:UpdataPanelData(_heroData)
if recruitType and recruitType[1]==RecruitType.PrayerSingle then
local num=PrivilegeManager.GetPrivilegeRemainValue(wishSettingConfig[1].DiamondMaxTimes)
d=RecruitManager.GetExpendDataByCostItem(wishSettingConfig[1].CostItemSingle,1,num)
elseif recruitType and (recruitType[1]==RecruitType.XiangYaoSingle or recruitType[1]==RecruitType.XiangYaoTen)then
d=RecruitManager.GetExpendData(type)
local needCostTime=0
local Privilege=2023
if recruitType[1]==RecruitType.XiangYaoSingle then
needCostTime=PrivilegeManager.GetPrivilegeUsedTimes(Privilege)+1
elseif recruitType[1]==RecruitType.XiangYaoTen then
needCostTime=PrivilegeManager.GetPrivilegeUsedTimes(Privilege)+10
end
if d[1] == 16 and needCostTime>privilegeConfig[Privilege].Condition[1][2] then
local lotterySettingConfig = ConfigManager.GetConfigData(ConfigName.LotterySetting,type)
local costLength=#lotterySettingConfig.CostItem
d=lotterySettingConfig.CostItem[costLength]
end
else
d=RecruitManager.GetExpendData(type)
end