PGRData/Resources/Scripts/XRedPoint/XRedPointConditions/XRedPointConditionReformTaskGetReward.lua
2022-12-26 14:06:01 +05:30

22 lines
No EOL
747 B
Lua

local XRedPointConditionReformTaskGetReward = {}
function XRedPointConditionReformTaskGetReward.GetEvents()
if XRedPointConditionReformTaskGetReward.Events == nil then
XRedPointConditionReformTaskGetReward.Events = {
XRedPointEventElement.New(XEventId.EVENT_FINISH_TASK)
}
end
return XRedPointConditionReformTaskGetReward.Events
end
function XRedPointConditionReformTaskGetReward.Check()
local taskDatas = XDataCenter.TaskManager.GetTaskList(TaskType.Reform)
for _, taskData in pairs(taskDatas) do
if taskData.State == XDataCenter.TaskManager.TaskState.Achieved then
return true
end
end
return false
end
return XRedPointConditionReformTaskGetReward