WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   isCollected issue (https://www.wowinterface.com/forums/showthread.php?t=55587)

loff93 07-20-17 09:38 PM

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?

Lombra 07-21-17 04:38 AM

"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)

loff93 07-21-17 10:01 AM

Quote:

Originally Posted by Lombra (Post 324267)
"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?

Lombra 07-21-17 04:58 PM

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.

loff93 07-24-17 06:48 PM

Quote:

Originally Posted by Lombra (Post 324288)
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)


All times are GMT -6. The time now is 05:51 PM.

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