PGRData/Resources/Scripts/XRedPoint/XRedPointConditions/XRedPointConditionTRPGMainView.lua

33 lines
903 B
Lua
Raw Normal View History

2022-12-26 08:36:01 +00:00
local XRedPointConditionTRPGMainView = {}
local SubCondition = nil
function XRedPointConditionTRPGMainView.GetSubConditions()
SubCondition = SubCondition or {
XRedPointConditions.Types.CONDITION_TRPG_MAIN_MODE,
XRedPointConditions.Types.CONDITION_TRPG_SECOND_MAIN_REWARD,
}
return SubCondition
end
function XRedPointConditionTRPGMainView.Check(chapterId)
if chapterId ~= XDataCenter.FubenMainLineManager.TRPGChapterId then
return false
end
local chapterInfo = XDataCenter.FubenMainLineManager.GetChapterInfo(chapterId)
if (not chapterInfo) or (not chapterInfo.Unlock and not chapterInfo.IsOpen) then
return false
end
if XRedPointConditionTRPGMainMode.Check() then
return true
end
if XRedPointTRPGSecondMainReward.Check() then
return true
end
return false
end
return XRedPointConditionTRPGMainView