名将擂台:刷新机制
This commit is contained in:
@@ -54,10 +54,6 @@ export class LadderDefense {
|
||||
export class LadderOppPlayerInDB {
|
||||
@prop({ required: true })
|
||||
rank: number;
|
||||
@prop({ required: true })
|
||||
roleId: string;
|
||||
@prop({ required: true })
|
||||
isRobot: boolean;
|
||||
}
|
||||
|
||||
// ladderMatchRec
|
||||
@@ -206,13 +202,12 @@ export class LadderOppPlayerReturn {
|
||||
defCe: number = 0; // 对手防守阵容战力
|
||||
isRobot: boolean = true; // 是否是机器人
|
||||
|
||||
constructor(rank: number, isRobot: boolean) {
|
||||
constructor(rank: number) {
|
||||
this.rank = rank;
|
||||
this.isRobot = isRobot;
|
||||
if(isRobot) this.roleId = `robot${this.rank}`;
|
||||
}
|
||||
|
||||
setByRedis(param: RoleRankInfo, defCe: number) {
|
||||
this.isRobot = false;
|
||||
this.roleId = param.roleId;
|
||||
this.roleName = param.roleName;
|
||||
this.head = param.head;
|
||||
@@ -224,6 +219,8 @@ export class LadderOppPlayerReturn {
|
||||
}
|
||||
|
||||
setByRobot(ladderDifficultRatio: DicLadderDifficultRatio) {
|
||||
this.isRobot = true;
|
||||
this.roleId = `robot${this.rank}`;
|
||||
this.head = ladderDifficultRatio.head;
|
||||
this.spine = ladderDifficultRatio.spine;
|
||||
this.lv = ladderDifficultRatio.level;
|
||||
|
||||
Reference in New Issue
Block a user