feat(副将): 设置副将

This commit is contained in:
luying
2022-12-08 15:35:34 +08:00
parent bdbac4b085
commit b684307818
12 changed files with 92 additions and 8 deletions

View File

@@ -26,6 +26,10 @@ export default class PvpSaveData extends BaseModel {
const result: PvpSaveDataType[] = await PvpSaveDataModel.find({ roleId }).lean();
return result;
}
public static async removeBySub(roleId: string, subHid: number) {
await PvpSaveDataModel.updateMany({ roleId }, { $pull: { heroes: { actorId: subHid } } });
}
}