fix 合成装备bug
This commit is contained in:
@@ -144,6 +144,11 @@ export default class Hero extends BaseModel {
|
||||
return hero;
|
||||
}
|
||||
|
||||
public static async findByHidAndRoleWithEquip(hid: number, roleId: string, lean = true) {
|
||||
const hero: HeroType = await HeroModel.findOne({ hid, roleId }).populate('ePlace.equip').lean(lean);
|
||||
return hero;
|
||||
}
|
||||
|
||||
public static async addEquip(roleId: string, hid: number, ePlaceId: number, equipId: string, lean = true) {
|
||||
const hero: HeroType = await HeroModel.findOneAndUpdate(
|
||||
{ roleId, hid, 'ePlace.id': ePlaceId },
|
||||
|
||||
Reference in New Issue
Block a user