View Single Post
05-16-16, 07:18 AM   #50
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Originally Posted by MunkDev View Post
Does someone know how to get the localized string for items now that GetAuctionItemClasses has been removed?

This is what I used to have:
Lua Code:
  1. local QUEST = select(10, GetAuctionItemClasses())
GetItemInfo has 2 new returns:
[12] - itemClassID (number)
[13] - itemSubClassID (number)

You could get their values (localized strings) by either the 6th and the 7th return of GetItemInfo or by:
GetItemClassInfo(itemClassID)
GetItemSubClassInfo(itemClassID, itemSubClassID)

You could also compare the itemClassIDs directly to LE_ITEM_CLASS_* (LE_ITEM_CLASS_QUESTITEM in your case as Edik pointed out above)

There is one case which is somewhat inconsistent and that is LE_ITEM_CLASS_CONSUMABLE.
GetItemClassInfo(LE_ITEM_CLASS_CONSUMABLE) returns nil, but the 6th return of GetItemInfo for consumable items is "" (an empty string).