Mercurial > wow > buffalo2
view ObjectiveTracker/Events.lua @ 40:03ed70f846de
- move block accessors into a new file
- define a tMove function for reconciling the free/used tables as needed
- when retrieving an old block frame, confirm ID still matches; resolves multiple watch items on one block
- stop any animations when a block is freed; resolves stuck flare graphics
author | Nenue |
---|---|
date | Sun, 24 Apr 2016 14:15:25 -0400 |
parents | 92534dc793f2 |
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 _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 print('swapping selection from', previousSelection, 'to', logIndex) end previousSelection = logIndex end