Skip to content

Commit

Permalink
fix total points calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkIntaqt committed Feb 11, 2024
1 parent eeab05b commit 33c88ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/module/user/orderChallenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function removeUnnecessaryChallenges(challengesArray, filters, masterOnly
})


const challengesDetailed = window.JSONPREQUEST;
const challengesDetailed = window.JSONPREQUEST || [];

return challengesDetailed.map(function (challengeData) {

Expand Down
17 changes: 10 additions & 7 deletions src/module/user/statsCalculateTotalPoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,24 @@ export default function statsCalculateTotalPoints(challenges) {
tiers[config.tiers[i]] = 0
}

console.log("-----");

for (let i = 0; i < challenges.length; i++) {
const challenge = challenges[i];

if (challenge[0] > 10
&& challenge[8] !== 600006
&& challenge[8] !== 2022000
&& challenge[8] !== 2023000
&& challenge[8] !== 601000
&& challenge[8] !== 2024100
&& challenge[8] !== 301104
&& challenge[8] !== 402406
&& challenge[6].parent !== "0" // summoner level challenge
&& challenge[8] !== 2022000 // 2022 capstone
&& challenge[8] !== 2023000 // 2023 capstone
&& challenge[8] !== 601000 // arena capstone
&& challenge[8] !== 2024100 // seasonal 2024 capstone
&& challenge[6].state === "ENABLED"
) {
//console.log(challenge[8]);
tiers[intToTier(challenge[1])] += 1

} else {
console.log(challenge[6].translation.name, challenge[6].translation.description)
}
}
return tiers
Expand Down

0 comments on commit 33c88ab

Please sign in to comment.