This commit is contained in:
chenxi 2023-05-11 21:33:48 +08:00
parent 4e95b11e21
commit 57bf9204c1

View File

@ -38,17 +38,18 @@ function DailyTaskData:init(data)
} }
if v.bounty then if v.bounty then
dailyTaskObj.lock = true dailyTaskObj.lock = true
else -- 只有解锁的任务才注册监听任务进度
local list = self.taskTypeMap[taskInfo.type]
if list == nil then
list = {}
self.taskTypeMap[taskInfo.type] = list
end
table.insert(list, dailyTaskObj)
if #list == 1 then
self:registerTask(taskInfo.type)
end
end end
self.dailyTasks[k] = dailyTaskObj self.dailyTasks[k] = dailyTaskObj
local list = self.taskTypeMap[taskInfo.type]
if list == nil then
list = {}
self.taskTypeMap[taskInfo.type] = list
end
table.insert(list, dailyTaskObj)
if #list == 1 then
self:registerTask(taskInfo.type)
end
end end
end end
end end