gm修改
This commit is contained in:
parent
2d1ab5421d
commit
0de502ba07
@ -149,18 +149,23 @@ function ServerDataManager:dealGM(params, callback)
|
||||
end
|
||||
end
|
||||
elseif args[1] == "pass_chapter" then
|
||||
local id = tonumber(args[2])
|
||||
if not id then
|
||||
local maxId = tonumber(args[2])
|
||||
if not maxId then
|
||||
return
|
||||
end
|
||||
local cfg = ConfigManager:getConfig("chapter")
|
||||
for id, info in ipairs(cfg) do
|
||||
if id > maxId then
|
||||
break
|
||||
end
|
||||
|
||||
local maxWave = info.box_num[#info.box_num]
|
||||
if maxWave then
|
||||
ServerGameData.ChapterData:fightChapter(id, true, maxWave)
|
||||
end
|
||||
ServerGameData.HeroData:tryUnlockHeroByChapterId(id)
|
||||
end
|
||||
ServerGameData.ChapterData.data.maxChapterId = id
|
||||
ServerGameData.ChapterData.data.maxChapterId = maxId
|
||||
end
|
||||
|
||||
ServerGameData:saveData()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user