🐞 fix(共鸣系统): 修改装备养成维度

This commit is contained in:
zhangxk
2023-10-13 10:54:55 +08:00
parent 92e9549a21
commit bcd2305076

View File

@@ -92,12 +92,11 @@ export async function refreshResonanceData(roleId: string, serverId: number, sid
//装备强化
topLineHero = sortData(dbResonanceMap, topLineHeroes, RESONANCE_SORT_TYPE.EQUIP_LV, id);
let topLineHeroEplace = topLineHero.ePlace.find(cur => cur.id == id);
resonanceEquip.push({ hid: topLineHero.hid, id, lv: 0 });
if (topLineHeroEplace)
if (!topLineHeroEplace)
resonanceEquip.push({ hid: topLineHero.hid, id, lv: 0 });
else
resonanceEquip.push({ hid: topLineHero.hid, id, lv: topLineHeroEplace?.lv || 0 });
for (let [hid] of dbResonanceMap) {
if (!topLineHeroEplace || !topLineHeroEplace.lv) continue;
let hero = dbHeroes.find(cur => cur.hid == hid);
@@ -113,13 +112,13 @@ export async function refreshResonanceData(roleId: string, serverId: number, sid
topLineHero = sortData(dbResonanceMap, topLineHeroes, RESONANCE_SORT_TYPE.EQUIP_QUALITY, id);
topLineHeroEplace = topLineHero.ePlace.find(cur => cur.id == id);
resonanceEpQuality.push({ hid: topLineHero.hid, id, quality: 0, qualityStage: 0 })
if (topLineHeroEplace)
if (!topLineHeroEplace)
resonanceEpQuality.push({ hid: topLineHero.hid, id, quality: 0, qualityStage: 0 })
else
resonanceEpQuality.push({ hid: topLineHero.hid, id, quality: topLineHeroEplace?.quality || 0, qualityStage: topLineHeroEplace?.qualityStage || 0 })
for (let [hid] of dbResonanceMap) {
if (!topLineHeroEplace && !topLineHeroEplace.quality || !topLineHeroEplace.qualityStage) continue;
if (!topLineHeroEplace || !topLineHeroEplace.quality || !topLineHeroEplace.qualityStage) continue;
let hero = dbHeroes.find(cur => cur.hid == hid);
let ePlaceData = hero.ePlace.find(cur => cur.id == id);
if (!ePlaceData) {
@@ -132,8 +131,9 @@ export async function refreshResonanceData(roleId: string, serverId: number, sid
topLineHero = sortData(dbResonanceMap, topLineHeroes, RESONANCE_SORT_TYPE.EQUIP_STAR, id);
topLineHeroEplace = topLineHero.ePlace.find(cur => cur.id == id);
resonanceEpStar.push({ hid: topLineHero.hid, id, star: 0, starStage: 0 })
if (topLineHeroEplace)
if (!topLineHeroEplace)
resonanceEpStar.push({ hid: topLineHero.hid, id, star: 0, starStage: 0 })
else
resonanceEpStar.push({ hid: topLineHero.hid, id, star: topLineHeroEplace?.star || 0, starStage: topLineHeroEplace?.starStage || 0 })
for (let [hid] of dbResonanceMap) {
@@ -151,8 +151,9 @@ export async function refreshResonanceData(roleId: string, serverId: number, sid
topLineHero = sortData(dbResonanceMap, topLineHeroes, RESONANCE_SORT_TYPE.JEWEL, id, dbJewelMap);
topLineHeroEplace = topLineHero.ePlace.find(cur => cur.id == id);
resonanceJewel.push({ hid: topLineHero.hid, id, jewel: 0 });
if (topLineHeroEplace)
if (!topLineHeroEplace)
resonanceJewel.push({ hid: topLineHero.hid, id, jewel: 0 });
else
resonanceJewel.push({ hid: topLineHero.hid, id, jewel: topLineHeroEplace?.jewel || 0 });
//破,御,护,命