From d8f31bab35aab6ad92e8c4d1705417a5f5f9e460 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 19 Nov 2020 14:26:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=B4=BB=E5=8A=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ActivityGift/ActivityGiftManager.lua | 9 ++++++-- .../DynamicActivity/DynamicActivityPanel.lua | 21 +++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua index 2f0d280d8d..f900f93945 100644 --- a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua @@ -1089,12 +1089,17 @@ end function this.IsQualifiled(type) -- 相同类型活动解锁类型相同,所以只判断第一个 local data = ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity,"Type",type) - if not data then return false end - + if not data then + return false + end + -- 当前玩家等级 local qualifiled = false local playerLv = PlayerManager.level local openRule = data.OpenRules + if not data.OpenRules or #data.OpenRules < 2 then + return true + end if openRule[1] == 1 then -- 关卡开启 qualifiled = FightPointPassManager.IsFightPointPass(openRule[2]) elseif openRule[1] == 2 then -- 等级开启 diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityPanel.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityPanel.lua index e720a16b52..b1bf7127b8 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityPanel.lua @@ -224,20 +224,17 @@ function this.PageTabAdapter(tab, index, status) this.BindPageRedpot(index, redpot) end local id = ActivityGiftManager.IsActivityTypeOpen(tabs[index].ActType) - if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[index].ActType) then - if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then - tab:SetActive(GlobalActConfig[id].ShowArt == index) - else - tab.gameObject:SetActive(true) - end - + if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[index].ActType) then + if GlobalActConfig[id].Type == ActivityTypeDef.DynamicAct then + if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then + tab:SetActive(GlobalActConfig[id].ShowArt == index) + end --限时兑换特殊处理 - if GlobalActConfig[id].Type == ActivityTypeDef.LimitExchange then + elseif GlobalActConfig[id].Type == ActivityTypeDef.LimitExchange then tab.gameObject:SetActive(GlobalActConfig[id].ShowArt ~= 1) - end - + --累计充值特殊处理 - if GlobalActConfig[id].Type == ActivityTypeDef.AccumulativeRechargeExper then + elseif GlobalActConfig[id].Type == ActivityTypeDef.AccumulativeRechargeExper then if GlobalActConfig[id] and GlobalActConfig[id].ShowArt ~= 1 then tab.gameObject:SetActive(true) else @@ -245,6 +242,8 @@ function this.PageTabAdapter(tab, index, status) end elseif GlobalActConfig[id].Type == ActivityTypeDef.DynamicAct_recharge then tab.gameObject:SetActive(true) + else + tab.gameObject:SetActive(true) end else tab.gameObject:SetActive(false)