Quantcast

Move some stuff

Darthpred [08-23-16 - 18:29]
Move some stuff
Filename
ElvUI_SLE/defaults/private.lua
ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua
ElvUI_SLE/modules/Armory/Config.lua
ElvUI_SLE/modules/Armory/KnightFrame.lua
diff --git a/ElvUI_SLE/defaults/private.lua b/ElvUI_SLE/defaults/private.lua
index 8aba63d..32618b9 100644
--- a/ElvUI_SLE/defaults/private.lua
+++ b/ElvUI_SLE/defaults/private.lua
@@ -38,13 +38,6 @@ V["sle"] = {
 		["setoverlay"] = false,
 		["lockbutton"] = false,
 	},
-	["Armory"] = {
-		["ItemLevel"] = {
-			["font"] = "PT Sans Narrow",
-			["size"] = 12,
-			["outline"] = "NONE",
-		},
-	},
 	--Minimap Module
 	["minimap"] = {
 		["buttons"] = {
diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
index cd93cb6..b06feaf 100644
--- a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
+++ b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
@@ -897,7 +897,7 @@ function CA:UpdateSettings(part)
 end

 function CA:UpdateIlvlFont()
-	local db = E.private.sle.Armory.ItemLevel
+	local db = E.db.sle.Armory.Character.ItemLevel
 	_G["CharacterStatsPane"].ItemLevelFrame.Value:FontTemplate(E.LSM:Fetch('font', db.font), db.size, db.outline)
 	_G["CharacterStatsPane"].ItemLevelFrame:SetHeight(db.size + 4)
 	_G["CharacterStatsPane"].ItemLevelFrame.Background:SetHeight(db.size + 4)
@@ -909,6 +909,7 @@ end

 KF.Modules[#KF.Modules + 1] = 'CharacterArmory'
 KF.Modules.CharacterArmory = function()
+	if E.private.sle.Armory then E.db.sle.Armory.Character.ItemLevel = E.private.sle.Armory.ItemLevel; E.db.sle.Armory.ItemLevel = nil end --DB converts
 	if E.db.sle.Armory.Character.Enable ~= false then
 		Info.CharacterArmory_Activate = true

diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua
index f61e560..cc22688 100644
--- a/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua
+++ b/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua
@@ -11,6 +11,12 @@ P.sle.Armory.Character = {
 	NoticeMissing = true,
 	MissingIcon = true,

+	ItemLevel = {
+		font = "PT Sans Narrow",
+		size = 12,
+		outline = "NONE",
+	},
+
 	Backdrop = {
 		SelectedBG = 'Space',
 		CustomAddress = ''
diff --git a/ElvUI_SLE/modules/Armory/Config.lua b/ElvUI_SLE/modules/Armory/Config.lua
index 81daa4b..c8050a7 100644
--- a/ElvUI_SLE/modules/Armory/Config.lua
+++ b/ElvUI_SLE/modules/Armory/Config.lua
@@ -323,8 +323,8 @@ local function LoadArmoryConfigTable()
 							name = L["Font"],
 							order = 5,
 							guiInline = true,
-							get = function(info) return E.private.sle.Armory.ItemLevel[ info[#info] ] end,
-							set = function(info, value) E.private.sle.Armory.ItemLevel[ info[#info] ] = value; _G["CharacterArmory"]:UpdateIlvlFont() end,
+							get = function(info) return E.db.sle.Armory.ItemLevel[ info[#info] ] end,
+							set = function(info, value) E.db.sle.Armory.ItemLevel[ info[#info] ] = value; _G["CharacterArmory"]:UpdateIlvlFont() end,
 							args = {
 								font = {
 									type = 'select', dialogControl = 'LSM30_Font',
diff --git a/ElvUI_SLE/modules/Armory/KnightFrame.lua b/ElvUI_SLE/modules/Armory/KnightFrame.lua
index 79614e5..0218558 100644
--- a/ElvUI_SLE/modules/Armory/KnightFrame.lua
+++ b/ElvUI_SLE/modules/Armory/KnightFrame.lua
@@ -314,7 +314,10 @@ if not (select(2, GetAddOnInfo('ElvUI_KnightFrame')) and IsAddOnLoaded('ElvUI_Kn

 		function KF:ForUpdateAll()
 			_G["CharacterArmory"]:UpdateSettings("all")
-			if not SLE._Compatibility["DejaCharacterStats"] then _G["CharacterArmory"]:ToggleStats() end
+			if not SLE._Compatibility["DejaCharacterStats"] then
+				_G["CharacterArmory"]:ToggleStats()
+				_G["CharacterArmory"]:UpdateIlvlFont()
+			end
 			_G["InspectArmory"]:UpdateSettings("all")
 		end
 	end