There's no way to get item IDs from the mount journal. C_MountJournal.GetMountInfo takes an
index (eg. 1 is the 1st mount listed, 52 is that 52nd mount listed, and so on), not an itemID, item name, mount name, or loot slot index (which is what you're passing it). Searching by name would not be effective either, since many mount items have different names than the mounts they teach.
It would be way more efficient to just check if
any mount dropped. Are there even any mounts that drop from mobs that
aren't rare?
lua Code:
local c = { r = 1, g = 1, b = 1 } -- change values to use some color other than white
local f = CreateFrame("Frame")
f:RegisterEvent("LOOT_OPENED")
f:SetScript("OnEvent", function()
for i = 1, GetNumLootItems() do
local link = GetLootSlotLink(i)
local _, _, _, _, _, _, subtype, _, _, icon = GetItemInfo(link)
if subtype == "Mount" then -- change if you're not playing in English
PlaySoundFile("Sound\\Creature\\Ragnaros\\RagnarosSpecialAttack01.wav")
RaidNotice_AddMessage(RaidWarningFrame, "|T"..icon..":0|t "..link.." mount dropped!", c)
return -- no need to keep looking
end
end
end)