Mercurial > wow > wowdb-profiler
comparison Main.lua @ 89:09b6773252ad
Record Mailbox locations.
| author | James D. Callahan III <jcallahan@curse.com> |
|---|---|
| date | Mon, 27 Aug 2012 14:52:22 -0500 |
| parents | 5da0e8da22de |
| children | 2f8390cf1bd1 |
comparison
equal
deleted
inserted
replaced
| 88:5da0e8da22de | 89:09b6773252ad |
|---|---|
| 54 CHAT_MSG_SYSTEM = true, | 54 CHAT_MSG_SYSTEM = true, |
| 55 COMBAT_LOG_EVENT_UNFILTERED = true, | 55 COMBAT_LOG_EVENT_UNFILTERED = true, |
| 56 COMBAT_TEXT_UPDATE = true, | 56 COMBAT_TEXT_UPDATE = true, |
| 57 ITEM_TEXT_BEGIN = true, | 57 ITEM_TEXT_BEGIN = true, |
| 58 LOOT_OPENED = true, | 58 LOOT_OPENED = true, |
| 59 MAIL_SHOW = true, | |
| 59 MERCHANT_SHOW = "UpdateMerchantItems", | 60 MERCHANT_SHOW = "UpdateMerchantItems", |
| 60 MERCHANT_UPDATE = "UpdateMerchantItems", | 61 MERCHANT_UPDATE = "UpdateMerchantItems", |
| 61 PET_BAR_UPDATE = true, | 62 PET_BAR_UPDATE = true, |
| 62 PLAYER_TARGET_CHANGED = true, | 63 PLAYER_TARGET_CHANGED = true, |
| 63 QUEST_COMPLETE = true, | 64 QUEST_COMPLETE = true, |
| 999 update_func() | 1000 update_func() |
| 1000 end | 1001 end |
| 1001 end -- do-block | 1002 end -- do-block |
| 1002 | 1003 |
| 1003 | 1004 |
| 1005 function WDP:MAIL_SHOW(event_name) | |
| 1006 local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("npc")) | |
| 1007 | |
| 1008 if not unit_idnum or unit_type ~= private.UNIT_TYPES.OBJECT then | |
| 1009 return | |
| 1010 end | |
| 1011 UpdateDBEntryLocation("objects", unit_idnum) | |
| 1012 end | |
| 1013 | |
| 1014 | |
| 1004 do | 1015 do |
| 1005 local POINT_MATCH_PATTERNS = { | 1016 local POINT_MATCH_PATTERNS = { |
| 1006 ("^%s$"):format(_G.ITEM_REQ_ARENA_RATING:gsub("%%d", "(%%d+)")), -- May no longer be necessary | 1017 ("^%s$"):format(_G.ITEM_REQ_ARENA_RATING:gsub("%%d", "(%%d+)")), -- May no longer be necessary |
| 1007 ("^%s$"):format(_G.ITEM_REQ_ARENA_RATING_3V3:gsub("%%d", "(%%d+)")), -- May no longer be necessary | 1018 ("^%s$"):format(_G.ITEM_REQ_ARENA_RATING_3V3:gsub("%%d", "(%%d+)")), -- May no longer be necessary |
| 1008 ("^%s$"):format(_G.ITEM_REQ_ARENA_RATING_5V5:gsub("%%d", "(%%d+)")), -- May no longer be necessary | 1019 ("^%s$"):format(_G.ITEM_REQ_ARENA_RATING_5V5:gsub("%%d", "(%%d+)")), -- May no longer be necessary |
| 1012 | 1023 |
| 1013 local ITEM_REQ_REPUTATION_MATCH = "Requires (.-) %- (.*)" | 1024 local ITEM_REQ_REPUTATION_MATCH = "Requires (.-) %- (.*)" |
| 1014 local ITEM_REQ_QUEST_MATCH1 = "Requires: .*" | 1025 local ITEM_REQ_QUEST_MATCH1 = "Requires: .*" |
| 1015 local ITEM_REQ_QUEST_MATCH2 = "Must have completed: .*" | 1026 local ITEM_REQ_QUEST_MATCH2 = "Must have completed: .*" |
| 1016 | 1027 |
| 1017 function WDP:UpdateMerchantItems(event) | 1028 function WDP:UpdateMerchantItems(event_name) |
| 1018 local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) | 1029 local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) |
| 1019 | 1030 |
| 1020 if unit_type ~= private.UNIT_TYPES.NPC or not unit_idnum then | 1031 if unit_type ~= private.UNIT_TYPES.NPC or not unit_idnum then |
| 1021 return | 1032 return |
| 1022 end | 1033 end |
| 1127 end | 1138 end |
| 1128 _G.SetMerchantFilter(current_filters) | 1139 _G.SetMerchantFilter(current_filters) |
| 1129 _G.MerchantFrame_Update() | 1140 _G.MerchantFrame_Update() |
| 1130 end | 1141 end |
| 1131 end -- do-block | 1142 end -- do-block |
| 1143 | |
| 1132 | 1144 |
| 1133 function WDP:PET_BAR_UPDATE() | 1145 function WDP:PET_BAR_UPDATE() |
| 1134 if not action_data.label or not action_data.label == "mind_control" then | 1146 if not action_data.label or not action_data.label == "mind_control" then |
| 1135 return | 1147 return |
| 1136 end | 1148 end |
| 1215 action_data.npc_level = npc_level | 1227 action_data.npc_level = npc_level |
| 1216 self:UpdateTargetLocation() | 1228 self:UpdateTargetLocation() |
| 1217 end | 1229 end |
| 1218 end -- do-block | 1230 end -- do-block |
| 1219 | 1231 |
| 1232 | |
| 1220 do | 1233 do |
| 1221 local function UpdateQuestJuncture(point) | 1234 local function UpdateQuestJuncture(point) |
| 1222 local unit_name = _G.UnitName("questnpc") | 1235 local unit_name = _G.UnitName("questnpc") |
| 1223 | 1236 |
| 1224 if not unit_name then | 1237 if not unit_name then |
