Mercurial > wow > buffalo2
view ObjectiveTracker/Events.lua @ 39:92534dc793f2
- restore the previous QuestLogSelection after pulling for selection-restricted quest data; fixes icon mixups while quest map is open
- moved progressbar builders into the schema environment, with all the other Frame.lua functions; prep for configuration access
- relegate the various removal events to a framescript in their corresponding blocks; this takes care of resolving dead frames
author | Nenue |
---|---|
date | Thu, 21 Apr 2016 16:43:37 -0400 |
parents | 1f8f9cc3d956 |
children | 03ed70f846de |
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 _G = _G local OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT = OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT local OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST_ADDED = OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST_ADDED 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, GetQuestLogIndexByID, AddQuestWatch, SetSuperTrackedQuestID = GetQuestID, GetQuestLogIndexByID, AddQuestWatch, SetSuperTrackedQuestID local QuestPOIUpdateIcons = QuestPOIUpdateIcons ------------------------------------------------------------------- --- Deal with blizzard API calls that affect the tracker/log contents --- mainly just hiding blocks until they can be picked up by the next update event ------------------------------------------------------------------- T.AddQuestWatch = function(questID) if not B.Conf.VeneerObjectiveWrapper.enabled then return end return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST end local Quest = T.Quest T.RemoveQuestWatch = function(questIndex, ...) print('|cFFFF8800RemoveQuestWatch', questIndex, ...) --return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST end T.AddTrackedAchievement = function(cheevID) --return OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT end T.RemoveTrackedAchievement = function(cheevID) --return OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT end T.AcceptQuest = function() end T.AbandonQuest = function() QuestPOIUpdateIcons() return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST end T.CompleteQuest = function() local questID = GetQuestID() QuestPOIUpdateIcons() return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST end T.AddAutoQuestPopUp = function(...) return OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP end T.RemoveAutoQuestPopUp = function(questID) return OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP end T.SetSuperTrackedQuestID = function(questID) --T:Update() end local previousSelection local tprint = B.print('Tracker') T.SelectQuestLogEntry = function(logIndex) if previousSelection and previousSelection ~= logIndex then tprint('swapping selection from', previousSelection, 'to', logIndex) end previousSelection = logIndex end