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 Zone { /** * Returns the zone's name hash if its type matches one of the following: * * @param pos * @returns */ static getWaterMapZoneAtCoords(pos: Vector3): number { return (inv('0x5BA7A68A346A5A91', f(pos.x), f(pos.y), f(pos.z), rai())) & 0xFFFFFFFF; } /** * Returns name hash, see common:/data/levels/rdr3/mapzones.meta type (-1 matches any type): * class CMapZone * { * public: * enum class Type * { * STATE, * TOWN, * LAKE, * RIVER, * OIL_SPILL, * SWAMP, * OCEAN, * CREEK, * POND, * GLACIER, * DISTRICT, * TEXT_PRINTED, * TEXT_WRITTEN * }; * }; https://github.com/femga/rdr3_discoveries/tree/master/zones & https://alloc8or.re/rdr3/doc/enums/CMapZone__Type.txt * * @param pos * @param type * @returns */ static getMapZoneAtCoords(pos: Vector3, type: int): number { return (inv('0x43AD8FC02B429D33', f(pos.x), f(pos.y), f(pos.z), type, rai())) & 0xFFFFFFFF; } }