Mercurial > wow > wowdb-profiler
diff Main.lua @ 371:2d0899e85e29
Added collection of item data (bonusIDs, mainly) for quest rewards.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Sat, 22 Nov 2014 06:52:41 -0500 |
parents | 2e122726c7dd |
children | 54d5562a6ad5 |
line wrap: on
line diff
--- a/Main.lua Sat Nov 01 01:33:55 2014 -0400 +++ b/Main.lua Sat Nov 22 06:52:41 2014 -0500 @@ -1493,6 +1493,22 @@ end update_func(item_id, quantity) end + + + function WDP:CHAT_MSG_SYSTEM(event_name, message) + local item_link, quantity = deformat(message, _G.ERR_QUEST_REWARD_ITEM_MULT_IS) + if not item_link then + quantity, item_link = 1, deformat(message, _G.ERR_QUEST_REWARD_ITEM_S) + end + local item_id = ItemLinkToID(item_link) + + if not item_id then + return + end + + -- We only want to record the item's incoming data; no other need for system messages atm. + RecordItemData(item_id, item_link, true) + end end