pvp:修复赛季结束
This commit is contained in:
@@ -66,11 +66,6 @@ export class PvpHandler {
|
||||
}
|
||||
update = { ...update, ...refOppObj }
|
||||
}
|
||||
|
||||
if (pvpDefense.isFirstEntry) {
|
||||
update.isFirstEntry = false;
|
||||
result.setIsFirstEntry(true);
|
||||
}
|
||||
|
||||
if(Object.keys(update).length > 0) {
|
||||
pvpDefense = await PvpDefenseModel.updateInfoAndInclude(roleId, update);
|
||||
@@ -83,8 +78,10 @@ export class PvpHandler {
|
||||
result.setOppPlayers(oppPlayersReturn);
|
||||
// 赛季结算
|
||||
let pvpSeasonResult = await PvpSeasonResultModel.getPvpSeasonResult(roleId);
|
||||
if (!!pvpSeasonResult && !!pvpSeasonResult.show) {
|
||||
if (!!pvpSeasonResult && !!pvpSeasonResult.show && pvpDefense.seasonNum == seasonNum) {
|
||||
result.setPvpSeasonResult(pvpSeasonResult);
|
||||
result.setIsFirstEntry(true);
|
||||
update.isFirstEntry = false;
|
||||
await PvpSeasonResultModel.setShow(roleId);
|
||||
}
|
||||
// 拍卖
|
||||
@@ -577,8 +574,8 @@ export class PvpHandler {
|
||||
}
|
||||
|
||||
async debugPvpSeasonResetTime(msg: { day: number }, session: BackendSession) {
|
||||
let { day: hour } = msg;
|
||||
let { seasonNum, seasonEndTime } = await pinus.app.rpc.systimer.systimerRemote.resetPvpSeasonTime.toServer('systimer-server-1', hour);
|
||||
let { day: minute } = msg;
|
||||
let { seasonNum, seasonEndTime } = await pinus.app.rpc.systimer.systimerRemote.resetPvpSeasonTime.toServer('systimer-server-1', minute);
|
||||
return resResult(STATUS.SUCCESS, { seasonNum, seasonEndTime });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user