View Single Post
08-09-14, 12:13 PM   #18
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
If you also need the index from the mount journal I would generate a table in-game with [spellID] = journalIndex, because it appears to be an alphabetically sorted list rather than a static value and I wouldn't trust it to be the same across localizations.

Something like this..
Lua Code:
  1. local SpellToJournal = {} -- [spellID] = journalIndex
  2. for i = 1, C_MountJournal.GetNumMounts() do
  3.     local _, spellID = C_MountJournal.GetMountInfo(i)
  4.     SpellToJournal[spellID] = i
  5. end

Edit: Nimhfree confirmed that the indexes are definitely not the same in different languages.

Last edited by semlar : 08-09-14 at 12:32 PM.