Skip to content

Commit

Permalink
fix: stage efficiency didn't calculate lmd's value
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsuk1ko committed May 3, 2024
1 parent 86d563f commit 1a867db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/data/changelog.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[
{
"time": "2024-04-14",
"changes": ["【精英材料计算】支持五周年活动限时掉落"]
"time": "2024-05-03",
"changes": [
"【精英材料计算】支持五周年活动限时掉落",
"【精英材料计算】修复理智效率没有计算龙门币价值的问题"
]
},
{
"time": "2024-04-14",
Expand Down
14 changes: 12 additions & 2 deletions src/store/materialValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
});
Expand Down

0 comments on commit 1a867db

Please sign in to comment.