Thread Tools Display Modes
10-21-20, 06:22 AM   #1
Partholan
A Murloc Raider
 
Partholan's Avatar
Join Date: Oct 2020
Posts: 4
C_TransmogCollection.GetAppearanceSources does not return all sources

Hello everyone,
first of all a big thank you to everyone here. I have often found solutions to my problems here.

Unfortunately not today

My goal:
To create a "CSV" list of transmog to filter them in Excel etc.

Lua Code:
  1. --example for Legs
  2. local index = 1
  3. local output = {}
  4. output[index]=table.concat({"appearanceCollected","visualId","sourceId","sourceCollected","itemId","sourceType"},";")
  5.  
  6. local sourceNames = {"","Boss Drop","Quest","Vendor","World Drop","Achievement","Profession"}
  7.  
  8. local appearancesList = C_TransmogCollection.GetCategoryAppearances(10) --Legs
  9. for appearanceIndex = 1, #appearancesList do
  10.     local appearancesCollected = appearancesList[appearanceIndex].isCollected
  11.     local appearancesVisualID = appearancesList[appearanceIndex].visualID
  12.  
  13.     local appearanceInfos = {}
  14.     local sourcesList = C_TransmogCollection.GetAppearanceSources(appearancesVisualID)
  15.     for sourceIndex = 1, #sourcesList do
  16.         index = index + 1
  17.         appearanceInfos[1] = tostring(appearancesCollected)
  18.         appearanceInfos[2] = appearancesVisualID
  19.         appearanceInfos[3] = sourcesList[sourceIndex].sourceID
  20.         appearanceInfos[4] = tostring(sourcesList[sourceIndex].isCollected)
  21.         appearanceInfos[5] = sourcesList[sourceIndex].itemID
  22.         appearanceInfos[6] = sourceNames[(sourcesList[sourceIndex].sourceType or 0) + 1]
  23.         output[index] = table.concat(appearanceInfos,";")
  24.     end    
  25. end
  26.  
  27. output = table.concat(output,"\n")
  28. --output is then sent to an editbox
This works syntactically.

My problem:
For example:
C_TransmogCollection.GetAppearanceSources(11296) creates three entries
Code:
visualId	sourceId	itemId
11296		21670		45141
11296		21968		45536
11296		22087		45846
However, there should be at least four (maybe more), since the item (itemID=155942) also has the appearance (appearanceID=11296) (see C_TransmogCollection.GetItemInfo(155942)).
I am on the correct character to wear these items (Level 50 Feral Druid).

My question:
Is this a bug in C_TransmogCollection.GetAppearanceSources or am I missing something somewhere?

Greetings
Partholan
  Reply With Quote
10-22-20, 09:40 AM   #2
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by Partholan View Post
Code:
visualId	sourceId	itemId
11296		21670		45141
11296		21968		45536
11296		22087		45846
However, there should be at least four (maybe more), since the item (itemID=155942) also has the appearance (appearanceID=11296) (see C_TransmogCollection.GetItemInfo(155942))
When I look up those items on Wowhead I notice some items have the same name, so maybe there is some optimization under the hood to only return unique item names instead of IDshttps://wow.tools/dbc/?dbc=itemappea...4#search=11296
  Reply With Quote
10-23-20, 06:42 AM   #3
Partholan
A Murloc Raider
 
Partholan's Avatar
Join Date: Oct 2020
Posts: 4
Originally Posted by Ketho View Post
I notice some items have the same name
This is how I found out about the problem; Loot from TW-Raids has the same look as the original pieces, but a different ItemID (which I did not find in my Mog-List).

Originally Posted by Ketho View Post
only return unique item names instead of IDs
Comparing the names is a good idea, even if I am a bit reluctant to compare strings when ids (should) exist
In addition, the IDs are immediately available, while you sometimes have to wait for the names.


Otherwise I read from your answer that you didn't find a mistake in my approach and that it is probably a bug.
  Reply With Quote
10-23-20, 07:09 AM   #4
Partholan
A Murloc Raider
 
Partholan's Avatar
Join Date: Oct 2020
Posts: 4
Originally Posted by Partholan View Post
Comparing the names is a good idea
Never mind; there are also items that have the same name but a different appearance.
  Reply With Quote
10-23-20, 10:26 AM   #5
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
Originally Posted by Partholan View Post
Never mind; there are also items that have the same name but a different appearance.
This is what I see when I mouse over an item and it says "You have collected this appearance, but from another item".
__________________
Author of JWExpBar and JWRepBar.
  Reply With Quote
10-24-20, 02:57 AM   #6
Partholan
A Murloc Raider
 
Partholan's Avatar
Join Date: Oct 2020
Posts: 4
Originally Posted by JDoubleU00 View Post
This is what I see when I mouse over an item and it says "You have collected this appearance, but from another item".
This is true; however, I then need corresponding lists of items, which I can run through and compare with the output from C_TransmogCollection.

Sources in C_TransmogCollection are the following:
  • Boss Drop
  • Quest
  • Vendor
  • World Drop
  • Achievement
  • Profession
For "Boss Drop" I can use the Encounter/Dungeon Journal, but for everything else I do not know any lists.

So if some quest in the farthest corner of the world has an item as a reward, which doesn't show up with its ItemID in C_TransmogCollection, I would never notice that.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » C_TransmogCollection.GetAppearanceSources does not return all sources

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