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

23 lines
853 B
Lua
Raw Normal View History

----------------------------------------------------------------
--单个邮件检测
local XRedPointConditionMailPersonal = {}
local Events = nil
function XRedPointConditionMailPersonal.GetSubEvents()
Events = Events or
{
2024-09-01 20:49:41 +00:00
XRedPointEventElement.New(XAgencyEventId.EVENT_MAIL_SYNC),
XRedPointEventElement.New(XAgencyEventId.EVENT_MAIL_GET_ALL_MAIL_REWARD),
XRedPointEventElement.New(XAgencyEventId.EVENT_MAIL_DELETE),
XRedPointEventElement.New(XAgencyEventId.EVENT_MAIL_READ),
XRedPointEventElement.New(XAgencyEventId.EVENT_MAIL_GET_MAIL_REWARD),
}
return Events
end
function XRedPointConditionMailPersonal.Check(mailId)
2024-09-01 20:49:41 +00:00
---@type XMailAgency
local mailAgency = XMVCA:GetAgency(ModuleId.XMail)
return mailAgency:IsMailUnReadOrHasReward(mailId)
end
return XRedPointConditionMailPersonal