Defining the armor type
Hello everyone, I come here because I have a pretty annoying problem with the implementation of a function for my addon. I'm trying to determine the armor type that the user has dropped to understand if the user wants it or not (determined by an external variable). The goal is, with this function, to return either "plate", "mail", "leather" or "cloth" depending on the armor type the user dropped to, after, fetch from the variables the user specifications.
Code:
function ArmorType(item) Sorry if my writings are convoluted or if I butchered some english, but as you may understand it's not my main language. Feel free to ask for better expanations :o |
Try using those numbers with GetItemClassInfo. Also, I think you get those same numbers directly from GetItemInfo in the last return arguments.
Edit: GetItemSubClassInfo, even, I guess. |
Thank you for the fast answer, it's exactly what I've been looking for. Strangely enough on wowprogramming these functions (and the last parameters of GetItemInfo) are not documented, but anyhow thank you :D
|
Quote:
Try wowpedia.org instead. |
Remember, wowprogramming is updatable by anyone, just like wowpedia.
Also, change this Lua Code:
Lua Code:
|
Here's code for determining all of the item classes and their associated subclasses:
Code:
do |
All times are GMT -6. The time now is 05:43 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI