Quantcast

Character Frame Rewrite-Highly NOT Recommended for Live Production!

Repooc [02-22-14 - 05:04]
Character Frame Rewrite-Highly NOT Recommended for Live Production!
Filename
ElvUI_SLE/config/profile.lua
ElvUI_SLE/media/textures/Gradation.tga
ElvUI_SLE/media/textures/Space.tga
ElvUI_SLE/modules/characterframe/characterframe.lua
ElvUI_SLE/modules/characterframe/core.lua
ElvUI_SLE/modules/characterframe/durability.lua
ElvUI_SLE/modules/characterframe/enchant.lua
ElvUI_SLE/modules/characterframe/itemlevel.lua
ElvUI_SLE/modules/characterframe/load_characterframe.xml
ElvUI_SLE/modules/characterframe/options.lua
diff --git a/ElvUI_SLE/config/profile.lua b/ElvUI_SLE/config/profile.lua
index b61b314..343493e 100755
--- a/ElvUI_SLE/config/profile.lua
+++ b/ElvUI_SLE/config/profile.lua
@@ -81,6 +81,15 @@ P['sle'] = {
 		},
 	},

+	--Knightframe Adaption
+	['KnightFrame_Armory'] = {
+		['Enable'] = true,
+		['NoticeMissing'] = true,
+	},
+	['KnightFrame_Inspect'] = {
+		['Enable'] = true,
+	},
+
 	--Combat Icon
 	['combatico'] = {
 		['pos'] = 'TOP',
diff --git a/ElvUI_SLE/media/textures/Gradation.tga b/ElvUI_SLE/media/textures/Gradation.tga
new file mode 100644
index 0000000..dae412d
Binary files /dev/null and b/ElvUI_SLE/media/textures/Gradation.tga differ
diff --git a/ElvUI_SLE/media/textures/Space.tga b/ElvUI_SLE/media/textures/Space.tga
new file mode 100644
index 0000000..d94fc70
Binary files /dev/null and b/ElvUI_SLE/media/textures/Space.tga differ
diff --git a/ElvUI_SLE/modules/characterframe/characterframe.lua b/ElvUI_SLE/modules/characterframe/characterframe.lua
index 91b692e..53c51e4 100755
--- a/ElvUI_SLE/modules/characterframe/characterframe.lua
+++ b/ElvUI_SLE/modules/characterframe/characterframe.lua
@@ -1,34 +1,591 @@
 local E, L, V, P, G, _ = unpack(ElvUI);
-local CFO = E:NewModule('CharacterFrameOptions', 'AceHook-3.0', 'AceEvent-3.0');
+local CFO = E:NewModule('CharacterFrameOptions', 'AceEvent-3.0');

-function CFO:ToggleCFO()
-	self:UpdateItemDurability()
-	self:UpdateItemLevel()
-	self:UpdateItemEnchants()
+local f = CreateFrame('Frame', 'KnightArmory', PaperDollFrame)
+local C = KnightFrame_Armory_Constants
+
+local function GemSocket_OnClick(self, button)
+	self = self:GetParent()
+
+	if CursorHasItem() then
+		local CursorType, _, ItemLink = GetCursorInfo()
+
+		-- Check cursor item is gem type
+		if CursorType == 'item' and select(6, GetItemInfo(ItemLink)) == select(8, GetAuctionItemClasses()) then
+			SocketInventoryItem(GetInventorySlotInfo(self.slotName))
+			ClickSocketButton(self.socketNumber)
+
+			return
+		end
+	end
+
+	if self.GemItemID then
+		local itemName, itemLink = GetItemInfo(self.GemItemID)
+
+		if not IsShiftKeyDown() then
+			SetItemRef(itemLink, itemLink, 'LeftButton')
+		else
+			if button == 'RightButton' then
+				SocketInventoryItem(GetInventorySlotInfo(self.slotName))
+			elseif HandleModifiedItemClick(itemLink) then
+			elseif BrowseName and BrowseName:IsVisible() then
+				AuctionFrameBrowse_Reset(BrowseResetButton)
+				BrowseName:SetText(itemName)
+				BrowseName:SetFocus()
+			end
+		end
+	end
 end

-function CFO:OnShowEquipmentChange()
-	CFO:UpdateItemLevel()
-	CFO:UpdateItemEnchants()
+local function GemSocket_OnRecieveDrag(self)
+	self = self:GetParent()
+
+	if CursorHasItem() then
+		local CursorType, _, ItemLink = GetCursorInfo()
+
+		if CursorType == 'item' and select(6, GetItemInfo(ItemLink)) == select(8, GetAuctionItemClasses()) then
+			SocketInventoryItem(GetInventorySlotInfo(self.slotName))
+			ClickSocketButton(self.socketNumber)
+		end
+	end
+end
+
+local function CreateArmoryFrame(self)
+	--<< Core >>--
+	self:Point('TOPLEFT', CharacterFrameInset, 10, 20)
+	self:Point('BOTTOMRIGHT', CharacterFrameInsetRight, 'BOTTOMLEFT', -10, 5)
+
+	--<< Background >>--
+	self.BG = self:CreateTexture(nil, 'OVERLAY')
+	self.BG:SetInside()
+	self.BG:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\Space.tga')
+
+	--<< Change Model Frame's frameLevel >>--
+	CharacterModelFrame:SetFrameLevel(self:GetFrameLevel() + 2)
+
+	--<< Average Item Level >>--
+	C.Toolkit.TextSetting(self, nil, { ['Tag'] = 'AverageItemLevel', ['FontSize'] = 12, }, 'BOTTOM', CharacterModelFrame, 'TOP', 0, 14)
+	local function ValueColorUpdate()
+		self.AverageItemLevel:SetText(C.Toolkit.Color_Value(L['Average'])..' : '..format('%.2f', select(2, GetAverageItemLevel())))
+	end
+	E.valueColorUpdateFuncs[ValueColorUpdate] = true
+
+	-- Create each equipment slots gradation, text, gem socket icon.
+	local Slot
+	for i, slotName in pairs(C.GearList) do
+		-- Equipment Tag
+		Slot = CreateFrame('Frame', nil, self)
+		Slot:Size(130, 41)
+		Slot:SetFrameLevel(CharacterModelFrame:GetFrameLevel() + 1)
+		Slot.Direction = i%2 == 1 and 'LEFT' or 'RIGHT'
+		Slot.ID, Slot.EmptyTexture = GetInventorySlotInfo(slotName)
+		Slot:Point(Slot.Direction, _G['Character'..slotName], Slot.Direction == 'LEFT' and -1 or 1, 0)
+
+		-- Grow each equipment slot's frame level
+		_G['Character'..slotName]:SetFrameLevel(Slot:GetFrameLevel() + 1)
+
+		-- Gradation
+		Slot.Gradation = Slot:CreateTexture(nil, 'OVERLAY')
+		Slot.Gradation:SetInside()
+		Slot.Gradation:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\Gradation.tga')
+
+		if Slot.Direction == 'LEFT' then
+			Slot.Gradation:SetTexCoord(0, .5, 0, .5)
+		else
+			Slot.Gradation:SetTexCoord(.5, 1, 0, .5)
+		end
+
+		if slotName ~= 'ShirtSlot' and slotName ~= 'TabardSlot' then
+			-- Item Level
+			C.Toolkit.TextSetting(Slot, nil, { ['Tag'] = 'ItemLevel', ['FontSize'] = 10, ['directionH'] = Slot.Direction, }, 'TOP'..Slot.Direction, _G['Character'..slotName], 'TOP'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 2 or -2, -1)
+
+			-- Enchantment Name
+			C.Toolkit.TextSetting(Slot, nil, { ['Tag'] = 'ItemEnchant', ['FontSize'] = 8, ['directionH'] = Slot.Direction, }, Slot.Direction, _G['Character'..slotName], Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT', Slot.Direction == 'LEFT' and 2 or -2, 1)
+			Slot.EnchantWarning = CreateFrame('Button', nil, Slot)
+			Slot.EnchantWarning:Size(12)
+			Slot.EnchantWarning.Texture = Slot.EnchantWarning:CreateTexture(nil, 'OVERLAY')
+			Slot.EnchantWarning.Texture:SetInside()
+			Slot.EnchantWarning.Texture:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\Warning-Small.tga')
+			Slot.EnchantWarning:Point(Slot.Direction, Slot.ItemEnchant, Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT', Slot.Direction == 'LEFT' and 3 or -3, 0)
+			Slot.EnchantWarning:SetScript('OnEnter', C.CommonScript.OnEnter)
+			Slot.EnchantWarning:SetScript('OnLeave', C.CommonScript.OnLeave)
+
+			-- Durability
+			C.Toolkit.TextSetting(Slot, nil, { ['Tag'] = 'Durability', ['FontSize'] = 10, ['directionH'] = Slot.Direction, }, 'BOTTOM'..Slot.Direction, _G['Character'..slotName], 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 2 or -2, 3)
+
+			-- Gem Socket
+			for i = 1, MAX_NUM_SOCKETS do
+				Slot['Socket'..i] = CreateFrame('Frame', nil, Slot)
+				Slot['Socket'..i]:Size(12)
+				Slot['Socket'..i]:SetBackdrop({
+					bgFile = E.media.blankTex,
+					edgeFile = E.media.blankTex,
+					tile = false, tileSize = 0, edgeSize = E.mult,
+					insets = { left = 0, right = 0, top = 0, bottom = 0}
+				})
+				Slot['Socket'..i]:SetBackdropColor(0, 0, 0, 1)
+				Slot['Socket'..i]:SetBackdropBorderColor(0, 0, 0)
+				Slot['Socket'..i]:SetFrameLevel(CharacterModelFrame:GetFrameLevel() + 1)
+
+				Slot['Socket'..i].slotName = slotName
+				Slot['Socket'..i].socketNumber = i
+
+				Slot['Socket'..i].Socket = CreateFrame('Button', nil, Slot['Socket'..i])
+				Slot['Socket'..i].Socket:SetBackdrop({
+					bgFile = E.media.blankTex,
+					edgeFile = E.media.blankTex,
+					tile = false, tileSize = 0, edgeSize = E.mult,
+					insets = { left = 0, right = 0, top = 0, bottom = 0}
+				})
+				Slot['Socket'..i].Socket:SetInside()
+				Slot['Socket'..i].Socket:SetFrameLevel(Slot['Socket'..i]:GetFrameLevel() + 1)
+				Slot['Socket'..i].Socket:RegisterForClicks('AnyUp')
+				Slot['Socket'..i].Socket:SetScript('OnEnter', C.CommonScript.OnEnter)
+				Slot['Socket'..i].Socket:SetScript('OnLeave', C.CommonScript.OnLeave)
+				Slot['Socket'..i].Socket:SetScript('OnClick', GemSocket_OnClick)
+				Slot['Socket'..i].Socket:SetScript('OnReceiveDrag', GemSocket_OnRecieveDrag)
+
+				Slot['Socket'..i].Texture = Slot['Socket'..i].Socket:CreateTexture(nil, 'OVERLAY')
+				Slot['Socket'..i].Texture:SetTexCoord(.1, .9, .1, .9)
+				Slot['Socket'..i].Texture:SetInside()
+			end
+			Slot.Socket2:Point(Slot.Direction, Slot.Socket1, Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT', Slot.Direction == 'LEFT' and 1 or -1, 0)
+			Slot.Socket3:Point(Slot.Direction, Slot.Socket2, Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT', Slot.Direction == 'LEFT' and 1 or -1, 0)
+
+			Slot.SocketWarning = CreateFrame('Button', nil, Slot)
+			Slot.SocketWarning:Size(12)
+			Slot.SocketWarning:RegisterForClicks('AnyUp')
+			Slot.SocketWarning.Texture = Slot.SocketWarning:CreateTexture(nil, 'OVERLAY')
+			Slot.SocketWarning.Texture:SetInside()
+			Slot.SocketWarning.Texture:SetTexture('Interface\\AddOns\\ElvUI_SLE\\media\\textures\\Warning-Small.tga')
+			Slot.SocketWarning:SetScript('OnEnter', C.CommonScript.OnEnter)
+			Slot.SocketWarning:SetScript('OnLeave', C.CommonScript.OnLeave)
+		end
+
+		self[slotName] = Slot
+	end
+
+	-- GameTooltip for counting gem sockets and getting enchant effects
+	self.ScanTTForEnchanting1 = CreateFrame('GameTooltip', 'KnightArmoryScanTT_E1', nil, 'GameTooltipTemplate')
+	self.ScanTTForEnchanting1:SetOwner(UIParent, 'ANCHOR_NONE')
+
+	-- GameTooltip for checking that texture in tooltip is socket texture
+	self.ScanTTForEnchanting2 = CreateFrame('GameTooltip', 'KnightArmoryScanTT_E2', nil, 'GameTooltipTemplate')
+	self.ScanTTForEnchanting2:SetOwner(UIParent, 'ANCHOR_NONE')
+
+	-- For resizing paper doll frame when it toggled.
+	self.ChangeCharacterFrameWidth = CreateFrame('Frame')
+	self.ChangeCharacterFrameWidth:SetScript('OnShow', function() if PaperDollFrame:IsVisible() then PANEL_DEFAULT_WIDTH = 448 CFO:ArmoryFrame_DataSetting() end end)
+	self.ChangeCharacterFrameWidth:SetScript('OnHide', function() PANEL_DEFAULT_WIDTH = 338 end)
+
+	CreateArmoryFrame = nil
+end
+
+function CFO:ArmoryFrame_DataSetting()
+	if not f:IsVisible() then return end
+
+	-- Get Player Profession
+	local Prof1, Prof2 = GetProfessions()
+	local Prof1_Level, Prof2_Level = 0, 0
+	CFO.PlayerProfession = {}
+
+	if Prof1 then Prof1, _, Prof1_Level = GetProfessionInfo(Prof1) end
+	if Prof2 then Prof2, _, Prof2_Level = GetProfessionInfo(Prof2) end
+	if Prof1 and C.ProfessionList[Prof1] then CFO.PlayerProfession[(C.ProfessionList[Prof1])] = Prof1_Level end
+	if Prof2 and C.ProfessionList[Prof2] then CFO.PlayerProfession[(C.ProfessionList[Prof2])] = Prof2_Level end
+
+	local ErrorDetected
+	local r, g, b
+	local Slot, ItemLink, ItemRarity, BasicItemLevel, TrueItemLevel, ItemUpgradeID, ItemTexture, IsEnchanted, UsableEffect, CurrentLineText, GemID, GemTotal_1, GemTotal_2, GemCount, CurrentDurability, MaxDurability
+	local arg1, itemID, enchantID, _, _, _, _, arg2, arg3, arg4, arg5, arg6
+
+	for _, slotName in pairs(C.GearList) do
+		if not (slotName == 'ShirtSlot' or slotName == 'TabardSlot') then
+			Slot = f[slotName]
+
+			do --<< Clear Setting >>--
+				ErrorDetected, TrueItemLevel, IsEnchanted, UsableEffect, ItemRarity, ItemUpgradeID, ItemTexture = nil, nil, nil, nil, nil, nil, nil
+
+				Slot.ItemLevel:SetText(nil)
+				Slot.ItemEnchant:SetText(nil)
+				Slot.Durability:SetText('')
+				for i = 1, MAX_NUM_SOCKETS do
+					Slot['Socket'..i].Texture:SetTexture(nil)
+					Slot['Socket'..i].GemItemID = nil
+					Slot['Socket'..i].GemType = nil
+					Slot['Socket'..i]:Hide()
+				end
+
+				Slot.Socket1:Point('BOTTOM'..Slot.Direction, _G['Character'..slotName], 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, 3)
+				Slot.EnchantWarning:Hide()
+				Slot.EnchantWarning.Message = nil
+				Slot.SocketWarning:Point(Slot.Direction, Slot.Socket1)
+				Slot.SocketWarning:Hide()
+				Slot.SocketWarning.Link = nil
+				Slot.SocketWarning.Message = nil
+
+				f.ScanTTForEnchanting1:ClearLines()
+				f.ScanTTForEnchanting2:ClearLines()
+				for i = 1, 10 do
+					_G['KnightArmoryScanTT_E1Texture'..i]:SetTexture(nil)
+					_G['KnightArmoryScanTT_E2Texture'..i]:SetTexture(nil)
+				end
+			end
+
+			ItemLink = GetInventoryItemLink('player', Slot.ID)
+
+			if ItemLink then
+				do --<< Gem Parts >>--
+					arg1, itemID, enchantID, _, _, _, _, arg2, arg3, arg4, arg5, arg6 = strsplit(':', ItemLink)
+
+					f.ScanTTForEnchanting1:SetInventoryItem('player', Slot.ID)
+					f.ScanTTForEnchanting2:SetHyperlink(format('%s:%s:%d:0:0:0:0:%s:%s:%s:%s:%s', arg1, itemID, enchantID, arg2, arg3, arg4, arg5, arg6))
+
+					GemTotal_1, GemTotal_2, GemCount = 0, 0, 0
+
+					-- First, Counting default gem sockets
+					for i = 1, MAX_NUM_SOCKETS do
+						ItemTexture = _G['KnightArmoryScanTT_E2Texture'..i]:GetTexture()
+
+						if ItemTexture and ItemTexture:find('Interface\\ItemSocketingFrame\\') then
+							GemTotal_1 = GemTotal_1 + 1
+							Slot['Socket'..GemTotal_1].GemType = strupper(gsub(ItemTexture, 'Interface\\ItemSocketingFrame\\UI--EmptySocket--', ''))
+						end
+					end
+
+					-- Second, Check if slot's item enable to adding a socket
+					if (slotName == 'WaistSlot' and UnitLevel('player') >= 70) or -- buckle
+						((slotName == 'WristSlot' or slotName == 'HandsSlot') and CFO.PlayerProfession.BlackSmithing and CFO.PlayerProfession.BlackSmithing >= 550) then -- BlackSmith
+
+						GemTotal_1 = GemTotal_1 + 1
+						Slot['Socket'..GemTotal_1].GemType = 'PRISMATIC'
+					end
+
+					-- Apply current item's gem setting
+					for i = 1, MAX_NUM_SOCKETS do
+						ItemTexture = _G['KnightArmoryScanTT_E1Texture'..i]:GetTexture()
+						GemID = select(i, GetInventoryItemGems(Slot.ID))
+
+						if Slot['Socket'..i].GemType and C.GemColor[Slot['Socket'..i].GemType] then
+							r, g, b = unpack(C.GemColor[Slot['Socket'..i].GemType])
+							Slot['Socket'..i].Socket:SetBackdropColor(r, g, b, .5)
+							Slot['Socket'..i].Socket:SetBackdropBorderColor(r, g, b)
+						else
+							Slot['Socket'..i].Socket:SetBackdropColor(1, 1, 1, .5)
+							Slot['Socket'..i].Socket:SetBackdropBorderColor(1, 1, 1)
+						end
+
+						if ItemTexture then
+							Slot['Socket'..i]:Show()
+							GemTotal_2 = GemTotal_2 + 1
+							Slot.SocketWarning:Point(Slot.Direction, Slot['Socket'..i], (Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, 0)
+
+							if GemID then
+								GemCount = GemCount + 1
+								Slot['Socket'..i].Texture:SetTexture(ItemTexture)
+								Slot['Socket'..i].GemItemID = GemID
+							end
+						end
+					end
+				end
+
+				_, _, ItemRarity, BasicItemLevel, _, _, _, _, _, ItemTexture = GetItemInfo(ItemLink)
+				r, g, b = GetItemQualityColor(ItemRarity)
+
+				ItemUpgradeID = ItemLink:match(':(%d+)\124h%[')
+
+				--<< Enchant Parts >>--
+				for i = 1, f.ScanTTForEnchanting1:NumLines() do
+					CurrentLineText = _G['KnightArmoryScanTT_E1TextLeft'..i]:GetText()
+
+					if CurrentLineText:find(C.ItemLevelKey) then
+						TrueItemLevel = tonumber(CurrentLineText:match(C.ItemLevelKey))
+					elseif CurrentLineText:find(C.EnchantKey) then
+						CurrentLineText = CurrentLineText:match(C.EnchantKey) -- Get enchant string
+						CurrentLineText = gsub(CurrentLineText, ITEM_MOD_CRIT_RATING_SHORT, CRIT_ABBR) -- Critical is too long
+						CurrentLineText = gsub(CurrentLineText, ' + ', '+') -- Remove space
+
+						Slot.ItemEnchant:SetText('|cffceff00'..CurrentLineText)
+
+						IsEnchanted = true
+					elseif CurrentLineText:find(ITEM_SPELL_TRIGGER_ONUSE) then
+						UsableEffect = true
+					end
+				end
+
+				--<< ItemLevel Parts >>--
+				if BasicItemLevel then
+					if ItemUpgradeID then
+						if ItemUpgradeID == '0' then
+							ItemUpgradeID = nil
+						else
+							if not C.ItemUpgrade[ItemUpgradeID] then
+								print('New Upgrade ID |cffceff00['..ItemUpgradeID..']|r : |cffceff00'..(TrueItemLevel - BasicItemLevel))
+							end
+
+							ItemUpgradeID = TrueItemLevel - BasicItemLevel
+						end
+					end
+
+					Slot.ItemLevel:SetText((Slot.Direction == 'LEFT' and TrueItemLevel or '')..(ItemUpgradeID and (Slot.Direction == 'LEFT' and ' ' or '')..(C.UpgradeColor[ItemUpgradeID] or '|cffaaaaaa')..'(+'..ItemUpgradeID..')|r'..(Slot.Direction == 'RIGHT' and ' ' or '') or '')..(Slot.Direction == 'RIGHT' and TrueItemLevel or ''))
+				end
+
+				--<< Durability Parts >>--
+				CurrentDurability, MaxDurability = GetInventoryItemDurability(Slot.ID)
+				if CurrentDurability and MaxDurability then
+					r, g, b = E:ColorGradient((CurrentDurability / MaxDurability), 1, 0, 0, 1, 1, 0, 0, 1, 0)
+					Slot.Durability:SetFormattedText("%s%.0f%%|r", E:RGBToHex(r, g, b), (CurrentDurability / MaxDurability) * 100)
+					Slot.Socket1:Point('BOTTOM'..Slot.Direction, Slot.Durability, 'BOTTOM'..(Slot.Direction == 'LEFT' and 'RIGHT' or 'LEFT'), Slot.Direction == 'LEFT' and 3 or -3, -2)
+				end
+
+				-- Check Error
+				if E.db.sle.KnightFrame_Armory.NoticeMissing ~= false then
+					if (not IsEnchanted and C.EnchantableSlots[slotName]) or ((slotName == 'Finger0Slot' or slotName == 'Finger1Slot') and CFO.PlayerProfession.Enchanting and CFO.PlayerProfession.Enchanting >= 550 and not IsEnchanted) then
+						ErrorDetected = true
+						Slot.EnchantWarning:Show()
+						Slot.ItemEnchant:SetText('|cffff0000'..L['Not Enchanted'])
+					elseif CFO.PlayerProfession.Engineering and ((slotName == 'BackSlot' and CFO.PlayerProfession.Engineering >= 380) or (slotName == 'HandsSlot' and CFO.PlayerProfession.Engineering >= 400) or (slotName == 'WaistSlot' and CFO.PlayerProfession.Engineering >= 380)) and not UsableEffect then
+						ErrorDetected = true
+						Slot.EnchantWarning:Show()
+						Slot.EnchantWarning.Message = '|cff71d5ff'..GetSpellInfo(110403)..'|r : '..L['Missing Tinkers']
+					elseif slotName == 'ShoulderSlot' and CFO.PlayerProfession.Inscription and C.ItemEnchant_Profession_Inscription and CFO.PlayerProfession.Inscription >= C.ItemEnchant_Profession_Inscription.NeedLevel and not C.ItemEnchant_Profession_Inscription[enchantID] then
+						ErrorDetected = true
+						Slot.EnchantWarning:Show()
+						Slot.EnchantWarning.Message = '|cff71d5ff'..GetSpellInfo(110400)..'|r : '..L['This is not profession only.']
+					elseif slotName == 'WristSlot' and CFO.PlayerProfession.LeatherWorking and C.ItemEnchant_Profession_LeatherWorking and CFO.PlayerProfession.LeatherWorking >= C.ItemEnchant_Profession_LeatherWorking.NeedLevel and not C.ItemEnchant_Profession_LeatherWorking[enchantID] then
+						ErrorDetected = true
+						Slot.EnchantWarning:Show()
+						Slot.EnchantWarning.Message = '|cff71d5ff'..GetSpellInfo(110423)..'|r : '..L['This is not profession only.']
+					elseif slotName == 'BackSlot' and CFO.PlayerProfession.Tailoring and C.ItemEnchant_Profession_Tailoring and CFO.PlayerProfession.Tailoring >= C.ItemEnchant_Profession_Tailoring.NeedLevel and not C.ItemEnchant_Profession_Tailoring[enchantID] then
+						ErrorDetected = true
+						Slot.EnchantWarning:Show()
+						Slot.EnchantWarning.Message = '|cff71d5ff'..GetSpellInfo(110426)..'|r : '..L['This is not profession only.']
+					end
+
+					if GemTotal_1 > GemTotal_2 or GemTotal_1 > GemCount then
+						ErrorDetected = true
+
+						Slot.SocketWarning:Show()
+
+						if GemTotal_1 > GemTotal_2 then
+							if slotName == 'WaistSlot' then
+								if TrueItemLevel < 300 then
+									_, Slot.SocketWarning.Link = GetItemInfo(41611)
+								elseif TrueItemLevel < 417 then
+									_, Slot.SocketWarning.Link = GetItemInfo(55054)
+								else
+									_, Slot.SocketWarning.Link = GetItemInfo(90046)
+								end
+							elseif slotName == 'HandsSlot' then
+								Slot.SocketWarning.Link = GetSpellLink(114112)
+							elseif slotName == 'WristSlot' then
+								Slot.SocketWarning.Link = GetSpellLink(113263)
+							end
+
+							if slotName == 'WaistSlot' then
+								Slot.SocketWarning.Message = L['Missing Buckle']
+							elseif slotName == 'WristSlot' or slotName == 'HandsSlot' then
+								Slot.SocketWarning.Message = '|cff71d5ff'..GetSpellInfo(110396)..'|r : '..L['Missing Socket']
+							end
+						else
+							Slot.SocketWarning.Message = '|cffff5678'..(GemTotal_1 - GemCount)..'|r '..L['Empty Socket']
+						end
+
+						if GemTotal_1 ~= GemTotal_2 and slotName == 'WaistSlot' then
+							Slot.SocketWarning:SetScript('OnClick', function(self, button)
+								local itemName, itemLink
+
+								if TrueItemLevel < 300 then
+									itemName, itemLink = GetItemInfo(41611)
+								elseif TrueItemLevel < 417 then
+									itemName, itemLink = GetItemInfo(55054)
+								else
+									itemName, itemLink = GetItemInfo(90046)
+								end
+
+								if HandleModifiedItemClick(itemLink) then
+								elseif IsShiftKeyDown() then
+									if button == 'RightButton' then
+										SocketInventoryItem(Slot.ID)
+									elseif BrowseName and BrowseName:IsVisible() then
+										AuctionFrameBrowse_Reset(BrowseResetButton)
+										BrowseName:SetText(itemName)
+										BrowseName:SetFocus()
+									end
+								end
+							end)
+						end
+					end
+				end
+			end
+
+			-- Change Gradation
+			if ErrorDetected and E.db.sle.KnightFrame_Armory.NoticeMissing ~= false then
+				if Slot.Direction == 'LEFT' then
+					Slot.Gradation:SetTexCoord(0, .5, .5, 1)
+				else
+					Slot.Gradation:SetTexCoord(.5, 1, .5, 1)
+				end
+			else
+				if Slot.Direction == 'LEFT' then
+					Slot.Gradation:SetTexCoord(0, .5, 0, .5)
+				else
+					Slot.Gradation:SetTexCoord(.5, 1, 0, .5)
+				end
+			end
+		end
+	end
+
+	f.AverageItemLevel:SetText(C.Toolkit.Color_Value(L['Average'])..' : '..format('%.2f', select(2, GetAverageItemLevel())))
+end
+
+function CFO:StartArmoryFrame()
+	--if E.db.sle.KnightFrame_Armory.Enable then
+		-- Setting frame
+		CHARACTERFRAME_EXPANDED_WIDTH = 650
+		CharacterFrame:SetHeight(444)
+		CharacterFrameInsetRight:SetPoint('TOPLEFT', CharacterFrameInset, 'TOPRIGHT', 110, 0)
+		CharacterFrameExpandButton:SetPoint('BOTTOMRIGHT', CharacterFrameInsetRight, 'BOTTOMLEFT', 0, 1)
+
+		-- Move right equipment slots
+		CharacterHandsSlot:SetPoint('TOPRIGHT', CharacterFrameInsetRight, 'TOPLEFT', -4, -2)
+
+		-- Move bottom equipment slots
+		CharacterMainHandSlot:SetPoint('BOTTOMLEFT', PaperDollItemsFrame, 'BOTTOMLEFT', 185, 14)
+
+		-- Model Frame
+		CharacterModelFrame:Size(341, 302)
+		CharacterModelFrame:SetPoint('TOPLEFT', PaperDollFrame, 'TOPLEFT', 52, -90)
+		CharacterModelFrame.BackgroundTopLeft:Hide()
+		CharacterModelFrame.BackgroundTopRight:Hide()
+		CharacterModelFrame.BackgroundBotLeft:Hide()
+		CharacterModelFrame.BackgroundBotRight:Hide()
+
+		if CreateArmoryFrame then
+			CreateArmoryFrame(KnightArmory)
+		end
+		CFO:ArmoryFrame_DataSetting()
+
+		-- Run ArmoryMode
+		CFO:RegisterEvent('SOCKET_INFO_SUCCESS', 'ArmoryFrame_DataSetting')
+		CFO:RegisterEvent('PLAYER_EQUIPMENT_CHANGED', 'ArmoryFrame_DataSetting')
+		CFO:RegisterEvent('PLAYER_ENTERING_WORLD', 'ArmoryFrame_DataSetting')
+		CFO:RegisterEvent('UNIT_INVENTORY_CHANGED', 'ArmoryFrame_DataSetting')
+		CFO:RegisterEvent('EQUIPMENT_SWAP_FINISHED', 'ArmoryFrame_DataSetting')
+		CFO:RegisterEvent('UPDATE_INVENTORY_DURABILITY', 'ArmoryFrame_DataSetting')
+		CFO:RegisterEvent('ITEM_UPGRADE_MASTER_UPDATE', 'ArmoryFrame_DataSetting')
+
+		-- For frame resizing
+		f.ChangeCharacterFrameWidth:SetParent(PaperDollFrame)
+		if PaperDollFrame:IsVisible() then
+			f.ChangeCharacterFrameWidth:Show()
+			CharacterFrame:SetWidth(CharacterFrameInsetRight:IsShown() and 650 or 448)
+		end
+
+		--KF_ArmoryMode.CheckButton:Show()
+		KF_ArmoryMode_NoticeMissing:EnableMouse(true)
+		KF_ArmoryMode_NoticeMissing.text:SetTextColor(1, 1, 1)
+		KF_ArmoryMode_NoticeMissing.CheckButton:SetTexture('Interface\\Buttons\\UI-CheckBox-Check')
+	--elseif not CreateArmoryFrame then
+		-- Setting frame to default
+		--PANEL_DEFAULT_WIDTH = 338
+		--CHARACTERFRAME_EXPANDED_WIDTH = 540
+		--CharacterFrame:SetHeight(424)
+		--CharacterFrameInsetRight:SetPoint('TOPLEFT', CharacterFrameInset, 'TOPRIGHT', 1, 0)
+		--CharacterFrameExpandButton:SetPoint('BOTTOMRIGHT', CharacterFrameInset, 'BOTTOMRIGHT', -2, -1)
+
+		-- Move rightside equipment slots to default position
+		--CharacterHandsSlot:SetPoint('TOPRIGHT', CharacterFrameInset, 'TOPRIGHT', -4, -2)
+
+		-- Move bottom equipment slots to default position
+		--CharacterMainHandSlot:SetPoint('BOTTOMLEFT', PaperDollItemsFrame, 'BOTTOMLEFT', 130, 16)
+
+		-- Model Frame
+	--[[
+		CharacterModelFrame:Size(231, 320)
+		CharacterModelFrame:SetPoint('TOPLEFT', PaperDollFrame, 'TOPLEFT', 52, -66)
+		CharacterModelFrame.BackgroundTopLeft:Show()
+		CharacterModelFrame.BackgroundTopRight:Show()
+		CharacterModelFrame.BackgroundBotLeft:Show()
+		CharacterModelFrame.BackgroundBotRight:Show()
+	]]
+		-- Turn off ArmoryFrame
+	--[[
+		f:Hide()
+		CFO:UnregisterEvent('SOCKET_INFO_SUCCESS', 'ArmoryFrame_DataSetting')
+		CFO:UnregisterEvent('PLAYER_ENTERING_WORLD', 'ArmoryFrame_DataSetting')
+		CFO:UnregisterEvent('UNIT_INVENTORY_CHANGED', 'ArmoryFrame_DataSetting')
+		CFO:UnregisterEvent('EQUIPMENT_SWAP_FINISHED', 'ArmoryFrame_DataSetting')
+		CFO:UnregisterEvent('UPDATE_INVENTORY_DURABILITY', 'ArmoryFrame_DataSetting')
+		CFO:UnregisterEvent('ITEM_UPGRADE_MASTER_UPDATE', 'ArmoryFrame_DataSetting')
+	]]
+		-- Return to default size when PaperDollFrame is open
+	--[[
+		f.ChangeCharacterFrameWidth:SetParent(nil)
+		f.ChangeCharacterFrameWidth:Hide()
+		if PaperDollFrame:IsVisible() then
+			CharacterFrame:SetWidth(CharacterFrameInsetRight:IsShown() and 540 or 338)
+		end
+	]]
+		--KF_ArmoryMode.CheckButton:Hide()
+	--[[
+		KF_ArmoryMode_NoticeMissing:EnableMouse(false)
+		KF_ArmoryMode_NoticeMissing.text:SetTextColor(0.31, 0.31, 0.31)
+		KF_ArmoryMode_NoticeMissing.CheckButton:SetTexture('Interface\\Buttons\\UI-CheckBox-Check-Disabled')
+	end
+	]]
 end

 function CFO:Initialize()
-	if not E.private.sle.characterframeoptions.enable then return; end
-	_G["CharacterFrame"]:HookScript("OnShow", function(self)
-		CFO:UpdateItemDurability()
-		CFO:UpdateItemLevel()
-		CFO:UpdateItemEnchants()
+	if not E.private.sle.characterframeoptions.enable then return end
+	-- Create Config button in Character Frame : Enable
+	--C.Toolkit.CreateWidget_CheckButton('KF_ArmoryMode', L['Armory Mode'], 20, { ['FontSize'] = 10, ['directionH'] = 'LEFT', })
+	--KF_ArmoryMode:SetParent(PaperDollFrame)
+	--KF_ArmoryMode:SetFrameLevel(PaperDollFrame:GetFrameLevel() + 1)
+	--KF_ArmoryMode:SetFrameStrata(PaperDollFrame:GetFrameStrata())
+	--KF_ArmoryMode:Point('TOPLEFT', PaperDollFrame, 15, -20)
+	--KF_ArmoryMode:SetScript('OnClick', function(self)
+	--	E.db.sle.KnightFrame_Armory.Enable = not E.db.sle.KnightFrame_Armory.Enable
+
+	--	CFO:ToggleArmoryFrame()
+	--end)
+
+	-- Create Config button in Character Frame : NoticeMissing
+	C.Toolkit.CreateWidget_CheckButton('KF_ArmoryMode_NoticeMissing', L['Notice Missing'], 20, { ['FontSize'] = 10, ['directionH'] = 'LEFT', })
+
+	if E.db.sle.KnightFrame_Armory.NoticeMissing == false then
+		KF_ArmoryMode_NoticeMissing.CheckButton:Hide()
+	end
+
+	KF_ArmoryMode_NoticeMissing:SetParent(PaperDollFrame)
+	KF_ArmoryMode_NoticeMissing:SetFrameLevel(PaperDollFrame:GetFrameLevel() + 1)
+	KF_ArmoryMode_NoticeMissing:SetFrameStrata(PaperDollFrame:GetFrameStrata())
+	KF_ArmoryMode_NoticeMissing:Point('TOPLEFT', PaperDollFrame, 15, -20)
+	KF_ArmoryMode_NoticeMissing:SetScript('OnClick', function(self)
+		if E.db.sle.KnightFrame_Armory.NoticeMissing == true then
+			E.db.sle.KnightFrame_Armory.NoticeMissing = false
+			KF_ArmoryMode_NoticeMissing.CheckButton:Hide()
+		else
+			E.db.sle.KnightFrame_Armory.NoticeMissing = true
+			KF_ArmoryMode_NoticeMissing.CheckButton:Show()
+		end
+
+		CFO:ArmoryFrame_DataSetting()
 	end)

-	self:RegisterEvent("PLAYER_EQUIPMENT_CHANGED", "OnShowEquipmentChange")
-	--self:RegisterEvent("PLAYER_EQUIPMENT_CHANGED", "UpdateItemLevel")
-	--self:RegisterEvent("PLAYER_EQUIPMENT_CHANGED", "UpdateItemMods")
-	self:RegisterEvent("ITEM_UPGRADE_MASTER_UPDATE", "UpdateItemLevel")
-	self:RegisterEvent("UPDATE_INVENTORY_DURABILITY", "UpdateItemDurability")
-
-	self:LoadDurability()
-	self:LoadItemLevel()
-	self:LoadItemEnchants()
+	if E.db.sle.KnightFrame_Armory.Enable == false then
+		--KF_ArmoryMode.CheckButton:Hide()
+		KF_ArmoryMode_NoticeMissing.text:SetTextColor(0.31, 0.31, 0.31)
+		KF_ArmoryMode_NoticeMissing.CheckButton:SetTexture('Interface\\Buttons\\UI-CheckBox-Check-Disabled')
+	end
+	KF_ArmoryMode_NoticeMissing:EnableMouse(E.db.sle.KnightFrame_Armory.Enable)
+
+	--local function ValueColorUpdate()
+		--KF_ArmoryMode.text:SetTextColor(unpack(E.media.rgbvaluecolor))
+	--end
+	--E['valueColorUpdateFuncs'][ValueColorUpdate] = true
+
+	CFO:StartArmoryFrame()
 end

 E:RegisterModule(CFO:GetName())
\ No newline at end of file
diff --git a/ElvUI_SLE/modules/characterframe/core.lua b/ElvUI_SLE/modules/characterframe/core.lua
new file mode 100644
index 0000000..7ebf5e6
--- /dev/null
+++ b/ElvUI_SLE/modules/characterframe/core.lua
@@ -0,0 +1,198 @@
+local E, L, V, P, G, _  = unpack(ElvUI)
+
+-- Constants
+KnightFrame_Armory_Constants = {
+	['ItemLevelKey'] = ITEM_LEVEL:gsub('%%d', '(.+)'),
+	['EnchantKey'] = ENCHANTED_TOOLTIP_LINE:gsub('%%s', '(.+)'),
+	['ItemSetBonusKey'] = ITEM_SET_BONUS:gsub('%%s', '(.+)'),
+	['TransmogrifiedKey'] = TRANSMOGRIFIED:gsub('%%s', '(.+)'),
+
+	['GearList'] = {
+		'HeadSlot', 'HandsSlot', 'NeckSlot', 'WaistSlot', 'ShoulderSlot', 'LegsSlot', 'BackSlot', 'FeetSlot', 'ChestSlot', 'Finger0Slot',
+		'ShirtSlot', 'Finger1Slot', 'TabardSlot', 'Trinket0Slot', 'WristSlot', 'Trinket1Slot', 'SecondaryHandSlot', 'MainHandSlot'
+	},
+
+	['EnchantableSlots'] = {
+		['ShoulderSlot'] = true, ['BackSlot'] = true, ['ChestSlot'] = true, ['WristSlot'] = true, ['HandsSlot'] = true,
+		['LegsSlot'] = true, ['FeetSlot'] = true, ['MainHandSlot'] = true, ['SecondaryHandSlot'] = true
+	},
+
+	['UpgradeColor'] = {
+		[16] = '|cffff9614', [12] = '|cfff88ef4', [8] = '|cff2eb7e4', [4] = '|cffceff00'
+	},
+
+	['GemColor'] = {
+		['RED'] = { 1, .2, .2, }, ['YELLOW'] = { .97, .82, .29, }, ['BLUE'] = { .47, .67, 1, }
+	},
+
+	['EmptySocketString'] = {
+		[EMPTY_SOCKET_BLUE] = true, [EMPTY_SOCKET_COGWHEEL] = true, [EMPTY_SOCKET_HYDRAULIC] = true, [EMPTY_SOCKET_META] = true,
+		[EMPTY_SOCKET_NO_COLOR] = true, [EMPTY_SOCKET_PRISMATIC] = true, [EMPTY_SOCKET_RED] = true, [EMPTY_SOCKET_YELLOW] = true
+	},
+
+	['ItemUpgrade'] = {
+		['0'] = 0, ['1'] = 8,
+		['373'] = 4, ['374'] = 8, ['375'] = 4, ['376'] = 4, ['377'] = 4, ['379'] = 4, ['380'] = 4,
+		['445'] = 0, ['446'] = 4, ['447'] = 8, ['451'] = 0, ['452'] = 8, ['453'] = 0, ['454'] = 4,
+		['455'] = 8, ['456'] = 0, ['457'] = 8, ['458'] = 0, ['459'] = 4, ['460'] = 8, ['461'] = 12,
+		['462'] = 16, ['465'] = 0, ['466'] = 4, ['467'] = 8, ['468'] = 0, ['469'] = 4, ['470'] = 8,
+		['471'] = 12, ['472'] = 16, ['476'] = 0, ['477'] = 4, ['478'] = 8, ['479'] = 0, ['480'] = 8,
+		['491'] = 0, ['492'] = 4, ['493'] = 8, ['494'] = 0, ['495'] = 4, ['496'] = 8, ['497'] = 12, ['498'] = 16,
+	},
+
+	['ItemEnchant_Profession_Inscription'] = {
+		['NeedLevel'] = 600,
+		['4912'] = true, -- ?? ?? ????			Secret Ox Horn Inscription
+		['4913'] = true, -- ?? ??? ????		Secret Crane Wing Inscription
+		['4914'] = true, -- ?? ??? ?? ????	Secret Tiger Claw Inscription
+		['4915'] = true, -- ?? ??? ??? ????	Secret Tiger Fang Inscription
+	},
+
+	['ItemEnchant_Profession_LeatherWorking'] = {
+		['NeedLevel'] = 575,
+		['4875'] = true, -- ?? ?? - ?				Fur Lining - Strength
+		['4877'] = true, -- ?? ?? - ??			Fur Lining - Intellect
+		['4878'] = true, -- ?? ?? - ??			Fur Lining - Stamina
+		['4879'] = true, -- ?? ?? - ???			Fur Lining - Agility
+	},
+
+	['ItemEnchant_Profession_Tailoring'] = {
+		['NeedLevel'] = 550,
+		['4892'] = true, -- ??? ??					Lightweave Embroidery
+		['4893'] = true, -- ??? ??					Darkglow Embroidery
+		['4894'] = true, -- ?? ??					Swordguard Embroidery
+	},
+
+	['ProfessionList'] = {
+		[GetSpellInfo(110396)] = 'BlackSmithing',
+		[GetSpellInfo(110400)] = 'Enchanting',
+		[GetSpellInfo(110403)] = 'Engineering',
+		[GetSpellInfo(110417)] = 'Inscription',
+		[GetSpellInfo(110420)] = 'JewelCrafting',
+		[GetSpellInfo(110423)] = 'LeatherWorking',
+		[GetSpellInfo(110426)] = 'Tailoring'
+	},
+
+	['CommonScript'] = {
+		['OnEnter'] = function(self)
+			if self.Link or self.Message then
+				GameTooltip:SetOwner(self, 'ANCHOR_RIGHT')
+
+				self:SetScript('OnUpdate', function()
+					GameTooltip:ClearLines()
+
+					if self.Link then
+						GameTooltip:SetHyperlink(self.Link)
+					end
+
+					if self.Link and self.Message then GameTooltip:AddLine(' ') end -- Line space
+
+					if self.Message then
+						GameTooltip:AddLine(self.Message, 1, 1, 1)
+					end
+
+					GameTooltip:Show()
+				end)
+			end
+		end,
+		['OnLeave'] = function(self)
+			self:SetScript('OnUpdate', nil)
+			GameTooltip:Hide()
+		end,
+		['GemSocket_OnEnter'] = function(self)
+			GameTooltip:SetOwner(self, 'ANCHOR_RIGHT')
+
+			self = self:GetParent()
+
+			if self.GemItemID then
+				if type(self.GemItemID) == 'number' then
+					GameTooltip:SetHyperlink(select(2, GetItemInfo(self.GemItemID)))
+				else
+					GameTooltip:ClearLines()
+					GameTooltip:AddLine(self.GemItemID)
+				end
+			elseif self.GemType then
+				GameTooltip:ClearLines()
+				GameTooltip:AddLine(_G['EMPTY_SOCKET_'..self.GemType])
+			end
+
+			GameTooltip:Show()
+		end
+	},
+
+	['Toolkit'] = {
+		['Color_Value'] = function(InputText)
+			return E:RGBToHex(E.media.rgbvaluecolor[1], E.media.rgbvaluecolor[2], E.media.rgbvaluecolor[3])..(InputText and InputText..'|r' or '')
+		end,
+
+		['Color_Class'] = function(Class, InputText)
+			return (Class and '|c'..RAID_CLASS_COLORS[Class].colorStr or '')..(InputText and InputText..'|r' or '')
+		end,
+
+		['TextSetting'] = function(self, Text, Style, ...)
+			if Style and Style.Tag then
+				if not self[Style.Tag] then
+					self[Style.Tag] = self:CreateFontString(nil, 'OVERLAY')
+				end
+
+				self = self[Style.Tag]
+			else
+				if not Style then
+					Style = {}
+				end
+
+				if not self.text then
+					self.text = self:CreateFontString(nil, 'OVERLAY')
+				end
+
+				self = self.text
+			end
+
+			self:FontTemplate(Style.Font and LibStub('LibSharedMedia-3.0'):Fetch('font', Style.Font), Style.FontSize, Style.FontOutline)
+			self:SetJustifyH(Style.directionH or 'CENTER')
+			self:SetJustifyV(Style.directionV or 'MIDDLE')
+			self:SetText(Text)
+
+			if ... then
+				self:Point(...)
+			else
+				self:SetInside()
+			end
+		end,
+
+		['CreateWidget_CheckButton'] = function(buttonName, buttonText, heightSize, fontInfo)
+			if not _G[buttonName] then
+				heightSize = heightSize or 24
+				fontInfo = fontInfo or { ['FontStyle'] = 'OUTLINE', ['directionH'] = 'LEFT', }
+
+				CreateFrame('Button', buttonName, E.UIParent)
+				_G[buttonName]:SetHeight(heightSize)
+				_G[buttonName]:EnableMouse(true)
+
+				_G[buttonName].CheckButtonBG = CreateFrame('Frame', nil, _G[buttonName])
+				_G[buttonName].CheckButtonBG:SetTemplate('Default', true)
+				_G[buttonName].CheckButtonBG:Size(heightSize - 8)
+				_G[buttonName].CheckButtonBG:SetPoint('LEFT')
+
+				_G[buttonName].CheckButton = _G[buttonName].CheckButtonBG:CreateTexture(nil, 'OVERLAY')
+				_G[buttonName].CheckButton:Size(heightSize)
+				_G[buttonName].CheckButton:Point('CENTER', _G[buttonName].CheckButtonBG)
+				_G[buttonName].CheckButton:SetTexture('Interface\\Buttons\\UI-CheckBox-Check')
+
+				KnightFrame_Armory_Constants.Toolkit.TextSetting(_G[buttonName], buttonText, fontInfo, 'LEFT', _G[buttonName].CheckButtonBG, 'RIGHT', 6, 0)
+
+				_G[buttonName].hover = _G[buttonName]:CreateTexture(nil, 'HIGHLIGHT')
+				_G[buttonName].hover:SetTexture('Interface\\Buttons\\UI-CheckBox-Highlight')
+				_G[buttonName].hover:SetBlendMode('ADD')
+				_G[buttonName].hover:SetAllPoints(_G[buttonName].CheckButtonBG)
+
+				_G[buttonName]:SetHighlightTexture(_G[buttonName].hover)
+				_G[buttonName]:SetWidth(_G[buttonName].text:GetWidth() + heightSize + 2)
+				_G[buttonName]:SetScript('OnMouseDown', function(self) self.text:Point('LEFT', self.CheckButtonBG, 'RIGHT', 6, -2) end)
+				_G[buttonName]:SetScript('OnMouseUp', function(self) self.text:Point('LEFT', self.CheckButtonBG, 'RIGHT', 6, 0) end)
+
+				return _G[buttonName]
+			end
+		end,
+	},
+}
diff --git a/ElvUI_SLE/modules/characterframe/durability.lua b/ElvUI_SLE/modules/characterframe/durability.lua
index e4f0a99..e69de29 100755
--- a/ElvUI_SLE/modules/characterframe/durability.lua
+++ b/ElvUI_SLE/modules/characterframe/durability.lua
@@ -1,55 +0,0 @@
-local E, L, V, P, G, _ = unpack(ElvUI);
-local CFO = E:GetModule('CharacterFrameOptions')
-local LSM = LibStub("LibSharedMedia-3.0")
-
-local durabilitySlots = {
-	"HeadSlot","NeckSlot","ShoulderSlot","BackSlot","ChestSlot","WristSlot",
-	"ShirtSlot","TabardSlot","MainHandSlot","SecondaryHandSlot","HandsSlot","WaistSlot",
-	"LegsSlot","FeetSlot","Finger0Slot","Finger1Slot","Trinket0Slot","Trinket1Slot"
-}
-
-function CFO:UpdateItemDurability()
-	local frame = _G["CharacterFrame"]
-	if not frame:IsShown() then return end
-
-	local slot, current, maximum, r, g, b
-	for i = 1, #durabilitySlots do
-		frame = _G[("Character%s"):format(durabilitySlots[i])]
-		frame.ItemDurability:SetText()
-		slot = GetInventorySlotInfo(durabilitySlots[i])
-		current, maximum = GetInventoryItemDurability(slot)
-		if current and maximum and current < maximum then
-			r, g, b = E:ColorGradient((current / maximum), 1, 0, 0, 1, 1, 0, 0, 1, 0)
-			frame.ItemDurability:SetFormattedText("%s%.0f%%|r", E:RGBToHex(r, g, b), (current / maximum) * 100)
-		end
-		if not E.db.sle.characterframeoptions.itemdurability.enable then
-			frame.ItemDurability:Hide()
-		else
-			frame.ItemDurability:Show()
-		end
-	end
-end
-
-function CFO:UpdateItemDurabilityFont()
-	local frame
-	for i = 1, #durabilitySlots do
-		frame = _G[("Character%s"):format(durabilitySlots[i])]
-		frame.ItemDurability:FontTemplate(LSM:Fetch("font", E.db.sle.characterframeoptions.itemdurability.font), E.db.sle.characterframeoptions.itemdurability.fontSize, E.db.sle.characterframeoptions.itemdurability.fontOutline)
-	end
-end
-
-function CFO:LoadDurability()
-	--_G["CharacterFrame"]:HookScript("OnShow", function(self)
-	--	CFO:UpdateItemDurability()
-	--end)
-
-	--self:RegisterEvent("UPDATE_INVENTORY_DURABILITY", "UpdateItemDurability")
-
-	local frame
-	for i = 1, #durabilitySlots do
-		frame = _G[("Character%s"):format(durabilitySlots[i])]
-		frame.ItemDurability = frame:CreateFontString(nil, "OVERLAY")
-		frame.ItemDurability:SetPoint("BOTTOM", frame, "BOTTOM", 2, 2)
-		frame.ItemDurability:FontTemplate(LSM:Fetch("font", E.db.sle.characterframeoptions.itemdurability.font), E.db.sle.characterframeoptions.itemdurability.fontSize, E.db.sle.characterframeoptions.itemdurability.fontOutline)
-	end
-end
\ No newline at end of file
diff --git a/ElvUI_SLE/modules/characterframe/enchant.lua b/ElvUI_SLE/modules/characterframe/enchant.lua
index 5d99032..e69de29 100644
--- a/ElvUI_SLE/modules/characterframe/enchant.lua
+++ b/ElvUI_SLE/modules/characterframe/enchant.lua
@@ -1,140 +0,0 @@
-local E, L, V, P, G, _ = unpack(ElvUI);
-local CFO = E:GetModule('CharacterFrameOptions')
-local LSM = LibStub("LibSharedMedia-3.0")
-
-local enchantSlot = {
-	"HeadSlot","NeckSlot","ShoulderSlot","BackSlot","ChestSlot","WristSlot",
-	"MainHandSlot","SecondaryHandSlot","HandsSlot","WaistSlot",
-	"LegsSlot","FeetSlot","Finger0Slot","Finger1Slot","Trinket0Slot","Trinket1Slot"
-}
-
-local isEnchantable = {
-	"ShoulderSlot",
-	"BackSlot",
-	"ChestSlot",
-	"WristSlot",
-	"HandsSlot",
-	"MainHandSlot",
-	"SecondaryHandSlot",
-	"LegsSlot",
-	"FeetSlot"
-}
-local PlayerProfession = {}
-
-local nameEnch = GetSpellInfo(110400)
-
-function CFO:UpdateItemEnchants()
-	local frame = _G["CharacterFrame"]
-	if not frame:IsShown() then return end
-
-	for i = 1, #enchantSlot do
-		frame = _G[("Character%s"):format(enchantSlot[i])]
-		frame.ItemEnchant:SetText()
-
-		local canEnchant, isEnchanted
-		local itemLink = GetInventoryItemLink("player",GetInventorySlotInfo(enchantSlot[i]))
-		if itemLink then
-			if enchantSlot[i] == "Finger0Slot" or enchantSlot[i] == "Finger1Slot" then
-				local profNames = self:fetchProfs()
-				for k, v in pairs(profNames) do
-					if v == nameEnch then
-						canEnchant = true
-						isEnchanted = self:fetchChant(enchantSlot[i])
-					end
-				end
-			elseif enchantSlot[i] == "RangedSlot" then
-				local subClass = self:fetchSubclass(enchantSlot[i])
-				if subClass == "Bows" or subClass == "Guns" or subClass == "Crossbows" then
-					canEnchant = true
-					isEnchanted = self:fetchChant(enchantSlot[i])
-				end
-			elseif enchantSlot[i] == "WristSlot" or enchantSlot[i] == "HandsSlot" then
-				canEnchant = true
-				isEnchanted = self:fetchChant(enchantSlot[i])
-			else
-				for k ,v in pairs(isEnchantable) do
-					if v == enchantSlot[i] then
-						canEnchant = true
-						isEnchanted = self:fetchChant(enchantSlot[i])
-					end
-				end
-			end
-
-			isEnchanted = tonumber(isEnchanted)
-			if canEnchant == true then
-				if isEnchanted == 0 then
-					frame.ItemEnchant:SetFormattedText("|cffff0000%s|r", L["Not Enchanted"])
-				elseif isEnchanted > 0 then
-					frame.ItemEnchant:SetFormattedText("")
-					--frame.ItemEnchant:SetFormattedText("|cff00ff00%s|r", L["Enchanted"])
-				end
-			elseif canEnchant == nil or canEnchant == false then
-				frame.ItemEnchant:SetFormattedText("")
-			end
-
-			if not E.db.sle.characterframeoptions.itemenchant.enable then
-				frame.ItemEnchant:Hide()
-			else
-				frame.ItemEnchant:Show()
-			end
-		end
-	end
-end
-function CFO:fetchChant(slotName)
-	local inventoryID = GetInventorySlotInfo(slotName)
-	local myLink = GetInventoryItemLink("player", inventoryID)
-	local parsedItemDataTable = {}
-	local foundStart, foundEnd, parsedItemData = string.find(myLink, "^|c%x+|H(.+)|h%[.*%]")
-	for v in string.gmatch(parsedItemData, "[^:]+") do
-		tinsert(parsedItemDataTable, v)
-	end
-
-	return parsedItemDataTable[3]
-end
-
-function CFO:fetchProfs()
-	local prof1, prof2, archaeology, fishing, cooking, firstAid = GetProfessions()
-	local profs = {prof1, prof2, archaeology, fishing, cooking, firstAid}
-	local profNames = {}
-
-	for k, v in pairs(profs) do
-		local name, texture, rank, maxRank, numSpells, spelloffset, skillLine, rankModifier = GetProfessionInfo(v)
-		tinsert(profNames, name)
-	end
-
-	return profNames
-end
-function CFO:fetchSubclass(slotName)
-	local slotId, texture, checkRelic = GetInventorySlotInfo(slotName)
-	local itemId = GetInventoryItemID("player", slotId)
-	if itemId then
-		local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(itemId)
-		return(subclass)
-	end
-end
-function CFO:UpdateItemEnchantFont()
-	local frame
-	for i = 1, #enchantSlot do
-		frame = _G[("Character%s"):format(enchantSlot[i])]
-		frame.ItemEnchant:FontTemplate(LSM:Fetch("font", E.db.sle.characterframeoptions.itemenchant.font), E.db.sle.characterframeoptions.itemenchant.fontSize, E.db.sle.characterframeoptions.itemenchant.fontOutline)
-	end
-end
-
-function CFO:LoadItemEnchants()
-	local frame
-	for i = 1, #enchantSlot do
-		frame = _G[("Character%s"):format(enchantSlot[i])]
-		frame.ItemEnchant = frame:CreateFontString(nil, "OVERLAY")
-
-		if frame == CharacterHeadSlot or frame == CharacterNeckSlot or frame == CharacterShoulderSlot or frame == CharacterBackSlot or frame == CharacterChestSlot or frame == CharacterWristSlot or frame == CharacterShirtSlot or frame == CharacterTabardSlot then
-			frame.ItemEnchant:SetPoint("LEFT", frame, "RIGHT", 8, 7)
-		elseif frame == CharacterHandsSlot or frame == CharacterWaistSlot or frame == CharacterLegsSlot or frame == CharacterFeetSlot or frame == CharacterFinger0Slot or frame == CharacterFinger1Slot or frame == CharacterTrinket0Slot or frame == CharacterTrinket1Slot then
-			frame.ItemEnchant:SetPoint("RIGHT", frame, "LEFT", -5, 7)
-		elseif frame == CharacterMainHandSlot then
-			frame.ItemEnchant:SetPoint("TOPRIGHT", frame, "BOTTOMRIGHT", 5, -3)
-		elseif frame == CharacterSecondaryHandSlot then
-			frame.ItemEnchant:SetPoint("TOPLEFT", frame, "BOTTOMLEFT", -2, -3)
-		end
-		frame.ItemEnchant:FontTemplate(LSM:Fetch("font", E.db.sle.characterframeoptions.itemenchant.font), E.db.sle.characterframeoptions.itemenchant.fontSize, E.db.sle.characterframeoptions.itemenchant.fontOutline)
-	end
-end
\ No newline at end of file
diff --git a/ElvUI_SLE/modules/characterframe/itemlevel.lua b/ElvUI_SLE/modules/characterframe/itemlevel.lua
index e293065..e69de29 100755
--- a/ElvUI_SLE/modules/characterframe/itemlevel.lua
+++ b/ElvUI_SLE/modules/characterframe/itemlevel.lua
@@ -1,145 +0,0 @@
-local E, L, V, P, G, _ = unpack(ElvUI);
-local CFO = E:GetModule('CharacterFrameOptions')
-local LSM = LibStub("LibSharedMedia-3.0")
--- /dump GetInventoryItemLink("player",INVSLOT_HEAD) Leave in here for my notes
--- /dump GetInventoryItemLink("player",GetInventorySlotInfo("MainHandSlot"))
--- /run x=GetInventoryItemLink("player",GetInventorySlotInfo("MainHandSlot"));baseLevel = select(4,GetItemInfo(x)); print(baseLevel)
-local ilvlSlots = {
-	"HeadSlot","NeckSlot","ShoulderSlot","BackSlot","ChestSlot","WristSlot","MainHandSlot","SecondaryHandSlot",
-	"HandsSlot","WaistSlot","LegsSlot","FeetSlot","Finger0Slot","Finger1Slot","Trinket0Slot","Trinket1Slot"
-}
--- From http://www.wowhead.com/items?filter=qu=7;sl=16:18:5:8:11:10:1:23:7:21:2:22:13:24:15:28:14:4:3:19:25:12:17:6:9;minle=1;maxle=1;cr=166;crs=3;crv=0
-local WOW_Heirlooms = {
-	[80] = {
-		44102,42944,44096,42943,42950,48677,42946,42948,42947,42992,
-		50255,44103,44107,44095,44098,44097,44105,42951,48683,48685,
-		42949,48687,42984,44100,44101,44092,48718,44091,42952,48689,
-		44099,42991,42985,48691,44094,44093,42945,48716
-	},
-	[90] = {
-		105683,105693,105691,105690,105689,105688,105687,105686,
-		105685,105684,105692,104402,104407,104405,104404,104403,
-		104409,104401,104400,104399,104406,104408,105678,105679,
-		105680,105676,105675,105677,105673,105672,105671,105670,105674
-	},
-}
-
-function CFO:UpdateItemLevel()
-	local frame = _G["CharacterFrame"]
-	if not frame:IsShown() then return end
-
-	for i = 1, #ilvlSlots do
-		frame = _G[("Character%s"):format(ilvlSlots[i])]
-		frame.ItemLevel:SetText()
-
-		local avgItemLevel, avgEquipItemLevel = GetAverageItemLevel()
-		local actualItemLevel, itemLink
-		itemLink = GetInventoryItemLink("player",GetInventorySlotInfo(ilvlSlots[i]))
-
-		if itemLink then
-			local itemLevel = self:GetActualItemLevel(itemLink);
-			local rarity = select(3,GetItemInfo(itemLink))
-			local _, _, _, _, heirloomid = string.find(itemLink, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?");
-			heirloomid = tonumber(heirloomid);
-			local checkheirloom = true
-
-			for k,hID in pairs(WOW_Heirlooms[90]) do
-				if hID == heirloomid then
-					checkheirloom = false;
-				end
-			end
-
-			if (rarity == 7 and checkheirloom == true) then
-				actualItemLevel = self:Heirloom(itemLink);
-			else
-				actualItemLevel = itemLevel
-			end
-
-			if actualItemLevel and actualItemLevel <= avgEquipItemLevel - 10 then
-				frame.ItemLevel:SetFormattedText("|cffff0000%i|r", actualItemLevel)
-			elseif actualItemLevel and actualItemLevel >= avgEquipItemLevel + 10 then
-				frame.ItemLevel:SetFormattedText("|cff00ff00%i|r", actualItemLevel)
-			elseif actualItemLevel then
-				frame.ItemLevel:SetFormattedText("|cffffff99%i|r", actualItemLevel)
-			end
-		end
-
-		if not E.db.sle.characterframeoptions.itemlevel.enable then
-			frame.ItemLevel:Hide()
-		else
-			frame.ItemLevel:Show()
-		end
-	end
-end
-
-function CFO:Heirloom(itemLink)
-	local level = UnitLevel("player")
-
-	if level > 80 then
-		local _, _, _, _, itemId = string.find(itemLink, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?");
-		--print(itemId)
-		itemId = tonumber(itemId);
-
-		for k,iid in pairs(WOW_Heirlooms[80]) do
-			if iid == itemId then
-				level = 80;
-			end
-		end
-
-        if level > 85 then
-            level = 85
-        end
-	end
-
-	if level > 80 then
-		return (( level - 80) * 26.6) + 200;
-	elseif level > 70 then
-		return (( level - 70) * 10) + 100;
-	elseif level > 60 then
-		return (( level - 60) * 4) + 60;
-	else
-		return level;
-	end
-end
-
-function CFO:GetActualItemLevel(link)
-	local levelAdjust={ -- 11th item:id field and level adjustment
-		["0"]=0,["1"]=8,["373"]=4,["374"]=8,["375"]=4,["376"]=4,["377"]=4,["379"]=4,["380"]=4,
-		["445"]=0,["446"]=4,["447"]=8,["451"]=0,["452"]=8,["453"]=0,["454"]=4,["455"]=8,
-		["456"]=0,["457"]=8,["458"]=0,["459"]=4,["460"]=8,["461"]=12,["462"]=16,
-		["465"]=0,["466"]=4,["467"]=8,["468"] = 0,["469"] = 4,["470"] = 8,["471"] = 12,["472"] = 16,
-		["491"]=0,["492"]=4,["493"]=8,["494"]=4,["495"]=8,["496"]=8,["497"]=12,["498"]=16
-	}
-	local baseLevel = select(4,GetItemInfo(link))
-	local upgrade = link:match(":(%d+)\124h%[")
-	if baseLevel and upgrade and levelAdjust[upgrade] then
-		return baseLevel + levelAdjust[upgrade]
-	else
-		return baseLevel
-	end
-end
-
-function CFO:UpdateItemLevelFont()
-	local frame
-	for i = 1, #ilvlSlots do
-		frame = _G[("Character%s"):format(ilvlSlots[i])]
-		frame.ItemLevel:FontTemplate(LSM:Fetch("font", E.db.sle.characterframeoptions.itemlevel.font), E.db.sle.characterframeoptions.itemlevel.fontSize, E.db.sle.characterframeoptions.itemlevel.fontOutline)
-	end
-end
-
-function CFO:LoadItemLevel()
-	--_G["CharacterFrame"]:HookScript("OnShow", function(self)
-	--	CFO:UpdateItemLevel()
-	--end)
-
-	--self:RegisterEvent("PLAYER_EQUIPMENT_CHANGED", "UpdateItemLevel")
-	--self:RegisterEvent("ITEM_UPGRADE_MASTER_UPDATE", "UpdateItemLevel")
-
-	local frame
-	for i = 1, #ilvlSlots do
-		frame = _G[("Character%s"):format(ilvlSlots[i])]
-		frame.ItemLevel = frame:CreateFontString(nil, "OVERLAY")
-		frame.ItemLevel:SetPoint("TOP", frame, "TOP", 2, -3)
-		frame.ItemLevel:FontTemplate(LSM:Fetch("font", E.db.sle.characterframeoptions.itemlevel.font), E.db.sle.characterframeoptions.itemlevel.fontSize, E.db.sle.characterframeoptions.itemlevel.fontOutline)
-	end
-end
\ No newline at end of file
diff --git a/ElvUI_SLE/modules/characterframe/load_characterframe.xml b/ElvUI_SLE/modules/characterframe/load_characterframe.xml
index fb0f4a8..b0a0edd 100755
--- a/ElvUI_SLE/modules/characterframe/load_characterframe.xml
+++ b/ElvUI_SLE/modules/characterframe/load_characterframe.xml
@@ -1,4 +1,5 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/">
+<Ui xmlns="http://www.blizzard.com/wow/ui/">
+	<Script file='core.lua'/>
 	<Script file='characterframe.lua'/>
 	<Script file='durability.lua'/>
 	<Script file='itemlevel.lua'/>
diff --git a/ElvUI_SLE/modules/characterframe/options.lua b/ElvUI_SLE/modules/characterframe/options.lua
index 8eb6908..555bf57 100755
--- a/ElvUI_SLE/modules/characterframe/options.lua
+++ b/ElvUI_SLE/modules/characterframe/options.lua
@@ -1,214 +1,212 @@
 local E, L, V, P, G, _ = unpack(ElvUI);
 local CFO = E:GetModule('CharacterFrameOptions')
-local function configTable()

---UI Buttons
-E.Options.args.sle.args.characterframeoptions = {
-	type = "group",
-	name = L["Character Frame"],
-	order = 12,
-	args = {
-		header = {
-			order = 1,
-			type = "header",
-			name = L["Character Frame Options"],
-		},
-		intro = {
-			order = 2,
-			type = 'description',
-			name = L['CFO_DESC'],
-		},
-		enable = {
-			order = 3,
-			type = "toggle",
-			name = L["Enable"],
-			desc = L["Enable/Disable Character Frame Options"],
-			get = function(info) return E.private.sle.characterframeoptions.enable end,
-			set = function(info, value) E.private.sle.characterframeoptions.enable = value; E:StaticPopup_Show("PRIVATE_RL") end
-		},
-		itemlevel = {
-			type = "group",
-			--name = L["Item Level"],
-			name = STAT_AVERAGE_ITEM_LEVEL,
-			order = 4,
-			guiInline = true,
-			disabled = function() return not E.private.sle.characterframeoptions.enable end,
-			args = {
-				enable = {
-					order = 1,
-					type = "toggle",
-					name = L["Enable"],
-					--desc = L["Show/Hide Item Levels"],
-					get = function(info) return E.db.sle.characterframeoptions.itemlevel.enable end,
-					set = function(info, value) E.db.sle.characterframeoptions.itemlevel.enable = value; CFO:ToggleCFO() end
-				},
-				fontGroup = {
-					order = 2,
-					type = 'group',
-					guiInline = true,
-					disabled = function() return not E.db.sle.characterframeoptions.itemlevel.enable end,
-					name = L['Font'],
-					args = {
-						font = {
-							type = "select", dialogControl = 'LSM30_Font',
-							order = 1,
-							--name = L["Fonts"],
-							name = L["Font"],
-							desc = L["The font that the item level will use."],
-							values = AceGUIWidgetLSMlists.font,
-							get = function(info) return E.db.sle.characterframeoptions.itemlevel.font end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemlevel.font = value; CFO:UpdateItemLevelFont(); end,
-						},
-						fontSize = {
-							order = 2,
-							name = L["Font Size"],
-							desc = L["Set the font size that the item level will use."],
-							type = "range",
-							min = 6, max = 22, step = 1,
-							get = function(info) return E.db.sle.characterframeoptions.itemlevel.fontSize end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemlevel.fontSize = value; CFO:UpdateItemLevelFont(); end,
-						},
-						fontOutline = {
-							order = 3,
-							name = L["Font Outline"],
-							desc = L["Set the font outline that the item level will use."],
-							type = "select",
-							values = {
-								['NONE'] = L['None'],
-								['OUTLINE'] = 'OUTLINE',
-								['MONOCHROME'] = 'MONOCHROME',
-								['MONOCHROMEOUTLINE'] = 'MONOCROMEOUTLINE',
-								['THICKOUTLINE'] = 'THICKOUTLINE',
+local function configTable()
+	E.Options.args.sle.args.characterframeoptions = {
+		type = "group",
+		name = L["Character Frame"],
+		order = 12,
+		args = {
+			header = {
+				order = 1,
+				type = "header",
+				name = L["Character Frame Options"],
+			},
+			intro = {
+				order = 2,
+				type = 'description',
+				name = L['CFO_DESC'],
+			},
+			enable = {
+				order = 3,
+				type = "toggle",
+				name = L["Enable"],
+				desc = L["Enable/Disable Character Frame Options"],
+				get = function(info) return E.private.sle.characterframeoptions.enable end,
+				set = function(info, value) E.private.sle.characterframeoptions.enable = value; E:StaticPopup_Show("PRIVATE_RL") end
+			},
+			itemlevel = {
+				type = "group",
+				name = STAT_AVERAGE_ITEM_LEVEL,
+				order = 4,
+				guiInline = true,
+				disabled = function() return not E.private.sle.characterframeoptions.enable end,
+				args = {
+					enable = {
+						order = 1,
+						type = "toggle",
+						name = L["Enable"],
+						--desc = L["Show/Hide Item Levels"],
+						get = function(info) return E.db.sle.characterframeoptions.itemlevel.enable end,
+						set = function(info, value) E.db.sle.characterframeoptions.itemlevel.enable = value; CFO:ToggleCFO() end
+					},
+					fontGroup = {
+						order = 2,
+						type = 'group',
+						guiInline = true,
+						disabled = function() return not E.db.sle.characterframeoptions.itemlevel.enable end,
+						name = L['Font'],
+						args = {
+							font = {
+								type = "select", dialogControl = 'LSM30_Font',
+								order = 1,
+								--name = L["Fonts"],
+								name = L["Font"],
+								desc = L["The font that the item level will use."],
+								values = AceGUIWidgetLSMlists.font,
+								get = function(info) return E.db.sle.characterframeoptions.itemlevel.font end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemlevel.font = value; CFO:UpdateItemLevelFont(); end,
+							},
+							fontSize = {
+								order = 2,
+								name = L["Font Size"],
+								desc = L["Set the font size that the item level will use."],
+								type = "range",
+								min = 6, max = 22, step = 1,
+								get = function(info) return E.db.sle.characterframeoptions.itemlevel.fontSize end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemlevel.fontSize = value; CFO:UpdateItemLevelFont(); end,
+							},
+							fontOutline = {
+								order = 3,
+								name = L["Font Outline"],
+								desc = L["Set the font outline that the item level will use."],
+								type = "select",
+								values = {
+									['NONE'] = L['None'],
+									['OUTLINE'] = 'OUTLINE',
+									['MONOCHROME'] = 'MONOCHROME',
+									['MONOCHROMEOUTLINE'] = 'MONOCROMEOUTLINE',
+									['THICKOUTLINE'] = 'THICKOUTLINE',
+								},
+								get = function(info) return E.db.sle.characterframeoptions.itemlevel.fontOutline end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemlevel.fontOutline = value; CFO:UpdateItemLevelFont(); end,
 							},
-							get = function(info) return E.db.sle.characterframeoptions.itemlevel.fontOutline end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemlevel.fontOutline = value; CFO:UpdateItemLevelFont(); end,
 						},
 					},
 				},
 			},
-		},
-		itemdurabilty = {
-			type = "group",
-			--name = L["Item Durability"],
-			name = DURABILITY,
-			order = 5,
-			guiInline = true,
-			disabled = function() return not E.private.sle.characterframeoptions.enable end,
-			args = {
-				enable = {
-					order = 1,
-					type = "toggle",
-					name = L["Enable"],
-					--desc = L["Show/Hide Item Durability"],
-					get = function(info) return E.db.sle.characterframeoptions.itemdurability.enable end,
-					set = function(info, value) E.db.sle.characterframeoptions.itemdurability.enable = value; CFO:ToggleCFO() end,
-				},
-				fontGroup = {
-					order = 2,
-					type = 'group',
-					guiInline = true,
-					disabled = function() return not E.db.sle.characterframeoptions.itemdurability.enable end,
-					name = L['Font'],
-					args = {
-						font = {
-							type = "select", dialogControl = 'LSM30_Font',
-							order = 1,
-							name = L["Font"],
-							desc = L["The font that the item durability will use."],
-							values = AceGUIWidgetLSMlists.font,
-							get = function(info) return E.db.sle.characterframeoptions.itemdurability.font end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemdurability.font = value; CFO:UpdateItemDurabilityFont(); end,
-						},
-						fontSize = {
-							order = 2,
-							name = L["Font Size"],
-							desc = L["Set the font size that the item durability will use."],
-							type = "range",
-							min = 6, max = 22, step = 1,
-							get = function(info) return E.db.sle.characterframeoptions.itemdurability.fontSize end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemdurability.fontSize = value; CFO:UpdateItemDurabilityFont(); end,
-						},
-						fontOutline = {
-							order = 3,
-							name = L["Font Outline"],
-							desc = L["Set the font outline that the item durability will use."],
-							type = "select",
-							values = {
-								['NONE'] = L['None'],
-								['OUTLINE'] = 'OUTLINE',
-								['MONOCHROME'] = 'MONOCHROME',
-								['MONOCHROMEOUTLINE'] = 'MONOCROMEOUTLINE',
-								['THICKOUTLINE'] = 'THICKOUTLINE',
+			itemdurabilty = {
+				type = "group",
+				--name = L["Item Durability"],
+				name = DURABILITY,
+				order = 5,
+				guiInline = true,
+				disabled = function() return not E.private.sle.characterframeoptions.enable end,
+				args = {
+					enable = {
+						order = 1,
+						type = "toggle",
+						name = L["Enable"],
+						--desc = L["Show/Hide Item Durability"],
+						get = function(info) return E.db.sle.characterframeoptions.itemdurability.enable end,
+						set = function(info, value) E.db.sle.characterframeoptions.itemdurability.enable = value; CFO:ToggleCFO() end,
+					},
+					fontGroup = {
+						order = 2,
+						type = 'group',
+						guiInline = true,
+						disabled = function() return not E.db.sle.characterframeoptions.itemdurability.enable end,
+						name = L['Font'],
+						args = {
+							font = {
+								type = "select", dialogControl = 'LSM30_Font',
+								order = 1,
+								name = L["Font"],
+								desc = L["The font that the item durability will use."],
+								values = AceGUIWidgetLSMlists.font,
+								get = function(info) return E.db.sle.characterframeoptions.itemdurability.font end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemdurability.font = value; CFO:UpdateItemDurabilityFont(); end,
+							},
+							fontSize = {
+								order = 2,
+								name = L["Font Size"],
+								desc = L["Set the font size that the item durability will use."],
+								type = "range",
+								min = 6, max = 22, step = 1,
+								get = function(info) return E.db.sle.characterframeoptions.itemdurability.fontSize end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemdurability.fontSize = value; CFO:UpdateItemDurabilityFont(); end,
+							},
+							fontOutline = {
+								order = 3,
+								name = L["Font Outline"],
+								desc = L["Set the font outline that the item durability will use."],
+								type = "select",
+								values = {
+									['NONE'] = L['None'],
+									['OUTLINE'] = 'OUTLINE',
+									['MONOCHROME'] = 'MONOCHROME',
+									['MONOCHROMEOUTLINE'] = 'MONOCROMEOUTLINE',
+									['THICKOUTLINE'] = 'THICKOUTLINE',
+								},
+								get = function(info) return E.db.sle.characterframeoptions.itemdurability.fontOutline end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemdurability.fontOutline = value; CFO:UpdateItemDurabilityFont(); end,
 							},
-							get = function(info) return E.db.sle.characterframeoptions.itemdurability.fontOutline end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemdurability.fontOutline = value; CFO:UpdateItemDurabilityFont(); end,
 						},
 					},
 				},
 			},
-		},
-		itemenchant = {
-			type = "group",
-			name = L["Enchanting Notification"],
-			--name = DURABILITY,
-			order = 6,
-			guiInline = true,
-			disabled = function() return not E.private.sle.characterframeoptions.enable end,
-			args = {
-				enable = {
-					order = 1,
-					type = "toggle",
-					name = L["Enable"],
-					--desc = L["Show/Hide Item Durability"],
-					get = function(info) return E.db.sle.characterframeoptions.itemenchant.enable end,
-					set = function(info, value) E.db.sle.characterframeoptions.itemenchant.enable = value; CFO:ToggleCFO() end,
-				},
-				fontGroup = {
-					order = 2,
-					type = 'group',
-					guiInline = true,
-					disabled = function() return not E.db.sle.characterframeoptions.itemenchant.enable end,
-					name = L['Font'],
-					args = {
-						font = {
-							type = "select", dialogControl = 'LSM30_Font',
-							order = 1,
-							name = L["Font"],
-							desc = L["The font that the enchant notification will use."],
-							values = AceGUIWidgetLSMlists.font,
-							get = function(info) return E.db.sle.characterframeoptions.itemenchant.font end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemenchant.font = value; CFO:UpdateItemEnchantFont(); end,
-						},
-						fontSize = {
-							order = 2,
-							name = L["Font Size"],
-							desc = L["Set the font size that the enchant notification will use."],
-							type = "range",
-							min = 6, max = 22, step = 1,
-							get = function(info) return E.db.sle.characterframeoptions.itemenchant.fontSize end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemenchant.fontSize = value; CFO:UpdateItemEnchantFont(); end,
-						},
-						fontOutline = {
-							order = 3,
-							name = L["Font Outline"],
-							desc = L["Set the font outline that the enchant notification will use."],
-							type = "select",
-							values = {
-								['NONE'] = L['None'],
-								['OUTLINE'] = 'OUTLINE',
-								['MONOCHROME'] = 'MONOCHROME',
-								['MONOCHROMEOUTLINE'] = 'MONOCROMEOUTLINE',
-								['THICKOUTLINE'] = 'THICKOUTLINE',
+			itemenchant = {
+				type = "group",
+				name = L["Enchanting Notification"],
+				--name = DURABILITY,
+				order = 6,
+				guiInline = true,
+				disabled = function() return not E.private.sle.characterframeoptions.enable end,
+				args = {
+					enable = {
+						order = 1,
+						type = "toggle",
+						name = L["Enable"],
+						--desc = L["Show/Hide Item Durability"],
+						get = function(info) return E.db.sle.characterframeoptions.itemenchant.enable end,
+						set = function(info, value) E.db.sle.characterframeoptions.itemenchant.enable = value; CFO:ToggleCFO() end,
+					},
+					fontGroup = {
+						order = 2,
+						type = 'group',
+						guiInline = true,
+						disabled = function() return not E.db.sle.characterframeoptions.itemenchant.enable end,
+						name = L['Font'],
+						args = {
+							font = {
+								type = "select", dialogControl = 'LSM30_Font',
+								order = 1,
+								name = L["Font"],
+								desc = L["The font that the enchant notification will use."],
+								values = AceGUIWidgetLSMlists.font,
+								get = function(info) return E.db.sle.characterframeoptions.itemenchant.font end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemenchant.font = value; CFO:UpdateItemEnchantFont(); end,
+							},
+							fontSize = {
+								order = 2,
+								name = L["Font Size"],
+								desc = L["Set the font size that the enchant notification will use."],
+								type = "range",
+								min = 6, max = 22, step = 1,
+								get = function(info) return E.db.sle.characterframeoptions.itemenchant.fontSize end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemenchant.fontSize = value; CFO:UpdateItemEnchantFont(); end,
+							},
+							fontOutline = {
+								order = 3,
+								name = L["Font Outline"],
+								desc = L["Set the font outline that the enchant notification will use."],
+								type = "select",
+								values = {
+									['NONE'] = L['None'],
+									['OUTLINE'] = 'OUTLINE',
+									['MONOCHROME'] = 'MONOCHROME',
+									['MONOCHROMEOUTLINE'] = 'MONOCROMEOUTLINE',
+									['THICKOUTLINE'] = 'THICKOUTLINE',
+								},
+								get = function(info) return E.db.sle.characterframeoptions.itemenchant.fontOutline end,
+								set = function(info, value) E.db.sle.characterframeoptions.itemenchant.fontOutline = value; CFO:UpdateItemEnchantFont(); end,
 							},
-							get = function(info) return E.db.sle.characterframeoptions.itemenchant.fontOutline end,
-							set = function(info, value) E.db.sle.characterframeoptions.itemenchant.fontOutline = value; CFO:UpdateItemEnchantFont(); end,
 						},
 					},
 				},
 			},
 		},
-	},
-}
+	}
 end

 table.insert(E.SLEConfigs, configTable)
\ No newline at end of file