WoWInterface SVN PhanxConfigWidgets

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches
    from Rev 33 to Rev 34
    Reverse comparison

Rev 33 → Rev 34

LibDualSpec-1.0/LibDualSpec-1.0.lua
31,7 → 31,7
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--]]
 
local MAJOR, MINOR = "LibDualSpec-1.0", 4
local MAJOR, MINOR = "LibDualSpec-1.0", 6
assert(LibStub, MAJOR.." requires LibStub")
local lib = LibStub:NewLibrary(MAJOR, MINOR)
if not lib then return end
40,7 → 40,6
-- Library data
-- ----------------------------------------------------------------------------
 
lib.talentGroup = lib.talentGroup or GetActiveTalentGroup()
lib.eventFrame = lib.eventFrame or CreateFrame("Frame")
 
lib.registry = lib.registry or {}
114,7 → 113,7
-- Mixin
-- ----------------------------------------------------------------------------
 
--- Get dual spec feature status.
--- Get dual spec feature status.
-- @return (boolean) true is dual spec feature enabled.
-- @name enhancedDB:IsDualSpecEnabled
function mixin:IsDualSpecEnabled()
129,7 → 128,7
if enabled and not db.char.talentGroup then
db.char.talentGroup = lib.talentGroup
db.char.profile = self:GetCurrentProfile()
db.char.enabled = true
db.char.enabled = true
else
db.char.enabled = enabled
self:CheckDualSpecState()
146,7 → 145,7
 
--- Set the alternate profile name.
-- No validation are done to ensure the profile is valid.
-- @param profileName (string) the profile name to use.
-- @param profileName (string) the profile name to use.
-- @name enhancedDB:SetDualSpecProfile
function mixin:SetDualSpecProfile(profileName)
registry[self].db.char.profile = profileName
161,7 → 160,7
-- @name enhancedDB:CheckDualSpecState
function mixin:CheckDualSpecState()
local db = registry[self].db
if db.char.enabled and db.char.talentGroup ~= lib.talentGroup then
if lib.talentsLoaded and db.char.enabled and db.char.talentGroup ~= lib.talentGroup then
local currentProfile = self:GetCurrentProfile()
local newProfile = db.char.profile
db.char.talentGroup = lib.talentGroup
301,6 → 300,7
 
lib.eventFrame:RegisterEvent('PLAYER_TALENT_UPDATE')
lib.eventFrame:SetScript('OnEvent', function()
lib.talentsLoaded = true
local newTalentGroup = GetActiveTalentGroup()
if lib.talentGroup ~= newTalentGroup then
lib.talentGroup = newTalentGroup