抽卡:修复时间戳
This commit is contained in:
@@ -1,19 +1,17 @@
|
||||
import { Application, BackendSession } from "pinus";
|
||||
import { resResult, getRandomWithWeight } from "../../../pubUtils/util";
|
||||
import { STATUS, GACHA_ID, GACHA_CONTENT_TYPE, GACHA_OCCUPY_HID } from "../../../consts";
|
||||
import { STATUS, GACHA_ID } from "../../../consts";
|
||||
import { gameData } from "../../../pubUtils/data";
|
||||
import { GachaListReturn, Floor, Hope, GachaResult } from "../../../domain/activityField/gachaField";
|
||||
import { GachaListReturn, GachaResult } from "../../../domain/activityField/gachaField";
|
||||
import { UserGachaModel } from "../../../db/UserGacha";
|
||||
import { refreshGacha, getFloorResult, getResultFromContentId, transPiece } from "../../../services/gachaService";
|
||||
import { RoleModel } from "../../../db/Role";
|
||||
import { HeroModel, HeroUpdate } from "../../../db/Hero";
|
||||
import { RewardInter } from "../../../pubUtils/interface";
|
||||
import { handleCost, createHeroes, addItems } from "../../../services/rewardService";
|
||||
import { CounterModel } from "../../../db/Counter";
|
||||
import { getNextTime, getAfterDateByDay } from "../../../pubUtils/timeUtil";
|
||||
import { getAfterDateByDay } from "../../../pubUtils/timeUtil";
|
||||
import { UserGachaRecModel } from "../../../db/UserGachaRec";
|
||||
|
||||
|
||||
export default function (app: Application) {
|
||||
return new GachaHandler(app);
|
||||
}
|
||||
@@ -38,8 +36,8 @@ export class GachaHandler {
|
||||
if(id == GACHA_ID.TIMELIMIT) continue; // 不包括限时
|
||||
|
||||
let userGacha = userGachaList.find(cur => cur.gachaId == id);
|
||||
userGacha = await refreshGacha(dicGacha, userGacha);
|
||||
console.log(JSON.stringify(userGacha))
|
||||
if(userGacha)
|
||||
userGacha = await refreshGacha(dicGacha, userGacha);
|
||||
let param = new GachaListReturn(dicGacha, userGacha);
|
||||
list.push(param);
|
||||
}
|
||||
@@ -97,7 +95,7 @@ export class GachaHandler {
|
||||
}
|
||||
resultList.push(result);
|
||||
}
|
||||
console.log('***', dicGacha.free.count, dicGacha.free.day, freeCount, count);
|
||||
|
||||
let costNum = count;
|
||||
if(dicGacha.free.count > 0) {
|
||||
if(count > dicGacha.free.count - freeCount) {
|
||||
|
||||
Reference in New Issue
Block a user