diff --git a/src/lib/bd.ts b/src/lib/bd.ts deleted file mode 100644 index 9564b09..0000000 --- a/src/lib/bd.ts +++ /dev/null @@ -1,20 +0,0 @@ -export const calculateXP = ( - normalBerries: bigint, - poisonBerries: bigint, - slowBerries: bigint, - ultraBerries: bigint, - speedyBerries: bigint, - coinBerries: bigint -): bigint => { - let totalXp: bigint = 0n - - totalXp += normalBerries - totalXp -= poisonBerries - totalXp -= slowBerries - totalXp += ultraBerries * 5n - totalXp += speedyBerries * 10n - totalXp += coinBerries * 10n - - if (totalXp < 0n) totalXp = 0n - return totalXp -} diff --git a/src/routes/berrydash/account/get.ts b/src/routes/berrydash/account/get.ts index 9f598a5..038934d 100644 --- a/src/routes/berrydash/account/get.ts +++ b/src/routes/berrydash/account/get.ts @@ -6,7 +6,6 @@ import { } from '../../../lib/util' import { berryDashUserData, users } from '../../../lib/tables' import { eq, sql } from 'drizzle-orm' -import { calculateXP } from '../../../lib/bd' export const handler = async (context: Context) => { const dbInfo0 = getDatabaseConnection(0) @@ -77,14 +76,6 @@ export const handler = async (context: Context) => { totalAntiBerries: BigInt( savedata?.gameStore?.totalAntiBerries ?? 0 ).toString(), - xp: calculateXP( - BigInt(savedata?.gameStore?.totalNormalBerries ?? 0), - BigInt(savedata?.gameStore?.totalPoisonBerries ?? 0), - BigInt(savedata?.gameStore?.totalSlowBerries ?? 0), - BigInt(savedata?.gameStore?.totalUltraBerries ?? 0), - BigInt(savedata?.gameStore?.totalSpeedyBerries ?? 0), - BigInt(savedata?.gameStore?.totalCoinBerries ?? 0) - ).toString(), coins: BigInt(savedata?.bird?.customIcon?.balance ?? 0).toString() } return row