feat(武将): 重生体验优化 ca13e8be3 至 4ee246e78

This commit is contained in:
luying
2023-08-29 16:29:19 +08:00
parent 878d80f069
commit 820bfe170a
8 changed files with 155 additions and 9 deletions

View File

@@ -42,6 +42,11 @@ export default class School extends BaseModel {
return result;
}
public static async findByHids(roleId: string, hids: number[]) {
let result: SchoolType[] = await SchoolModel.find({ roleId, hid: { $in: hids } }).lean();
return result;
}
public static async updateBySclAndPos(roleId: string, schoolId: number, positionId: number, update: SchoolUpdate) {
const doc = new SchoolModel();

View File

@@ -29,6 +29,11 @@ export default class Skin extends BaseModel {
return rec;
}
public static async findbyRoleAndHids(roleId: string, hids: number[]) {
const rec: SkinType[] = await SkinModel.find({ roleId, hid: { $in: hids } }).lean();
return rec;
}
public static getInitInfo(hid: number): SkinUpdate {
let dicHero = gameData.hero.get(hid);
let dicFashion = gameData.fashion.get(dicHero.initialSkin)