feat(服务器): 修改服务器自动开服策略

This commit is contained in:
luying
2023-04-25 13:04:30 +08:00
parent af1f6b9d8c
commit 906449be60
14 changed files with 121 additions and 128 deletions

View File

@@ -59,32 +59,28 @@ export default class ServerStategy {
@prop({ required: true, default: 0 })
maxPlayerCnt: number; // 人数上限
@prop({ required: true, default: 0, type: Number })
timers: number[]; // 开服时间点
@prop({ required: true, default: 0 })
type: number; // 类型 1-定时 2-人数到了既时
@prop({ required: true, default: 0, type: String })
timers: string[]; // 开服时间点
@prop({ required: true, type: Number })
activityGroupId: number[]; // 选择活动组
@prop({ required: true, type: GMMail, _id: false })
openMail: GMMail;
@prop({ required: true, type: GMMail, _id: false })
circleMail: GMMail;
@prop({ required: true, default: 0 })
stopRegisterTime: number; // 关闭注册时间
constructor(stategy: ServerStategyUpdate & { hasOpenMail: boolean, hasCircleMail: boolean}) {
constructor(stategy: ServerStategyUpdate & { hasOpenMail: boolean}) {
this.isOpen = stategy.isOpen;
this.maxPlayerCnt = stategy.maxPlayerCnt;
this.type = stategy.type;
this.timers = stategy.timers;
this.activityGroupId = stategy.activityGroupId;
this.stopRegisterTime = stategy.stopRegisterTime;
if(stategy.hasCircleMail) {
this.circleMail = stategy.circleMail;
} else {
this.circleMail = null;
}
if(stategy.hasOpenMail) {
this.openMail = stategy.openMail;
} else {