WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   C_TransmogCollection.GetAppearanceSources does not return all sources (https://www.wowinterface.com/forums/showthread.php?t=58336)

Partholan 10-21-20 06:22 AM

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

Ketho 10-22-20 09:40 AM

Quote:

Originally Posted by Partholan (Post 337360)
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

Partholan 10-23-20 06:42 AM

Quote:

Originally Posted by Ketho (Post 337382)
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).

Quote:

Originally Posted by Ketho (Post 337382)
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 :D
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.

Partholan 10-23-20 07:09 AM

Quote:

Originally Posted by Partholan (Post 337393)
Comparing the names is a good idea

Never mind; there are also items that have the same name but a different appearance.

JDoubleU00 10-23-20 10:26 AM

Quote:

Originally Posted by Partholan (Post 337394)
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".

Partholan 10-24-20 02:57 AM

Quote:

Originally Posted by JDoubleU00 (Post 337395)
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.


All times are GMT -6. The time now is 01:03 PM.

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