Mercurial > wow > buffalo2
view ObjectiveTracker/APIHooks.lua @ 45:dd1ae565f559
Hooks and Handlers:
- correct argument mix-ups for AcceptQuest/QUEST_ACCEPTED handlers; fixes auto-watch
- respond to AcknowledgeAutoAcceptQuest; fixes lingering popups
- include Popup and Quest trackers in the response code for CompleteQuest; fixes content artifacts following the rollover of repeating popups seen in Ashran
- clean up wacky OnEvent header
Layout
- add alpha blend options
QuestData
- reset objectives data when a quest is in a completed state; keeps old data from ever reaching the Default.x code
author | Nenue |
---|---|
date | Tue, 26 Apr 2016 14:57:18 -0400 |
parents | 756e8aeb040b |
children |
line wrap: on
line source
--- ${PACKAGE_NAME} -- @file-author@ -- @project-revision@ @project-hash@ -- @file-revision@ @file-hash@ -- Created: 3/30/2016 1:23 AM local B = select(2,...).frame local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame') local print = B.print('Objectives') local OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST = OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST local OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP = OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP local GetQuestID = GetQuestID local QuestPOIUpdateIcons = QuestPOIUpdateIcons --- Module updates triggered by user events T.AcknowledgeAutoAcceptQuest = function(...) return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST + OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP end T.AddQuestWatch = function(questID) return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST end T.AbandonQuest = function() QuestPOIUpdateIcons() return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST end T.CompleteQuest = function() QuestPOIUpdateIcons() return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST end T.AddAutoQuestPopUp = function(...) return OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP end T.RemoveAutoQuestPopUp = function(questID) AddQuestWatch(GetQuestLogIndexByID(questID)) return OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP end --- SUPER_TRACKED_QUEST_CHANGED will fires local tprint = B.print('Tracker') T.SetSuperTrackedQuestID = function(questID) tprint('SetSuperTrackedQuestID', questID) for index, block in ipairs(T.Quest.usedBlocks) do if block:IsVisible() then if block.info.id == questID then block.SelectionOverlay:Show() else block.SelectionOverlay:Hide() end end end end local previousSelection --@debug@ local tprint = B.print('Tracker') -- @debug@ T.SelectQuestLogEntry = function(logIndex) --@debug@ if previousSelection and previousSelection ~= logIndex then print('swapping selection from', previousSelection, 'to', logIndex) end--@end-debug@ previousSelection = logIndex end --- Dummies for future ideas T.RemoveQuestWatch = function(questIndex, ...) end T.AddTrackedAchievement = function(cheevID) end T.RemoveTrackedAchievement = function(cheevID) end T.AcceptQuest = function() end