Skip to content

Commit

Permalink
impr: set level text to the starting value when animating xp bar
Browse files Browse the repository at this point in the history
!nuf
  • Loading branch information
Miodec committed Sep 25, 2024
1 parent db319b1 commit d4c1ca2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/ts/elements/xp-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export async function update(
addedXp,
breakdown,
};

levelEl.text(Levels.getLevelFromTotalXp(currentXp));

const startingXp = Levels.getXpDetails(currentXp);
const endingXp = Levels.getXpDetails(currentXp + addedXp);
const startingLevel =
Expand Down Expand Up @@ -493,3 +496,5 @@ async function flashLevel(): Promise<void> {
}
);
}
//@ts-expect-error
window.updateXp = update;

0 comments on commit d4c1ca2

Please sign in to comment.