pvp:修复显示信息
This commit is contained in:
@@ -553,6 +553,7 @@ export async function generMyRecInfo(heroScores: HeroScores[], winStreakNum: num
|
||||
|
||||
const dicOpp = gameData.pvpOpponent.get(pos);
|
||||
const plusScore = getPlusScore(winStreakNum);
|
||||
let pLv = getLvByScore(heroScores);
|
||||
|
||||
let myHeroRecords = new Array<HeroesRecord>();
|
||||
let showHeroScores = new Array<{ hid: number, addScore: number, plusScore: number, score: number }>();
|
||||
@@ -579,6 +580,7 @@ export async function generMyRecInfo(heroScores: HeroScores[], winStreakNum: num
|
||||
}
|
||||
const myHero = await HeroModel.findByHidAndRole(hid, roleId, 'quality star colorStar lv');
|
||||
let { quality, star, colorStar, lv } = myHero;
|
||||
|
||||
myHeroRecords.push({
|
||||
hid, quality, star, colorStar, lv, damage, heal, underDamage
|
||||
});
|
||||
@@ -587,12 +589,12 @@ export async function generMyRecInfo(heroScores: HeroScores[], winStreakNum: num
|
||||
let attackInfo = {
|
||||
roleId,
|
||||
roleName,
|
||||
lv: role.lv,
|
||||
lv: pLv,
|
||||
head: role.head,
|
||||
frame: role.frame,
|
||||
spine: role.spine,
|
||||
title: role.title,
|
||||
ce: reduceCe(role.topLineupCe),
|
||||
ce: role.topLineupCe,
|
||||
heroes: myHeroRecords,
|
||||
isSuccess,
|
||||
score: isSuccess ? addSumScore : 0
|
||||
@@ -605,7 +607,7 @@ export async function generMyRecInfo(heroScores: HeroScores[], winStreakNum: num
|
||||
export async function generPVPOppRecInfo(isSuccess: boolean, curOpp: OppPlayers, oppHeroes: pvpEndParamInter[], myLv: number) {
|
||||
let oppHeroRecords = new Array<HeroesRecord>();
|
||||
let oppRole = <PvpHistoryOppType>curOpp.oppDef;
|
||||
if(!oppRole) { /* TODO 判空处理 */ }
|
||||
if(!oppRole) { console.error('opp role not found') }
|
||||
for (let { hid, damage, heal, underDamage } of oppHeroes) {
|
||||
let historyHero = oppRole.heroes.find(cur => cur.actorId == hid);
|
||||
if(historyHero) {
|
||||
@@ -616,12 +618,12 @@ export async function generPVPOppRecInfo(isSuccess: boolean, curOpp: OppPlayers,
|
||||
return {
|
||||
roleId: robotIdComBack(oppRole.oppRoleId),
|
||||
roleName: oppRole.roleName,
|
||||
lv: oppRole.lv,
|
||||
lv: oppRole.pLv,
|
||||
head: oppRole.head,
|
||||
frame: oppRole.frame,
|
||||
spine: oppRole.spine,
|
||||
title: oppRole.title,
|
||||
ce: reduceCe(oppRole.defCe),
|
||||
ce: oppRole.defCe,
|
||||
heroes: oppHeroRecords,
|
||||
isSuccess: !isSuccess,
|
||||
score: 0
|
||||
|
||||
Reference in New Issue
Block a user