I am trying to "peek" at all items dropped (loot messages) and am at the point where I have the item ID from the message, eg " Mïckeyy receives loot: [Thu'rayan Lash]." or "You receive item: [Illidari Shoulders]." and from there I can get item ID: [01:56:02] [Illidari Shoulders]  [Armor] [Leather] [INVTYPE_SHOULDER]
However I have not yet tried it in a party/raid because the documentation of GetItemInfo() says that unless it's in your bags/bank you will not be able to use it.
If this therefore does not work, is there a better way to get information on dropped loot?
Only if you use the item name. If you plug the itemID into GetItemInfo, you will get the info, but if you don’t have the item, you will initially not get info. Listen for the GET_ITEM_INFO_RECEIVED event and plug the first return back into GetItemInfo (which is the itemID you received the info for) and you’ll get the returns.
Here’s a short timeline of what I mean:
12:00:01 Loot message
12:00:01 local itemName=GetItemInfo(itemID)
12:00:01 itemName is nil
12:00:03 GET_ITEM_INFO_RECEIVED fires
12:00:03 local itemName=GetItemInfo(itemID)
12:00:03 itemName now has the item name
Say we are interested in the item level. We receive a loot message, we get the item string and from that calling GetItemInfo(itemString) returns all the information, including the ilvl.
Supposing we get nils, now we then wait for GET_ITEM_INFO_RECEIVED which sends us only the itemID so I assume that now I can call GetItemInfo(itemString) and will see the information. And I assume that since the GET_ITEM_INFO_RECEIVED carries only the itemID and no other parameters it tells me that it has updated my client on ALL possible variations of this itemID.
Have not tried it yet...
|All times are GMT -6. The time now is 04:11 AM.|
vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI