1
0
Fork 0

Use LibBabble-Zone to localize instance names.

This commit is contained in:
Andrew Tomaka 2011-09-18 16:51:56 -04:00
parent f9b7b0718c
commit 139f34629b
3 changed files with 25 additions and 14 deletions

View File

@ -7,5 +7,6 @@ externals:
Libs/AceConsole-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
Libs/AceDB-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0
Libs/AceEvent-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
Libs/LibBabble-Zone-3.0: svn://svn.wowace.com/wow/libbabble-zone-3-0/mainline/trunk
Libs/LibQTip-1.0: svn://svn.wowace.com/wow/libqtip-1-0/mainline/trunk
Libs/LibDBIcon-1.0: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0

View File

@ -1,18 +1,14 @@
ChoreTracker = LibStub('AceAddon-3.0'):NewAddon('ChoreTracker', 'AceConsole-3.0', 'AceEvent-3.0')
local core = ChoreTracker
local LibQTip
local LQT
local db
local LDB
local LDBIcon
local tooltip
local LBZ
local zones
local trackedInstances = {
['Baradin Hold'] = 'BH',
['Firelands'] = 'FL',
['The Bastion of Twilight'] = 'BoT',
['Blackwing Descent'] = 'BWD',
['Throne of the Four Winds'] = '4W',
}
local trackedInstances
local defaults = {
global = {},
@ -65,7 +61,9 @@ function core:OnInitialize()
end
function core:OnEnable()
LibQTip = LibStub('LibQTip-1.0')
LQT = LibStub('LibQTip-1.0')
LBZ = LibStub("LibBabble-Zone-3.0")
LoadAddOn('Blizzard_Calendar')
for class,color in pairs(RAID_CLASS_COLORS) do
@ -102,7 +100,7 @@ function core:OnEnable()
for instance,abbreviation in pairs(trackedInstances) do
columnCount = columnCount + 1
end
tooltip = LibQTip:Acquire('ChoreTrackerTooltip', columnCount, 'LEFT', 'CENTER', 'RIGHT')
tooltip = LQT:Acquire('ChoreTrackerTooltip', columnCount, 'LEFT', 'CENTER', 'RIGHT')
core:DrawTooltip()
@ -110,7 +108,7 @@ function core:OnEnable()
tooltip:Show()
end,
OnLeave = function(self)
LibQTip:Release(tooltip)
LQT:Release(tooltip)
tooltip = nil
end,
})
@ -124,6 +122,17 @@ function core:OnEnable()
else
self.LDBIcon:Show('ChoreTracker')
end
-- Get instances
zones = LBZ:GetLookupTable()
trackedInstances = {
[zones['Baradin Hold']] = 'BH',
[zones['Firelands']] = 'FL',
[zones['The Bastion of Twilight']] = 'BoT',
[zones['Blackwing Descent']] = 'BWD',
[zones['Throne of the Four Winds']] = '4W',
}
end
function core:UpdateChores()
@ -210,7 +219,7 @@ function core:GetNextVPReset()
local title,hour,minute = CalendarGetDayEvent(monthOffset, day, i)
if title == 'Baradin Hold' then
if title == zones['Baradin Hold'] then
resetDate = { year = year, month = month + monthOffset, day = day }
end
end

View File

@ -5,7 +5,7 @@
## Notes: Reminding you to do your chores just like your mother.
## DefaultState: enabled
## SavedVariables: ChoreTrackerDB
## OptionalDeps: LibQTip-1.0, LibDBIcon-1.0
## OptionalDeps: LibQTip-1.0, LibDBIcon-1.0, LibBabble-Zone-3.0
Libs\LibStub\LibStub.lua
Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
@ -13,8 +13,9 @@ Libs\AceAddon-3.0\AceAddon-3.0.xml
Libs\AceConsole-3.0\AceConsole-3.0.xml
Libs\AceDB-3.0\AceDB-3.0.xml
Libs\AceEvent-3.0\AceEvent-3.0.xml
Libs\LibQTip-1.0\lib.xml
Libs\LibBabble-Zone-3.0\lib.xml
Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
Libs\LibQTip-1.0\lib.xml
ChoreTracker.lua