jenkins:修复测试不通过bug

This commit is contained in:
luying
2021-11-01 09:49:56 +08:00
parent b49ca6aee7
commit fd3e42d77d
2 changed files with 5 additions and 6 deletions

View File

@@ -240,7 +240,7 @@ async function matchRobot(oppPlayers: OppPlayer[], role: RoleType, score: number
if (!dicHero) continue;
let heroInfo = new PvpHeroInfo();
let { attribute, ce, lv } = getRobotAttribute(actorId, ratio, score);
heroInfo.setRobotInfo(actorId, lv);
heroInfo.setRobotInfo(dicHero, lv);
defCe += ce;
heroInfo.setAttribute(attribute);
let enemy = new PvpEnemies(h, heroInfo, 0, ce);

View File

@@ -2,7 +2,7 @@ import { prop, mongoose, Ref } from '@typegoose/typegoose';
import { DicWarJson } from '../pubUtils/dictionary/DicWarJson';
import Hero, { HeroType } from '../db/Hero';
import { nowSeconds } from '../pubUtils/timeUtil';
import { gameData } from '../pubUtils/data';
import { DicHero } from '../pubUtils/dictionary/DicHero';
// 从玩家数据中覆盖warjson的部分字段
export class PvpHeroInfo {
@@ -42,10 +42,9 @@ export class PvpHeroInfo {
this.quality = hero.quality;
}
setRobotInfo(actorId: number, lv: number) {
let dicHero = gameData.hero.get(actorId);
this.actorId = actorId;
this.skinId = actorId;
setRobotInfo(dicHero: DicHero, lv: number) {
this.actorId = dicHero.heroId;
this.skinId = dicHero.heroId;
this.actorName = dicHero.name;
this.star = dicHero.initialStars;
this.lv = lv;