Skip to content

Commit

Permalink
fix: Fixing season rank, so it won't count extra levels until you rea…
Browse files Browse the repository at this point in the history
…ch cap of season
  • Loading branch information
itssimple committed Aug 27, 2021
1 parent dc39f3c commit 106771f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/scripts/destiny2/goalItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,24 @@ function Destiny2Goals() {
seasonDefinition.artifactItemHash
];

let seasonRank = seasonPassData.level;
let nextLevelAt = seasonPassData.nextLevelAt;
let progressToNextLevel = seasonPassData.progressToNextLevel;

if (seasonPassData.level == seasonPassData.levelCap) {
seasonRank += seasonPassProgressionData.level;
nextLevelAt += seasonPassProgressionData.nextLevelAt;
progressToNextLevel += seasonPassProgressionData.progressToNextLevel;
}

let seasonRankDataItem = {
name: `Season Rank ${
seasonPassData.level + seasonPassProgressionData.level
}`,
name: `Season Rank ${seasonRank}`,
description: seasonDefinition.displayProperties.name,
icon: `${seasonArtifactData.displayProperties.icon}`,
startDate: seasonDefinition.startDate,
endDate: seasonDefinition.endDate,
nextLevelAt:
seasonPassData.nextLevelAt + seasonPassProgressionData.nextLevelAt,
progressToNextLevel:
seasonPassData.progressToNextLevel +
seasonPassProgressionData.progressToNextLevel,
nextLevelAt: nextLevelAt,
progressToNextLevel: progressToNextLevel,
type: "seasonrank",
order: -1,
inProgressValueStyle: 0,
Expand Down

0 comments on commit 106771f

Please sign in to comment.