Commit cfc7a04a7d8a6d89e0cd9ff72b20d7e98c4ad84b

Authored by zhouhaihai
1 parent 031dcf99

map id 提供随机概率调整

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/adv/Adv.lua
... ... @@ -829,7 +829,7 @@ function Adv:randomMapId(chapterId, level)
829 829 local temp = csvdb["mapCsv"][mapId]
830 830 if temp and not lastMapIds[mapId] then
831 831 if AdvCommon.checkIsIn(level, temp.leveltype, temp.levellimit) then
832   - table.insert(pool, mapId)
  832 + pool[mapId] = {showup = temp.showup}
833 833 end
834 834 end
835 835 end
... ... @@ -837,7 +837,7 @@ function Adv:randomMapId(chapterId, level)
837 837 error("mapIds is empty!")
838 838 return
839 839 end
840   - return pool[math.randomInt(1, #pool)]
  840 + return math.randWeight(pool, "showup")
841 841 end
842 842  
843 843 -- log long1 字段被征用!!!
... ...