diff --git a/game-server/app/services/pvpService.ts b/game-server/app/services/pvpService.ts index e233c7d79..ff8c78173 100644 --- a/game-server/app/services/pvpService.ts +++ b/game-server/app/services/pvpService.ts @@ -245,6 +245,7 @@ async function generPlayerOppHis(pvpdefense: PvpDefenseType, roleId: string, pos if(!attr) continue; let attribute = attr.getAttributesToString(); let ce = attr.calCe(); + if(isNaN(ce)) ce = 0; heroInfo.setAttribute(attribute); let enemy = new PvpEnemies(warJson, heroInfo, hs ? hs.score : 0, ce); enemy.setOutIndex(h.order); @@ -385,7 +386,7 @@ export async function comsumeChallengeCnt(challengeCnt: number, challengeRefTime export async function sendLastSeasonRewardIfNotSent(pvpDefense: PvpDefenseType) { let seasonSettleNum: number = pinus.app.get('pvpSettleSeasonNum'); console.log('##### sendLastSeasonRewardIfNotSent seasonSettleNum', pvpDefense.roleId, pvpDefense.rankSeasonNum, seasonSettleNum) - if(seasonSettleNum && pvpDefense.rankSeasonNum < seasonSettleNum) { + if(seasonSettleNum && pvpDefense.rankSeasonNum <= seasonSettleNum) { let oldPvpCongig = await PVPConfigModel.findPVPConfig(seasonSettleNum); let result = await sendPVPRewardToUser(pvpDefense, seasonSettleNum, oldPvpCongig.seasonEndTime); pvpDefense = result.pvpDefense;