WoWInterface SVN UrbanAchiever

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 72 to Rev 73
    Reverse comparison

Rev 72 → Rev 73

UrbanAchiever.toc
1,8 → 1,8
## Interface: 30100
## Interface: 30200
## Title: Urban Achiever
## Author: Syzgyn
## Notes: Improved Achievement Frame
## Version 0.9.6.wowi:revision
## Version 0.9.7.wowi:revision
## OptionalDeps: Blizzard_AchievementUI
## SavedVariables: UASV
## SavedVariablesPerCharacter: UASVPC
Main.lua
1,8 → 1,7
local DBG = false
UrbanAchiever = LibStub("AceAddon-3.0"):NewAddon("UrbanAchiever", "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0")
local self = UrbanAchiever
 
if select(4, GetBuildInfo()) < 30100 then print("This version of Urban Achiever is for 3.1 Only.") return end
 
-------------------------------------------------------------
--Locals
-------------------------------------------------------------
10,7 → 9,7
BINDING_HEADER_URBANACHIEVER = "Urban Achiever"
BINDING_NAME_URBANACHIEVER_TOGGLE = "Toggle Achievement Frame"
 
local MAX_ACHIEVEMENTS = 3400
local MAX_ACHIEVEMENTS = 4200
local menuTypes = {"PLAYER", "PARTY", "RAID_PLAYER"}
local playerFaction = UnitFactionGroup("player") == "Alliance" and 1 or 2
 
211,10 → 210,23
["trackTimed"] = true,
}
-------------------------------------------------------------
--Local functions
-------------------------------------------------------------
local function debug(...)
if DBG then print(...) end
return
end
 
local GANC = GetAchievementNumCriteria
local function GetAchievementNumCriteria(...)
return GANC(...) or 0
end
-------------------------------------------------------------
--Startup Stuff
-------------------------------------------------------------
function self:Initialize()
 
function self:Initialize(event, name)
self:UnregisterEvent("ADDON_LOADED")
debug("Initializing")
self:PopulateMasterList()
 
self:PopulateCategories("achievements")
228,7 → 240,6
 
UrbanAchiever:CreateOptions()
 
self:UnregisterEvent("ADDON_LOADED")
end
 
function self:OnEnable()
254,6 → 265,7
--I loooooove that this event gets called for any achievement, not just when you're tracking it.
self:RegisterEvent("TRACKED_ACHIEVEMENT_UPDATE", function(event, ...)
local id, criteriaID, elapsed, duration = ...
--print("TAU", id, criteriaID, elapsed, duration)
if not elapsed or not duration or not UASVPC.trackTimed then return end
if elapsed < duration then
AddTrackedAchievement(id)
360,10 → 372,10
CloseDropDownMenus()
if ( this.type == "QUEST" ) then
if IsModifiedClick("ALT") then
RemoveQuestWatch(this.index)
RemoveQuestWatch(GetQuestIndexForWatch(this.index))
WatchFrame_Update()
else
QuestLog_OpenToQuestIndex(this.index)
QuestLog_OpenToQuestIndex(GetQuestIndexForWatch(this.index))
end
elseif ( this.type == "ACHIEVEMENT" ) then
if IsModifiedClick("ALT") then
1316,6 → 1328,7
end
 
function self:PopulateMasterList()
debug("PML")
local id, name, points, completed, month, day, year, description, icon, reward, searchString
local criteriaName
local catList, numAchievements, nextId
1655,7 → 1668,6
buttonNum = buttonNum + 1
end
end
 
self.frame.criteriaScroll:SetMinMaxValues(0,math.max(GetAchievementNumCriteria(self.currentAch)-#self.frame.display.criteriaButtons, 0))
 
if GetAchievementNumCriteria(self.currentAch)-#self.frame.display.criteriaButtons > 0 then