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

22 lines
No EOL
963 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

----------------------------------------------------------------
--资料检测只关心依赖度等级变化需要参数characterId动作有变化也检查
local XRedPointConditionFavorabilityAction = {}
local Events = nil
function XRedPointConditionFavorabilityAction.GetSubEvents()
Events = Events or {
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_LEVELCHANGED),
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_ACTIONUNLOCK),
}
return Events
end
function XRedPointConditionFavorabilityAction.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.HasActionToBeUnlock(characterId)
end
return XRedPointConditionFavorabilityAction