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 unpack = unpack
|
||||
local select = select
|
||||
local find = string.find
|
||||
local find, split = string.find, string.split
|
||||
--WoW API / Variables
|
||||
local GetItemInfo = GetItemInfo
|
||||
local GetItemQualityColor = GetItemQualityColor
|
||||
@@ -79,13 +79,12 @@ local function LoadSkin()
|
||||
CraftIcon:SetHeight(40)
|
||||
CraftIcon:SetPoint("TOPLEFT", 4, -3)
|
||||
|
||||
CraftRequirements:SetTextColor(1, 0.80, 0.10)
|
||||
|
||||
local skillLink = GetCraftItemLink(id)
|
||||
if skillLink then
|
||||
local skillEnchantID = select(3, find(skillLink, "enchant:(%d+)"))
|
||||
local skillItemID = select(3, find(skillLink, "item:(%d+)"))
|
||||
local skillID = skillEnchantID or skillItemID
|
||||
CraftRequirements:SetTextColor(1, 0.80, 0.10)
|
||||
if skillID then
|
||||
local skillString = select(3, find(skillLink, "|H(.+)|h"))
|
||||
local skillID = select(2, split(":", skillString))
|
||||
local quality = select(3, GetItemInfo(skillID))
|
||||
if quality and quality > 1 then
|
||||
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
@@ -95,7 +94,6 @@ local function LoadSkin()
|
||||
CraftName:SetTextColor(1, 1, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local numReagents = GetCraftNumReagents(id)
|
||||
for i = 1, numReagents, 1 do
|
||||
@@ -105,10 +103,8 @@ local function LoadSkin()
|
||||
local name = _G["CraftReagent" .. i .. "Name"]
|
||||
|
||||
if reagentLink then
|
||||
local reagentEnchantID = select(3, find(reagentLink, "item:(%d+)"))
|
||||
local reagentItemID = select(3, find(reagentLink, "item:(%d+)"))
|
||||
local reagentID = reagentEnchantID or reagentItemID
|
||||
if reagentID then
|
||||
local reagentString = select(3, find(reagentLink, "|H(.+)|h"))
|
||||
local reagentID = select(2, split(":", reagentString))
|
||||
local quality = select(3, GetItemInfo(reagentID))
|
||||
if quality and quality > 1 then
|
||||
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
@@ -122,7 +118,6 @@ local function LoadSkin()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
for i = 1, CRAFTS_DISPLAYED do
|
||||
|
||||
Reference in New Issue
Block a user