annotate 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
rev   line source
Nenue@1 1 --- ${PACKAGE_NAME}
Nenue@1 2 -- @file-author@
Nenue@1 3 -- @project-revision@ @project-hash@
Nenue@1 4 -- @file-revision@ @file-hash@
Nenue@1 5 -- Created: 3/30/2016 1:23 AM
Nenue@1 6 local B = select(2,...).frame
Nenue@1 7 local mod = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame')
Nenue@1 8 local print = B.print('ObjectiveEvent')
Nenue@1 9
Nenue@1 10 --------------------------------------------------------------------
Nenue@1 11 --- Specialized event handlers
Nenue@1 12 --------------------------------------------------------------------
Nenue@1 13 print(mod:GetName())
Nenue@1 14 mod.OnQuestAccepted = function(_, questLogIndex, questID)
Nenue@1 15 AddQuestWatch(questLogIndex)
Nenue@1 16 SetSuperTrackedQuestID(questID)
Nenue@1 17 end
Nenue@1 18
Nenue@1 19 mod.OnQuestComplete = function(_, questLogIndex, questID)
Nenue@1 20 QuestPOIUpdateIcons()
Nenue@1 21 end
Nenue@1 22
Nenue@1 23 mod.OnQuestFinished = function(_, questLogIndex, questID)
Nenue@1 24 mod.TrackClosest()
Nenue@1 25 RemoveQuestWatch(questLogIndex)
Nenue@1 26 end
Nenue@1 27
Nenue@2 28 mod.OnQuestRemoved = function(_, questLogIndex, questID)
Nenue@2 29 end
Nenue@2 30
Nenue@1 31 mod.OnQuestFromLocation = function(event) end
Nenue@1 32
Nenue@1 33 mod.OnAddQuestWatch = function(questID)
Nenue@1 34 mod.UpdateActionButtons()
Nenue@1 35 end