WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Classic - AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=179)
-   -   Need help with API about whose loot is this? (https://www.wowinterface.com/forums/showthread.php?t=57745)

jwu98 12-21-19 11:26 PM

Need help with API about whose loot is this?
 
I'm new to the API, brand new - this is the first add-on I've ever bothered to try to create.

I'm crawling through the API but I can't find what I need so I figured I'd ask here.

I want to make an add-on can show whose loot is this supposed to be.

GetLootInfo can show: Whether you are eligible to loot this item or not. Locked items are by default shown tinted red. If there is any API can show who is eligible to loot this item?

Really need help!!!!

Thanks.

Kanegasi 12-22-19 01:49 AM

It is not possible in classic for a single install to determine who needs to loot a corpse. The information on retail is only available from the tooltip, so with that line gone from classic, we're blind. It is possible to query if a corpse is yours with CanLootUnit(unit), but in order for a whole party to figure out who "owns" the corpse, an addon or weakaura querying that function has to be installed by everyone.

If you intend on making that and can get a whole group to install it, the way Blizzard uses it on retail suggests the return won't work immediately after a mob death, you have to delay it by at least 1 second. The relevant usage is in retail's tutorial code:

https://github.com/Gethe/wow-ui-sour...ogic.lua#L1501

SDPhantom 12-24-19 02:24 AM

From my observations, the only times a loot item is tinted red is either you're in a group with master looter on or the mob dropped a quest item that you already have enough of to complete the objective. Loot intended for other people simply doesn't show up in classic.


All times are GMT -6. The time now is 05:39 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI