
[Feature]: Cosmetics
morgan35543 opened this issue ยท 0 comments
Describe the feature
It'd be amazing if searching cosmetics/a default category were added in. I'm unsure how much overhead it would add but the following API function exists and return a bool. It'd be great if there were one for toys too but I've not been able to find it.
Describe the implementation
Either a default category or adding cosmetics to the search function. I've not found a function to return the text so searching may be off the table. The following function checks if the item's a costmetic, which should make it easy to sort into a default "Cosmetics" category as I assume the "Sort" is going through each inventory item and calling GetItemInfo(). This would be a second call, but one optimisation would be only doing it against equipable gear.
https://warcraft.wiki.gg/wiki/API_C_Item.IsCosmeticItem
Logical flow:
- GetItemInfo()
- Is classID in array [2, 4] (2 or 4) - Yes? Continue.
- IsCosmeticItem() - Yes? Potentially store a flag against it or just stick it into a "cosmetic" category, that may then allow it to be searched against although I've not looked into your code