🐞 fix(gvg): 被挑战过程中不可离开城池

This commit is contained in:
luying
2023-03-03 15:26:46 +08:00
parent 8022805d70
commit d43c7f70e9
3 changed files with 18 additions and 12 deletions
+4
View File
@@ -342,6 +342,10 @@ export default class GVGTeam extends BaseModel {
public static async updateRoleInfo(roleId: string, info: { roleName?: string, lv?: number }) {
await GVGTeamModel.updateMany({ roleId }, { $set: info });
}
public static async checkLockTeam(roleId: string) {
return await GVGTeamModel.exists({ roleId, lockTime: { $gt: nowSeconds() } })
}
}
export const GVGTeamModel = getModelForClass(GVGTeam);