Thread Tools Display Modes
10/14/20, 04:57 AM   #1
IsJustaGhost
AddOn Author - Click to view addons
Join Date: May 2020
Posts: 37
[open] DoesItemLinkFulfillJournalQuestCondition() returns wrong result

When a writ calls for "Lemon Flower Mazte", DoesItemLinkFulfillJournalQuestCondition() returns true for "Mazte" in the following code.

Lua Code:
  1. for recipeListIndex = 1, GetNumRecipeLists() do
  2.         local recipeListName, numRecipes, upIcon, downIcon, overIcon, _, recipeListCreateSound = GetRecipeListInfo(recipeListIndex)
  3.  
  4.         for recipeIndex = 1, numRecipes do
  5.             local known, recipeName, numIngredients, _, specialIngredientType = GetRecipeInfo(recipeListIndex,recipeIndex)
  6.  
  7.             local itemLink = GetRecipeResultItemLink(recipeListIndex, recipeIndex)
  8.             if DoesItemLinkFulfillJournalQuestCondition(itemLink, qIndex, 1, lineId) then

Last edited by IsJustaGhost : 10/15/20 at 05:48 PM.
  Reply With Quote
10/14/20, 07:24 AM   #2
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
I'm not sure I understand what you're saying here. DoesItemLinkFulfillJournalQuestCondition returns a bool, not a string.
  Reply With Quote
10/14/20, 08:36 AM   #3
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 626
Is there an api that can return the recipe of any given item link? Meaning it returns strings and quantities of what is required to make the item? Is there an api that will take a string, such as the name of an item and return what is required to make it?

Last edited by Sharlikran : 10/14/20 at 08:39 AM.
  Reply With Quote
10/14/20, 09:17 AM   #4
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
You can do

local craftingStationType, recipeListIndex, recipeIndex =GetRecipeInfoFromItemId(itemId)

and then use recipe APIs to look through the ingredients of the recipe. That might get what you want?
  Reply With Quote
10/14/20, 03:52 PM   #5
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 626
I'm going to wait and see how the original poster responds. That may be what he needs.
  Reply With Quote
10/14/20, 04:36 PM   #6
IsJustaGhost
AddOn Author - Click to view addons
Join Date: May 2020
Posts: 37
I apologize for the confusion. I should have said "(returns true for "Mazte")".
When using the method posted above to parse provisioning recipes the function returns true for Mazte tho the writ requires Lemon Flower Mazte. Mazte should not return a match for the quest condition.

Users of my addon have been reporting the issue with that specific DC writ. I had been only using one character that is AD, so I never ran into the issue or even new that there were different provisioning writs for the alliances. After finding that out, I made a DC character and waited for when I got the writ with Lemon Flower Mazte and I ran into the same problem.

After testing, I ended up having to dump the function and create one that checks between a trimmed down condition name and the recipe name. Also having to trim out spaces and hyphens do to the recipe name not matching the condition without "Craft" and ":0/1"

Condition, "Craft Lemon Flower Mazte:0/1"
Recipe name, "Lemon-Flower Mazte"

Both gsub'd to "LemonFlowerMazte"

if DoesItemLinkFulfillJournalQuestCondition is using string.match, I have noticed that string.match dose not match parameter 2 to the whole of parameter 1, but matching the whole of parameter 2 to anywhere in paramater 1.
string.match(parameter1, paramter2)

Last edited by IsJustaGhost : 10/15/20 at 05:46 AM.
  Reply With Quote

ESOUI » Developer Discussions » Bug Reports » [open] DoesItemLinkFulfillJournalQuestCondition() returns wrong result

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off