# HG changeset patch # User James D. Callahan III # Date 1341346971 18000 # Node ID b58277aa11da3a87c9fa33be6c55d2b7f29ee4a2 # Parent 2b5a2d60dd51d9771a13fcc62e992b9066495624 Record items in the Black Market Auction House. diff -r 2b5a2d60dd51 -r b58277aa11da Main.lua --- 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