jenkins:修复测试不通过bug
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user