Thread: GetItemInfo
View Single Post
03-23-18, 03:00 AM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
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

Last edited by Kanegasi : 03-23-18 at 03:06 AM.
  Reply With Quote