抽卡:免费抽卡次数

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
@@ -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,
@@ -275,7 +275,7 @@ export class NormalBattleHandler {
pushVestigeFirstMsg(roleId, roleName, serverId, warInfo.warType, warInfo.war_id);
}
// 是否首次3星
if (newStar == 3 && (!isFirst || curWarStar.star != 3)) {
if (newStar == 3 && (isFirst || curWarStar.star != 3)) {
warReward.setCondition(1, true);
}