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

17 lines
539 B
Lua
Raw Normal View History

2024-09-01 20:49:41 +00:00
local XRedPointConditionCharacterTowerEntrance = {}
function XRedPointConditionCharacterTowerEntrance.Check(id)
if not XTool.IsNumberValid(id) then
return false
end
local chapterIds = XFubenCharacterTowerConfigs.GetChapterIdsById(id)
for _, chapterId in pairs(chapterIds) do
local hasRedPoint = XDataCenter.CharacterTowerManager.CheckRedPointByChapterId(chapterId)
if hasRedPoint then
return true
end
end
return false
end
return XRedPointConditionCharacterTowerEntrance