Thread Tools Display Modes
07-20-17, 09:38 PM   #1
loff93
A Fallenroot Satyr
Join Date: Apr 2017
Posts: 25
isCollected issue

Hey
First it seemed to work as I tested 2 items that I had and didn't, but when I tested with this item it's wrong.

Am I actually using it correctly?
Code:
local visualID = C_TransmogCollection.GetItemInfo(itemID)
local _, appearanceVisualID, _, _, isCollected = C_TransmogCollection.GetAppearanceSourceInfo(visualID)
if I'm not mistaken the visualID is correct. I assume sourceID and visualID is the same

If you check the image below it will show that I have collected the item. Any idea why?
http://imgur.com/a/b5T0q

Also - what is really the difference between visualID and appearanceVisualID?
  Reply With Quote
07-21-17, 04:38 AM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
"Visual" ID is the same as "appearance" ID is the same as "visual appearance" ID. It's a bit confusing how they use all these variants interchangibly. The appearance ID essentially refers to the item model and texture, while a source ID refers to a specific item.

You need the source ID:
Code:
local visualID, sourceID = C_TransmogCollection.GetItemInfo(itemID)
__________________
Grab your sword and fight the Horde!
  Reply With Quote
07-21-17, 10:01 AM   #3
loff93
A Fallenroot Satyr
Join Date: Apr 2017
Posts: 25
Originally Posted by Lombra View Post
"Visual" ID is the same as "appearance" ID is the same as "visual appearance" ID. It's a bit confusing how they use all these variants interchangibly. The appearance ID essentially refers to the item model and texture, while a source ID refers to a specific item.

You need the source ID:
Code:
local visualID, sourceID = C_TransmogCollection.GetItemInfo(itemID)
Thanks a lot - worked!
Edit:
Code:
if isCollected == false then
Shows all items (plate, cloth, leather ..), I read that someone said it would only show items you could actually unlock on that character which is false. Can't find any good methods/APIs so I'm wondering if anyone got suggestions on how to check if the item can actually can be unlocked by the character you are using?

Last edited by loff93 : 07-21-17 at 01:12 PM.
  Reply With Quote
07-21-17, 04:58 PM   #4
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Don't remember exactly, and I can't check now, but I think C_TransmogCollection.GetAppearanceSources(appearanceID) might return stuff only if it's included in your wardrobe.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
07-24-17, 06:48 PM   #5
loff93
A Fallenroot Satyr
Join Date: Apr 2017
Posts: 25
Originally Posted by Lombra View Post
Don't remember exactly, and I can't check now, but I think C_TransmogCollection.GetAppearanceSources(appearanceID) might return stuff only if it's included in your wardrobe.
Where do I find what values it returns?
Edit:
Nvm.
Code:
local sources = C_TransmogCollection.GetAppearanceSources(appearanceID)

Last edited by loff93 : 07-25-17 at 01:21 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » isCollected issue

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