Commit 150e01af601909438f977746c61b5aafc30acc4b
1 parent
2cc20bbe
gmbug
Showing
1 changed file
with
8 additions
and
8 deletions
Show diff stats
src/actions/GmAction.lua
@@ -354,16 +354,16 @@ function _M.adv(role, pms) | @@ -354,16 +354,16 @@ function _M.adv(role, pms) | ||
354 | local chapterId = tonum(pms.pm1) | 354 | local chapterId = tonum(pms.pm1) |
355 | local layer = tonum(pms.pm2) | 355 | local layer = tonum(pms.pm2) |
356 | 356 | ||
357 | - local advData = csvdb["adv_chapterCsv"][chapterId] | ||
358 | - if not advData then return end | 357 | + local advCsv = csvdb["adv_chapterCsv"][chapterId] |
358 | + if not advCsv then return end | ||
359 | if math.floor(chapterId / 100) ~= 2 then | 359 | if math.floor(chapterId / 100) ~= 2 then |
360 | - layer = math.min(layer, advData.limitlevel) | 360 | + layer = math.min(layer, advCsv.limitlevel) |
361 | end | 361 | end |
362 | local advPass = role:getProperty("advPass") | 362 | local advPass = role:getProperty("advPass") |
363 | local addPre | 363 | local addPre |
364 | addPre = function(chapterId) | 364 | addPre = function(chapterId) |
365 | - local advData = csvdb["adv_chapterCsv"][chapterId] | ||
366 | - for pre, l in ipairs(advData.prepose:toNumMap()) do | 365 | + local advCsv = csvdb["adv_chapterCsv"][chapterId] |
366 | + for pre, l in ipairs(advCsv.prepose:toNumMap()) do | ||
367 | if (advPass[pre] or 0) < l then | 367 | if (advPass[pre] or 0) < l then |
368 | advPass[pre] = l | 368 | advPass[pre] = l |
369 | addPre(pre) | 369 | addPre(pre) |
@@ -384,15 +384,15 @@ table.insert(helpDes, {"冒险到达指定层", "advt", "章节id", "层数"}) | @@ -384,15 +384,15 @@ table.insert(helpDes, {"冒险到达指定层", "advt", "章节id", "层数"}) | ||
384 | function _M.advt(role, pms) | 384 | function _M.advt(role, pms) |
385 | local chapterId = tonum(pms.pm1) | 385 | local chapterId = tonum(pms.pm1) |
386 | local layer = tonum(pms.pm2) | 386 | local layer = tonum(pms.pm2) |
387 | - local advData = csvdb["adv_chapterCsv"][chapterId] | ||
388 | - if not advData then return "不存在的章节" end | 387 | + local advCsv = csvdb["adv_chapterCsv"][chapterId] |
388 | + if not advCsv then return "不存在的章节" end | ||
389 | 389 | ||
390 | local advData = role:getAdvData() | 390 | local advData = role:getAdvData() |
391 | if not advData.chapterId then | 391 | if not advData.chapterId then |
392 | return "先随便开启一关" | 392 | return "先随便开启一关" |
393 | end | 393 | end |
394 | if not advData:isEndless() then | 394 | if not advData:isEndless() then |
395 | - layer = math.min(layer, advData.limitlevel) | 395 | + layer = math.min(layer, advCsv.limitlevel) |
396 | end | 396 | end |
397 | 397 | ||
398 | _M.adv(role, {pm1 = chapterId, pm2 = layer - 1}) | 398 | _M.adv(role, {pm1 = chapterId, pm2 = layer - 1}) |