🐞 fix(活动): 宴请百家解锁条件修改

This commit is contained in:
luying
2023-07-07 19:51:45 +08:00
parent 363fd33f0a
commit 82f9f36321
3 changed files with 7 additions and 4 deletions
+3
View File
@@ -14,6 +14,9 @@ class EntertainRecord {
@prop({ required: true })
hid: number; // 冗余,武将id
@prop({ required: true })
index: number; // 冗余,武将id
@prop({ required: true })
reward: string; // 冗余,奖励
@@ -120,7 +120,7 @@ export class EntertainData extends ActivityBase {
this.todayPlayCnt = 0;
this.playCnt = 0;
let recByDay = new Map<number, number>();
for (let { id, hid, todayIndex } of (playerData.record || [])) {
for (let { id, index, todayIndex } of (playerData.record || [])) {
if (todayIndex == this.todayIndex) {
this.todayPlayCnt++;
this.playCnt++;
@@ -136,8 +136,8 @@ export class EntertainData extends ActivityBase {
let hero = this.findHeroById(id);
hero.incNum();
if(this.invitedHids.indexOf(hid) == -1) {
this.invitedHids.push(hid);
if(this.invitedHids.indexOf(index) == -1) {
this.invitedHids.push(index);
this.invitedHeroNum++;
}
}