fix 未找到对手
This commit is contained in:
@@ -261,6 +261,9 @@ export class PvpHandler {
|
||||
// 战报记录
|
||||
await PvpRecordModel.createRec({roleId1: roleId, roleId2: robotIdComBack(oppRoleId), warId: BattleRecord.battleId, attackInfo, defenseInfo, createTime: nowSeconds()});
|
||||
|
||||
// 对手记录更新
|
||||
await PvpHistoryOppModel.setStatus(roleId, oppRoleId, 1);
|
||||
|
||||
// 刷新对手
|
||||
let newOppPlayers: Array<OppPlayers> = await refreshEnemies(role, score, pLv);
|
||||
|
||||
@@ -282,9 +285,6 @@ export class PvpHandler {
|
||||
let params = new RankParam(roleName, role.lv, role.vLv, role.headHid, role.sHid, role.title);
|
||||
await setRank(REDIS_KEY.PVP_RANK, 0, roleId, pvpDefense.score, pvpDefense.updatedAt.getTime(), params);
|
||||
let myRank = await getMyRank(REDIS_KEY.PVP_RANK, 0, roleId);
|
||||
|
||||
// 对手记录更新
|
||||
await PvpHistoryOppModel.setStatus(roleId, oppRoleId, 1);
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
battleCode, isSuccess,
|
||||
|
||||
Reference in New Issue
Block a user