Quantcast

4.6

Steven Jackson [09-28-14 - 23:54]
4.6
Filename
Interface/AddOns/SVUI/SVUI.toc
Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc
Interface/AddOns/SVUI/packages/stats/SVStats.lua
Interface/AddOns/SVUI/packages/stats/stats/system.lua
Interface/AddOns/SVUI/system/setup.lua
Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc
Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc
Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc
Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc
Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc
Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc
diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc
index 6f94a7e..d532552 100644
--- a/Interface/AddOns/SVUI/SVUI.toc
+++ b/Interface/AddOns/SVUI/SVUI.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## Title: |cffFF9900SVUI|r
 ## Notes: Supervillain UI [|cff9911FFCore Framework|r].
 ## SavedVariables: SVUI_Global
diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
index b790c2e..62b462f 100644
--- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
+++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
@@ -817,7 +817,7 @@ function lib:NewPlugin(obj)

         CoreObject[schema] = SetExternalModule(obj, schema, addonName, header, lod)

-        if(CoreObject.AddonLaunched and not CoreObject[schema].initialized) then
+        if(not lod and CoreObject.AddonLaunched and not CoreObject[schema].initialized) then
             --print("NewPlugin - " .. schema .. ": New Database")
             self:NewDatabase(CoreObject[schema])
             if(CoreObject[schema].Load) then
@@ -871,11 +871,13 @@ function lib:NewPrototype(name)
     mt.__tostring = rootstring
     setmetatable(obj, mt)

-    obj.db = {["enable"] = false}
-
     CoreObject[schema] = obj

-    return obj
+    return CoreObject[schema]
+end
+
+function lib:GetModuletable()
+    return Modules
 end

 function lib:GetPlugins()
@@ -898,8 +900,36 @@ end

 --[[ CONSTRUCTORS ]]--

+function lib:LoadQueuedModules()
+    if ModuleQueue then
+        for i=1,#ModuleQueue do
+            local schema = ModuleQueue[i]
+            local obj = CoreObject[schema]
+            if obj and not obj.initialized then
+                obj.initialized = true;
+                local halt = false
+                self:NewDatabase(obj)
+                if(obj.db.incompatible) then
+                    for addon,_ in pairs(obj.db.incompatible) do
+                        if IsAddOnLoaded(addon) then halt = true end
+                    end
+                end
+                if obj.Load then
+                    if(not halt) then
+                        obj:Load()
+                        obj.Load = nil
+                    end
+                end
+            end
+        end
+
+        twipe(ModuleQueue)
+    end
+end
+
 local function NewLoadOnDemand(addonName, schema, header)
     LoadOnDemand[schema] = addonName;
+    CoreObject.configs[schema] = {["enable"] = false}
     CoreObject.Options.args.plugins.args.pluginOptions.args[schema] = {
         type = "group",
         name = header,
@@ -920,7 +950,7 @@ local function NewLoadOnDemand(addonName, schema, header)
                     if(not IsAddOnLoaded(addonName)) then
                         local loaded, reason = LoadAddOn(addonName)
                         PROFILE_SV.STORED[SOURCE_KEY][schema].enable = true
-                        CoreObject:StaticPopup_Show("RL_CLIENT")
+                        lib:LoadQueuedModules()
                     else
                         PROFILE_SV.STORED[SOURCE_KEY][schema].enable = false
                         CoreObject:StaticPopup_Show("RL_CLIENT")
@@ -1111,30 +1141,7 @@ function lib:Launch()
         end
     end

-    if ModuleQueue then
-        for i=1,#ModuleQueue do
-            local schema = ModuleQueue[i]
-            local obj = CoreObject[schema]
-            if obj and not obj.initialized then
-                obj.initialized = true;
-                local halt = false
-                self:NewDatabase(obj)
-                if(obj.db.incompatible) then
-                    for addon,_ in pairs(obj.db.incompatible) do
-                        if IsAddOnLoaded(addon) then halt = true end
-                    end
-                end
-                if obj.Load then
-                    if(not halt) then
-                        obj:Load()
-                        obj.Load = nil
-                    end
-                end
-            end
-        end
-
-        twipe(ModuleQueue)
-    end
+    self:LoadQueuedModules()

     if ScriptQueue then
         for i=1, #ScriptQueue do
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc
index 99ef241..0d51ad9 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc
@@ -2,7 +2,7 @@
 ## Title: oUF ActionPanel
 ## Notes: Adds a backing to all unit frames that provides many utilities.
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## X-Category: oUF
 ## Dependencies: oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc
index c67e0f8..7a62ddf 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc
@@ -2,7 +2,7 @@
 ## Title: oUF Afflicted
 ## Notes: Adds Custom Debuff Highlighting to oUF.
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## X-Category: oUF
 ## Dependencies: oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc
index 54395a1..7fb26c5 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc
@@ -2,7 +2,7 @@
 ## Title: oUF Arcane Charge
 ## Notes: Adds support for arcane charge indicators to oUF.
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## Dependencies: oUF

 oUF_ArcaneCharge.lua
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc
index 7c72451..0945cc2 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc
@@ -2,7 +2,7 @@
 ## Title: oUF Combatant
 ## Notes: Adds PvP trinket status and spec icons to oUF frames.
 ## Author: Munglunch
-## Version: 4.50
+## Version: 4.60
 ## X-Category: oUF
 ## Dependencies: oUF

diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua
index 42ea044..47af1ad 100644
--- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua
+++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua
@@ -704,6 +704,10 @@ function MOD:Load()
 	self.tooltip:SetFrameStrata("DIALOG")
 	self.tooltip:HookScript("OnShow", _hook_TooltipOnShow)

+	if(GetCVar("scriptProfile") == "1") then
+		self.DebugList = SVLib:GetModuletable()
+	end
+
 	self:Generate()
 	self:RegisterEvent("PLAYER_ENTERING_WORLD", "Generate")

diff --git a/Interface/AddOns/SVUI/packages/stats/stats/system.lua b/Interface/AddOns/SVUI/packages/stats/stats/system.lua
index c1af43e..6e380aa 100644
--- a/Interface/AddOns/SVUI/packages/stats/stats/system.lua
+++ b/Interface/AddOns/SVUI/packages/stats/stats/system.lua
@@ -38,7 +38,8 @@ GET ADDON DATA
 ##########################################################
 ]]--
 local SVUI_ADDON_NAME, SV = ...
-local L = LibStub("LibSuperVillain-1.0"):Lang();
+local SVLib = LibStub("LibSuperVillain-1.0")
+local L = SVLib:Lang();
 local MOD = SV.SVStats;
 --[[
 ##########################################################
@@ -66,15 +67,17 @@ local function formatMem(memory)
 	local mult = 10^1
 	if memory > 999 then
 		local mem = ((memory/1024) * mult) / mult
-		return format(megaByteString, mem)
+		return megaByteString:format(mem)
 	else
 		local mem = (memory * mult) / mult
-		return format(kiloByteString, mem)
+		return kiloByteString:format(mem)
 	end
 end

 local memoryTable = {}
 local cpuTable = {}
+--local eventTable = {"ZONE_CHANGED", "ZONE_CHANGED_NEW_AREA", "PLAYER_ENTERING_WORLD"}
+
 local function RebuildAddonList()
 	local addOnCount = GetNumAddOns()
 	if (addOnCount == #memoryTable) then return end
@@ -138,11 +141,13 @@ local function OnEnter(self)
 	UpdateMemory()
 	bandwidth = GetAvailableBandwidth()

-	MOD.tooltip:AddDoubleLine(L['Home Latency:'], format(homeLatencyString, select(3, GetNetStats())), 0.69, 0.31, 0.31,0.84, 0.75, 0.65)
+	MOD.tooltip:AddDoubleLine(L['Home Latency:'], homeLatencyString:format(select(3, GetNetStats())), 0.69, 0.31, 0.31,0.84, 0.75, 0.65)

 	if bandwidth ~= 0 then
-		MOD.tooltip:AddDoubleLine(L['Bandwidth'] , format(bandwidthString, bandwidth),0.69, 0.31, 0.31,0.84, 0.75, 0.65)
-		MOD.tooltip:AddDoubleLine(L['Download'] , format(percentageString, GetDownloadedPercentage() *100),0.69, 0.31, 0.31, 0.84, 0.75, 0.65)
+		local percent = GetDownloadedPercentage()
+		percent = percent * 100
+		MOD.tooltip:AddDoubleLine(L['Bandwidth'] , bandwidthString:format(bandwidth), 0.69, 0.31, 0.31,0.84, 0.75, 0.65)
+		MOD.tooltip:AddDoubleLine(L['Download'] , percentageString:format(percent), 0.69, 0.31, 0.31, 0.84, 0.75, 0.65)
 		MOD.tooltip:AddLine(" ")
 	end

@@ -150,7 +155,7 @@ local function OnEnter(self)
 	MOD.tooltip:AddDoubleLine(L['Total Memory:'], formatMem(totalMemory), 0.69, 0.31, 0.31,0.84, 0.75, 0.65)
 	if cpuProfiling then
 		totalCPU = UpdateCPU()
-		MOD.tooltip:AddDoubleLine(L['Total CPU:'], format(homeLatencyString, totalCPU), 0.69, 0.31, 0.31,0.84, 0.75, 0.65)
+		MOD.tooltip:AddDoubleLine(L['Total CPU:'], homeLatencyString:format(totalCPU), 0.69, 0.31, 0.31,0.84, 0.75, 0.65)
 	end

 	local red, green
@@ -171,9 +176,32 @@ local function OnEnter(self)
 			if (cpuTable[i][4]) then
 				red = cpuTable[i][3] / totalCPU
 				green = 1 - red
-				MOD.tooltip:AddDoubleLine(cpuTable[i][2], format(homeLatencyString, cpuTable[i][3]), 1, 1, 1, red, green + .5, 0)
+				MOD.tooltip:AddDoubleLine(cpuTable[i][2], homeLatencyString:format(cpuTable[i][3]), 1, 1, 1, red, green + .5, 0)
 			end
 		end
+
+		-- if(MOD.DebugList) then
+		-- 	MOD.tooltip:AddLine(" ")
+		-- 	for _,schema in pairs(MOD.DebugList) do
+		--         local obj = SV[schema]
+		--         if obj and obj.___eventframe then
+		--             local upTime, numEvents = GetFrameCPUUsage(obj.___eventframe)
+		--             local eventString = ("%s:"):format(schema)
+		-- 			local eventResults = ("Calls: |cffFFFF00%d|r @: |cffFFFF00%dms|r"):format(numEvents, upTime)
+		-- 			MOD.tooltip:AddDoubleLine(eventString, eventResults, 1, 0.5, 0, 1, 1, 1)
+		--         end
+		--     end
+		-- end
+
+		-- MOD.tooltip:AddLine(" ")
+		-- for i = 1, #eventTable do
+		-- 	local upTime, numEvents = GetEventCPUUsage(eventTable[i])
+		-- 	local eventString = ("%s:"):format(eventTable[i])
+		-- 	local eventResults = ("Calls: |cffFFFF00%d|r @: |cffFFFF00%dms|r"):format(numEvents, upTime)
+		-- 	MOD.tooltip:AddDoubleLine(eventString, eventResults, 1, 0.5, 0, 1, 1, 1)
+		-- end
+
+
 		MOD.tooltip:AddLine(" ")
 		MOD.tooltip:AddLine(L['(Hold Shift) Memory Usage'])
 	end
@@ -210,4 +238,13 @@ local function Update(self, t)
 	end
 end

-MOD:Extend('System', nil, nil, Update, Click, OnEnter, OnLeave)
\ No newline at end of file
+MOD:Extend('System', nil, nil, Update, Click, OnEnter, OnLeave)
+
+--[[
+OTHER CHECKS
+
+GetScriptCPUUsage()
+print(debugstack())
+local usage, calls = GetFunctionCPUUsage(function, includeSubroutines)
+local usage, numEvents = GetEventCPUUsage(["event"])
+]]--
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/system/setup.lua b/Interface/AddOns/SVUI/system/setup.lua
index 3c4ffe0..1767903 100644
--- a/Interface/AddOns/SVUI/system/setup.lua
+++ b/Interface/AddOns/SVUI/system/setup.lua
@@ -1663,7 +1663,7 @@ end
 local function InstallComplete()
 	SVLib:SaveSafeData("install_version", SV.Version)
 	StopMusic()
-	SetCVar("Sound_MusicVolume",user_music_vol)
+	SetCVar("Sound_MusicVolume", user_music_vol)
 	okToResetMOVE = false;
 	ReloadUI()
 end
@@ -1682,7 +1682,7 @@ local function InstallMungsChoice()
 	SetupAuralayout();
 	SVLib:SaveSafeData("install_version", SV.Version)
 	StopMusic()
-	SetCVar("Sound_MusicVolume",user_music_vol)
+	SetCVar("Sound_MusicVolume", user_music_vol)
 	ReloadUI()
 end

diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc
index efe62f6..ab2aa07 100644
--- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc
+++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## Title: |cffFF9900SVUI |r|cffFFEF00Answering Service|r
 ## Notes: Supervillain UI [|cff9911FFAutomatic Whispers|r]
 ## RequiredDeps: SVUI
diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc
index 7255c88..3444963 100644
--- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc
+++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## Title: |cffFF9900SVUI |r|cffFFEF00Art of War|r
 ## Notes: Supervillain UI [|cff9911FFPvP Tools|r].
 ## SavedVariables: SVAOW_Data
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc
index 896823a..01ae44c 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc
+++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## Title: |cffFF9900SVUI |r|cffFFEF00Config O Matic|r
 ## Notes: Supervillain UI [|cff9911FFConfig Options|r]
 ## RequiredDeps: SVUI
diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc
index b7cd441..6f78be9 100644
--- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc
+++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## Title: |cffFF9900SVUI |r|cffFFEF00Laborer|r
 ## Notes: Supervillain UI [|cff9911FFProfession Tools|r].
 ## SavedVariables: LABOR_Data
diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
index 2fcd584..18495c0 100644
--- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
+++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## Title: |cffFF9900SVUI |r|cffFFEF00Log O Matic|r
 ## Notes: Supervillain UI [|cff9911FFData Logging|r].
 ## SavedVariables: SVLOG_Data
diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc
index 7b9d3b5..c4f678c 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc
+++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch, Azilroka, Sortokk
-## Version: 4.5
+## Version: 4.6
 ## Title: |cffFF9900SVUI |r|cffFFEF00Style O Matic|r
 ## Notes: Supervillain UI [|cff9911FFAddon Skins|r].
 ## RequiredDeps: SVUI
diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc
index e50beff..81f67ba 100644
--- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc
+++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc
@@ -1,6 +1,6 @@
 ## Interface: 50400
 ## Author: Munglunch
-## Version: 4.5
+## Version: 4.6
 ## Title: |cffFF9900SVUI |r|cffFFEF00Tracking Device|r
 ## Notes: Supervillain UI [|cff9911FFRaid & Party Member Tracking|r].
 ## RequiredDeps: SVUI