抽卡:免费抽卡次数

This commit is contained in:
luying
2022-08-03 11:27:20 +08:00
parent a77304b271
commit e1e9da4a80
7 changed files with 29 additions and 25 deletions

View File

@@ -93,12 +93,14 @@ export class GachaHandler {
userGacha = await UserGachaModel.updateInfo(roleId, gachaId, activityId, {
freeCount, hope, floor, count: historyCount + count
});
let newDicGacha = getDicGachaByGachaCnt(dicGacha, userGacha.count);
await UserGachaRecModel.createRec(roleId, gachaId, activityId, count, resultList);
if(dicGacha.isTask) await checkTaskInGacha(serverId, roleId, sid, count, resultHeroes, resultList, false);
return resResult(STATUS.SUCCESS, {
gachaId, activityId,
freeCount, refFreeTime: userGacha.refFreeTime, count: userGacha.count, point: userGacha.point, floor, hope,
isFree: freeCount < newDicGacha.free.count, cost: newDicGacha.cost,
count: userGacha.count, point: userGacha.point, floor, hope,
// heroes: resultHeroes,
addHeros: heroes,
result: resultList,