view ObjectiveTracker/Data.lua @ 38:1f8f9cc3d956

- module integration brought up to speed with current frame management structure
author Nenue
date Thu, 21 Apr 2016 11:36:41 -0400
parents adcd7c328d07
children
line wrap: on
line source
local B = select(2,...).frame
local wipe, pairs, ipairs, min, max, unpack = table.wipe, pairs, ipairs, min, max, unpack
local tinsert, tostring, format, mod = tinsert, tostring, format, mod
local GetQuestTagInfo, GetQuestLogTitle = GetQuestTagInfo, GetQuestLogTitle
local GetNumQuestLogEntries, GetNumQuestWatches, GetQuestLogCompletionText, IsQuestWatched, IsQuestHardWatched, GetQuestLogSpecialItemInfo, GetQuestLogSpecialItemCooldown = GetNumQuestLogEntries, GetNumQuestWatches, GetQuestLogCompletionText, IsQuestWatched, IsQuestHardWatched, GetQuestLogSpecialItemInfo, GetQuestLogSpecialItemCooldown
local GetNumAutoQuestPopUps, GetAutoQuestPopUp, GetTasksTable, GetNumQuestLogTasks, GetTaskInfo, GetQuestObjectiveInfo = GetNumAutoQuestPopUps, GetAutoQuestPopUp, GetTasksTable, GetNumQuestLogTasks, GetTaskInfo, GetQuestObjectiveInfo
local GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, GetMoneyString = GetNumQuestLogRewardCurrencies, GetQuestLogRewardCurrencyInfo, GetNumQuestLogRewards, GetQuestLogRewardInfo, GetQuestLogRewardMoney, GetMoneyString
local GetNumQuestLeaderBoards, GetAchievementNumCriteria, GetQuestLogLeaderBoard, GetAchievementCriteriaInfo = GetNumQuestLeaderBoards, GetAchievementNumCriteria, GetQuestLogLeaderBoard, GetAchievementCriteriaInfo
local GetQuestWatchIndex, GetQuestLogIndexByID, GetSuperTrackedQuestID, SetSuperTrackedQuestID, GetQuestWatchInfo = GetQuestWatchIndex, GetQuestLogIndexByID, GetSuperTrackedQuestID, SetSuperTrackedQuestID, GetQuestWatchInfo
local QuestHasPOIInfo, GetDistanceSqToQuest, GetQuestFactionGroup = QuestHasPOIInfo, GetDistanceSqToQuest, GetQuestFactionGroup
local GetTrackedAchievements, GetNumTrackedAchievements, GetAchievementInfo = GetTrackedAchievements, GetNumTrackedAchievements, GetAchievementInfo
local GetMoney, floor = GetMoney, floor
local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame')
local print = B.print('Info')
local QUEST_TAG_DUNGEON = QUEST_TAG_DUNGEON
local QUEST_TAG_GROUP = QUEST_TAG_GROUP
local QUEST_TAG_ACCOUNT = QUEST_TAG_ACCOUNT
local QUEST_TAG_TCOORDS = QUEST_TAG_TCOORDS
local LE_QUEST_FREQUENCY_DAILY = LE_QUEST_FREQUENCY_DAILY
local LE_QUEST_FREQUENCY_WEEKLY = LE_QUEST_FREQUENCY_WEEKLY
local FACTION_ALLIANCE, LE_QUEST_FACTION_HORDE, FACTION_HORDE, LE_QUEST_FACTION_HORDE = FACTION_ALLIANCE, LE_QUEST_FACTION_HORDE, FACTION_HORDE, LE_QUEST_FACTION_HORDE

local Tracker, Bonus, AutoQuest, Quest, Cheevs = T.DefaultTracker, T.Bonus, T.AutoQuest, T.Quest, T.Cheevs
--------------------------------------------------------------------
--- Tracker-specific data retrieval functions
--------------------------------------------------------------------




-----------------------------
--- AUTO_QUEST
-----------------------------
--- BONUS OBJECTIVE
-- The default UI pops them up as you enter their relevant areas, but the data is actually available at all times.
-- The only requirement is that you've been to said area and progressed any of the objectives.
-- Blizzard deal with this fact by caching any task data collected during session and masking out whatever gets completed.
-- For the addon's module structure to work, GetNumWatched method also invokes a tasks table scan.
-- That composes the table searched by GetInfo().

------------------------------------------------------------------------------------------
--- These functions are copied from Blizzard_BonusObjectiveTracker.lua;
-- It's kind of dumb, but this avoids the risk of code taint.