mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Backport the optional-deps getter vanilla never exposed (it ships GetAddOnDependencies for the required array only). Resolves the arg the same way stock Script_GetAddOnDependencies does -- numeric via FUN_ADDON_GET_BY_INDEX, string via the by-name hash lookup 0x0051E350 (returns record+0x48; subtract to recover the base) -- then walks the OptionalDeps descriptor at record+0x38 (count +0x3C, data +0x40), verified against the TOC parser FUN_0051C9B0. Arg/error behavior matches stock: out-of-range index or a non-string/number arg errors; an unknown name returns nothing.