diff --git a/game-server/app/services/pvpService.ts b/game-server/app/services/pvpService.ts index 2ae751b92..f92cc42e0 100644 --- a/game-server/app/services/pvpService.ts +++ b/game-server/app/services/pvpService.ts @@ -518,7 +518,10 @@ export async function generPVPOppRecInfo(isSuccess: boolean, curOpp: OppPlayer, * pvp定时任务赛季结算 * @param obj */ - export async function pvpSeasonEnd(pvpConfig: PVPConfigType) { + export async function pvpSeasonEnd(seasonNum: number) { + let pvpConfig = await PVPConfigModel.findPVPConfig(seasonNum); + if(pvpConfig.hasSettleReward) return; + console.log('exce pvpSeasonEnd' + pvpConfig.seasonNum); let resultMaxRank = gameData.pvpRankMax.max;//根据排行榜的奖励表,获得最大排名挡位的最小值,其余不在结算中结算的玩家按照最大排名挡位在登录或进入pvp时结算 let r = new Rank(REDIS_KEY.PVP_RANK, { seasonNum: pvpConfig.seasonNum }, false, resultMaxRank.min - 1); @@ -546,12 +549,12 @@ export async function sendPVPRewardToUser(pvpDefense: PvpDefenseType, seasonNum: if (!!rankGoods.length) //排名奖励 await sendMailByContent(MAIL_TYPE.PVP_RANK_REWARD, pvpDefense.roleId, { params: [JSON.stringify(seasonNum), (rankLv > 1000 ? '999+' : JSON.stringify(rankLv))], - goods: rankGoods, endTime: seasonEndTime, notPush + goods: rankGoods, notPush }); if (!!heroGoods.length) //武将功勋奖励 await sendMailByContent(MAIL_TYPE.PVP_RESULT, pvpDefense.roleId, { params: [JSON.stringify(seasonNum)], - goods: heroGoods, endTime: seasonEndTime, notPush + goods: heroGoods, notPush }); return await resetPvpScores(pvpDefense, seasonNum + 1, pvpSeasonResult); diff --git a/game-server/app/services/timeTaskService.ts b/game-server/app/services/timeTaskService.ts index 1f176f233..f26ff685a 100644 --- a/game-server/app/services/timeTaskService.ts +++ b/game-server/app/services/timeTaskService.ts @@ -103,7 +103,7 @@ async function setPvpSeason(isForce?: boolean, hour?: number) { console.log(`******** setPvpSeason2: during-${during}, seasonEndTime-${pvpConfig?.seasonEndTime}, now-${nowSeconds()}`) if(!pvpConfig || pvpConfig.seasonEndTime <= nowSeconds() || isForce) { if(pvpConfig && !pvpConfig.hasSettleReward) { - await pvpSeasonEnd(pvpConfig); + await pvpSeasonEnd(pvpConfig.seasonNum); } let lastSeasonNum = pvpConfig? pvpConfig.seasonNum: 0; @@ -153,10 +153,10 @@ async function setPvpSeasonMakeRewardJob(pvpConfig: PVPConfigType) { } if(!pvpConfig) return; if(pvpConfig.seasonRewardTime < nowSeconds() && !pvpConfig.hasSettleReward) { // 未发奖励 - await pvpSeasonEnd(pvpConfig); + await pvpSeasonEnd(pvpConfig.seasonNum); } else { seasonMakeRewardTimJobId = scheduleJob('seasonMakeRewardTimJobId', pvpConfig.seasonRewardTime, async () => { - await pvpSeasonEnd(pvpConfig); + await pvpSeasonEnd(pvpConfig.seasonNum); }); } }