diff --git a/src/adv/Adv.lua b/src/adv/Adv.lua index e1bc4fe..988c336 100644 --- a/src/adv/Adv.lua +++ b/src/adv/Adv.lua @@ -829,7 +829,7 @@ function Adv:randomMapId(chapterId, level) local temp = csvdb["mapCsv"][mapId] if temp and not lastMapIds[mapId] then if AdvCommon.checkIsIn(level, temp.leveltype, temp.levellimit) then - table.insert(pool, mapId) + pool[mapId] = {showup = temp.showup} end end end @@ -837,7 +837,7 @@ function Adv:randomMapId(chapterId, level) error("mapIds is empty!") return end - return pool[math.randomInt(1, #pool)] + return math.randWeight(pool, "showup") end -- log long1 字段被征用!!! -- libgit2 0.21.2