🐞 fix(服务器): 自动开服时更新战区
This commit is contained in:
@@ -167,5 +167,10 @@ export async function createNewServer(region: RegionType ,serverId: number, para
|
|||||||
await RegionModel.newServer(region.id, newServer);
|
await RegionModel.newServer(region.id, newServer);
|
||||||
await redisClient().hsetAsync(REDIS_KEY.SERVER, `${newServer.id}`, `${newServer.name}`);
|
await redisClient().hsetAsync(REDIS_KEY.SERVER, `${newServer.id}`, `${newServer.name}`);
|
||||||
await redisClient().hsetAsync(REDIS_KEY.SERVER_OPEN_TIME, `${newServer.id}`, `${newServer.openTime}`);
|
await redisClient().hsetAsync(REDIS_KEY.SERVER_OPEN_TIME, `${newServer.id}`, `${newServer.openTime}`);
|
||||||
|
await pinus.app.rpc.guild.guildRemote.setServerGroup.broadcast();
|
||||||
|
await pinus.app.rpc.chat.chatRemote.setServerGroup.broadcast();
|
||||||
|
await pinus.app.rpc.connector.connectorRemote.setServerGroup.broadcast();
|
||||||
|
await pinus.app.rpc.gm.gmRemote.setServerGroup.broadcast();
|
||||||
|
await pinus.app.rpc.systimer.systimerRemote.setServerGroup.broadcast();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@ export default class ServerStategy {
|
|||||||
@prop({ required: true, default: 0 })
|
@prop({ required: true, default: 0 })
|
||||||
type: number; // 类型 1-定时 2-人数到了既时
|
type: number; // 类型 1-定时 2-人数到了既时
|
||||||
|
|
||||||
@prop({ required: true, default: 0, type: String })
|
@prop({ required: true, type: String })
|
||||||
timers: string[]; // 开服时间点
|
timers: string[]; // 开服时间点
|
||||||
|
|
||||||
@prop({ required: true, type: Number })
|
@prop({ required: true, type: Number })
|
||||||
@@ -78,7 +78,7 @@ export default class ServerStategy {
|
|||||||
this.isOpen = stategy.isOpen;
|
this.isOpen = stategy.isOpen;
|
||||||
this.maxPlayerCnt = stategy.maxPlayerCnt;
|
this.maxPlayerCnt = stategy.maxPlayerCnt;
|
||||||
this.type = stategy.type;
|
this.type = stategy.type;
|
||||||
this.timers = stategy.timers;
|
if(stategy.timers) this.timers = stategy.timers;
|
||||||
this.activityGroupId = stategy.activityGroupId;
|
this.activityGroupId = stategy.activityGroupId;
|
||||||
this.stopRegisterTime = stategy.stopRegisterTime;
|
this.stopRegisterTime = stategy.stopRegisterTime;
|
||||||
if(stategy.hasOpenMail) {
|
if(stategy.hasOpenMail) {
|
||||||
|
|||||||
Reference in New Issue
Block a user