mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update Craft skin
This commit is contained in:
@@ -6,7 +6,7 @@ local S = E:GetModule("Skins");
|
|||||||
local _G = _G
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local select = select
|
local select = select
|
||||||
local find = string.find
|
local find, split = string.find, string.split
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetItemInfo = GetItemInfo
|
local GetItemInfo = GetItemInfo
|
||||||
local GetItemQualityColor = GetItemQualityColor
|
local GetItemQualityColor = GetItemQualityColor
|
||||||
@@ -79,21 +79,19 @@ local function LoadSkin()
|
|||||||
CraftIcon:SetHeight(40)
|
CraftIcon:SetHeight(40)
|
||||||
CraftIcon:SetPoint("TOPLEFT", 4, -3)
|
CraftIcon:SetPoint("TOPLEFT", 4, -3)
|
||||||
|
|
||||||
|
CraftRequirements:SetTextColor(1, 0.80, 0.10)
|
||||||
|
|
||||||
local skillLink = GetCraftItemLink(id)
|
local skillLink = GetCraftItemLink(id)
|
||||||
if skillLink then
|
if skillLink then
|
||||||
local skillEnchantID = select(3, find(skillLink, "enchant:(%d+)"))
|
local skillString = select(3, find(skillLink, "|H(.+)|h"))
|
||||||
local skillItemID = select(3, find(skillLink, "item:(%d+)"))
|
local skillID = select(2, split(":", skillString))
|
||||||
local skillID = skillEnchantID or skillItemID
|
local quality = select(3, GetItemInfo(skillID))
|
||||||
CraftRequirements:SetTextColor(1, 0.80, 0.10)
|
if quality and quality > 1 then
|
||||||
if skillID then
|
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
local quality = select(3, GetItemInfo(skillID))
|
CraftName:SetTextColor(GetItemQualityColor(quality))
|
||||||
if quality and quality > 1 then
|
else
|
||||||
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
CraftIcon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
CraftName:SetTextColor(GetItemQualityColor(quality))
|
CraftName:SetTextColor(1, 1, 1)
|
||||||
else
|
|
||||||
CraftIcon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
|
||||||
CraftName:SetTextColor(1, 1, 1)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -105,21 +103,18 @@ local function LoadSkin()
|
|||||||
local name = _G["CraftReagent" .. i .. "Name"]
|
local name = _G["CraftReagent" .. i .. "Name"]
|
||||||
|
|
||||||
if reagentLink then
|
if reagentLink then
|
||||||
local reagentEnchantID = select(3, find(reagentLink, "item:(%d+)"))
|
local reagentString = select(3, find(reagentLink, "|H(.+)|h"))
|
||||||
local reagentItemID = select(3, find(reagentLink, "item:(%d+)"))
|
local reagentID = select(2, split(":", reagentString))
|
||||||
local reagentID = reagentEnchantID or reagentItemID
|
local quality = select(3, GetItemInfo(reagentID))
|
||||||
if reagentID then
|
if quality and quality > 1 then
|
||||||
local quality = select(3, GetItemInfo(reagentID))
|
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
if quality and quality > 1 then
|
if playerReagentCount < reagentCount then
|
||||||
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
name:SetTextColor(0.5, 0.5, 0.5)
|
||||||
if playerReagentCount < reagentCount then
|
|
||||||
name:SetTextColor(0.5, 0.5, 0.5)
|
|
||||||
else
|
|
||||||
name:SetTextColor(GetItemQualityColor(quality))
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
icon.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
name:SetTextColor(GetItemQualityColor(quality))
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
icon.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user