添加获取对手阵容,开始战斗,结算

This commit is contained in:
luying
2021-01-07 17:38:07 +08:00
parent edc45932da
commit 5bfac1723c
12 changed files with 299 additions and 20 deletions
+6
View File
@@ -153,6 +153,12 @@ export default class Hero extends BaseModel {
const hero: HeroType[] = await HeroModel.find({ seqId: {$in: seqIds}, roleId }).lean(lean);
return hero;
}
public static async findByHidRange(hids: Array<number>, roleId: string, lean = true) {
const hero: HeroType[] = await HeroModel.find({ hid: {$in: hids}, roleId }).lean(lean);
return hero;
}
public static async findBySeqIdAndRole(seqId: number, roleId: string, lean = true) {
const hero: HeroType = await HeroModel.findOne({ seqId, roleId }).lean(lean);
return hero;