🐞 fix(共鸣系统): 修改地玉养成维度
This commit is contained in:
@@ -174,7 +174,7 @@ export async function refreshResonanceData(roleId: string, serverId: number, sid
|
||||
resonanceStone.push({ id, stones: [] });
|
||||
for (let index = 1; index <= EQUIP_STONE.THREE; index++) {
|
||||
topLineHero = sortData(dbResonanceMap, topLineHeroes, RESONANCE_SORT_TYPE.STONE, id, null, index);
|
||||
const topLineHeroEplace = topLineHero.ePlace.find(cur => cur.id == id);
|
||||
topLineHeroEplace = topLineHero.ePlace.find(cur => cur.id == id);
|
||||
|
||||
resonanceStone.find(cur => cur.id == id).stones.push({ hid: topLineHero.hid, id: index, stone: 0 });
|
||||
if (topLineHeroEplace && topLineHeroEplace.stones) {
|
||||
@@ -185,7 +185,7 @@ export async function refreshResonanceData(roleId: string, serverId: number, sid
|
||||
|
||||
|
||||
for (let [hid] of dbResonanceMap) {
|
||||
if (!topLineHeroEplace && !topLineHeroEplace.stones) continue;
|
||||
if (!topLineHeroEplace || !topLineHeroEplace.stones) continue;
|
||||
const topLineHeroStone = topLineHeroEplace.stones.find(cur => cur.id == index);
|
||||
if (!topLineHeroStone || !topLineHeroStone.stone) continue;
|
||||
|
||||
@@ -205,7 +205,6 @@ export async function refreshResonanceData(roleId: string, serverId: number, sid
|
||||
let updateHeroes: HeroUpdate[] = [], newHeroes: HeroType[] = [], newHeroIds: number[] = [];
|
||||
for (let [hid] of dbResonanceMap) {
|
||||
let hero = dbHeroes.find(cur => cur.hid == hid);
|
||||
// console.log('-x-x--x-x-x-x-x-x-x-x-x-55 hero', util.inspect(hero, { depth: null }));
|
||||
updateHeroes.push({ ...pick(hero, ['roleId', 'hid', 'lv', 'exp', 'job', 'jobStage', 'connections', 'skins', 'jobStage', 'ePlace']) })
|
||||
newHeroes.push(hero);
|
||||
newHeroIds.push(hid);
|
||||
@@ -270,6 +269,7 @@ export function sortData(dbResonanceMap: Map<number, ResonanceType>, heroes: Her
|
||||
case RESONANCE_SORT_TYPE.EQUIP_QUALITY:
|
||||
{
|
||||
heroes = sortByEquipQuality(heroes, findType);
|
||||
|
||||
break;
|
||||
}
|
||||
case RESONANCE_SORT_TYPE.EQUIP_STAR:
|
||||
@@ -289,13 +289,15 @@ export function sortData(dbResonanceMap: Map<number, ResonanceType>, heroes: Her
|
||||
}
|
||||
}
|
||||
|
||||
let topLineHeroes: HeroType[] = [];
|
||||
for (let hero of heroes) {
|
||||
const { hid } = hero;
|
||||
if (!dbResonanceMap.has(hid) && topLineHeroes.length < LINEUP_NUM) {
|
||||
topLineHeroes.push(hero);
|
||||
}
|
||||
}
|
||||
let topLineHeroes: HeroType[] = heroes;
|
||||
// for (let hero of heroes) {
|
||||
// const { hid } = hero;
|
||||
// if (!dbResonanceMap.has(hid) && topLineHeroes.length < LINEUP_NUM) {
|
||||
// topLineHeroes.push(hero);
|
||||
// }
|
||||
// }
|
||||
// console.log('-x-x--x-x-x-x-x-x-x-x-x- topLineHeroes', util.inspect(heroes, { depth: null }));
|
||||
|
||||
|
||||
return topLineHeroes[LINEUP_NUM - 1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user