🐞 fix(活动): 鹊桥活动挑战次数在完成之后才算
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user