Quantcast
C_TransmogCollection.GetAppearanceSources does not return all sources - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

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