增加一个gm

This commit is contained in:
xiekaidong 2023-04-23 18:33:21 +08:00
parent e88e056b50
commit eb3dfd49e8
2 changed files with 13 additions and 0 deletions

View File

@ -37,6 +37,13 @@ arg1:英雄id
Example: add_hero 1]],
type = "add_hero"
},
{
title = "设置通关章节",
desc = [[ type:pass_chapter
arg1:id
Example: pass_chapter 1]],
type = "pass_chapter"
},
}
return GMConst

View File

@ -147,6 +147,12 @@ function ServerDataManager:dealGM(params, callback)
end
end
end
elseif args[1] == "pass_chapter" then
local id = tonumber(args[2])
if not id then
return
end
ServerGameData.ChapterData.data.maxChapterId = id
end
ServerGameData:saveData()