Quantcast
Wardrobe problem - WoWInterface
Thread Tools Display Modes
08-12-16, 03:57 PM   #1
pkiller162
A Kobold Labourer
Join Date: Aug 2016
Posts: 1
Wardrobe problem

Trying to alert the user when they have unlocked a new tmog in the wardrobe (very much like the current blizz chat message but for any quality items) and have come up with a solution however it only seems to work half the time. Im new to LUA so might have missed something obvious :P

Every time a TRANSMOG_COLLECTION_UPDATED fires, I get the latest appearance (C_TransmogCollection.GetLatestAppearance) and from that, get the first source from that appearance ID (C_TransmogCollection.GetAppearanceSources) and display its name in the chat (C_TransmogCollection.GetAppearanceSourceInfo contains the items name). This works very well however, it seems like half the time, GetAppearanceSourceInfo returns nil.

For a normal item, the GetAppearanceSourceInfo returns this:
Code:
11 1076 false 132543 true [Expedition Boots] [Expedition Boots] 4
But for an item that didnt work:
Code:
7 1351 false 132606 false []  6
Any idea why this might be the case?

EDIT: Solved! There might be multiple sources for a transmog item, some may even be different armour type. Its not safe just taking the first source as it causes nil values if you cant equip it. Search through them all to find your armour type

Last edited by pkiller162 : 08-12-16 at 07:17 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Wardrobe problem

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