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

29 lines
1.3 KiB
Lua
Raw Normal View History

----------------------------------------------------------------
--好感度奖励检测跟好感度等级角色战斗参数角色等级角色品质关联需要参数characterId
local XRedPointConditionFavorabilityGift = {}
local Events = nil
function XRedPointConditionFavorabilityGift.GetSubEvents()
Events = Events or {
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_LEVELCHANGED),
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_CHAR_ABILITY_CHANGED),
XRedPointEventElement.New(XEventId.EVENT_CHARACTER_LEVEL_UP),
XRedPointEventElement.New(XEventId.EVENT_CHARACTER_QUALITY_PROMOTE),
XRedPointEventElement.New(XEventId.EVENT_FAVORABILITY_COLLECTGIFT),
}
return Events
end
function XRedPointConditionFavorabilityGift.Check(checkArgs)
if XFunctionManager.CheckFunctionFitter(XFunctionManager.FunctionName.FavorabilityGift) 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.FavorabilityGift)
if not isOpen then return false end
return false
end
return XRedPointConditionFavorabilityGift