战报添加时间戳
This commit is contained in:
@@ -18,6 +18,7 @@ import { BattleRecordModel } from '../../../db/BattleRecord';
|
||||
import { PvpRecordModel, HeroesRecord } from '../../../db/PvpRecord';
|
||||
import { existsRank, initRank, getRank, setRank, getMyRank } from '../../../services/redisService';
|
||||
import { handleCost } from '../../../services/rewardService';
|
||||
import { nowSeconds } from '../../../pubUtils/timeUtil';
|
||||
|
||||
export default function(app: Application) {
|
||||
return new PvpHandler(app);
|
||||
@@ -185,7 +186,7 @@ export class PvpHandler {
|
||||
const defenseInfo = await generPVPOppRecInfo(isSuccess, curOpp, oppRoleId, oppHeroes, role.lv);
|
||||
|
||||
// 战报记录
|
||||
await PvpRecordModel.createRec({roleId1: roleId, roleId2: oppRoleId, warId: BattleRecord.battleId, attackInfo, defenseInfo});
|
||||
await PvpRecordModel.createRec({roleId1: roleId, roleId2: oppRoleId, warId: BattleRecord.battleId, attackInfo, defenseInfo, createTime: nowSeconds()});
|
||||
|
||||
// 刷新对手
|
||||
let newOppPlayers: Array<OppPlayers> = await refreshEnemies(role, score, pLv);
|
||||
|
||||
Reference in New Issue
Block a user