message: fake items for display
diff: @@ -33,6 +33,8 @@ export default function SeasonalRank({
  const prestigeRewardHash = 1620506139; // this hash does not matter as long as it exists and is not class exclusive
  const seasonalEngramHash = 591441816; // this hash does matter per season (for icon and description) https://github.com/DestinyItemManager/d2-additional-info/pull/82
  + const prestigeRewardLevel = 9999;
  + const seasonalEngramRewardLevel = 9998;
  // Get season details
  const seasonNameDisplay = season.displayProperties.name;
  @@ -47,27 +49,36 @@ export default function SeasonalRank({
  const seasonHashes = profileInfo?.profile?.data?.seasonHashes || [];
  // Get seasonal character progressions
  - const seasonProgress = characterProgressions.progressions[seasonPassProgressionHash];
  - const prestigeProgress = characterProgressions.progressions[seasonPassPrestigeProgressionHash];
  - const prestigeMode = seasonProgress.level === 100;
  - const seasonalRank = prestigeMode
  - ? prestigeProgress.level + seasonProgress.level
  - : seasonProgress.level;
  - const { progressToNextLevel, nextLevelAt } = prestigeMode ? prestigeProgress : seasonProgress;
  + const prestigeMode = characterProgressions.progressions[seasonPassProgressionHash].level === 100;
  + const seasonProgress =
  + characterProgressions.progressions[
  + prestigeMode ? seasonPassPrestigeProgressionHash : seasonPassProgressionHash
  + ];
  + const seasonalRank = prestigeMode ? seasonProgress.level + 100 : seasonProgress.level;
  + const { progressToNextLevel, nextLevelAt } = seasonProgress;
  const { rewardItems } = defs.Progression.get(seasonPassProgressionHash);
  +
  + if (
  + // Only add the fake rewards once
  + !rewardItems.filter((item) => item.rewardedAtProgressionLevel === prestigeRewardLevel).length
  + ) {
  + rewardItems.push(fakeReward(prestigeRewardHash, prestigeRewardLevel));
  + rewardItems.push(fakeReward(seasonalEngramHash, seasonalEngramRewardLevel));
  + }
  +
  const getBrightEngram = prestigeMode && (seasonalRank + 1) % 5 === 0;
  // Get the reward item for the next progression level
  const nextRewardItems = rewardItems
  .filter((item) =>
  prestigeMode
  - ? item.rewardedAtProgressionLevel === 91 // this needs to be a level that only has 1 reward
  + ? getBrightEngram
  + ? item.rewardedAtProgressionLevel === seasonalEngramRewardLevel
  + : item.rewardedAtProgressionLevel === prestigeRewardLevel
  : item.rewardedAtProgressionLevel === seasonalRank + 1
  )
  // Filter class-specific items
  .filter((item) => {
  - const def = defs.InventoryItem.get(
  - prestigeMode ? (getBrightEngram ? seasonalEngramHash : prestigeRewardHash) : item.itemHash
  - );
  + const def = defs.InventoryItem.get(item.itemHash);
  return def.classType === DestinyClass.Unknown || def.classType === store.classType;
  })
  // Premium reward first to match companion
  @@ -159,3 +170,15 @@ export function ownCurrentSeasonPass(seasonHashes: number[], currentSeasonHash?:
  }
  return seasonHashes.includes(currentSeasonHash);
  }
  +
  +function fakeReward(hash, level) {
  + return {
  + acquisitionBehavior: 1,
  + claimUnlockDisplayStrings: [''],
  + itemClaimedUnlockHash: 0,
  + itemHash: hash,
  + quantity: 1,
  + rewardedAtProgressionLevel: level,
  + uiDisplayStyle: 'free'
  + };
  +}
  