Originally Posted by semlar
I added a PlayerCanCollectAppearance function which should theoretically only return information if it's possible to acquire the appearance, let me know if it doesn't work though.
|
So there are two issues I'm trying to solve:
1. Some equipable items are not transmoggable by anyone, but I don't know how to determine if it is or not.
2. My current method of determining if an item is transmoggable by anyone or not has localization issues (specifically I use a mapping to the Weapon type name).
Unfortunately, PlayerCanCollectSource doesn't work for 1, and is inconsistent for 2.
In the addon I am trying to differentiate between something that cannot be learned on this character, and something that cannot be learned at all. C_TransmogCollection.PlayerCanCollectSource seems to (usually) correctly return if the item can be collected by this character, but I would also need to know if it is transmoggable by anyone. For example, the Runestaff of Nordrassil returns false for PlayerCanCollectSource, but I also need to know if it's transmoggable at all (which it is not).
I am checking for transmoggablility by checking the item type against a localized mapping of item type (weapons use "Bows", "Guns", etc., armor uses "INVTYPE_LEGS", "INVTYPE_BODY", etc.) to Transmog Category (found using C_TransmogCollection.GetCategoryInfo for the category numbers) and plugging it into C_TransmogCollection.IsCategoryValidForItem. This works very consistently with two problems, 1. localization, 2. doesn't work on some very specific items (Runestaff for example).
C_TransmogCollection.PlayerCanCollectSource and C_TransmogCollection.PlayerKnowsSource seem to return inconsistent results. For example, changing the addon logic to use PlayerCanCollectSource (like in your code snippet) breaks tabards (none seem to have a source) and fishing poles (all seem to have a source, but they are not transmoggable), and the brewfest steins (not transmoggable).
GitHub link if you'd like to see the code. I also made a branch that integrates your latest function:
https://github.com/TorelTwiddler/CanIMogIt
I really appreciate your help in figuring out the issues we've been running into. I wish Blizzard put out actual docs for their API!
Thanks again!