战力:修复创建武将bug
This commit is contained in:
+4
-4
@@ -5,7 +5,7 @@ import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoos
|
||||
export class AttrCell {
|
||||
@prop({ required: true })
|
||||
attrId: number; // 属性id
|
||||
@prop({ required: true })
|
||||
@prop({ required: true, type: Number })
|
||||
values: number[]; // 战力公式中的全局加成的数据,查表后的结果
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export class EquipAttr {
|
||||
}
|
||||
|
||||
// 百家学宫加成
|
||||
class SchoolAttr {
|
||||
export class SchoolAttr {
|
||||
@prop({ required: true })
|
||||
hid: number; // 武将id
|
||||
@prop({ required: true })
|
||||
@@ -76,13 +76,13 @@ export default class RoleCe extends BaseModel {
|
||||
equipAttrs: EquipAttr[]
|
||||
|
||||
@prop({ required: true, type: SchoolAttr, _id: false })
|
||||
schoolAttr: SchoolAttr[];
|
||||
schoolAttrs: SchoolAttr[];
|
||||
|
||||
@prop({ required: true, type: ScrollAttr, _id: false })
|
||||
scrollAttrs: ScrollAttr[];
|
||||
|
||||
public static async findByRoleId(roleId: string) {
|
||||
let result: RoleCeType = await RoleCeModel.findOneAndUpdate({ roleId }).lean();
|
||||
let result: RoleCeType = await RoleCeModel.findOne({ roleId }).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user