mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
update TradeSkill skin
This commit is contained in:
@@ -7,6 +7,7 @@ local _G = _G
|
|||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local select = select
|
local select = select
|
||||||
local find = string.find
|
local find = string.find
|
||||||
|
local split = string.split
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetItemInfo = GetItemInfo
|
local GetItemInfo = GetItemInfo
|
||||||
local GetItemQualityColor = GetItemQualityColor
|
local GetItemQualityColor = GetItemQualityColor
|
||||||
@@ -145,16 +146,15 @@ local function LoadSkin()
|
|||||||
local skillLink = GetTradeSkillItemLink(id)
|
local skillLink = GetTradeSkillItemLink(id)
|
||||||
if skillLink then
|
if skillLink then
|
||||||
TradeSkillRequirementLabel:SetTextColor(1, 0.80, 0.10)
|
TradeSkillRequirementLabel:SetTextColor(1, 0.80, 0.10)
|
||||||
local skillID = select(3, find(skillLink, "item:(%d+)"))
|
local skillString = select(3, find(skillLink, "|H(.+)|h"))
|
||||||
if skillID then
|
local skillID = select(2, split(":", skillString))
|
||||||
local quality = select(3, GetItemInfo(skillID))
|
local quality = select(3, GetItemInfo(skillID))
|
||||||
if quality and quality > 1 then
|
if quality and quality > 1 then
|
||||||
TradeSkillSkillIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
TradeSkillSkillIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
TradeSkillSkillName:SetTextColor(GetItemQualityColor(quality))
|
TradeSkillSkillName:SetTextColor(GetItemQualityColor(quality))
|
||||||
else
|
else
|
||||||
TradeSkillSkillIcon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
TradeSkillSkillIcon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
TradeSkillSkillName:SetTextColor(1, 1, 1)
|
TradeSkillSkillName:SetTextColor(1, 1, 1)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -166,19 +166,18 @@ local function LoadSkin()
|
|||||||
local name = _G["TradeSkillReagent" .. i .. "Name"]
|
local name = _G["TradeSkillReagent" .. i .. "Name"]
|
||||||
|
|
||||||
if reagentLink then
|
if reagentLink then
|
||||||
local reagentID = select(3, find(reagentLink, "item:(%d+)"))
|
local reagentString = select(3, find(reagentLink, "|H(.+)|h"))
|
||||||
if reagentID then
|
local reagentID = select(2, split(":", reagentString))
|
||||||
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))
|
||||||
if playerReagentCount < reagentCount then
|
if playerReagentCount < reagentCount then
|
||||||
name:SetTextColor(0.5, 0.5, 0.5)
|
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