Use LibBabble-Zone to localize instance names.
This commit is contained in:
parent
f9b7b0718c
commit
139f34629b
3 changed files with 25 additions and 14 deletions
1
.pkgmeta
1
.pkgmeta
|
@ -7,5 +7,6 @@ externals:
|
||||||
Libs/AceConsole-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
|
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/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/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/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
|
Libs/LibDBIcon-1.0: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0
|
|
@ -1,18 +1,14 @@
|
||||||
ChoreTracker = LibStub('AceAddon-3.0'):NewAddon('ChoreTracker', 'AceConsole-3.0', 'AceEvent-3.0')
|
ChoreTracker = LibStub('AceAddon-3.0'):NewAddon('ChoreTracker', 'AceConsole-3.0', 'AceEvent-3.0')
|
||||||
local core = ChoreTracker
|
local core = ChoreTracker
|
||||||
local LibQTip
|
local LQT
|
||||||
local db
|
local db
|
||||||
local LDB
|
local LDB
|
||||||
local LDBIcon
|
local LDBIcon
|
||||||
local tooltip
|
local tooltip
|
||||||
|
local LBZ
|
||||||
|
local zones
|
||||||
|
|
||||||
local trackedInstances = {
|
local trackedInstances
|
||||||
['Baradin Hold'] = 'BH',
|
|
||||||
['Firelands'] = 'FL',
|
|
||||||
['The Bastion of Twilight'] = 'BoT',
|
|
||||||
['Blackwing Descent'] = 'BWD',
|
|
||||||
['Throne of the Four Winds'] = '4W',
|
|
||||||
}
|
|
||||||
|
|
||||||
local defaults = {
|
local defaults = {
|
||||||
global = {},
|
global = {},
|
||||||
|
@ -65,7 +61,9 @@ function core:OnInitialize()
|
||||||
end
|
end
|
||||||
|
|
||||||
function core:OnEnable()
|
function core:OnEnable()
|
||||||
LibQTip = LibStub('LibQTip-1.0')
|
LQT = LibStub('LibQTip-1.0')
|
||||||
|
LBZ = LibStub("LibBabble-Zone-3.0")
|
||||||
|
|
||||||
LoadAddOn('Blizzard_Calendar')
|
LoadAddOn('Blizzard_Calendar')
|
||||||
|
|
||||||
for class,color in pairs(RAID_CLASS_COLORS) do
|
for class,color in pairs(RAID_CLASS_COLORS) do
|
||||||
|
@ -102,7 +100,7 @@ function core:OnEnable()
|
||||||
for instance,abbreviation in pairs(trackedInstances) do
|
for instance,abbreviation in pairs(trackedInstances) do
|
||||||
columnCount = columnCount + 1
|
columnCount = columnCount + 1
|
||||||
end
|
end
|
||||||
tooltip = LibQTip:Acquire('ChoreTrackerTooltip', columnCount, 'LEFT', 'CENTER', 'RIGHT')
|
tooltip = LQT:Acquire('ChoreTrackerTooltip', columnCount, 'LEFT', 'CENTER', 'RIGHT')
|
||||||
|
|
||||||
core:DrawTooltip()
|
core:DrawTooltip()
|
||||||
|
|
||||||
|
@ -110,7 +108,7 @@ function core:OnEnable()
|
||||||
tooltip:Show()
|
tooltip:Show()
|
||||||
end,
|
end,
|
||||||
OnLeave = function(self)
|
OnLeave = function(self)
|
||||||
LibQTip:Release(tooltip)
|
LQT:Release(tooltip)
|
||||||
tooltip = nil
|
tooltip = nil
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -124,6 +122,17 @@ function core:OnEnable()
|
||||||
else
|
else
|
||||||
self.LDBIcon:Show('ChoreTracker')
|
self.LDBIcon:Show('ChoreTracker')
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
function core:UpdateChores()
|
function core:UpdateChores()
|
||||||
|
@ -210,7 +219,7 @@ function core:GetNextVPReset()
|
||||||
|
|
||||||
local title,hour,minute = CalendarGetDayEvent(monthOffset, day, i)
|
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 }
|
resetDate = { year = year, month = month + monthOffset, day = day }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
## Notes: Reminding you to do your chores just like your mother.
|
## Notes: Reminding you to do your chores just like your mother.
|
||||||
## DefaultState: enabled
|
## DefaultState: enabled
|
||||||
## SavedVariables: ChoreTrackerDB
|
## 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\LibStub\LibStub.lua
|
||||||
Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
|
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\AceConsole-3.0\AceConsole-3.0.xml
|
||||||
Libs\AceDB-3.0\AceDB-3.0.xml
|
Libs\AceDB-3.0\AceDB-3.0.xml
|
||||||
Libs\AceEvent-3.0\AceEvent-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\LibDataBroker-1.1\LibDataBroker-1.1.lua
|
||||||
Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
|
Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
|
||||||
|
Libs\LibQTip-1.0\lib.xml
|
||||||
|
|
||||||
ChoreTracker.lua
|
ChoreTracker.lua
|
Loading…
Reference in a new issue