This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,80 @@
// Metro module 1890 (f1891).
import { PerkConfigType } from "./types";
import { has, deserialize, getFlag } from "../../../_bundle/HighLow";
import { PerkSource } from "../../../_bundle/Module1892";
let getPerkSource;
const parseServerPerkConfigKind = function parseServerPerkConfigKind(a0) {
if (a0.kind != null) {
const type = a0.kind.type;
if (PerkConfigType.INCREASED_FILE_UPLOAD_SIZE === type) {
return {
type: PerkConfigType.INCREASED_FILE_UPLOAD_SIZE,
maxSize: a0.kind.max_size
};
}
if (PerkConfigType.INCREASED_GUILD_LIMIT === type) {
return {
type: PerkConfigType.INCREASED_GUILD_LIMIT,
maxGuilds: a0.kind.max_guilds
};
}
return void 0;
}
};
getPerkSource = function getPerkSource(a0, a1) {
let source;
if (a0 != null) {
const r20 = a0.configByPerk[String(a1)];
if (r20?.source != null) {
source = r20.source;
} else {
const r23 = a0 == null;
let r8 = false;
if (!r23) {
const activePerksBitmask = a0.activePerksBitmask;
const r10 = Math.floor(a1 / 64);
r8 = !(r10 >= activePerksBitmask.length) && has(deserialize(activePerksBitmask[r10]), getFlag(a1 % 64));
}
source = r8 ? [PerkSource.SOURCE_NITRO] : void 0;
}
return source;
}
};
export function parseServerPerks(a0) {
if (a0 == null) {
return null;
}
const configByPerk = {};
for (const item of Object.entries(a0.config_by_perk)) {
const [r34, r12] = item;
configByPerk[r34] = {
source: r12.source,
kind: parseServerPerkConfigKind(r12)
};
}
return {
activePerksBitmask: a0.active_perks_bitmask,
configByPerk,
rulesVersion: a0.rules_version
};
}
export function hasPerk(a0, a1) {
if (a0 == null) {
return false;
}
const activePerksBitmask = a0.activePerksBitmask;
const r5 = Math.floor(a1 / 64);
return !(r5 >= activePerksBitmask.length) && has(deserialize(activePerksBitmask[r5]), getFlag(a1 % 64));
}
export { getPerkSource };
export function getPerkConfig(a0, a1) {
if (a0 != null) {
const r9 = a0.configByPerk[String(a1)];
if (r9 != null) {
return {
source: getPerkSource(a0, a1),
kind: r9.kind
};
}
}
}
+8
View File
@@ -0,0 +1,8 @@
// Metro module 1891 (f1892).
const r9 = {
INCREASED_FILE_UPLOAD_SIZE: 0,
0: "INCREASED_FILE_UPLOAD_SIZE",
INCREASED_GUILD_LIMIT: 1,
1: "INCREASED_GUILD_LIMIT"
};
export { r9 as PerkConfigType };