形象:设置头像相框形象

This commit is contained in:
luying
2021-03-11 19:29:50 +08:00
parent 09a7a8b89b
commit e888ab916d
11 changed files with 222 additions and 44 deletions
@@ -647,16 +647,26 @@ export class FriendHandler {
let dbHeroes = await HeroModel.findByRole(oppoRoleId);
let role = await RoleModel.findByRoleId(oppoRoleId, null, true);
let { topLineup, topLineupCe, towerLv } = role;
let { topLineup, topLineupCe, towerLv, showLineup } = role;
let heroes = new Array<PlayerDetailHero>();
for(let {hid, lv, star, colorStar, quality } of dbHeroes) {
let hasHero = topLineup.find(cur => cur.hid == hid);
if(hasHero) {
heroes.push({
actorId: hid, lv, star, colorStar, quality,
score: 0
});
if(showLineup) { // 设置过展示阵容
let hasHero = showLineup.includes(hid);
if(hasHero) {
heroes.push({
actorId: hid, lv, star, colorStar, quality,
score: 0
});
}
} else {
let hasHero = topLineup.find(cur => cur.hid == hid);
if(hasHero) {
heroes.push({
actorId: hid, lv, star, colorStar, quality,
score: 0
});
}
}
}
let rank = await getMyRank(REDIS_KEY.PVP_RANK, 0, oppoRoleId);//去redis中获取排名