Mercurial > wow > buffalo2
view ObjectiveEvents.lua @ 2:a2396b03ce63
- identify action buttons by the associated QuestID instead of QuestLogIndex
- deferred button placement in general to a self-destructing OnUpdate
-- and defer self-destruct to a end of combat event if InCombatLockdown
- tracker wrapper has an experience/reputation bar; the two elements "feel" related and it's a very simple info display
author | Nenue |
---|---|
date | Thu, 31 Mar 2016 01:38:47 -0400 |
parents | b0447b382f36 |
children | 589de8ea05b9 |
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 mod = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame') local print = B.print('ObjectiveEvent') -------------------------------------------------------------------- --- Specialized event handlers -------------------------------------------------------------------- print(mod:GetName()) mod.OnQuestAccepted = function(_, questLogIndex, questID) AddQuestWatch(questLogIndex) SetSuperTrackedQuestID(questID) end mod.OnQuestComplete = function(_, questLogIndex, questID) QuestPOIUpdateIcons() end mod.OnQuestFinished = function(_, questLogIndex, questID) mod.TrackClosest() RemoveQuestWatch(questLogIndex) end mod.OnQuestRemoved = function(_, questLogIndex, questID) end mod.OnQuestFromLocation = function(event) end mod.OnAddQuestWatch = function(questID) mod.UpdateActionButtons() end