Commit fed94c7ce111662be383a3d680f0a83848484ad8
1 parent
8cfb25d7
错误的函数
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/adv/AdvMap.lua
... | ... | @@ -313,13 +313,13 @@ function Map:openBlocksIsMonsterByRoom(roomId, count, isPlayer, ignoreBack) |
313 | 313 | end |
314 | 314 | end |
315 | 315 | |
316 | - if not count or count == -1 or count >= len(allBlock) then | |
316 | + if not count or count == -1 or count >= #allBlock then | |
317 | 317 | for _, blockId in ipairs(allBlock) do |
318 | 318 | openBlock(blockId) |
319 | 319 | end |
320 | 320 | else |
321 | 321 | for i = 1, count do |
322 | - local idx = math.randomInt(1, len(allBlock)) | |
322 | + local idx = math.randomInt(1, #allBlock) | |
323 | 323 | openBlock(allBlock[idx]) |
324 | 324 | table.remove(allBlock, idx) |
325 | 325 | end | ... | ... |