增加一个用于debug的游戏开始时间
This commit is contained in:
parent
d5ae3f9b84
commit
2d31ec5c9a
@ -107,8 +107,10 @@ class PuzzleController extends BaseController {
|
||||
@role('anon')
|
||||
@router('post /api/:accountid/puzzle/match')
|
||||
async joinMultipleGame(req, res) {
|
||||
const { shop, accountid } = req.params
|
||||
const { shop, accountid, debug_begin_sec } = req.params
|
||||
let data = { shop }
|
||||
let beginSecond = (debug_begin_sec ? +debug_begin_sec : 20)
|
||||
beginSecond = (Math.max(2, beginSecond)) * 1000
|
||||
/**
|
||||
* 查找店铺设置, 查看一定时间内是否有要开始的活动
|
||||
* 如果有, 则读取配置, 加入开始游戏的定时
|
||||
@ -146,7 +148,6 @@ class PuzzleController extends BaseController {
|
||||
history.members.set(accountid, new PuzzleStatusClass())
|
||||
history.room = roomId
|
||||
//TODO: 根据配置赋值
|
||||
const beginSecond = 20 * 1000
|
||||
history.total = 10
|
||||
history.begin = Date.now() + beginSecond
|
||||
beginTime = history.begin
|
||||
|
Loading…
x
Reference in New Issue
Block a user