Skip to content

Commit

Permalink
Revert accidental change MK2
Browse files Browse the repository at this point in the history
Co-authored-by: Pavel Alexandrov <[email protected]>
Signed-off-by: Reece Dunham <[email protected]>
  • Loading branch information
RDIL and Yanrishatum committed Feb 16, 2024
1 parent 79ecf62 commit 7780d4f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions components/candle/progressionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,6 @@ export class ProgressionService {
if (masteryData) {
const previousLevel = locationData.Level

locationData.Level = clampValue(
isEvergreenContract
? evergreenLevelForXp(locationData.Xp)
: sniperUnlockable
? sniperLevelForXp(locationData.Xp)
: levelForXp(locationData.Xp),
1,
maxLevel,
)

locationData.Xp = clampValue(
locationData.Xp + masteryXp + actionXp,
0,
Expand All @@ -207,6 +197,16 @@ export class ProgressionService {
: xpRequiredForLevel(maxLevel),
)

locationData.Level = clampValue(
isEvergreenContract
? evergreenLevelForXp(locationData.Xp)
: sniperUnlockable
? sniperLevelForXp(locationData.Xp)
: levelForXp(locationData.Xp),
1,
maxLevel,
)

// If mastery level has gone up, check if there are available drop rewards and award them
if (locationData.Level > previousLevel) {
const masteryLocationDrops = this.getLocationMasteryDrops(
Expand Down

0 comments on commit 7780d4f

Please sign in to comment.