From a9543d0f0307c56383a89beba83e130d27b1b231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E4=BB=A3=E7=B6=BA=E5=87=9B?= Date: Fri, 20 Dec 2024 00:41:10 +0800 Subject: [PATCH] feat: uniequip id only output number --- src/views/Material/index.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/views/Material/index.js b/src/views/Material/index.js index d21033cc..0bb48eca 100644 --- a/src/views/Material/index.js +++ b/src/views/Material/index.js @@ -1819,7 +1819,7 @@ export default defineComponent({ if (name === '002_amiya') return list; name = this.$root.cnServerMessages.character[name]; // 精英化 - const maxEvolve = evolve.findIndex(v => v) + 1; + const maxEvolve = evolve.findLastIndex(v => v) + 1; if (maxEvolve > 0) list.push({ name, elite: maxEvolve }); // 普通技能 if (skills.normal[0]) list.push({ name, skills: skills.normal[2] }); @@ -1829,14 +1829,15 @@ export default defineComponent({ }); // 模组 _.map(uniequip, ([enable, , maxLevel], id) => { - if (enable) { - list.push({ - name, - uniequip_id: id, - uniequip_name: this.$root.cnServerMessages.uniequip[id], - uniequip_level: maxLevel, - }); - } + if (!enable) return; + const numberId = parseInt(id.match(/\d+/)[0]); + if (Number.isNaN(numberId)) return; + list.push({ + name, + uniequip_id: numberId, + uniequip_name: this.$root.cnServerMessages.uniequip[id], + uniequip_level: maxLevel, + }); }); return list; },