Page 1 of 1

Is there a way to get the level of an item?

Posted: Sun Sep 13, 2009 4:14 pm
by d003232
Is there a way to get the level of an item? I want to try to make me a little help to create mana stones. So I want to move the right items to the "Arkaner Umwandler". The stones I can select by name. But how to select the armor? I thought to take the item level but I can't find that information anywhere.

Re: Is there a way to get the level of an item?

Posted: Sun Sep 13, 2009 4:45 pm
by GurdyMan
Why can't you take the armour name as well? I saw this function CIMF_GetItemInfo (from http://www.theromwiki.com/index.php/List_of_Functions), but don't know how it works or what it returns.

Also, some of the Addons that work with items like StatRating will ignore the item all together and grab its information from the tooltip.

Re: Is there a way to get the level of an item?

Posted: Sun Sep 13, 2009 4:48 pm
by d003232
[quote="GurdyMan"]Why can't you take the armour name as well? I saw this function CIMF_GetItemInfo (from http://www.theromwiki.com/index.php/List_of_Functions), but don't know how it works or what it returns.

Also, some of the Addons that work with items like StatRating will ignore the item all together and grab its information from the tooltip.[/quote]

Re: Is there a way to get the level of an item?

Posted: Sun Sep 13, 2009 4:50 pm
by d003232
GurdyMan wrote:Why can't you take the armour name as well? I saw this function CIMF_GetItemInfo (from http://www.theromwiki.com/index.php/List_of_Functions), but don't know how it works or what it returns.

Also, some of the Addons that work with items like StatRating will ignore the item all together and grab its information from the tooltip.
I don't know the name. The names change all the time. Item tooltip would be a way. I think i will look into StatRating to see, how they read the informations.

Re: Is there a way to get the level of an item?

Posted: Sun Sep 13, 2009 5:12 pm
by Administrator
As far as I know, there is no real way to do this well. It might be possible, but hackish. You could get the item link, then use ParseHyperlink() to separate it into several bits, then extract the information from that with a regular expression.

If ParseHyperlink() doesn't work (I can't even remember what it does; It's been a long time since I've looked at it), you might have to get the item link (as before), then use GameTooltip:SetHyperlink(_link), then extract it from there. It should be something like GameTooltip.tr contains a string for the "top right" (hence tr) text. Might help to use WoW references for this. Like this, for example.