From 1a867db357dd93068db2aaad771f9bd0c7c054f2 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, 3 May 2024 18:46:54 +0800 Subject: [PATCH] fix: stage efficiency didn't calculate lmd's value --- src/data/changelog.json | 7 +++++-- src/store/materialValue.js | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/data/changelog.json b/src/data/changelog.json index 0d7fb0eb..64c4d154 100644 --- a/src/data/changelog.json +++ b/src/data/changelog.json @@ -1,7 +1,10 @@ [ { - "time": "2024-04-14", - "changes": ["【精英材料计算】支持五周年活动限时掉落"] + "time": "2024-05-03", + "changes": [ + "【精英材料计算】支持五周年活动限时掉落", + "【精英材料计算】修复理智效率没有计算龙门币价值的问题" + ] }, { "time": "2024-04-14", diff --git a/src/store/materialValue.js b/src/store/materialValue.js index 79e08e35..1ffcc1d9 100644 --- a/src/store/materialValue.js +++ b/src/store/materialValue.js @@ -59,12 +59,22 @@ export const useMaterialValueStore = defineStore('materialValue', () => { } }; + const omitFieldsSet = new Set([ + 'zoneId', + 'sampleNum', + 'event', + 'retro', + 'cost', + 'lmd', + 'cardExp', + ]); + const calcStageEfficiency = dropTable => { if (!dataReady.value) return {}; return mapValues(dropTable, drops => { - let ap = 0; + let ap = drops.lmd * data.value[4001]; _.each(drops, (v, k) => { - if (k in data.value && v > 0) { + if (!omitFieldsSet.has(k) && k in data.value && v > 0) { ap += v * data.value[k]; } });