pvp:修复赛季相关
This commit is contained in:
@@ -930,10 +930,10 @@ export async function setRankRedisFromDb(type: string, args?: { serverId?: numbe
|
||||
await r.setRankWithGuildInfoArrParam(guild.code, [guild.lv, guild.activeWeekly, guild.activeUpdateTime], guild);
|
||||
}
|
||||
} else if (type == REDIS_KEY.PVP_RANK) {
|
||||
let pvpConfig = await PVPConfigModel.findCurPVPConfig();
|
||||
if(pvpConfig) {
|
||||
let ranks = await PvpDefenseModel.getRank(pvpConfig.seasonNum);//获得全服前1000名的排名,加入到redis中
|
||||
let r = new Rank(type, {});
|
||||
let seasonNum: number = pinus.app.get('pvpSeasonNum');
|
||||
if(seasonNum > 0) {
|
||||
let ranks = await PvpDefenseModel.getRank(seasonNum);//获得全服前1000名的排名,加入到redis中
|
||||
let r = new Rank(type, { seasonNum });
|
||||
r.setIsInit(true);
|
||||
for (let { roleId, role: _role, score, updatedAt } of ranks) {
|
||||
let role = <RoleType>_role;
|
||||
|
||||
Reference in New Issue
Block a user