Mercurial > wow > wowdb-profiler
comparison Main.lua @ 323:901b9cd2a6c2
Added support for recording object locations in GOSSIP_SHOW.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Mon, 14 Oct 2013 17:11:04 -0500 |
parents | fdf96c61d1b7 |
children | 9cc4ffab84d1 |
comparison
equal
deleted
inserted
replaced
322:fdf96c61d1b7 | 323:901b9cd2a6c2 |
---|---|
2573 function WDP:FORGE_MASTER_OPENED(event_name) | 2573 function WDP:FORGE_MASTER_OPENED(event_name) |
2574 SetUnitField("arcane_reforger", private.UNIT_TYPES.NPC) | 2574 SetUnitField("arcane_reforger", private.UNIT_TYPES.NPC) |
2575 end | 2575 end |
2576 | 2576 |
2577 | 2577 |
2578 local GOSSIP_SHOW_FUNCS = { | |
2579 [private.UNIT_TYPES.NPC] = function(unit_idnum) | |
2580 local gossip_options = { _G.GetGossipOptions() } | |
2581 | |
2582 for index = 2, #gossip_options, 2 do | |
2583 if gossip_options[index] == "binder" then | |
2584 SetUnitField("innkeeper", private.UNIT_TYPES.NPC) | |
2585 return | |
2586 end | |
2587 end | |
2588 end, | |
2589 [private.UNIT_TYPES.OBJECT] = function(unit_idnum) | |
2590 UpdateDBEntryLocation("objects", unit_idnum) | |
2591 end, | |
2592 } | |
2593 | |
2594 | |
2578 function WDP:GOSSIP_SHOW(event_name) | 2595 function WDP:GOSSIP_SHOW(event_name) |
2579 local gossip_options = { _G.GetGossipOptions() } | 2596 local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("npc")) |
2580 | 2597 if not unit_idnum then |
2581 for index = 2, #gossip_options, 2 do | 2598 return |
2582 if gossip_options[index] == "binder" then | 2599 end |
2583 SetUnitField("innkeeper", private.UNIT_TYPES.NPC) | 2600 |
2584 return | 2601 if GOSSIP_SHOW_FUNCS[unit_type] then |
2585 end | 2602 GOSSIP_SHOW_FUNCS[unit_type](unit_idnum) |
2586 end | 2603 end |
2587 end | 2604 end |
2588 | 2605 |
2589 | 2606 |
2590 function WDP:GUILDBANKFRAME_OPENED(event_name) | 2607 function WDP:GUILDBANKFRAME_OPENED(event_name) |