From 4d684a8b7e1cd17fbf53a64ac8889d698f719c00 Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Sat, 8 May 2021 15:16:59 +0800 Subject: [PATCH] fix: 宝藏图鉴-优化 检查拾荒关卡是否通关 --- src/models/Daily.lua | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/models/Daily.lua b/src/models/Daily.lua index 12a1267..4a38f3e 100644 --- a/src/models/Daily.lua +++ b/src/models/Daily.lua @@ -100,21 +100,9 @@ function Daily:checkUnlock(treaval) local treasureC = treaval.unlock:toArray(true, "=") local show = false if treasureC[1] == 1 then --通关关卡 - if self.owner:checkHangPass(treasureC[2]) then show = true end + show = self.owner:checkHangPass(treasureC[2]) elseif treasureC[1] == 2 then --通关拾荒章节=x层 - local chapterId = treasureC[2] - local layer = 1 - local advCsv = csvdb["adv_chapterCsv"][chapterId] - if not advCsv then return false end --不存在的章节 - if math.floor(chapterId / 100) ~= 2 then - layer = math.min(layer, advCsv.limitlevel) - end - local advPass = role:getProperty("advPass") - if (advPass[chapterId] or 0) < layer then - show = false - else - show = true - end + show = role:checkAdvChapterPass(treasureC[2]) elseif treasureC[1] == 3 then --拥有指定id的角色时 local hero = role:getHeroByID(treasureC[2]) if hero then show = true end -- libgit2 0.21.2