import type { Ped } from '../classes/Ped'; 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 Compendium { /** * @param category * @param subcategory * @returns */ static getSubcategorySampleToastTitle(category: string | number, subcategory: string | number): string { return inv('0x5E50C67EB60951E6', _h(category), _h(subcategory), ras()); } /** * herbType: https://alloc8or.re/rdr3/doc/enums/eHerbType.txt * Vector3: Player Location * * @param herbType * @param pos */ static herbPicked(herbType: string | number, pos: Vector3): void { inv('0x725D52F21A5E9E09', _h(herbType), f(pos.x), f(pos.y), f(pos.z)); } /** * @param animalStatItem * @param pos * @returns */ static getMapDiscoverableFromStatItem(animalStatItem: string | number, pos: Vector3): number { return (inv('0x729D54121A5E9E20', _h(animalStatItem), f(pos.x), f(pos.y), f(pos.z), rai())) & 0xFFFFFFFF; } /** * Only gets called if bSetObserved is true and animalType is matching * * @param ped * @param disableCompendiumToast */ static horseObserved(ped: Ped, disableCompendiumToast: boolean): void { inv('0x725D58F2125E5E50', ped.handle, disableCompendiumToast); } /** * Only used in R* SP Scripts, category = GANGS * *COMPENDIUM_GET_NUM_OF_ENTRIES_IN** * * @param category * @returns */ static N_0x729D52461AEA9E22(category: string | number): int { return inv('0x729D52461AEA9E22', _h(category), rai()); } /** * @param compendiumEntry * @returns */ static animalHasStamp(compendiumEntry: int): boolean { return !!inv('0xBCF569FC32FFF456', compendiumEntry, rai()); } /** * NET_PLAYER_HORSE_PROCESS_EVENT_HORSE_BREAKING * * @param ped */ static horseWildBroken(ped: Ped): void { inv('0x725852D21A2E9E50', ped.handle); } /** * @param p0 */ static gangEncountered(p0: any): void { inv('0x725D52F21A5E9E05', p0); } /** * @param ped * @param bondingLevel */ static horseBonding(ped: Ped, bondingLevel: int): void { inv('0x725D52F21A5E9E50', ped.handle, bondingLevel); } /** * @param compendiumEntry * @returns */ static animalHasSample(compendiumEntry: int): boolean { return !!inv('0x6FC24625E4FCAC27', compendiumEntry, rai()); } /** * @param category * @param ped * @returns */ static getEntryByPedIndex(category: string | number, ped: Ped): int { return inv('0x1CFA0219D8E1CF25', _h(category), ped.handle, rai()); } /** * @param p0 * @param p1 */ static gangCampFound(p0: any, p1: any): void { inv('0x725D52F21A5E9E03', p0, p1); } /** * @param compendiumEntry */ static animalSetDiscovered(compendiumEntry: int): void { inv('0x67F35C7C9F2BDCFE', compendiumEntry); } /** * @param category * @param ped * @returns */ static getSubcategoryPedIsIn(category: string | number, ped: Ped): number { return (inv('0x9B657550DF55EC96', _h(category), ped.handle, rai())) & 0xFFFFFFFF; } /** * Only used in R* SP Scripts, category = GANGS * *COMPENDIUM_GET** * * @param category * @returns */ static N_0x725D52F21A5E9E22(category: string | number): float { return inv('0x725D52F21A5E9E22', _h(category), raf()); } /** * @param p0 * @param p1 */ static gangHideoutFound(p0: any, p1: any): void { inv('0x725D52F21A5E9E08', p0, p1); } /** * @param category * @param subcategory * @param count * @returns */ static getEntryByIndexInSubcategory(category: string | number, subcategory: string | number, count: int): int { return inv('0x5CEB63B2E3D9895F', _h(category), _h(subcategory), count, rai()); } /** * @param animalType * @param disableCompendiumToast */ static animalObservedByStatName(animalType: string | number, disableCompendiumToast: boolean): void { inv('0x725D52F26A5E9E10', _h(animalType), disableCompendiumToast); } /** * @param ped * @param category */ static fishCaught(ped: Ped, category: string | number): void { inv('0x725D52F21A5E9E00', ped.handle, _h(category)); } /** * @param ped * @returns */ static getShortDescriptionFromPed(ped: Ped): number { return (inv('0x6C5E5D48E48B4C65', ped.handle, rai())) & 0xFFFFFFFF; } /** * @param category * @param subcategory * @returns */ static getSubcategorySampleToastDescComplete(category: string | number, subcategory: string | number): string { return inv('0x59D4D68CDB82427C', _h(category), _h(subcategory), ras()); } /** * @param category * @param subcategory * @returns */ static getSubcategoryToastAppId(category: string | number, subcategory: string | number): any { return inv('0x2BF30D9D4D680112', _h(category), _h(subcategory)); } /** * @param p0 */ static gangBountyCaptured(p0: any): void { inv('0x725D52F21A5E9E06', p0); } /** * @param category * @param subcategory * @returns */ static getSubcategorySampleToastDescProgress(category: string | number, subcategory: string | number): string { return inv('0x82BFB5B367957699', _h(category), _h(subcategory), ras()); } /** * @param p0 */ static gangMemberKilled(p0: any): void { inv('0x725D52F21A5E9E07', p0); } /** * @param p0 */ static gangAmbushSurvived(p0: any): void { inv('0x725D52F21A5E9E04', p0); } /** * @param category * @param animalType * @returns */ static getSubcategoryHashFromAnimalType(category: string | number, animalType: string | number): number { return (inv('0xCD278B6BFBDBDC22', _h(category), _h(animalType), rai())) & 0xFFFFFFFF; } /** * @param animalType * @param baitType * @returns */ static fishGetLureSuitabilityByStatItem(animalType: string | number, baitType: string | number): int { return inv('0x725D52F21A5E9E81', _h(animalType), _h(baitType), rai()); } /** * @param category * @param subcategory * @returns */ static getNumEntriesInSubcategory(category: string | number, subcategory: string | number): int { return inv('0xF58A0C0E086E8E36', _h(category), _h(subcategory), rai()); } /** * @param ped * @returns */ static getStudyAwardId(ped: Ped): any { return inv('0x9F678782720349E4', ped.handle); } /** * @param compendiumEntry * @returns */ static animalGetSampleInventoryItem(compendiumEntry: int): any { return inv('0x4E4ACAE1C671A9DA', compendiumEntry); } /** * @param category * @returns */ static getNumOfEntriesInCategory(category: string | number): int { return inv('0x729D52F61A5A9E22', _h(category), rai()); } /** * @param ped * @returns */ static wasAnimalObserved(ped: Ped): boolean { return !!inv('0x23B5E9C5160BC04F', ped.handle, rai()); } /** * @param category * @param animalType * @returns */ static getEntryByStatItem(category: string | number, animalType: string | number): int { return inv('0x66EC938394D76C85', _h(category), _h(animalType), rai()); } }