Im working on an addon to make a masterlooter's life easier.
Im having no problems trapping the LOOT_OPENED event and listing the loot.
However, im having probs when trying to separate the loot that can be distributed using the GiveMasterLoot() and loot that can be looted normally using LootSlot().
It's especially hard to tell because when i, for example, disenchant an item and it also triggers the same event. But also if you loot a chest with BoP items in it. And another situation that could occur is when a master looter decides to open up a bag of gems, or a lockbox with BoP items in it. So just checking loot quality in the slots vs GetLootThreshold() is not enough.
Is there a way to tell which lootslot requires which function? Or another way to put it. How do i tell what loot is for the master looter himself and what loot does he need to redistribute to the raid?
In addition, is it possible to tell what the loot source is? UnitGUID("target") would not be reliable because i can obviously target any mob and start disenchanting an item and also trigger the loot event. Loot source obviously isn't current target in this situation.
Easiest way I have found to determine if items need to be master looted is by hooking the OPEN_MASTER_LOOT_LIST event. Then you know anytime the API opens a ML menu. No you can't determine what mob dropped an item using the API. Best you can do is guess by mob targeting or a DB of items.
I see, but the only way i could find that event would be triggered is to LootSlot() every slot. Indeed, when there's a masterloot slot the OPEN_MASTER_LOOT_LIST event gets called. However, every other lootitem gets autolooted, even the stuff you might not want to loot.