巅峰演武:赛季优化修改
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
// import { sendRolesMails } from '../../../services/mailService';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { HeroUpdate } from '../../../db/Hero';
|
||||
import { RoleUpdate } from '../../../db/Role';
|
||||
import { SkinUpdate } from '../../../db/Skin';
|
||||
import { RankFirstModel, RankFirstType } from '../../../db/RankFirst';
|
||||
import { Figure } from '../../../domain/dbGeneral';
|
||||
import { PVPConfigModel, PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
||||
import { treatRoleName, taflush, sendSurveyMail } from '../../../services/sdkService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { setApiIsClose } from '../../../services/chatService';
|
||||
import { setPvpSeasonNum, setPvpSettleSeasonNum } from '../../../services/timeTaskService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -23,7 +20,6 @@ export class RoleRemote {
|
||||
this.app = app;
|
||||
// this.channelService = app.get('channelService');
|
||||
this.loadRankFirst();
|
||||
this.initPvpSeasonNum();
|
||||
}
|
||||
// private channelService: ChannelService;
|
||||
|
||||
@@ -74,21 +70,17 @@ export class RoleRemote {
|
||||
}
|
||||
|
||||
|
||||
public setPvpSeasonNum(pvpConfig: PVPConfigType) {
|
||||
public async setPvpSeasonNum(pvpConfig: PVPConfigType) {
|
||||
try {
|
||||
if(pvpConfig) {
|
||||
this.app.set('pvpSeasonNum', pvpConfig.seasonNum);
|
||||
this.app.set('pvpSeasonEndTime', pvpConfig.seasonEndTime);
|
||||
}
|
||||
await setPvpSeasonNum(pvpConfig);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async initPvpSeasonNum() {
|
||||
public async setPvpSettleSeasonNum(pvpConfig: PVPConfigType) {
|
||||
try {
|
||||
let pvpConfig = await PVPConfigModel.findCurPVPConfig();
|
||||
this.setPvpSeasonNum(pvpConfig);
|
||||
await setPvpSettleSeasonNum(pvpConfig);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user