From 4a80527bf5d052e394304e970c7a5dbbd2e7b5be Mon Sep 17 00:00:00 2001 From: atomaka Date: Sat, 3 Dec 2011 22:42:03 -0500 Subject: [PATCH] Add LFR instances to defaults directly from API for localization reasons. --- ChoreTracker.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ChoreTracker.lua b/ChoreTracker.lua index 384cc1b..d062e3e 100644 --- a/ChoreTracker.lua +++ b/ChoreTracker.lua @@ -30,14 +30,20 @@ local defaults = { [Z['Blackwing Descent']] = { abbreviation = 'BWD', enable = false, removed = false, }, [Z['Throne of the Four Winds']] = { abbreviation = '4W', enable = false, removed = false, }, }, - lfrs = { - -- needs localized - ['The Siege of Wyrmrest Temple'] = { abbreviation = 'SoWT', enable = true, removed = false, }, - ['Fall of Deathwing'] = { abbreviation = 'FoD', enable = true, removed = false, }, - } + lfrs = {} }, } +-- Setup LFR Defaults +local RFDungeonCount = GetNumRFDungeons() + +for i = 1, RFDungeonCount do + id, instanceName = GetRFDungeonInfo(i) + + defaults.profile.lfrs[instanceName] = { enable = true, removed = false, } + defaults.profile.lfrs[instanceName].abbreviation = string.sub(instanceName, 0, 1) +end + local options = { name = 'ChoreTracker', type = 'group',