User talk:Finalmjolnir

= Item Information =

I saw you posted a question on Flickering's talk page about item informations. Currently the only mechanism whereby AddOns can get information about an item is to fill a tooltip with text about that item, then scan the text of the tooltip. All AddOns out there that do anything with information about items, including ones like Thottbot and LootLink, utilise hidden tooltips for this purpose. The procedure is to create a tooltip, set its contents using one of its methods (e.g. tooltip:SetHyperLink, tooltip:SetInventoryItem or tooltip:SetContainerItem), then scan the text in the tooltip.

However, there are numerous catches and caveats about using hidden tooltips, there is an Art to this. For example, you have to be careful about the so-called "money line" issue, where setting the contents of any tooltip clears the money displayed on the main game tooltip. There are other catches like that as well.

I suggest that you take a look at some of the mods out there and see how they do it, in particular take a look at Sea, which has a number of functions for scanning tooltip contents.

Hope this helps. Lego 15:26, 17 Apr 2005 (EDT)