Mercurial > wow > wowdb-profiler
diff Main.lua @ 42:a2f1fcc1a813
Record location/IDnum for readable objects (books, etc).
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Thu, 14 Jun 2012 10:52:55 -0500 |
parents | 7db268f39c50 |
children | 15f2e3d8463b |
line wrap: on
line diff
--- a/Main.lua Wed Jun 13 12:29:43 2012 -0500 +++ b/Main.lua Thu Jun 14 10:52:55 2012 -0500 @@ -41,6 +41,7 @@ CHAT_MSG_SYSTEM = true, COMBAT_LOG_EVENT_UNFILTERED = true, COMBAT_TEXT_UPDATE = true, + ITEM_TEXT_BEGIN = true, LOOT_OPENED = true, MERCHANT_SHOW = "UpdateMerchantItems", -- MERCHANT_UPDATE = "UpdateMerchantItems", @@ -575,6 +576,16 @@ end +function WDP:ITEM_TEXT_BEGIN() + local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("npc")) + + if not unit_idnum or unit_type ~= private.UNIT_TYPES.OBJECT or _G.UnitName("npc") ~= _G.ItemTextGetItem() then + return + end + UpdateDBEntryLocation("objects", unit_idnum) +end + + do local RE_GOLD = _G.GOLD_AMOUNT:gsub("%%d", "(%%d+)") local RE_SILVER = _G.SILVER_AMOUNT:gsub("%%d", "(%%d+)")