Nenue@28: --- ${PACKAGE_NAME} Nenue@28: -- @file-author@ Nenue@28: -- @project-revision@ @project-hash@ Nenue@28: -- @file-revision@ @file-hash@ Nenue@28: -- Created: 4/13/2016 7:48 PM Nenue@28: local B = select(2,...).frame Nenue@28: local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame') Nenue@28: local _G, ipairs, max, min, unpack, floor, pairs, tostring, type, band = _G, ipairs, max, min, unpack, floor, pairs, tostring, type, bit.band Nenue@28: local GetAutoQuestPopUp, GetQuestLogCompletionText = GetAutoQuestPopUp, GetQuestLogCompletionText Nenue@28: local Cheevs = T.Cheevs Nenue@28: local format = format Nenue@28: local print = B.print('Tracker') Nenue@28: local lprint = B.print('Line') Nenue@28: local iprint = B.print('Info') Nenue@28: Nenue@28: Nenue@28: Nenue@28: Cheevs.UpdateLine = function(handler, block, line, data) Nenue@28: local print = B.print('CheevsLine') Nenue@28: line.progress = 0 Nenue@28: print(' ', data.objectiveIndex,'|cFF0088FF-|r', data.objectiveType, data.text) Nenue@28: if data.flags then Nenue@28: if band(data.flags, 0x00000001) > 0 then Nenue@28: line.format = "%d/%d" Nenue@28: line.widget = T.SetWidget(line, data, 'ProgressBar', data.criteriaID) Nenue@28: line.height = line.widget.height Nenue@28: elseif band(data.flags, 0x00000002) then Nenue@28: line.widget = nil Nenue@28: else Nenue@28: line.widget = nil Nenue@28: line.displayColor = 'FFFFFF' Nenue@28: line.displayText = line.text Nenue@28: Nenue@28: end Nenue@28: else Nenue@28: Nenue@28: line.displayText = data.text Nenue@28: end Nenue@28: print('line.type =', data.type) Nenue@28: print(' ** qtyStr:', data.quantityString, 'qty:', data.quantity, 'assetID:', data.assetID) Nenue@28: end Nenue@28: Nenue@28: Cheevs.Select = function(self) Nenue@28: --mod:Update(OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT) Nenue@28: end Nenue@28: Cheevs.Remove = function(self) Nenue@28: Nenue@28: RemoveTrackedAchievement(self.info.cheevID) Nenue@28: end Nenue@28: Cheevs.OnMouseUp = function(self, button) Nenue@28: Nenue@28: Default.OnMouseUp(self, button) Nenue@28: end Nenue@28: Cheevs.Link = function(self) Nenue@28: Nenue@28: local achievementLink = GetAchievementLink(self.info.cheevID); Nenue@28: if ( achievementLink ) then Nenue@28: ChatEdit_InsertLink(achievementLink); Nenue@28: end Nenue@28: end Nenue@28: Nenue@28: Cheevs.Open = function(self) Nenue@28: Nenue@28: if ( not AchievementFrame ) then Nenue@28: AchievementFrame_LoadUI(); Nenue@28: end Nenue@28: if ( not AchievementFrame:IsShown() ) then Nenue@28: AchievementFrame_ToggleAchievementFrame(); Nenue@28: end Nenue@28: AchievementFrame_SelectAchievement(self.info.cheevID); Nenue@28: end