mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
fix: career WN8s now accounts for all tanks
This commit is contained in:
1 parent
275ccf4e8f
commit
12aa38c0e9
1 file changed
+15
-10
+15
-10
@@ -90,15 +90,16 @@ export default {
|
|||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
);
|
);
|
||||||
const careerWN8s = tankStatsOverTimeEntries.reduce<Record<number, number>>(
|
const careerWN8s = careerTankStatsRaw.reduce<Record<number, number>>(
|
||||||
(accumulator, [tankIdString]) => {
|
(accumulator, { tank_id }) => {
|
||||||
const tankId = Number(tankIdString);
|
return tank_id === 0 || tankAverages[tank_id] === undefined
|
||||||
|
|
||||||
return tankId === 0 || tankAverages[tankId] === undefined
|
|
||||||
? accumulator
|
? accumulator
|
||||||
: {
|
: {
|
||||||
...accumulator,
|
...accumulator,
|
||||||
[tankId]: getWN8(tankAverages[tankId].all, careerStats[tankId]),
|
[tank_id]: getWN8(
|
||||||
|
tankAverages[tank_id].all,
|
||||||
|
careerStats[tank_id],
|
||||||
|
),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
@@ -119,13 +120,17 @@ export default {
|
|||||||
);
|
);
|
||||||
careerWN8s[0] =
|
careerWN8s[0] =
|
||||||
careerWN8sEntries.reduce(
|
careerWN8sEntries.reduce(
|
||||||
(accumulator, [tankIdString, wn8]) =>
|
(accumulator, [tankIdString, WN8]) =>
|
||||||
accumulator + wn8 * careerStats[Number(tankIdString)].battles,
|
isNaN(WN8)
|
||||||
|
? accumulator
|
||||||
|
: accumulator + WN8 * careerStats[Number(tankIdString)].battles,
|
||||||
0,
|
0,
|
||||||
) /
|
) /
|
||||||
careerWN8sEntries.reduce(
|
careerWN8sEntries.reduce(
|
||||||
(accumulator, [tankIdString]) =>
|
(accumulator, [tankIdString, WN8]) =>
|
||||||
accumulator + careerStats[Number(tankIdString)].battles,
|
isNaN(WN8)
|
||||||
|
? accumulator
|
||||||
|
: accumulator + careerStats[Number(tankIdString)].battles,
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user