✨ feat(活动): 新将擢迁保底显示
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ActivityModelType } from '../../db/Activity';
|
||||
import { UserGachaType } from '../../db/UserGacha';
|
||||
import { DicGacha } from '../../pubUtils/dictionary/DicGacha';
|
||||
import { getGachaRemainFloor } from '../../pubUtils/util';
|
||||
import { ActivityBase } from './activityField';
|
||||
|
||||
interface NewHeroGachaItemInDb {
|
||||
@@ -29,6 +30,7 @@ export class NewHeroGachaData extends ActivityBase {
|
||||
pickHero: number = 0;
|
||||
count: number = 0;
|
||||
isFree: boolean = false; // 免费次数
|
||||
remainFloor: number = 0;
|
||||
|
||||
constructor(activityData: ActivityModelType, createTime: number, serverTime: number) {
|
||||
super(activityData, createTime, serverTime)
|
||||
@@ -59,6 +61,7 @@ export class NewHeroGachaData extends ActivityBase {
|
||||
this.pickHero = data.pickHero;
|
||||
this.count = data.count;
|
||||
this.isFree = data.freeCount < dic?.free.count;
|
||||
this.remainFloor = getGachaRemainFloor(data.gachaId, data.floor||[])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user