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

28 lines
No EOL
1 KiB
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 XRedPointConditionFavorabilityPlot = {}
local Events = nil
function XRedPointConditionFavorabilityPlot.GetSubEvents()
Events = Events or {
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_LEVELCHANGED),
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_PLOTUNLOCK),
}
return Events
end
function XRedPointConditionFavorabilityPlot.Check(checkArgs)
if XFunctionManager.CheckFunctionFitter(XFunctionManager.FunctionName.FavorabilityStory) then
return false
end
if not checkArgs then return false end
local characterId = checkArgs.CharacterId
if characterId == nil then return false end
local isOpen = XFunctionManager.JudgeCanOpen(XFunctionManager.FunctionName.FavorabilityStory)
if not isOpen then return false end
return XDataCenter.FavorabilityManager.HasStroyToBeUnlock(characterId)
end
return XRedPointConditionFavorabilityPlot