形象:头像相框形象字段

This commit is contained in:
luying
2021-03-11 19:29:50 +08:00
parent b2566f3fb6
commit 09a7a8b89b
30 changed files with 290 additions and 166 deletions
+12 -7
View File
@@ -1,5 +1,6 @@
import BaseModel from './BaseModel';
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
import { FIGURE } from '../pubUtils/dicParam';
export class RoleStatus {
@prop({ required: true })
@@ -26,11 +27,14 @@ export class RoleStatus {
@prop({ required: false, default: false })
isFrd: boolean;
// 头像
@prop({ required: true, default: 19 })
headHid: number;
@prop({ required: true, default: FIGURE.DEFAULT_HEAD })
head: number;
// 相框
@prop({ required: true, default: FIGURE.DEFAULT_FRAME })
frame: number;
// 形象
@prop({ required: true, default: 19 })
sHid: number;
@prop({ required: true, default: FIGURE.DEFAULT_SPINE })
spine: number;
// 前五战力
@prop({ required: true, default: 0 })
topLineupCe: number;
@@ -50,14 +54,15 @@ export class RoleStatus {
@prop({ required: true, default: 0 })
frdRatio: number = 0;
constructor(roleId: string, roleName: string, isCap: boolean, isFrd: boolean, headHid: number, sHid: number, topLineupCe: number, lv: number, heroes = [], isRobot = false) {
constructor(roleId: string, roleName: string, isCap: boolean, isFrd: boolean, head: number, frame: number, spine: number, topLineupCe: number, lv: number, heroes = [], isRobot = false) {
this.roleId = roleId;
this.roleName = roleName;
this.isCap = isCap;
this.totalDmg = 0;
this.isFrd = isFrd;
this.headHid = headHid;
this.sHid = sHid;
this.head = head;
this.frame = frame;
this.spine = spine;
this.topLineupCe = topLineupCe;
this.lv = lv;
this.heroes = heroes;