青龙秘宝入口修改

dev_chengFeng
jiaoyangna 2020-09-22 11:58:49 +08:00 committed by JieLing
parent e3b387b8af
commit dd8e9ab701
3 changed files with 22 additions and 3 deletions

View File

@ -1081,6 +1081,25 @@ function this. OpenSeverWelfareRewardTabsSort(missions)
end)
end
-- 玩家是否有资格开启
function this.IsQualifiled(type)
-- 相同类型活动解锁类型相同,所以只判断第一个
local data = ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity,"Type",type)
if not data then return false end
-- 当前玩家等级
local qualifiled = false
local playerLv = PlayerManager.level
local openRule = data.OpenRules
if openRule[1] == 1 then -- 关卡开启
qualifiled = FightPointPassManager.IsFightPointPass(openRule[2])
elseif openRule[1] == 2 then -- 等级开启
qualifiled = playerLv >= openRule[2]
elseif openRule[1] == 3 then -- 工坊等级开启
qualifiled = WorkShopManager.WorkShopData.lv >= openRule[2]
end
return qualifiled
end
function this.GetTimeStartToEnd(type)
local info= ActivityGiftManager.GetActivityTypeInfo(type)

View File

@ -80,7 +80,7 @@ function MissionDailyPanel:OnOpen(popupType,...)
if RedPointManager.GetRedPointMissionDaily() then
index = 1
type = 0
elseif ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.SUNLONG) then
elseif ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) and ActivityGiftManager.IsQualifiled( ActivityTypeDef.TreasureOfSomeBody) then
if QinglongSerectTreasureManager.GetQinglongSerectTreasureRedPot() then
index = 2
type = 1
@ -132,7 +132,7 @@ function this.TabAdapter(tab, index, status)
tabLab:GetComponent("Text").text = _TabData[index].name
tabLab:GetComponent("Text").color = _TabFontColor[status]
if _TabData[index].type ~= -1 then
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.SUNLONG) and ActivityGiftManager.GetActivityOpenStatus( _TabData[index].type) then
if ActivityGiftManager.IsQualifiled( _TabData[index].type) and ActivityGiftManager.GetActivityOpenStatus( _TabData[index].type) then
tab.gameObject:SetActive(true)
else
tab.gameObject:SetActive(false)

View File

@ -151,7 +151,7 @@ function this.SingleMissionDatasDataShow(_go,_missionData)
local show
for i = 1, #reward do
show = false
if (reward[i].type == 2 and ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.SUNLONG))
if (reward[i].type == 2 and ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) and ActivityGiftManager.IsQualifiled( ActivityTypeDef.TreasureOfSomeBody))
or reward[i].type == 1 then
show = true
end