Mercurial > wow > wowdb-profiler
comparison Main.lua @ 36:1c30568085db
Record quest timers and whether a quest can be shared.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Thu, 07 Jun 2012 16:03:14 -0500 |
parents | b0264b73986e |
children | d9333f3e0c7a |
comparison
equal
deleted
inserted
replaced
35:b0264b73986e | 36:1c30568085db |
---|---|
701 DatamineTT:SetMerchantItem(item_index) | 701 DatamineTT:SetMerchantItem(item_index) |
702 | 702 |
703 for line_index = 1, DatamineTT:NumLines() do | 703 for line_index = 1, DatamineTT:NumLines() do |
704 local current_line = _G["WDPDatamineTTTextLeft" .. line_index] | 704 local current_line = _G["WDPDatamineTTTextLeft" .. line_index] |
705 | 705 |
706 if not current_line then | 706 if not current_line then |
707 break | 707 break |
708 end | 708 end |
709 local breakout | 709 local breakout |
710 | 710 |
711 for match_index = 1, #POINT_MATCH_PATTERNS do | 711 for match_index = 1, #POINT_MATCH_PATTERNS do |
893 end | 893 end |
894 end -- do-block | 894 end -- do-block |
895 | 895 |
896 | 896 |
897 function WDP:QUEST_LOG_UPDATE() | 897 function WDP:QUEST_LOG_UPDATE() |
898 local selected_quest = _G.GetQuestLogSelection() -- Save current selection to be restored when we're done. | |
899 local entry_index, processed_quests = 1, 0 | |
900 local _, num_quests = _G.GetNumQuestLogEntries() | |
901 | |
902 while processed_quests <= num_quests do | |
903 local _, _, _, _, is_header, _, _, _, quest_id = _G.GetQuestLogTitle(entry_index) | |
904 | |
905 if not is_header then | |
906 _G.SelectQuestLogEntry(entry_index); | |
907 | |
908 local quest = DBEntry("quests", quest_id) | |
909 quest.timer = _G.GetQuestLogTimeLeft() | |
910 quest.can_share = _G.GetQuestLogPushable() | |
911 processed_quests = processed_quests + 1 | |
912 end | |
913 entry_index = entry_index + 1 | |
914 end | |
915 _G.SelectQuestLogEntry(selected_quest) | |
898 self:UnregisterEvent("QUEST_LOG_UPDATE") | 916 self:UnregisterEvent("QUEST_LOG_UPDATE") |
899 end | 917 end |
900 | 918 |
901 | 919 |
902 function WDP:UNIT_QUEST_LOG_CHANGED(event, unit_id) | 920 function WDP:UNIT_QUEST_LOG_CHANGED(event, unit_id) |