feat(活动): 添加两种密卷 ed96aa4ac

This commit is contained in:
luying
2023-09-05 16:47:33 +08:00
parent 0b96397e80
commit 0e11635c5e
14 changed files with 167 additions and 17 deletions

View File

@@ -9,6 +9,7 @@ interface AuthorGachaDataInDb {
box: {
count: number; // 次数
rewards: string; // type&id&count, type: 1-武将 2-道具 3-礼包
isSpecial: boolean; // 重要节点奖励标记
hasReceived?: boolean; // 是否获得
}[];
}
@@ -45,10 +46,10 @@ export class AuthorGachaData extends ActivityBase {
public getShowResult() {
let box: AuthorGachaDataInDb['box'] = [];
for (let { count, rewards } of this.box) {
for (let { count, rewards, isSpecial = false } of this.box) {
let hasReceived = false;
if (this.record.indexOf(count) != -1) hasReceived = true;
box.push({ count, rewards, hasReceived })
box.push({ count, rewards, hasReceived, isSpecial })
}
return {