Determining a recipe's "learnability."
I've an addon that currently will look through a merchant's inventory and tell the user how many recipes he has. I'd also like it to list how many recipes he has that are currently learnable.
I tried using the function IsUsableItem(itemLink), but that function returns true for any recipe I currently have in my inventory (which, technically, is usable, I suppose). What function should I be using to determine an item's "learnability?" The more information I can get, the better. Here's my current merchant search: Lua Code:
|
There is a usable return in GetMerchantItemInfo. That might work better?
Code:
local name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(index) |
Interesting. That returns something different than IsUsableItem(item); however, it will still return true if the recipe is already known.
Any suggestions there? |
Quote:
|
Tooltip scanning comes to my mind. You create a tooltip and then you check for the line that says this recipe is known. Unluckily I never tried it myself so I just know the theory ;)
|
All times are GMT -6. The time now is 12:27 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI