pvp:修复pvp赛季设置问题

This commit is contained in:
luying
2022-01-13 18:15:57 +08:00
parent cc27f74179
commit afacfb59a1
4 changed files with 23 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import { getInitRoleInfo } from '../../../pubUtils/roleUtil';
import { DEFAULT_HEROES } from '../../../consts';
import { Figure } from '../../../domain/dbGeneral';
import { getDefaultRoleInfo } from '../../../services/roleService';
import { PVPConfigType } from '../../../db/SystemConfig';
import { PVPConfigModel, PVPConfigType } from '../../../db/SystemConfig';
import { treatRoleName, taflush } from '../../../services/sdkService';
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
@@ -25,6 +25,7 @@ export class RoleRemote {
this.channelService = app.get('channelService');
this.setInitRole();
this.loadRankFirst();
this.initPvpSeasonNum();
}
private channelService: ChannelService;
private initHeroes: Map<number, HeroUpdate> = new Map(); // hid => hero
@@ -122,6 +123,11 @@ export class RoleRemote {
}
}
public async initPvpSeasonNum() {
let pvpConfig = await PVPConfigModel.findCurPVPConfig();
this.setPvpSeasonNum(pvpConfig);
}
public async treatRoleName(roleId: string) {
await treatRoleName(roleId);
}