活动:修改结构

This commit is contained in:
qiaoxin
2021-06-30 11:41:38 +08:00
parent 550ec29842
commit 3cff8acf3a
60 changed files with 260 additions and 169 deletions
+8 -8
View File
@@ -30,7 +30,7 @@ export class GachaData extends ActivityBase {
let dicGacha = gameData.gacha.get(this.gachaId);
this.pickHero = userGacha.pickHero;
this.freeCount = userGacha.freeCount;
if(dicGacha.free.count > 0) {
if (dicGacha.free.count > 0) {
let f = getTimeFun(userGacha.refFreeTime);
this.refFreeTime = <number>f.getAfterDayWithHour(dicGacha.free.day);
}
@@ -38,8 +38,8 @@ export class GachaData extends ActivityBase {
this.floor = userGacha.floor;
}
constructor(activityData: ActivityModelType) {
super(activityData)
constructor(activityData: ActivityModelType, createTime: number) {
super(activityData, createTime)
}
}
@@ -91,13 +91,13 @@ export class GachaListReturn {
point: number = 0; // 积分
turntable: Turntable[] = []; // 转盘记录
pickHero: number = 0; // 玩家选择的武将
constructor(dicGacha: DicGacha, userGacha: UserGachaType) {
this.gachaId = dicGacha.id;
if(userGacha) {
if (userGacha) {
this.freeCount = userGacha.freeCount;
if(dicGacha.free.count > 0) {
if (dicGacha.free.count > 0) {
let f = getTimeFun(userGacha.refFreeTime);
this.refFreeTime = <number>f.getAfterDayWithHour(dicGacha.free.day);
}
@@ -130,7 +130,7 @@ export class GachaResult {
}
setSetPickHero(hid: number) {
if(hid > 0 && this.hid == GACHA_OCCUPY_HID) {
if (hid > 0 && this.hid == GACHA_OCCUPY_HID) {
this.hid = hid;
}
}