diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/XiangYaoDuoBao.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/XiangYaoDuoBao.lua index d3c3779b6d..6db6bd4db0 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/XiangYaoDuoBao.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/XiangYaoDuoBao.lua @@ -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] diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index ca6a40a1d5..06b3012087 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -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])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