移除 setLocalHours
This commit is contained in:
@@ -4,7 +4,7 @@ import Role, { RoleModel, RoleType } from '../db/Role';
|
||||
import { PvpDefenseModel } from '../db/PvpDefense';
|
||||
|
||||
import { getWarJsons, getGamedata, getExpeditionById } from '../pubUtils/gamedata';
|
||||
import { decodeStr, resResult, setLocalHours, shouldRefresh } from '../pubUtils/util';
|
||||
import { decodeStr, resResult, shouldRefresh } from '../pubUtils/util';
|
||||
import { EXPEDITION_CONST, HERO_CE_RATIO, getAttrCeRatio } from '../consts';
|
||||
import { getAtrrNameById} from '../consts';
|
||||
import { ExpeditionWarRecordModel } from '../db/ExpeditionWarRecord';
|
||||
@@ -149,7 +149,7 @@ export async function getCEScaleAndRange(roleId: string, curDicExpedition: any)
|
||||
// 匹配,判断是不是新手期
|
||||
const role = await RoleModel.findByRoleId(roleId);
|
||||
let now = new Date();
|
||||
let today = setLocalHours(0, now);
|
||||
let today = now.setHours(0, 0, 0, 0);;
|
||||
let isNew = today - role.createdAt.getTime() <= 3*24*60*60*1000;
|
||||
let scale = isNew?curDicExpedition.CEScaleNew:curDicExpedition.CEScale;
|
||||
let range = isNew?curDicExpedition.CERangeNew:curDicExpedition.CERange;
|
||||
|
||||
Reference in New Issue
Block a user