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

24 lines
926 B
Lua
Raw Normal View History

2022-12-26 08:36:01 +00:00
----------------------------------------------------------------
--资料检测只关心依赖度等级变化需要参数characterId
local XRedPointConditionFavorabilityInfo = {}
local Events = nil
function XRedPointConditionFavorabilityInfo.GetSubEvents()
Events = Events or {
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_LEVELCHANGED),
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_INFOUNLOCK),
}
return Events
end
function XRedPointConditionFavorabilityInfo.Check(checkArgs)
if not checkArgs then return false end
local characterId = checkArgs.CharacterId
if characterId == nil then return false end
local isOpen = XFunctionManager.JudgeCanOpen(XFunctionManager.FunctionName.FavorabilityFile)
if not isOpen then return false end
return XDataCenter.FavorabilityManager.HasDataToBeUnlock(characterId)
end
return XRedPointConditionFavorabilityInfo