ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Is GetItemCraftingInfo limited or buggy? (https://www.esoui.com/forums/showthread.php?t=618)

thifi 04/06/14 01:43 AM

Is GetItemCraftingInfo limited or buggy?
 
Hi,

I'm trying to query an item's crafting info inside an addon I'm developing and I'm getting strange results.

For a lot of items GetItemCraftingInfo returns valid values, but for a lot, the returned results are 0.

Example:
- link: [[|H2DC50E:item:45052:19:4:26844:19:4:0:0:0:0:0:0:0:0:0:4:0:0:63:0|h[maple restoration staff of shock^n]|h]]
- returned TradeSkillType = 0
- returned ItemType = 0

I found a lot of items like this in my char's inventory, sample code snippet to prove it:

Code:

...
local x,y = GetItemCraftingInfo(bagId, slotIdx)
local z = GetItemType(bagId, slotIdx)

if (y ~= z) then
    debug(colYellow .. "Item: " .. temName .. ", x: " .. x .. ", y: " .. y .. ", z: " .. z)
else
    debug(colGreen .. "Item: " .. itemName .. ", x: " .. x .. ", y: " .. y .. ", z: " .. z)
end
...

Is this a bug or a limitation?

Kaolas 05/02/14 03:53 PM

I've been working on another problem with getting the item info I want out of the API, but I found that when I called GetItemCraftingInfo on each item in my backpack and simply d() printed out the results, it only returned data for actual crafting components (ore, wood, plants, runes, upgrade components, etc.). For items that were armor, weapons, jewelry, or otherwise already "put together", it would return nil and/or zeros.

Iyanga 05/03/14 02:07 AM

Quote:

Originally Posted by thifi (Post 2901)
Is this a bug or a limitation?

I don't think the function is supposed to work on crafted items, but just for crafting components to determine the component details.

Hm, I should not just read the question, but other posts, too. :)
Yeah, what Kaolas said.


All times are GMT -6. The time now is 04:30 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI