添加查看详细武将接口
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
// 一些通用的interface定义
|
||||
|
||||
import { RoleType } from "../db/Role";
|
||||
import { Robot } from "../db/PvpDefense";
|
||||
import { reduceCe } from "./util";
|
||||
|
||||
export interface RewardInter {
|
||||
id: number;
|
||||
count: number;
|
||||
@@ -115,4 +119,41 @@ export class RankParam {
|
||||
this.sHid = sHid;
|
||||
this.title = title;
|
||||
}
|
||||
}
|
||||
|
||||
export interface PlayerDetailHero {
|
||||
actorId: number;
|
||||
lv: number;
|
||||
star: number;
|
||||
colorStar: number;
|
||||
quality: number;
|
||||
score: number;
|
||||
}
|
||||
|
||||
export class PlayerDetail {
|
||||
roleId: string;
|
||||
roleName: string;
|
||||
lv: number;
|
||||
title?: number = 1;
|
||||
sHid?: number = 19;
|
||||
headHid?: number = 19;
|
||||
|
||||
score?: number = 0;
|
||||
pLv?: number = 1;
|
||||
defCe?: number = 0;
|
||||
|
||||
heroes: PlayerDetailHero[];
|
||||
|
||||
constructor(detail: PlayerDetail) {
|
||||
if(detail.roleId) this.roleId = detail.roleId;
|
||||
if(detail.roleName) this.roleName = detail.roleName;
|
||||
if(detail.lv) this.lv = detail.lv;
|
||||
if(detail.title) this.title = detail.title;
|
||||
if(detail.sHid) this.sHid = detail.sHid;
|
||||
if(detail.headHid) this.headHid = detail.headHid;
|
||||
if(detail.score) this.score = detail.score;
|
||||
if(detail.pLv) this.pLv = detail.pLv;
|
||||
if(detail.defCe) this.defCe = reduceCe(detail.defCe);
|
||||
if(detail.heroes) this.heroes = detail.heroes;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user