diff --git a/game-server/app/services/timeTaskService.ts b/game-server/app/services/timeTaskService.ts index ee24dcb25..c0a51e81f 100644 --- a/game-server/app/services/timeTaskService.ts +++ b/game-server/app/services/timeTaskService.ts @@ -110,6 +110,7 @@ export async function checkResult(pvpDefense: PvpDefenseType, seasonNum: number, } let heroGoods = []; let score = 0; + let oldHeroScores = deepCopy(pvpDefense.heroScores) for (let i = 0; i < pvpDefense.heroScores.length; i++) { let heroScore = pvpDefense.heroScores[i]; let pvpHeroReward = getScore(pvpHeroRewards, heroScore.score); @@ -128,7 +129,7 @@ export async function checkResult(pvpDefense: PvpDefenseType, seasonNum: number, } let pLv = getLvByScore(pvpDefense.heroScores); await PvpSeasonResultModel.updatePvpSeasonResult(pvpDefense.roleId, { - oldSeasonData:{refOppCnt: pvpDefense.refOppCnt, rankLv, score: pvpDefense.score, pLv: oldPLv, heroScores: deepCopy(pvpDefense.heroScores), + oldSeasonData:{refOppCnt: pvpDefense.refOppCnt, rankLv, score: pvpDefense.score, pLv: oldPLv, heroScores: oldHeroScores, seasonNum: pvpDefense.seasonNum, challengeCnt, challengeRefTime, seasonEndTime: oldSeasonEndTime }, heroGoods, rankGoods, show: true}); return { rankLv, score, pLv, heroScores: pvpDefense.heroScores, seasonNum, challengeCnt:PVP.PVP_CHALLENGE_COUNTS, challengeRefTime:0, oldSeasonEndTime, goods}; @@ -175,7 +176,7 @@ async function setNextPvpTime(notSetNext: boolean) { return { seasonEndTime, seasonNum , oldSeasonEndTime: 0}; } let oldSeasonEndTime = seasonEndTime; - seasonEndTime = (PVP.PVP_SEASON_DAYS) * PER_DAY + seasonEndTime; + seasonEndTime = (PVP.PVP_SEASON_DAYS + 1) * PER_DAY + getTodayZeroPoint(); await SystemConfigModel.updateSeason(seasonEndTime, oldSeasonEndTime); let settleTime = (seasonEndTime - SETTLE_DIFF)* PER_SECOND; seasonJobId = scheduleJob(settleTime, setPvpSeasonResult, { name: 'setPvpSeasonResult' });