I have now accepted that I will have to dismount after the player has mounted.
To do this I have the following chunk:
Lua Code:
local f = CreateFrame("Frame")
f:SetScript(
"OnEvent",
function(self, event, ...)
if event == "UNIT_SPELLCAST_SUCCEEDED" then
unit, spellGUID, spellID = ...
print("UNIT_SPELLCAST_SUCCEEDED", unit, spellGUID, spellID)
for k, v in pairs(C_MountJournal.GetMountIDs()) do
if v == spellID then
print("found")
end
end
end
end
)
f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
I cannot work out why I never print
found, but maybe I am too close to see the error.