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

22 lines
979 B
Lua
Raw Normal View History

----------------------------------------------------------------
--异闻检测两种条件信赖度等级以及宿舍事件宿舍事件暂时还没有需要参数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