Commit cfc7a04a7d8a6d89e0cd9ff72b20d7e98c4ad84b

Authored by zhouhaihai
1 parent 031dcf99

map id 提供随机概率调整

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