PGRData/Script/matrix/xredpoint/xredpointconditions/XRedPointConditionCharacter.lua
2024-09-01 22:49:41 +02:00

41 lines
No EOL
1.1 KiB
Lua

----------------------------------------------------------------
--角色入口红点检测
local XRedPointConditionCharacter = {}
local SubCondition = nil
function XRedPointConditionCharacter.GetSubConditions()
SubCondition = SubCondition or {
XRedPointConditions.Types.CONDITION_CHARACTER_GRADE ,
XRedPointConditions.Types.CONDITION_CHARACTER_QUALITY,
XRedPointConditions.Types.CONDITION_CHARACTER_UNLOCK,
XRedPointConditions.Types.CONDITION_EXHIBITION_NEW,
}
return SubCondition
end
function XRedPointConditionCharacter.Check(characterId)
if not characterId then
return false
end
if XRedPointConditionCharacterUnlock.Check(characterId) then
return true
end
if XRedPointConditionCharacterGrade.Check(characterId) then
return true
end
if XRedPointConditionCharacterQuality.Check(characterId) then
return true
end
if XRedPointConditionExhibitionNew.Check(characterId) then
return true
end
return false
end
return XRedPointConditionCharacter