fix 刷对手时需要显示对手的所有武将
This commit is contained in:
@@ -385,11 +385,17 @@ export class PvpHandler {
|
||||
return resResult(STATUS.PVP_ROLE_NOT_FOUND);
|
||||
}
|
||||
|
||||
let heroes = pvpHistoryOpp.heroes.map(hero => {
|
||||
let heroes = new Array<PlayerDetailHero>();
|
||||
for(let hero of pvpHistoryOpp.heroes) {
|
||||
let newHero = new PlayerDetailHero();
|
||||
newHero.setPvpHeroInfo(hero);
|
||||
return newHero;
|
||||
})
|
||||
heroes.push(newHero);
|
||||
}
|
||||
for(let hero of pvpHistoryOpp.otherHeroes) {
|
||||
let newHero = new PlayerDetailHero();
|
||||
newHero.setPvpHeroInfo(hero);
|
||||
heroes.push(newHero);
|
||||
}
|
||||
result = new PlayerDetail({...pvpHistoryOpp, roleId: pvpHistoryOpp.oppRoleId, heroes, rank: pvpHistoryOpp.rankLv});
|
||||
} else { // 查询对方pvpDefense
|
||||
let pvpDefense = await PvpDefenseModel.findByRoleId(oppoRoleId);
|
||||
|
||||
Reference in New Issue
Block a user