import { Vector2 } from '../types/Vector2'; import { Vector3 } from '../types/Vector3'; import { Vector4 } from '../types/Vector4'; import { Color } from '../types/Color'; import { createFromHandle } from '../types/HandleRegistry'; import { inv, rai, raf, ras, rav, pvi, pvf, pvv, pvii, pvfi, _h, f, int, uint, float, Hash, u8, u16, u32, u64, i8, i16, i32, i64 } from '../types/NativeAliases'; export class Unlock { /** * @param unlockHash * @param toggle */ static setVisible(unlockHash: string | number, toggle: boolean): void { inv('0x46B901A8ECDB5A61', _h(unlockHash), toggle); } /** * @param unlockHash * @returns */ static isLootable(unlockHash: string | number): boolean { return !!inv('0x66BF197E066050DE', _h(unlockHash), rai()); } /** * @param unlockHash * @param flag * @returns */ static isUnlockFlagSet(unlockHash: string | number, flag: int): boolean { return !!inv('0x6B6369647F26F09F', _h(unlockHash), flag, rai()); } /** * @param unlockHash * @returns */ static isUnlocked(unlockHash: string | number): boolean { return !!inv('0xC4B660C7B6040E75', _h(unlockHash), rai()); } /** * @param unlockHash * @param toggle */ static setNew(unlockHash: string | number, toggle: boolean): void { inv('0xA6D79C7AEF870A99', _h(unlockHash), toggle); } /** * @param unlockHash * @returns */ static isNew(unlockHash: string | number): boolean { return !!inv('0x644166BA7AA49DEA', _h(unlockHash), rai()); } /** * @param unlockHash * @returns outData */ static getItemRoleUnlockInfo(unlockHash: string | number): number { const result = inv('0x7C1C2062CFAD06FE', _h(unlockHash), pvi()); return result; } /** * @param unlockHash * @param toggle */ static setUnlocked(unlockHash: string | number, toggle: boolean): void { inv('0x1B7C5ADA8A6910A0', _h(unlockHash), toggle); } /** * @param unlockHash * @returns */ static isVisible(unlockHash: string | number): boolean { return !!inv('0x8588A14B75AF096B', _h(unlockHash), rai()); } }