From 48eb31d55b8e57544c55622f8736a83231d5e070 Mon Sep 17 00:00:00 2001 From: luying Date: Tue, 23 May 2023 16:48:58 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E8=8A=82=E6=97=A5=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8):=20=E5=88=92=E8=88=B9=E5=85=8D=E8=B4=B9=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/domain/activityField/dragonBoatField.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/shared/domain/activityField/dragonBoatField.ts b/shared/domain/activityField/dragonBoatField.ts index 4f652238b..8cd92dab0 100644 --- a/shared/domain/activityField/dragonBoatField.ts +++ b/shared/domain/activityField/dragonBoatField.ts @@ -80,9 +80,18 @@ export class DragonBoatData extends ActivityBase { this.buyCnt = playerData.buyCnt||0; this.todayPlayCnt = 0; this.playCnt = 0; + let recByDay = new Map(); for(let { id, todayIndex, rewards } of (playerData.record||[])) { - if(todayIndex == this.todayIndex) this.todayPlayCnt ++; - this.playCnt ++; + if(todayIndex == this.todayIndex) { + this.todayPlayCnt ++; + this.playCnt ++; + } else { + let n = recByDay.get(todayIndex)||0; + if(n >= this.freeCnt) { // 不包含之前免费玩的次数 + this.playCnt ++; + } + recByDay.set(todayIndex, n + 1); + } let route = this.routes.find(cur => cur.id == id); if(route) route.setPass(rewards); }