降妖夺宝修改
parent
99a65d573a
commit
b836038a31
|
@ -239,6 +239,17 @@ function XiangYaoDuoBao:refreshBtnShow()
|
||||||
|
|
||||||
type = n == bType.Btn1 and singleRecruit.Id or tenRecruit.Id
|
type = n == bType.Btn1 and singleRecruit.Id or tenRecruit.Id
|
||||||
local d = RecruitManager.GetExpendData(type)
|
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
|
if isFree then
|
||||||
info.text=" "..Language[10493]
|
info.text=" "..Language[10493]
|
||||||
|
|
|
@ -95,6 +95,20 @@ function SingleRecruitPanel:BindEvent()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local d=RecruitManager.GetExpendData(type)
|
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
|
if BagManager.GetItemCountById(d[1])<d[2] then
|
||||||
PopupTipPanel.ShowTip(GetLanguageStrById(itemConfig[d[1]].Name)..Language[10486])
|
PopupTipPanel.ShowTip(GetLanguageStrById(itemConfig[d[1]].Name)..Language[10486])
|
||||||
return
|
return
|
||||||
|
@ -437,6 +451,20 @@ function SingleRecruitPanel:UpdataPanelData(_heroData)
|
||||||
if recruitType and recruitType[1]==RecruitType.PrayerSingle then
|
if recruitType and recruitType[1]==RecruitType.PrayerSingle then
|
||||||
local num=PrivilegeManager.GetPrivilegeRemainValue(wishSettingConfig[1].DiamondMaxTimes)
|
local num=PrivilegeManager.GetPrivilegeRemainValue(wishSettingConfig[1].DiamondMaxTimes)
|
||||||
d=RecruitManager.GetExpendDataByCostItem(wishSettingConfig[1].CostItemSingle,1,num)
|
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
|
else
|
||||||
d=RecruitManager.GetExpendData(type)
|
d=RecruitManager.GetExpendData(type)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue