Mount drop message & sound
Hello, I'm trying to make an addon to announce when a rare mount drops, since I almost never pay attention when looting the corpses and I'm using a fast loot addon so I don't see the loot window.
Code:
-- Mount drop message & sound |
You didn't mention what the problem was! But I'm guessing that the mount ID returned from C_MountJournal.GetMountInfo is not the same as the item ID.
|
Quote:
The loop should be starting at 1, not 0. You can get the hyperlink for the item in the loot window via GetLootSlotLink(i), pull the item ID out of that with strsplit(':', link) or something and compare them to a table of item IDs for the mounts. The event is also being unregistered, so the OnEvent script is never going to run. |
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:
|
All times are GMT -6. The time now is 11:02 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI