抽卡:心愿单解锁
This commit is contained in:
@@ -103,6 +103,7 @@ export class GachaHandler {
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
gachaId, activityId,
|
||||
freeCount, refFreeTime: userGacha.refFreeTime, count: userGacha.count, point: userGacha.point, floor, hope,
|
||||
guideResultCount: userGacha.guideResultCount,
|
||||
// heroes: resultHeroes,
|
||||
addHeros: heroes,
|
||||
result: resultList
|
||||
@@ -452,7 +453,7 @@ export class GachaHandler {
|
||||
let gachaPull = new GachaPull(gachaId, lv, userHeroes);
|
||||
let { items, heroInfo, resultList, activityData } = gachaPull.pullBySimpleResult(simpleResult);
|
||||
|
||||
|
||||
userGacha = await UserGachaModel.updateInfo(roleId, gachaId, 0, { guideResultCount: count });
|
||||
|
||||
// 给东西
|
||||
// console.log('****', heroInfo)
|
||||
@@ -467,6 +468,8 @@ export class GachaHandler {
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
hasInit: !!role.gachaHasGuide,
|
||||
guideResultCount: userGacha.guideResultCount,
|
||||
count: userGacha.count,
|
||||
gachaId,
|
||||
// heroes: resultHeroes,
|
||||
addHeros: heroes,
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class UserGacha extends BaseModel {
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
activityId: number; // 限时抽卡对应活动id
|
||||
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
count: number; // 已抽卡次数
|
||||
|
||||
@@ -117,6 +117,9 @@ export default class UserGacha extends BaseModel {
|
||||
@prop({ required: true, default: 0 })
|
||||
guideCount: number; // 预抽卡次数
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
guideResultCount: number; // 预抽卡次数
|
||||
|
||||
@prop({ required: true, type: SimpleResult, default: [], _id: false })
|
||||
guideResultList: SimpleResult[]; // 预抽卡结果
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ export class GachaListReturn {
|
||||
freeCount: number = 0; // 免费次数
|
||||
refFreeTime: number = 0; // 免费次数下次刷新时间
|
||||
count: number = 0; // 整体已抽卡次数
|
||||
guideResultCount: number = 0; // 引导已抽卡次数
|
||||
floor: Floor[] = []; // 整体保底
|
||||
hope: Hope[] = []; // 心愿单
|
||||
point: number = 0; // 积分
|
||||
@@ -107,6 +108,7 @@ export class GachaListReturn {
|
||||
this.point = userGacha.point;
|
||||
this.turntable = userGacha.turntable;
|
||||
this.pickHero = userGacha.pickHero;
|
||||
this.guideResultCount = userGacha.guideResultCount||0;
|
||||
} else {
|
||||
this.floor = getFloorStatus(dicGacha.id, []);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user