Thread Tools Display Modes
01-01-17, 08:21 PM   #1
JetstreamXT
A Defias Bandit
Join Date: Jan 2017
Posts: 3
/inspect Data Dump and C_TransmogCollection Functions

Hello, fairly new AddOn developer here, so I apologize if I've posted this in the wrong thread or if I've missed anything obvious in my search for help.

So, for my first project, I am attempting to create a companion addon for MogIt that would create a wishlist set based off of a target's transmog. Problem being, I cannot find anything in the WoW API that would allow me to get raw data on another player's transmog without opening the inspect window.

Furthermore, I do not fully understand the outputs of the functions in C_TransmogCollection. For example, C_TransmogCollection.GetAppearanceSources(30469) gives me this:

2 1671 false 135051 false [] 2

But I have no idea what that means or if it would be helpful to me, and searches on Google, WoW Programming, and WoWWiki have turned up nothing on these functions.

Perhaps a better route would be to add a button to the inspect tab, similar to InspectorGadgetzan, that would allow you to export someone's transmog into MogIt, which would solve the first problem, but would leave the second problem still to be dealt with.

Does anyone know if there is a function that would be able to get me raw inspect data without opening the inspect tab, or have any experience working with C_TransmogCollection functions, specifically GetAppearanceSources? Thank you very much for your time and assistance in advance, and have a great day.
  Reply With Quote
01-02-17, 11:13 AM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Hi,
You can actually do this already (kind of) by control-right clicking that one dressup button in the inspect frame. Not very obvious, I know. I don't know that you can do it without inspecting, though. You can do it without opening the inspect frame, though, as long as you use the appropriate APIs, but I don't really have any experience with that.

Most of the transmog API should be "documented" in the UI source, but I think I know what most of them do. GetAppearanceSources should return a bunch of tables. Is that really the function you tested?
__________________
Grab your sword and fight the Horde!
  Reply With Quote
01-02-17, 12:20 PM   #3
JetstreamXT
A Defias Bandit
Join Date: Jan 2017
Posts: 3
First of all, Lombra, it is an honor to make your acquaintance. I DID see the dressing room bit, but I did not see the fact that you can save an outfit out of another character's transmog. However, the problem with saving an outfit in the dressing room is that if you don't have the items' appearances, those parts of the transmog will not be saved to your outfits. With that in mind, saving an outfit as a MogIt wishlist set would provide at least two distinct advantages:

1. You can save parts of an outfit that you do not have the appearances of, so that you can remember to get them later.

2. You can see where each and every piece of an outfit can be found, regardless of whether you own the items or not.

I know that InspectorGadgetzan already does the second part, but I feel like there would be some benefit in saving it as a MogIt wishlist set based on the first point.

As for using the appropriate API's to get transmog information, it appears that both GetInventoryItemLink and GetInventoryItemID are busts, because they do not provide transmogrification information. Given this, it appears that I would need to resort to tooltip scanning for my addon to work. Given the limited number of API functions that can be used in response to INSPECT_READY (only Talent API and Inventory API functions, if I recall from WoWProgramming), I will not be able to use NotifyInspect(), and will instead have to open the inspect window in order for my addon to work.

Finally, I mainly saw the use of GetAppearanceSources from code for InspectorGadgetzan, and I am not really sure what it does. However, I have double checked my input using a simple print function in TinyPad, and it appears that the output that I listed is indeed correct for my input.

One other thing, I apologize for not getting in contact with you sooner. I wanted to obtain either you or Aelobin's blessing before getting too far into this project, as it does depend on your AddOn, MogIt, to function. I attempted to contact Aelobin via Curse, but I have not yet received a response. Given what you have seen so far, would you be all right if I continued work on this project?

Please let me know if you see anything wrong with my train of thought on this, or if you have any other comments regarding this. Thank you very much for your time and assistance
  Reply With Quote
01-02-17, 02:46 PM   #4
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Originally Posted by JetstreamXT View Post
I DID see the dressing room bit, but I did not see the fact that you can save an outfit out of another character's transmog. However, the problem with saving an outfit in the dressing room is that if you don't have the items' appearances, those parts of the transmog will not be saved to your outfits.
I'm not sure we're on the same page still! If you click the inspect button normally you get the transmog in the dressing room, but if you control-right click that button, you should get them in MogIt preview. From there you can then save it as a wishlist set.

Originally Posted by JetstreamXT View Post
As for using the appropriate API's to get transmog information, it appears that both GetInventoryItemLink and GetInventoryItemID are busts, because they do not provide transmogrification information. Given this, it appears that I would need to resort to tooltip scanning for my addon to work. Given the limited number of API functions that can be used in response to INSPECT_READY (only Talent API and Inventory API functions, if I recall from WoWProgramming), I will not be able to use NotifyInspect(), and will instead have to open the inspect window in order for my addon to work.
There shouldn't be any need to open the inspect frame. The default UI just uses the same APIs that anyone can use. All the visual stuff is the result of the API, so to speak, not the other way around. Transmog API is very limited for inventory items, indeed, but they added one function in Legion that solved this particular issue; C_TransmogCollection.GetInspectSources.

Originally Posted by JetstreamXT View Post
Finally, I mainly saw the use of GetAppearanceSources from code for InspectorGadgetzan, and I am not really sure what it does. However, I have double checked my input using a simple print function in TinyPad, and it appears that the output that I listed is indeed correct for my input.
GetAppearanceSources should, given an appearance/visual ID (essentially an item model) return a list of sources (items that uses the model). The output you provided rather looks like it could be from GetAppearanceSourceInfo, in which case the values are as follows:
Code:
categoryID, appearanceVisualID, canEnchant, icon, isCollected, link

Originally Posted by JetstreamXT View Post
One other thing, I apologize for not getting in contact with you sooner. I wanted to obtain either you or Aelobin's blessing before getting too far into this project, as it does depend on your AddOn, MogIt, to function. I attempted to contact Aelobin via Curse, but I have not yet received a response. Given what you have seen so far, would you be all right if I continued work on this project?
Absolutely, and don't worry about it.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
01-02-17, 03:03 PM   #5
JetstreamXT
A Defias Bandit
Join Date: Jan 2017
Posts: 3
I see now! Well...hmm...it appears that my idea for an addon has already been included in the base MogIt functionality. With that in mind, there seems to be no reason to continue with the project other than for practice. Thank you very much for explaining this functionality to me before I got too far ahead of myself. I will look further into GetInspectSources(), as I may use it in future projects. Other than that, I think I will put this project on the back burner for now. Thank you very much for your time and assistance, and for being so patient with me as you assisted me.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » /inspect Data Dump and C_TransmogCollection Functions

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