diff --git a/src/game/game.service.ts b/src/game/game.service.ts index 57d0b74e58d647467d6b481f00b0831b08e65c82..4863cf067d2133cc428da74bb80b1ed6448bff41 100644 --- a/src/game/game.service.ts +++ b/src/game/game.service.ts @@ -141,6 +141,13 @@ export class GameService { game: gameId, }); await this.objectivePointRepository.save(newFlagbox); + // create base status for flagbox + this.flagboxEvent(gameId, { + node_id: flagbox.objectivePointDescription, + owner: 0, + action: 0, + capture: 0, + }); }); } else { await this.objectivePointRepository.delete({ game: id }); @@ -289,7 +296,7 @@ export class GameService { const objectiveRef = await this.objectivePointRepository.findOne({ where: { objectivePointDescription: data.node_id, game: gameId }, }); - data.oP_HistoryTimestamp = new Date(Date.now()).toLocaleString(); + data.oP_HistoryTimestamp = Date.now(); const eventUpdate = await this.objectivePoint_HistoryRepository.create({ oP_HistoryTimestamp: data.oP_HistoryTimestamp, action: data.action,