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