Thread: Ah Scam Addon
View Single Post
08-31-10, 09:18 AM   #5
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Hehe, made a very simple "database" over items that can be sold on the auction house (that originate from vendors).

http://vlacula.no-ip.com/wow/ahripoff/AHRipoff_Data.lua

It is a LUA file that contain 3 global variable tables:
AHRipoff_IData -- item and npc id (["<item id>"]=<npc id>)
AHRipoff_VData -- npc id and their names, it supports locales so there are subtables containing each NPC name in each locale variety that Wowhead supports (["enUS"] = [["<npc id>"]="<npc name>", ...])
AHRipoff_ZData -- npc zone ([\"<npc id>\"]=<zone id>)

Have not had time to write an addon for this, but using this data it should be very efficient to check if an item is sold by a vendor or not.

For example, you open the auctionhouse and the addon only hooks tooltips when the AH frame is visible. Then by checking the item ID of the item that the mouse hovers, it can do a quick lookup in the table to find out if it's sold by a vendor or not. So far I've made it so that if the npc id is 0 that means either the vendor is unknown or that there are too many. Otherwise there is a npc id that again can be used for quick lookup using game locale and the npc id, to find the npc name and even their zone using the zone table. It's all direct lookups since the keys are unique ids, no "for" or "foreach" loops and saves lots of CPU cycles -yay!

I haven't implemented it yet, will wait for Cataclysm to enable addons. If you feel like using my data I don't mind at all.
  Reply With Quote