mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Mirror the classID extension just added to GetTalentIDByIndex. classID is the 4th arg (GetTalentSpellID(tab, idx[, rank[, classID]])); pass rank as nil to keep its default. A numeric classID resolves the talent against the Talent.dbc / TalentTab.dbc flat arrays via the shared ResolveTalentRecordForClass, then reads SpellRank[rank-1] off the record. One semantic difference from the same-class path: there's no player currentRank for a class you aren't, so a cross-class query with no explicit rank defaults to rank 1 (the canonical spellID) rather than delegating to the engine's GetTalentInfo. Verified in-game: own-class parity at rank 1 (14524 == 14524), Mage (8) tab1 talent1 -> Arcane Subtlety (11210 r1, 12592 r2, r9 nil), default-rank cross-class == rank 1, and bad tab/index/class all nil.