View Single Post
06/30/14, 09:46 PM   #47
Khaibit
 
Khaibit's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 26
Originally Posted by CrazyDutchGuy View Post
Actually I am complaining, as by the itemlink changes i can't determine the quality anymore based on the itemlink. Neither can i determine the itemname anymore from the itemlink. Also it has quite an impact if you use custom links.
So...having read through this and a few other threads...I get how to re-create the item name if the item is in your bags/bank somewhere, but how would you do this for (say for example) an item link retrieved from a guild store sales history? Those do not exist in your inventory, so all you get out of it is the new text-less item link (like "|H0:item:44176:51:50:0:0:0:0:0:0:0:0:0:0:0:0:5:0:0:0:0|h|h") and you can't check your bags for it to pull out a textual form. Setting that as the text of a label or button displayed the item correctly in the correct color and all that, so at least privately it's possible...lacking the plain text in the links makes it a pain to search through a table of items >.<

For example:

Code:
 for i = 0, numEvents do
    local theEvent = {}
    _, theEvent.secsSince, theEvent.seller, theEvent.buyer, 
    theEvent.quant, theEvent.itemName, theEvent.salePrice = GetGuildEventInfo(1, GUILD_HISTORY_SALES, i)
    -- theEvent.itemName now contains a text-less item link.  How to search against the name of the item?
  end
I've seen an addon that wrote their own function to do this, but he literally re-created the entire item data format as a giant lookup table and re-assembles the items by hand (and thus, it's horribly broken any time they update item IDs, styles, qualities, etc.). There's gotta be an easier way?

Last edited by Khaibit : 06/30/14 at 10:14 PM.
  Reply With Quote