Update helper.ts (#1311)

修复256级以后等级清零的问题。
This commit is contained in:
风小七 2025-10-12 20:36:31 +08:00 committed by GitHub
parent 2afdb2a0da
commit 315d847f06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -163,8 +163,8 @@ export function getQQVersionConfigPath(exePath: string = ''): string | undefined
export function calcQQLevel(level?: QQLevel) {
if (!level) return 0;
const { crownNum, sunNum, moonNum, starNum } = level;
return crownNum * 64 + sunNum * 16 + moonNum * 4 + starNum;
const { penguinNum, crownNum, sunNum, moonNum, starNum } = level;
return penguinNum * 256 + crownNum * 64 + sunNum * 16 + moonNum * 4 + starNum;
}
export function stringifyWithBigInt(obj: any) {
@ -204,4 +204,4 @@ export function parseAppidFromMajor(nodeMajor: string): string | undefined {
}
return undefined;
}
}