PGRData/Script/matrix/xredpoint/xredpointconditions/XRedPointConditionCharacterLevel.lua
2024-09-01 22:49:41 +02:00

36 lines
No EOL
940 B
Lua

----------------------------------------------------------------
--角色升级红点检测
local XRedPointConditionCharacterLevel = {}
local Events = nil
function XRedPointConditionCharacterLevel.GetSubEvents()
Events = Events or
{
XRedPointEventElement.New(XEventId.EVENT_CHARACTER_LEVEL_UP),
XRedPointEventElement.New(XEventId.EVENT_PLAYER_LEVEL_CHANGE),
}
return Events
end
function XRedPointConditionCharacterLevel.Check(characterId)
if not characterId then
return false
end
if not XFunctionManager.JudgeOpen(XFunctionManager.FunctionName.Character) then
return false
end
if XDataCenter.CharacterManager.CanLevelUp(characterId) then
return true
end
-- v2.6把解放单独拆出去了
-- if XRedPointConditionExhibitionNew.Check(characterId) then
-- return true
-- end
return false
end
return XRedPointConditionCharacterLevel