2023-07-14 19:35:33 +00:00
|
|
|
|
|
|
|
----------------------------------------------------------------
|
|
|
|
--角色晋升红点检测
|
|
|
|
local XRedPointConditionCharacterGrade = {}
|
|
|
|
local Events = nil
|
|
|
|
|
|
|
|
function XRedPointConditionCharacterGrade.GetSubEvents()
|
|
|
|
Events = Events or
|
|
|
|
{
|
|
|
|
XRedPointEventElement.New(XEventId.EVENT_CHARACTER_LEVEL_UP),
|
|
|
|
XRedPointEventElement.New(XEventId.EVENT_CHARACTER_GRADE),
|
|
|
|
XRedPointEventElement.New(XEventId.EVENT_CHARACTER_GRADE_PART),
|
|
|
|
XRedPointEventElement.New(XEventId.EVENT_ITEM_BUYASSET, {XDataCenter.ItemManager.ItemId.Coin})
|
|
|
|
}
|
|
|
|
return Events
|
|
|
|
end
|
|
|
|
|
|
|
|
function XRedPointConditionCharacterGrade.Check(characterId)
|
|
|
|
if not characterId then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
2024-09-01 20:49:41 +00:00
|
|
|
---@type XCharacterAgency
|
|
|
|
local ag = XMVCA:GetAgency(ModuleId.XCharacter)
|
|
|
|
|
2023-07-14 19:35:33 +00:00
|
|
|
if not XFunctionManager.JudgeOpen(XFunctionManager.FunctionName.CharacterGrade) then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
2024-09-01 20:49:41 +00:00
|
|
|
return ag:CanPromoteGrade(characterId)
|
2023-07-14 19:35:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return XRedPointConditionCharacterGrade
|