特权显示修改

dev_chengFeng
jiaoyangna 2021-09-27 17:46:43 +08:00
parent ea52d01112
commit ad35e1646c
1 changed files with 10 additions and 10 deletions

View File

@ -105,7 +105,14 @@ function FightAreaRewardPopup:OnShow()
local vipLv = VipManager.GetVipLevel()
local totalCurNum,totalLv,totalNum = LikabilityManager.GetTotalHeroLikeLv(-1)
if vipLv < 1 and totalLv < 1 then
local Vipvalue = 0
local config = ConfigManager.GetConfigData(ConfigName.PrivilegeTypeConfig,1)
for i = 1,#config.Condition do
if config.Condition[i][1] == vipLv then
Vipvalue = config.Condition[i][2]
end
end
if (vipLv < 1 or (Vipvalue - 10000)<= 0) and (totalLv < 1) then
this.extraReward.gameObject:SetActive(false)
else
local num = 1
@ -134,15 +141,8 @@ function FightAreaRewardPopup:OnShow()
data.sprite = "r_zjm_tequanpaizi"
data.iconText = "特权"
data.lv = vipLv..""
local value = 0
local config = ConfigManager.GetConfigData(ConfigName.PrivilegeTypeConfig,1)
for i = 1,#config.Condition do
if config.Condition[i][1] == vipLv then
value = config.Condition[i][2]
end
end
if value - 1 > 0 then
data.content = string.format(config.Name,GetPropertyFormatStrOne(config.IfFloat, value))
if Vipvalue - 10000 > 0 then
data.content = string.format(config.Name,GetPropertyFormatStrOne(config.IfFloat, Vipvalue - 10000))
data.type = 2
this.PriAdapter(num,data)
num = num + 1