时间:整理时间方法
This commit is contained in:
@@ -12,7 +12,7 @@ import { getGuildChannelSid } from "./chatService";
|
||||
import { pinus } from "pinus";
|
||||
import { getRandEelm, sortArrRandom, resResult } from "../pubUtils/util";
|
||||
import { Rank } from "./rankService";
|
||||
import { getNextHourPoint } from "../pubUtils/timeUtil";
|
||||
import { getTimeFun } from "../pubUtils/timeUtil";
|
||||
|
||||
export class GateActivityObject {
|
||||
private gateHp: Map<string, number> = new Map(); // 城门血条,每个军团有一条血条 guildCode => hp
|
||||
@@ -268,7 +268,8 @@ export class RaceActivityObject {
|
||||
if(woodenHorse.status == 1 || woodenHorse.status == 2) { // 更新距离 // TODO 写进const表
|
||||
let r = new Rank(REDIS_KEY.RACE_ACTIVITY, { serverId }, true, 5);
|
||||
await r.setRank({guildCode}, Math.floor(woodenHorse.distance * 1000), woodenHorse.time - woodenHorse.startTime, false);
|
||||
await r.setExpire(getNextHourPoint(5));
|
||||
let tomorrow = <number>getTimeFun().getAfterDayWithHour();
|
||||
await r.setExpire(tomorrow);
|
||||
if (needSendEnd) { // 抵达后发送奖励,发送消息,结算
|
||||
await sendSingleRaceActEndMsg(guildCode, woodenHorse);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user