Quantcast

Da new option for da armory

Darthpred [06-19-15 - 08:22]
Da new option for da armory
Filename
ElvUI_SLE/locales/russian.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/InspectArmory/InspectArmory.lua
ElvUI_SLE/modules/Armory/InspectArmory/Profile.lua
diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua
index 41b8904..87a16b9 100644
--- a/ElvUI_SLE/locales/russian.lua
+++ b/ElvUI_SLE/locales/russian.lua
@@ -170,6 +170,7 @@ L['Create Replacement'] = "Создать замену"
 L['Character Armory'] = "Персонаж"
 L['Inspect Armory'] = "Осмотр"
 L['Show Missing Enchants or Gems'] = "Показывать отсутствие чар и камней"
+L['Show Warning Icon'] = "Показывать иконку предупреждения"
 L['Select Image'] = "Выберите картинку"
 L["Custom"] = "Своя"
 L['Custom Image Path'] = "Путь к своей картинке"
diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
index 2762269..802d284 100644
--- a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
+++ b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
@@ -648,6 +648,13 @@ function CA:Update_Gear()
 							Slot.SocketWarning:Show()
 							Slot.SocketWarning.Message = '|cffff5678'..(GemCount_Now - GemCount)..'|r '..L['Empty Socket']
 						end
+						if E.db.sle.Armory.Character.MissingIcon then
+							Slot.EnchantWarning.Texture:Show()
+							Slot.SocketWarning.Texture:Show()
+						else
+							Slot.EnchantWarning.Texture:Hide()
+							Slot.SocketWarning.Texture:Hide()
+						end
 					end

 					--<< Transmogrify Parts >>--
diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua
index ce4d5bb..4b0f706 100644
--- a/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua
+++ b/ElvUI_SLE/modules/Armory/CharacterArmory/Profile.lua
@@ -9,6 +9,7 @@ P.sle.Armory.Character = {
 	Enable = true,

 	NoticeMissing = true,
+	MissingIcon = true,

 	Backdrop = {
 		SelectedBG = 'Space',
diff --git a/ElvUI_SLE/modules/Armory/Config.lua b/ElvUI_SLE/modules/Armory/Config.lua
index d345e56..85c8574 100644
--- a/ElvUI_SLE/modules/Armory/Config.lua
+++ b/ElvUI_SLE/modules/Armory/Config.lua
@@ -261,13 +261,21 @@ local function LoadArmoryConfigTable()
 						CharacterArmory:Update_Gear()
 						CharacterArmory:Update_Display(true)
 					end,
-					disabled = function() return E.db.sle.Armory.Character.Enable == false end,
-					width = 'full'
+					disabled = function() return not E.db.sle.Armory.Character.Enable end,
 				},
-				Space1 = {
-					type = 'description',
-					name = ' ',
-					order = 2
+				MissingIcon = {
+					type = 'toggle',
+					name = L['Show Warning Icon'],
+					order = 2,
+					desc = '',
+					get = function() return E.db.sle.Armory.Character.MissingIcon end,
+					set = function(_, value)
+						E.db.sle.Armory.Character.MissingIcon = value
+
+						CharacterArmory:Update_Gear()
+						CharacterArmory:Update_Display(true)
+					end,
+					disabled = function() return not E.db.sle.Armory.Character.Enable or not E.db.sle.Armory.Character.NoticeMissing end,
 				},
 				Backdrop = {
 					type = 'group',
@@ -741,13 +749,23 @@ local function LoadArmoryConfigTable()
 						end
 						InspectArmory:Update_Display(true)
 					end,
-					disabled = function() return E.db.sle.Armory.Inspect.Enable == false end,
-					width = 'full'
+					disabled = function() return not E.db.sle.Armory.Inspect.Enable end,
 				},
-				Space1 = {
-					type = 'description',
-					name = ' ',
-					order = 2
+				MissingIcon = {
+					type = 'toggle',
+					name = L['Show Warning Icon'],
+					order = 2,
+					desc = '',
+					get = function() return E.db.sle.Armory.Inspect.MissingIcon end,
+					set = function(_, value)
+						E.db.sle.Armory.Inspect.MissingIcon = value
+
+						if InspectArmory.LastDataSetting then
+							InspectArmory:InspectFrame_DataSetting(InspectArmory.CurrentInspectData)
+						end
+						InspectArmory:Update_Display(true)
+					end,
+					disabled = function() return not E.db.sle.Armory.Inspect.Enable or not E.db.sle.Armory.Inspect.NoticeMissing end,
 				},
 				Backdrop = {
 					type = 'group',
diff --git a/ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua b/ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua
index 0bce00d..54ab506 100644
--- a/ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua
+++ b/ElvUI_SLE/modules/Armory/InspectArmory/InspectArmory.lua
@@ -1967,8 +1967,8 @@ function IA:InspectFrame_DataSetting(DataTable)
 									if not E.db.sle.Armory.Character.Enchant.WarningIconOnly then
 										Slot.ItemEnchant:SetText('|cffff0000'..L['Not Enchanted'])
 									end
+								end
 							end
-						end

 							if GemCount_Enable > GemCount_Now or GemCount_Enable > GemCount or GemCount_Now > GemCount then
 								ErrorDetected = true
@@ -1976,6 +1976,13 @@ function IA:InspectFrame_DataSetting(DataTable)
 								Slot.SocketWarning:Show()
 								Slot.SocketWarning.Message = '|cffff5678'..(GemCount_Now - GemCount)..'|r '..L['Empty Socket']
 							end
+							if E.db.sle.Armory.Inspect.MissingIcon then
+								Slot.EnchantWarning.Texture:Show()
+								Slot.SocketWarning.Texture:Show()
+							else
+								Slot.EnchantWarning.Texture:Hide()
+								Slot.SocketWarning.Texture:Hide()
+							end
 						end

 						if Slot.TransmogrifyAnchor then --<< Transmogrify Parts >>--
diff --git a/ElvUI_SLE/modules/Armory/InspectArmory/Profile.lua b/ElvUI_SLE/modules/Armory/InspectArmory/Profile.lua
index 585c554..22f5d59 100644
--- a/ElvUI_SLE/modules/Armory/InspectArmory/Profile.lua
+++ b/ElvUI_SLE/modules/Armory/InspectArmory/Profile.lua
@@ -9,6 +9,7 @@ P.sle.Armory.Inspect = {
 	Enable = true,

 	NoticeMissing = true,
+	MissingIcon = true,

 	Backdrop = {
 		SelectedBG = 'Space',