diff --git a/Assets/ManagedResources/~Lua/Modules/Vip/VipManager.lua b/Assets/ManagedResources/~Lua/Modules/Vip/VipManager.lua index f902db30b4..e1593f5bbc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Vip/VipManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Vip/VipManager.lua @@ -495,4 +495,14 @@ function this.GetLevleRewardDatas(key) end end +function this.GetCurMinCanGetRewardLevel() + if levleRewardDatas and #levleRewardDatas > 0 then + for i = 1, #levleRewardDatas do + if levleRewardDatas[i] == 1 then + return i + end + end + end + return math.min(VipManager.GetVipLevel() + 1, VipManager.GetMaxVipLevel()) +end return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Vip/VipPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Vip/VipPanelV2.lua index 870d551f8a..2349548e1c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Vip/VipPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Vip/VipPanelV2.lua @@ -202,7 +202,7 @@ function VipPanelV2:SetPanelStatus() local maxLv = VipManager.GetMaxVipLevel() self.curLevel.sprite = this.spLoader:LoadSprite("r_zjm_tequanpaizi_0" .. self.context.vipLevel.."_zh") -- 显示的 - self.curShowLevel = math.min(self.context.vipLevel + 1, maxLv) + self.curShowLevel = VipManager.GetCurMinCanGetRewardLevel()--math.min(self.context.vipLevel + 1, maxLv) self:RefreshPanelStatus(self.curShowLevel) self:CheckTaskShow() self.BtnLeft:SetActive(self.curShowLevel > 1) @@ -541,7 +541,6 @@ function this.CheckVipLvPos(tarObj,lv) end --奖励 function VipPanelV2:ShowRewardInfo(level) - LogYellow("level "..level) local state = VipManager.GetLevleRewardDatas(level)--0 未领取 1 已领取 local vipCurLevel = VipManager.GetVipLevel() if state == 0 then