(武将): 设置副将时从阵容中删除
This commit is contained in:
@@ -352,6 +352,11 @@ export default class GVGTeam extends BaseModel {
|
||||
public static async checkLockTeam(roleId: string, cityId: number) {
|
||||
return await GVGTeamModel.exists({ roleId, lockTime: { $gt: nowSeconds() }, cityId: { $ne: cityId } })
|
||||
}
|
||||
|
||||
public static async removeBySub(roleId: string, subHid: number, ce: number) {
|
||||
console.log('removeBySub', roleId, subHid, ce)
|
||||
await GVGTeamModel.updateMany({ roleId, 'lineup.actorId': subHid }, { $pull: { lineup: { actorId: subHid } }, $inc: { lineupCe: -ce } });
|
||||
}
|
||||
}
|
||||
|
||||
export const GVGTeamModel = getModelForClass(GVGTeam);
|
||||
|
||||
Reference in New Issue
Block a user