forked from endernon/PGRData
31 lines
1,006 B
Lua
31 lines
1,006 B
Lua
|
local XRedPointConditionExtraChapterReward = {}
|
||
|
local SubCondition = nil
|
||
|
|
||
|
function XRedPointConditionExtraChapterReward.GetSubConditions()
|
||
|
SubCondition = SubCondition or
|
||
|
{
|
||
|
XRedPointConditions.Types.CONDITION_EXTRA_TREASURE, -- 外篇章节收集奖励
|
||
|
XRedPointConditions.Types.CONDITION_ZHOUMU_TASK, -- 周目挑战任务
|
||
|
}
|
||
|
return SubCondition
|
||
|
end
|
||
|
|
||
|
function XRedPointConditionExtraChapterReward.Check(chapterId)
|
||
|
if XRedPointConditionExtraTreasure.Check(chapterId) then
|
||
|
return true
|
||
|
end
|
||
|
|
||
|
local chapterInfo = XDataCenter.ExtraChapterManager.GetChapterInfo(chapterId)
|
||
|
local chapterMainId = (chapterInfo or {}).ChapterMainId or 0
|
||
|
local zhouMuId = XFubenExtraChapterConfigs.GetZhouMuId(chapterMainId)
|
||
|
if zhouMuId == 0 then
|
||
|
return false
|
||
|
end
|
||
|
|
||
|
if XRedPointConditionZhouMuTask.Check(zhouMuId) then
|
||
|
return true
|
||
|
end
|
||
|
|
||
|
return false
|
||
|
end
|
||
|
return XRedPointConditionExtraChapterReward
|