Chest loot detection
Hi,
I'm trying to make a loot assistant addon form my guild, to help our raid master to keep a count of player loots. I'm near to finish it, but i have a problem detecting loot when loot source is not from corpse but from a chest (like krossus). Originaly I try this code for loot detection: Code:
elseif (event == "LOOT_OPENED") then May someone help me a bit with that? Sorry for my bad english and thanks in advance |
On LOOT_READY you can iterate from 1 to GetNumLootItems() and call GetLootSourceInfo(index) to get the GUID of the unit being looted.
If you're looting a chest, the GUID will start with the word "GameObject", and will contain a unique identifier for that particular object as the 5th numeric field; for example the Felbound Chest from Krosus has an object ID of 248513, which you can see in wowhead's url, so its GUID will look something like "GameObject-0-0-0-0-248513-0". I'm not sure whether you want to match loot to a specific boss or just want to know whether a "boss" is being looted, or if any high level boss-like loot has been found, because there are a few different ways to go from there. |
Hi, semlar
Yes, the idea is to detect when any high level (raid) boss-like loot has been found, being in raid and in master looter mode. Since i've posted the original post, i've made a little more investigation and found that BAG_OPEN event refers to lootable objects being opened. So, i have replicated the code under LOOT_OPENED event to see if it can help me: Code:
elseif (event == "BAG_OPEN") then Pittyfully, loot funtions are hard to test since its conditions are hardly repeatable, i have to wait to be in raid, be masterlooter and kill a boss whose loot come from an object. I will try both methods next week, when we kill Krosus again. Thank you very much!! |
All times are GMT -6. The time now is 02:26 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI