diff --git a/src/actions/GmAction.lua b/src/actions/GmAction.lua index 078589e..998e6bb 100644 --- a/src/actions/GmAction.lua +++ b/src/actions/GmAction.lua @@ -354,16 +354,16 @@ function _M.adv(role, pms) local chapterId = tonum(pms.pm1) local layer = tonum(pms.pm2) - local advData = csvdb["adv_chapterCsv"][chapterId] - if not advData then return end + local advCsv = csvdb["adv_chapterCsv"][chapterId] + if not advCsv then return end if math.floor(chapterId / 100) ~= 2 then - layer = math.min(layer, advData.limitlevel) + layer = math.min(layer, advCsv.limitlevel) end local advPass = role:getProperty("advPass") local addPre addPre = function(chapterId) - local advData = csvdb["adv_chapterCsv"][chapterId] - for pre, l in ipairs(advData.prepose:toNumMap()) do + local advCsv = csvdb["adv_chapterCsv"][chapterId] + for pre, l in ipairs(advCsv.prepose:toNumMap()) do if (advPass[pre] or 0) < l then advPass[pre] = l addPre(pre) @@ -384,15 +384,15 @@ table.insert(helpDes, {"冒险到达指定层", "advt", "章节id", "层数"}) function _M.advt(role, pms) local chapterId = tonum(pms.pm1) local layer = tonum(pms.pm2) - local advData = csvdb["adv_chapterCsv"][chapterId] - if not advData then return "不存在的章节" end + local advCsv = csvdb["adv_chapterCsv"][chapterId] + if not advCsv then return "不存在的章节" end local advData = role:getAdvData() if not advData.chapterId then return "先随便开启一关" end if not advData:isEndless() then - layer = math.min(layer, advData.limitlevel) + layer = math.min(layer, advCsv.limitlevel) end _M.adv(role, {pm1 = chapterId, pm2 = layer - 1}) -- libgit2 0.21.2