测试环境可以给自己助力
This commit is contained in:
parent
15cf7d8449
commit
4968dae33e
@ -101,7 +101,8 @@ class BoxController extends BaseController {
|
|||||||
if (chest.status === ChestStatusEnum.LOCKED) {
|
if (chest.status === ChestStatusEnum.LOCKED) {
|
||||||
throw new ZError(14, 'chest is locked')
|
throw new ZError(14, 'chest is locked')
|
||||||
}
|
}
|
||||||
if (chest.user === uid) {
|
// 生产环境不能助力自己
|
||||||
|
if (process.env.NODE_ENV === 'production' && chest.user === uid) {
|
||||||
throw new ZError(15, 'can not enhance self')
|
throw new ZError(15, 'can not enhance self')
|
||||||
}
|
}
|
||||||
const score = Math.floor(Math.random() * (chest.bounsCfg[1] - chest.bounsCfg[0] + 1) + chest.bounsCfg[0])
|
const score = Math.floor(Math.random() * (chest.bounsCfg[1] - chest.bounsCfg[0] + 1) + chest.bounsCfg[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user