PGRData/Script/matrix/xredpoint/xredpointconditions/XRedPointConditionActivityFestival.lua

22 lines
708 B
Lua
Raw Permalink Normal View History

local XRedPointConditionActivityFestival = {}
function XRedPointConditionActivityFestival.Check(sectionId)
2024-09-01 22:49:41 +02:00
-- 节日Id是否在开放时间内
if not XDataCenter.FubenFestivalActivityManager.IsFestivalInActivity(sectionId) then
return false
end
2024-09-01 22:49:41 +02:00
-- 功能是否开启
local sectionCfg = XFestivalActivityConfig.GetFestivalById(sectionId)
if sectionCfg.FunctionOpenId > 0 then
if not XFunctionManager.JudgeCanOpen(sectionCfg.FunctionOpenId) then
2024-09-01 22:49:41 +02:00
return false
end
end
2024-09-01 22:49:41 +02:00
if XDataCenter.FubenFestivalActivityManager.CheckFestivalRedPoint(sectionId) then
return true
end
return false
end
return XRedPointConditionActivityFestival