形象:修复展示阵容排序问题
This commit is contained in:
@@ -15,7 +15,7 @@ import { addItems, handleCost } from "../../../services/rewardService";
|
|||||||
import { getFriendPointObject } from "../../../pubUtils/itemUtils";
|
import { getFriendPointObject } from "../../../pubUtils/itemUtils";
|
||||||
import { RewardInter } from "../../../pubUtils/interface";
|
import { RewardInter } from "../../../pubUtils/interface";
|
||||||
import { FriendPresentLogModel } from '../../../db/FriendPresentLog';
|
import { FriendPresentLogModel } from '../../../db/FriendPresentLog';
|
||||||
import { HeroModel } from "../../../db/Hero";
|
import { HeroModel, HeroType } from "../../../db/Hero";
|
||||||
import { EquipModel } from "../../../db/Equip";
|
import { EquipModel } from "../../../db/Equip";
|
||||||
import { getPlayerMainAttribute } from "../../../services/pvpService";
|
import { getPlayerMainAttribute } from "../../../services/pvpService";
|
||||||
import { FRIEND } from "../../../pubUtils/dicParam";
|
import { FRIEND } from "../../../pubUtils/dicParam";
|
||||||
@@ -650,18 +650,23 @@ export class FriendHandler {
|
|||||||
let { topLineup, topLineupCe, towerLv, showLineup } = role;
|
let { topLineup, topLineupCe, towerLv, showLineup } = role;
|
||||||
|
|
||||||
let heroes = new Array<PlayerDetailHero>();
|
let heroes = new Array<PlayerDetailHero>();
|
||||||
for(let {hid, lv, star, colorStar, quality } of dbHeroes) {
|
|
||||||
if(showLineup) { // 设置过展示阵容
|
if(showLineup) { // 设置过展示阵容
|
||||||
let hasHero = showLineup.includes(hid);
|
for(let hid of showLineup) {
|
||||||
if(hasHero) {
|
let curHero = dbHeroes.find(cur => cur.hid == hid);
|
||||||
|
if(curHero) {
|
||||||
|
let { lv, star, colorStar, quality } = curHero;
|
||||||
heroes.push({
|
heroes.push({
|
||||||
actorId: hid, lv, star, colorStar, quality,
|
actorId: hid, lv, star, colorStar, quality,
|
||||||
score: 0
|
score: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
let hasHero = topLineup.find(cur => cur.hid == hid);
|
} else {
|
||||||
if(hasHero) {
|
for(let { hid } of topLineup) {
|
||||||
|
let curHero = dbHeroes.find(cur => cur.hid == hid);
|
||||||
|
if(curHero) {
|
||||||
|
let { lv, star, colorStar, quality } = curHero;
|
||||||
heroes.push({
|
heroes.push({
|
||||||
actorId: hid, lv, star, colorStar, quality,
|
actorId: hid, lv, star, colorStar, quality,
|
||||||
score: 0
|
score: 0
|
||||||
@@ -669,6 +674,7 @@ export class FriendHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let rank = await getMyRank(REDIS_KEY.PVP_RANK, 0, oppoRoleId);//去redis中获取排名
|
let rank = await getMyRank(REDIS_KEY.PVP_RANK, 0, oppoRoleId);//去redis中获取排名
|
||||||
|
|
||||||
result = new PlayerDetail({...role, defCe: topLineupCe, heroes});
|
result = new PlayerDetail({...role, defCe: topLineupCe, heroes});
|
||||||
|
|||||||
Reference in New Issue
Block a user