fix 刷新对手无法找到武将
This commit is contained in:
@@ -138,7 +138,7 @@ export async function matchPlayerByRank(oppPlayers: OppPlayers[], mapWarJson: Di
|
||||
if(result.length <= 0) return false;
|
||||
oppRoleId = result[0];
|
||||
|
||||
let pvpdefense = await PvpDefenseModel.findByRoleId(oppRoleId);
|
||||
let pvpdefense = await PvpDefenseModel.findByRoleIdIncludeAll(oppRoleId);
|
||||
let pvpHistoryOpp = await generPlayerOppHis(pvpdefense, mapWarJson, roleId, pos);
|
||||
|
||||
oppPlayers.push({
|
||||
@@ -192,8 +192,8 @@ async function generPlayerOppHis(result: PvpDefenseType, mapWarJson: DicWarJson[
|
||||
for(let warJson of mapWarJson) {
|
||||
if(warJson.relation == 1) continue;
|
||||
let h = result.heroes.find(cur => cur.dataId == warJson.dataId);
|
||||
if(h) {
|
||||
let hs = heroScores.find(cur => cur.hid == warJson.actorId); // 这个武将的军功
|
||||
if(h && h.hero) {
|
||||
let hs = heroScores.find(cur => cur.hid == h.actorId); // 这个武将的军功
|
||||
let hero = <HeroType>h.hero;
|
||||
let heroInfo = new PvpHeroInfo();
|
||||
heroInfo.setHeroInfo(hero);
|
||||
|
||||
Reference in New Issue
Block a user