View Single Post
04-18-17, 11:25 AM   #1
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Currency Name to Currency ID

According to wow.gamepedia.com/API_GetMerchantItemCostItem the 3rd and 4th return values are:

itemLink
String - An itemLink for the cost item, nil if a currency.
currencyName
String - Name of the currency required, nil if an item.

I want to know how much of the currency the player has, but all the currency API functions seem to want an index or an ID, not the localized name of the currency. Am I missing something? Do I have to enumerate all the currencies until I find a localized name match to get the index or ID?
  Reply With Quote