View Single Post
09-30-14, 10:21 PM   #23
Alternator
A Fallenroot Satyr
 
Alternator's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 20
Sorry for spamming this thread, but just in case it is helpful

I opted to not use the cursor scanning approach, and found something which I haven't tested a lot yet but I think will work ok. (though hooksecurefunc is needed).

I determined that GetActionInfo is returning that same useless Index...
But that GameTooltip:GetSpell() will return the correct SpellID for the Mount...
In theory (and someone may rain on this?!) when picking up an action from an Action Button the tooltip for the mount will be shown.
So by hooking on GameTooltip:SetAction we can capture UselessIndex to SpellID mappings by looking at GetActionInfo and GameTooltip:GetSpell (and from there we can determine the MountIndex)

and of course
C_MountJournal.Pickup to capture UselessIndex to MountIndex mappings (from the Index passed to Pickup, and then from GetCursorInfo())

Naturally if this info is then wanted in a secure env it could be a pain given the sporadic nature, so really I'm just listing it as another work around for tackling this mess.