Commit cc30a8b3e428c1a39e0d37188cd80065ff96a3bb

Authored by liuzujun
1 parent d4876585

玛尼英雄帖任务类型7与15 bug

Showing 1 changed file with 8 additions and 5 deletions   Show diff stats
src/models/RoleTask.lua
@@ -697,7 +697,7 @@ function RoleTask.bind(Role) @@ -697,7 +697,7 @@ function RoleTask.bind(Role)
697 for _, hero in pairs(self.heros) do 697 for _, hero in pairs(self.heros) do
698 local unitData = csvdb["unitCsv"][hero:getProperty("type")] 698 local unitData = csvdb["unitCsv"][hero:getProperty("type")]
699 if unitData then 699 if unitData then
700 - if cfg.condition2 <= unitData.rare then 700 + if cfg.condition2 == unitData.rare then
701 count = count + 1 701 count = count + 1
702 end 702 end
703 end 703 end
@@ -758,11 +758,14 @@ function RoleTask.bind(Role) @@ -758,11 +758,14 @@ function RoleTask.bind(Role)
758 end 758 end
759 elseif cfg.type == 15 then -- 通关关卡 759 elseif cfg.type == 15 then -- 通关关卡
760 if (calTask[id] or 0) == 0 then 760 if (calTask[id] or 0) == 0 then
761 - local hangPass = self:getProperty("hangPass")  
762 - local diff = math.floor(cfg.condition2 / 10000)  
763 - if (hangPass[diff] or 0) >= cfg.condition1 then 761 + if self:checkHangPass(cfg.condition2) then
764 calTask[id] = 1 762 calTask[id] = 1
765 - end 763 + end
  764 + --local hangPass = self:getProperty("hangPass")
  765 + --local diff = math.floor(cfg.condition2 / 10000)
  766 + --if (hangPass[diff] or 0) >= cfg.condition2 then
  767 + -- calTask[id] = 1
  768 + --end
766 end 769 end
767 elseif cfg.type == 22 then -- 电台任务出勤人数 770 elseif cfg.type == 22 then -- 电台任务出勤人数
768 calTask[id] = (calTask[id] or 0) + (param1 or 0) 771 calTask[id] = (calTask[id] or 0) + (param1 or 0)