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,13 +79,12 @@ 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
|
|
||||||
CraftRequirements:SetTextColor(1, 0.80, 0.10)
|
|
||||||
if skillID then
|
|
||||||
local quality = select(3, GetItemInfo(skillID))
|
local quality = select(3, GetItemInfo(skillID))
|
||||||
if quality and quality > 1 then
|
if quality and quality > 1 then
|
||||||
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
@@ -95,7 +94,6 @@ local function LoadSkin()
|
|||||||
CraftName:SetTextColor(1, 1, 1)
|
CraftName:SetTextColor(1, 1, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
local numReagents = GetCraftNumReagents(id)
|
local numReagents = GetCraftNumReagents(id)
|
||||||
for i = 1, numReagents, 1 do
|
for i = 1, numReagents, 1 do
|
||||||
@@ -105,10 +103,8 @@ 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
|
|
||||||
if reagentID then
|
|
||||||
local quality = select(3, GetItemInfo(reagentID))
|
local quality = select(3, GetItemInfo(reagentID))
|
||||||
if quality and quality > 1 then
|
if quality and quality > 1 then
|
||||||
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
@@ -122,7 +118,6 @@ local function LoadSkin()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
for i = 1, CRAFTS_DISPLAYED do
|
for i = 1, CRAFTS_DISPLAYED do
|
||||||
|
|||||||
Reference in New Issue
Block a user