武将:职业天赋接口
This commit is contained in:
@@ -7,6 +7,7 @@ import { reduceCe } from '../pubUtils/util';
|
||||
import Skin from './Skin';
|
||||
import { SearchHeroParam } from '../domain/backEndField/search';
|
||||
import { Reward } from '../domain/battleField/pvp';
|
||||
import { getHeroInitTalent } from '../pubUtils/data';
|
||||
|
||||
type CeAttrUpdate = Partial<CeAttrData>;
|
||||
export class CeAttrData {
|
||||
@@ -61,6 +62,18 @@ export class Connect {
|
||||
level: number;
|
||||
}
|
||||
|
||||
export class Talent {
|
||||
@prop({ required: true })
|
||||
id: number; // 天赋表id
|
||||
@prop({ required: true })
|
||||
level: number; // 激活等级
|
||||
|
||||
constructor(id: number, level = 1) {
|
||||
this.id = id;
|
||||
this.level = level;
|
||||
}
|
||||
}
|
||||
|
||||
export class HeroSkin {
|
||||
@prop({ required: true })
|
||||
id: number;
|
||||
@@ -70,6 +83,19 @@ export class HeroSkin {
|
||||
skin: Ref<Skin>;
|
||||
@prop({ required: true })
|
||||
enable: boolean;
|
||||
@prop({ required: true, type: Talent, _id: false })
|
||||
talent: Talent[]; // 天赋树
|
||||
@prop({ required: true })
|
||||
usedTalentPoint: number; // 已使用的天赋点数
|
||||
|
||||
constructor(id: number, skinId: number, skin: string, enable: boolean) {
|
||||
this.id = id;
|
||||
this.skinId = skinId;
|
||||
this.skin = skin;
|
||||
this.enable = enable;
|
||||
this.talent = getHeroInitTalent(skinId);
|
||||
this.usedTalentPoint = 0;
|
||||
}
|
||||
}
|
||||
|
||||
export class Stone {
|
||||
|
||||
Reference in New Issue
Block a user