🐞 fix(活动): 鹊桥活动挑战次数在完成之后才算

This commit is contained in:
luying
2023-07-21 19:00:21 +08:00
parent 10b5cc7936
commit e3bdaad089

View File

@@ -67,14 +67,16 @@ export class QixiData extends ActivityBase {
playerData.record.sort((a, b) => a.time.getTime() - b.time.getTime());
for(let data of playerData.record) {
let { todayIndex, afterProgress, progress, hasPass, isSkip } = data;
if(todayIndex == this.todayIndex && hasPass) this.todayPlayCnt ++;
if(hasPass) this.playCnt ++;
if(afterProgress >= this.maxProgress) {
if(todayIndex == this.todayIndex && hasPass) this.todayPlayCnt ++;
if(hasPass) this.playCnt ++;
}
if(!isSkip) this.progress = afterProgress||progress;
this.records.push(data);
}
if(this.todayPlayCnt >= this.freeCntDaily && this.playCnt < this.freeCnt) {
for(let i = 1; i <= this.todayIndex; i++) {
let times = playerData.record.filter(cur => cur.todayIndex == i && cur.hasPass).length;
let times = playerData.record.filter(cur => cur.todayIndex == i && cur.hasPass && cur.afterProgress >= this.maxProgress).length;
if(times < this.freeCntDaily) {
this.recordTodayIndex = i; break;
}