军团活动:修复排行榜时间错误
This commit is contained in:
@@ -185,12 +185,14 @@ export class GateActivityHandler {
|
||||
|
||||
let myR = new Rank(REDIS_KEY.USER_GATE_ACTIVITY, { serverId, guildCode }, true);
|
||||
let r = new Rank(REDIS_KEY.GATE_ACTIVITY, { serverId }, true);
|
||||
if (isSuccess) {
|
||||
if (isSuccess && statusResult.status == GUILD_ACTIVITY_STATUS.START) {
|
||||
let obj = getGateActivityObj();
|
||||
let score = gameData.gateActivityPoint.get(GET_POINT_WAYS.DEFENSE_SUCCESS);
|
||||
// 更新redis数据
|
||||
await myR.setRank({ roleId }, [score, Date.now()], true);
|
||||
|
||||
await r.setRank({ guildCode }, [score, Date.now()], true);
|
||||
if(score > 0) {
|
||||
await myR.setRankWithRoleInfo(roleId, score, obj.getTimeGap(), null, true);
|
||||
await r.setRankWithGuildInfo(guildCode, score, obj.getTimeGap(), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
// 返回当前军团总军功
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { sendAllGuildRanks, calWoodenHorseAndSend, sendRaceStartMsg, setDicGuildActivity, setDicAuctionTime, settleGuildActivityReward, gateActivityStart, cityActivityStart } from '../../../services/guildActivity/guildActivityService';
|
||||
import { sendAllGuildRanks, calWoodenHorseAndSend, sendRaceStartMsg, setDicGuildActivity, setDicAuctionTime, settleGuildActivityReward, gateActivityStart, cityActivityStart, clearActivityObj } from '../../../services/guildActivity/guildActivityService';
|
||||
import { gameData } from '../../../pubUtils/data';
|
||||
import { setWeek } from '../../../pubUtils/timeUtil';
|
||||
import { sendUngotDividend } from '../../../services/auctionService';
|
||||
@@ -176,4 +176,12 @@ export class GuildActivityRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
async clearActivityObj() {
|
||||
try {
|
||||
clearActivityObj();
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user