Mercurial > wow > wowdb-profiler
changeset 56:b58277aa11da
Record items in the Black Market Auction House.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Tue, 03 Jul 2012 15:22:51 -0500 |
parents | 2b5a2d60dd51 |
children | 11fcae12db20 |
files | Main.lua |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Main.lua Tue Jul 03 11:54:36 2012 -0500 +++ b/Main.lua Tue Jul 03 15:22:51 2012 -0500 @@ -40,6 +40,7 @@ local EVENT_MAPPING = { + BLACK_MARKET_ITEM_UPDATE = true, CHAT_MSG_LOOT = true, CHAT_MSG_SYSTEM = true, COMBAT_LOG_EVENT_UNFILTERED = true, @@ -497,6 +498,19 @@ ----------------------------------------------------------------------- -- Event handlers. ----------------------------------------------------------------------- +function WDP:BLACK_MARKET_ITEM_UPDATE(event) + local num_items = _G.C_BlackMarket.GetNumItems() + + for index = 1, num_items do + local name, texture, quantity, item_type, is_usable, level, level_type, seller_name, min_bid, min_increment, current_bid, has_high_bid, num_bids, time_left, item_link, market_id = _G.C_BlackMarket.GetItemInfoByIndex(index); + + if item_link then + DBEntry("items", ItemLinkToID(item_link)).black_market = seller_name or "UNKNOWN" + end + end +end + + function WDP:CHAT_MSG_LOOT(event, message) if action_data.spell_label ~= "EXTRACT_GAS" then return