Process of format fixing
This commit is contained in:
@@ -48,8 +48,8 @@ async function getPlayer(uuid: string): Promise<PlayerData | null> {
|
||||
const playerReq: Player = await fetch(hypixel, {
|
||||
params: {
|
||||
key: apikey,
|
||||
uuid: uuid,
|
||||
},
|
||||
uuid: uuid
|
||||
}
|
||||
})
|
||||
|
||||
if (!playerReq.data.player) {
|
||||
@@ -61,15 +61,15 @@ async function getPlayer(uuid: string): Promise<PlayerData | null> {
|
||||
|
||||
async function getGuild(
|
||||
query: string,
|
||||
type?: GuildQuerqType,
|
||||
type?: GuildQuerqType
|
||||
): Promise<GuildData | null> {
|
||||
const reqType = type ? type : "player"
|
||||
|
||||
const guildReq: Guild = await fetch(guild, {
|
||||
params: {
|
||||
key: apikey,
|
||||
[reqType]: query,
|
||||
},
|
||||
[reqType]: query
|
||||
}
|
||||
})
|
||||
|
||||
if (!guildReq.data.guild) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
function guildLevel(exp: number): number {
|
||||
const EXP_NEEDED = [
|
||||
100000, 150000, 250000, 500000, 750000, 1000000, 1250000, 1500000,
|
||||
2000000, 2500000, 2500000, 2500000, 2500000, 2500000, 3000000,
|
||||
2000000, 2500000, 2500000, 2500000, 2500000, 2500000, 3000000
|
||||
]
|
||||
|
||||
let level = 0
|
||||
|
||||
@@ -12,7 +12,7 @@ function getLevel(exp: number): number {
|
||||
if (exp <= 1) return 1
|
||||
|
||||
return Math.floor(
|
||||
1 + REVERSE_PQ_PREFIX + Math.sqrt(REVERSE_CONST + GROWTHDIV2 * exp),
|
||||
1 + REVERSE_PQ_PREFIX + Math.sqrt(REVERSE_CONST + GROWTHDIV2 * exp)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user