PGRData/Resources/Scripts/XRedPoint/XRedPointConditions/XRedPointConditionCharacterQuality.lua
2022-12-26 14:06:01 +05:30

29 lines
No EOL
828 B
Lua

----------------------------------------------------------------
--角色升品红点检测
local XRedPointConditionCharacterQuality = {}
local Events = nil
function XRedPointConditionCharacterQuality.GetSubEvents()
Events = Events or
{
XRedPointEventElement.New(XEventId.EVENT_CHARACTER_QUALITY_STAR_PROMOTE),
XRedPointEventElement.New(XEventId.EVENT_CHARACTER_QUALITY_PROMOTE),
}
return Events
end
function XRedPointConditionCharacterQuality.Check(characterId)
if not characterId then
return false
end
if not XFunctionManager.JudgeOpen(XFunctionManager.FunctionName.CharacterQuality) then
return false
end
local canPromote = XDataCenter.CharacterManager.CanPromoteQuality(characterId)
return canPromote
end
return XRedPointConditionCharacterQuality