pvp:修复pvp赛季设置问题
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Application, ChannelService, FrontendSession, RemoterClass, HandlerService, } from 'pinus';
|
||||
import { PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { PVPConfigModel, PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
@@ -14,6 +14,7 @@ export class BattleRemote {
|
||||
constructor(private app: Application) {
|
||||
this.app = app;
|
||||
this.channelService = app.get('channelService');
|
||||
this.initPvpSeasonNum();
|
||||
}
|
||||
|
||||
private channelService: ChannelService;
|
||||
@@ -90,6 +91,11 @@ export class BattleRemote {
|
||||
}
|
||||
}
|
||||
|
||||
public async initPvpSeasonNum() {
|
||||
let pvpConfig = await PVPConfigModel.findCurPVPConfig();
|
||||
this.setPvpSeasonNum(pvpConfig);
|
||||
}
|
||||
|
||||
public setServerMainten(serverIds: number[], startTime: number, endTime: number) {
|
||||
setServerMainten(serverIds, startTime, endTime);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { resResult } from '../../../pubUtils/util';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { UserGuildType } from '../../../db/UserGuild';
|
||||
import { kickUser } from '../../../services/connectorService';
|
||||
import { PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { PVPConfigModel, PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { setDicAuctionTime } from '../../../services/guildActivityService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
@@ -17,6 +17,7 @@ export class ConnectorRemote {
|
||||
|
||||
constructor(private app: Application) {
|
||||
this.app = app;
|
||||
this.initPvpSeasonNum();
|
||||
}
|
||||
|
||||
public async remoteLogin(uid: string, message?: any) {
|
||||
@@ -89,6 +90,11 @@ export class ConnectorRemote {
|
||||
}
|
||||
}
|
||||
|
||||
public async initPvpSeasonNum() {
|
||||
let pvpConfig = await PVPConfigModel.findCurPVPConfig();
|
||||
this.setPvpSeasonNum(pvpConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 改变字典表中的拍卖行时间
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -241,8 +241,8 @@ module.exports = {
|
||||
'connector': [
|
||||
{ 'id': 'connector-server-4', 'host': '172.26.145.171', 'port': 9061, 'clientHost': '121.89.211.172', 'clientPort': 3050, 'frontend': true, "args": " --inspect=9237" },
|
||||
],
|
||||
'activity': [
|
||||
{ 'id': 'activity-server-2', 'host': '172.26.145.171', 'port': 9062, "args": " --inspect=9241" },
|
||||
'battle': [
|
||||
{ 'id': 'battle-server-2', 'host': '172.26.145.171', 'port': 9062 },
|
||||
]
|
||||
},
|
||||
'sq1': {
|
||||
|
||||
Reference in New Issue
Block a user