This commit is contained in:
parent
715d29b286
commit
7b44c0e4cf
|
|
@ -11,10 +11,6 @@ class GameJob extends Job {
|
||||||
|
|
||||||
StartGame(id) {
|
StartGame(id) {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
const response = await axios(`${process.env.BASE_URL}/API/Game/${id}?t=${process.env.ARBITER_TOKEN}`).catch((_) => reject(_))
|
|
||||||
const { server_token, server_port, server_owner_id } = response.data
|
|
||||||
|
|
||||||
this.id = server_token
|
|
||||||
this.placeId = id
|
this.placeId = id
|
||||||
|
|
||||||
const started = await this.Start()
|
const started = await this.Start()
|
||||||
|
|
@ -34,8 +30,8 @@ class GameJob extends Job {
|
||||||
{ type: "LUA_TSTRING", value: process.env.BASE_URL },
|
{ type: "LUA_TSTRING", value: process.env.BASE_URL },
|
||||||
|
|
||||||
{ type: "LUA_TNUMBER", value: id },
|
{ type: "LUA_TNUMBER", value: id },
|
||||||
{ type: "LUA_TNUMBER", value: server_port },
|
{ type: "LUA_TNUMBER", value: 50001 },
|
||||||
{ type: "LUA_TNUMBER", value: server_owner_id },
|
{ type: "LUA_TNUMBER", value: 0 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}).catch((e) => reject(e))
|
}).catch((e) => reject(e))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue