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

22 lines
No EOL
979 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 XRedPointConditionFavorabilityRumor = {}
local Events = nil
function XRedPointConditionFavorabilityRumor.GetSubEvents()
Events = Events or {
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_LEVELCHANGED),
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_RUMERUNLOCK),
}
return Events
end
function XRedPointConditionFavorabilityRumor.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.HasRumorsToBeUnlock(characterId)
end
return XRedPointConditionFavorabilityRumor