WoWInterface SVN NeedToKnow-Updated

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 31 to Rev 34
    Reverse comparison

Rev 31 → Rev 34

NeedToKnow/NeedToKnow.toc
1,7 → 1,7
## Interface: 30300
## Title: NeedToKnow - Updated!
## Author: Kitjan
## Version: 2.8.2
## Version: 2.8.3
## Notes: Buff/debuff timer bars, original code by Nephthys of Hyjal-US Added support for multiple buffs per bar.
## OptionalDeps: LibStub,LibSharedMedia-3.0
## DefaultState: Enabled
NeedToKnow/NeedToKnow.lua
16,7 → 16,7
NeedToKnow = {};
-- NEEDTOKNOW = {} is defined in the localization file, which must be loaded before this file
 
NEEDTOKNOW.VERSION = "2.8.2";
NEEDTOKNOW.VERSION = "2.8.3";
NEEDTOKNOW.MAXGROUPS = 4;
NEEDTOKNOW.MAXBARS = 6;
NEEDTOKNOW.UPDATE_INTERVAL = 0.05;
125,6 → 125,8
NeedToKnow_Settings["Spec"][2]["Groups"][1]["Enabled"] = true;
else
NeedToKnow.SafeUpgrade();
NeedToKnow.Update();
NeedToKnow.UIPanel_Update();
end
 
if ( not NeedToKnow_Visible ) then
233,10 → 235,34
 
 
function NeedToKnow.SafeUpgrade()
if ( NeedToKnow_Settings["Version"] < "2.0" ) then -- total settings clear if v1.x
-- If there had been an error during the previous upgrade, NeedToKnow_Settings
-- may be in an inconsistent, halfway state.
local bCorruptUpgrade = false;
if ( NeedToKnow_Settings["Spec"] ) then
for idxSpec = 1,2 do
local specSettings = NeedToKnow_Settings.Spec[idxSpec];
if ( not specSettings or not specSettings.Groups ) then
bCorruptUpgrade = true;
else
for idxGroup = 1,NEEDTOKNOW.MAXGROUPS do
local groupSettings = specSettings.Groups[idxGroup];
if not groupSettings then
bCorruptUpgrade = true;
end
end
end
end
if ( not bCorruptUpgrade and NeedToKnow_Settings["Version"] < "2.4" ) then
NeedToKnow_Settings.OldVersion = NeedToKnow_Settings["Version"];
NeedToKnow_Settings["Version"] = NEEDTOKNOW.VERSION;
end
end
 
if ( bCorruptUpgrade or NeedToKnow_Settings["Version"] < "2.0" ) then -- total settings clear if v1.x
print("Old NeedToKnow settings not compatible with current version... starting from scratch");
NeedToKnow_Settings = CopyTable(NEEDTOKNOW.DEFAULTS);
NeedToKnow_Settings["Spec"][1]["Groups"][1]["Enabled"] = true;
NeedToKnow_Settings["Spec"][2]["Groups"][1]["Enabled"] = true;
NeedToKnow_Settings["Spec"][2]["Groups"][1]["Enabled"] = true;
 
-- if before dual spec support, copy old settings to both specs
elseif (NeedToKnow_Settings["Version"] < "2.4") then
253,9 → 279,6
NeedToKnow_Settings["Spec"][1]["Groups"][i] = tempSettings["Groups"][i];
NeedToKnow_Settings["Spec"][2]["Groups"][i] = tempSettings["Groups"][i];
end
 
NeedToKnow.Update();
NeedToKnow.UIPanel_Update();
end
NeedToKnow_Settings.OldVersion = NeedToKnow_Settings["Version"];
NeedToKnow_Settings["Version"] = NEEDTOKNOW.VERSION;
378,10 → 401,15
resizeButton:Show();
end
 
group:ClearAllPoints();
local point, relativePoint, xOfs, yOfs = unpack(groupSettings.Position);
group:SetPoint(point, UIParent, relativePoint, xOfs, yOfs);
group:SetScale(groupSettings.Scale);
-- Early enough in the loading process (before PLAYER_LOGIN), we might not
-- know the position yet
if groupSettings.Position then
group:ClearAllPoints();
local point, relativePoint, xOfs, yOfs = unpack(groupSettings.Position);
group:SetPoint(point, UIParent, relativePoint, xOfs, yOfs);
group:SetScale(groupSettings.Scale);
end
 
if ( NeedToKnow_Visible and groupSettings.Enabled ) then
group:Show();
else
. Property changes : Added: svn:ignore + archive zips