diff ObjectiveEvents.lua @ 1:b0447b382f36

sorting client events from maintenance logic implemented all that action buttons entail for quest items
author Nenue
date Wed, 30 Mar 2016 16:30:49 -0400
parents
children a2396b03ce63
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ObjectiveEvents.lua	Wed Mar 30 16:30:49 2016 -0400
@@ -0,0 +1,32 @@
+--- ${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.OnQuestFromLocation = function(event) end
+
+mod.OnAddQuestWatch = function(questID)
+  mod.UpdateActionButtons()
+end