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