From e0643e39f8ddde09eccf28ae9ac67c1718d68d5b Mon Sep 17 00:00:00 2001 From: luying Date: Thu, 1 Jun 2023 14:15:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(pvp):=201000=E5=90=8D?= =?UTF-8?q?=E4=BB=A5=E5=90=8E=E7=9A=84=E8=B5=9B=E5=AD=A3=E5=A5=96=E5=8A=B1?= =?UTF-8?q?=E6=9C=AA=E8=8E=B7=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/pvpService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;