时间:整理时间方法

This commit is contained in:
luying
2021-05-08 19:13:44 +08:00
parent 6f03a96c51
commit 78e3c26a7a
51 changed files with 662 additions and 411 deletions
+3 -2
View File
@@ -4,7 +4,7 @@
*/
import { BattleDropModel } from '../db/BattleDrop';
import { getRefTime, getRandEelmWithWeight, getRandSingleEelm } from '../pubUtils/util';
import { getRandEelmWithWeight, getRandSingleEelm } from '../pubUtils/util';
import { BATTLE_REWARD_TYPE, BLUEPRT_CONST } from '../consts';
import { addItems } from './rewardService';
import { BattleBlueprtDropModel } from '../db/BattleBlueprtDrop'
@@ -12,6 +12,7 @@ import { RoleModel } from '../db/Role';
import { gameData } from '../pubUtils/data';
import { DicWar } from '../pubUtils/dictionary/DicWar';
import { RewardInter } from '../pubUtils/interface';
import { getZeroPointD } from '../pubUtils/timeUtil';
export class WarReward {
private roleId: string;
@@ -117,7 +118,7 @@ export class WarReward {
}
private async handlerBlueprtReward(num: number) {
const refTime = getRefTime(new Date(), BLUEPRT_CONST.REFRESH_TIME);
const refTime = getZeroPointD();
const battleBlueprtDrop = await BattleBlueprtDropModel.findByTime(this.roleId, refTime);
if(battleBlueprtDrop) {
let { getNum = 0, curCostAp = 0, getSum = 0, costAp = 0 } = battleBlueprtDrop;