Added pit progress
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { LEVELCOLORS, PRESTIGECOLORS } from "@/data/hypixel/pit"
|
||||
import { LEVELCOLORS, PRESTIGE_MULTIPLIERS, PRESTIGECOLORS } from "@/data/hypixel/pit"
|
||||
import { NonNullStats } from "@/lib/schema/player"
|
||||
|
||||
export function getLevelColor(level: number) {
|
||||
@@ -17,6 +17,11 @@ export function getPrestigeColor(prestige: number) {
|
||||
return PRESTIGECOLORS.at(0)!.color
|
||||
}
|
||||
|
||||
export function getXpForPrestige(prestige: number): number {
|
||||
if (prestige <= 0 || prestige > PRESTIGE_MULTIPLIERS.length) return 0
|
||||
return PRESTIGE_MULTIPLIERS[prestige - 1].SumXp
|
||||
}
|
||||
|
||||
export function getPrestige(stats: NonNullable<NonNullStats["Pit"]>) {
|
||||
return stats.profile.prestiges === undefined ? 0 : stats.profile.prestiges.length
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user