diff --git a/src/models/RoleTask.lua b/src/models/RoleTask.lua index 915cdea..64b9c26 100644 --- a/src/models/RoleTask.lua +++ b/src/models/RoleTask.lua @@ -607,6 +607,49 @@ function RoleTask.bind(Role) elseif subType == 2 then -- 直接赋值 calTask[id] = param1 elseif subType == 3 then -- 自定义类型 + if cfg.type == 7 then -- 英雄品质收集进度 + local count = 0 + for _, hero in pairs(self.heros) do + local unitData = csvdb["unitCsv"][hero:getProperty("type")] + if unitData then + if cfg.condition2 <= unitData.rare then + count = count + 1 + end + end + end + if calTask[id] < count then + calTask[id] = count + end + elseif cfg.type == 5 then -- 英雄等级收集进度 + local count = 0 + for _, hero in pairs(self.heros) do + if cfg.condition2 <= hero:getProperty("level") then + count = count + 1 + end + end + if calTask[id] < count then + calTask[id] = count + end + elseif cfg.type == 16 then -- 英雄星级收集进度 + local count = 0 + for _, hero in pairs(self.heros) do + if cfg.condition2 <= hero:getProperty("wakeL") then + count = count + 1 + end + end + if calTask[id] < count then + calTask[id] = count + end + elseif cfg.type == 18 then -- 挂机累计收获id,y个 + dump(param1) + for rid, v in pairs(param1) do + if cfg.condition2 == rid then + calTask[id] = (calTask[id] or 0) + v + end + end + elseif cfg.type == 19 then -- x名英雄装备y品质以上符文套装 + elseif cfg.type == 20 then -- 开启x品质时钟箱子 + end end end end -- libgit2 0.21.2