Mercurial > wow > wowdb-profiler
comparison Main.lua @ 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 |
comparison
equal
deleted
inserted
replaced
55:2b5a2d60dd51 | 56:b58277aa11da |
---|---|
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 local EVENT_MAPPING = { | 42 local EVENT_MAPPING = { |
43 BLACK_MARKET_ITEM_UPDATE = true, | |
43 CHAT_MSG_LOOT = true, | 44 CHAT_MSG_LOOT = true, |
44 CHAT_MSG_SYSTEM = true, | 45 CHAT_MSG_SYSTEM = true, |
45 COMBAT_LOG_EVENT_UNFILTERED = true, | 46 COMBAT_LOG_EVENT_UNFILTERED = true, |
46 COMBAT_TEXT_UPDATE = true, | 47 COMBAT_TEXT_UPDATE = true, |
47 ITEM_TEXT_BEGIN = true, | 48 ITEM_TEXT_BEGIN = true, |
495 | 496 |
496 | 497 |
497 ----------------------------------------------------------------------- | 498 ----------------------------------------------------------------------- |
498 -- Event handlers. | 499 -- Event handlers. |
499 ----------------------------------------------------------------------- | 500 ----------------------------------------------------------------------- |
501 function WDP:BLACK_MARKET_ITEM_UPDATE(event) | |
502 local num_items = _G.C_BlackMarket.GetNumItems() | |
503 | |
504 for index = 1, num_items do | |
505 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); | |
506 | |
507 if item_link then | |
508 DBEntry("items", ItemLinkToID(item_link)).black_market = seller_name or "UNKNOWN" | |
509 end | |
510 end | |
511 end | |
512 | |
513 | |
500 function WDP:CHAT_MSG_LOOT(event, message) | 514 function WDP:CHAT_MSG_LOOT(event, message) |
501 if action_data.spell_label ~= "EXTRACT_GAS" then | 515 if action_data.spell_label ~= "EXTRACT_GAS" then |
502 return | 516 return |
503 end | 517 end |
504 local item_link, quantity = deformat(message, _G.LOOT_ITEM_PUSHED_SELF_MULTIPLE) | 518 local item_link, quantity = deformat(message, _G.LOOT_ITEM_PUSHED_SELF_MULTIPLE) |