View Single Post
08-08-14, 09:58 PM   #8
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
What you could do, and I know this is hackish, but you could call "hooksecurefunc(C_MountJournal, 'Pickup', function(index) print(index, GetCursorInfo()) end)" and just store the number from GetCursorInfo() in a table as the key and the mount journal index (or spellID, or whatever you want) as the value, and just cross-reference that table for your button.
Lua Code:
  1. local MountID2JournalID = {}
  2. hooksecurefunc(C_MountJournal, 'Pickup', function(journalID)
  3.     local _, mountID = GetCursorInfo() -- might want to confirm this is actually holding a mount spell
  4.     MountID2JournalID[mountID] = journalID
  5. end)
This probably won't work when moving from an existing action button though.

You'd probably have to keep track of what every action slot contains, so if PickupAction is called you can figure out what spellID the mount is based on what was in that slot.

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