I have been using ingeniousclown's
research assistant and love how it marks with the red or green if a trait is known or not. I decided it would be great to have this feature for provisioning recipes so didn't have to take each one out of the guild bank to see if I already knew it.
I have gotten the code up to the point where it will write the green (or red) icon, however it does it on every recipe... either all green or all red.
local function CheckIsItemLearnable(bagId, slotIndex, recipeIndex)
local numRecipeLists = GetNumRecipeLists()
for i=1, numRecipeLists do
local known,_,_,_,_,_ = GetRecipeInfo(i, recipeIndex)
if (not known) then
return true
end
end
return false
end
If I change the return to true or false in the if statement it changes the color no matter what... meaning the game is seeing them all as not known.
The GetRecipeInfo is:
GetRecipeInfo(luaindex recipeListIndex, luaindex recipeIndex)
Returns: bool known, string name, integer numIngredients, integer provisionerLevelReq, integer qualityReq, ProvisionerSpecialIngredientType specialIngredientType
obviously the recipeListIndex is listed in the code... the recipeIndex is being passed from another function .... the issue could be there too:
local recipeIndex = GetItemName(bagId, slotIndex)
So my issue could be there in creating the recipeIndex
Any help would be greatly appreciated.