Thread Tools Display Modes
04/06/14, 01:43 AM   #1
thifi
 
thifi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 10
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?

Last edited by thifi : 04/06/14 at 01:43 AM. Reason: Typo in subject
  Reply With Quote
05/02/14, 03:53 PM   #2
Kaolas
Join Date: May 2014
Posts: 1
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.
  Reply With Quote
05/03/14, 02:07 AM   #3
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by thifi View Post
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.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Is GetItemCraftingInfo limited or buggy?


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