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