mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update & cleanup
This commit is contained in:
@@ -3,16 +3,16 @@ local S = E:GetModule("Skins");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = getfenv()
|
||||
local _G = _G
|
||||
local unpack = unpack
|
||||
local select = select
|
||||
local find = string.find
|
||||
--WoW API / Variables
|
||||
local hooksecurefunc = hooksecurefunc
|
||||
local GetItemInfo = GetItemInfo
|
||||
local GetItemQualityColor = GetItemQualityColor
|
||||
local GetCraftReagentInfo = GetCraftReagentInfo
|
||||
local GetCraftItemLink = GetCraftItemLink
|
||||
local hooksecurefunc = hooksecurefunc
|
||||
|
||||
local function LoadSkin()
|
||||
-- if E.private.skins.blizzard.enable ~= true or not E.private.skins.blizzard.craft ~= true then return end
|
||||
@@ -80,11 +80,12 @@ local function LoadSkin()
|
||||
CraftIcon:SetPoint("TOPLEFT", 4, -3)
|
||||
|
||||
local skillLink = GetCraftItemLink(id)
|
||||
local skillEnchantID = select(3, strfind(skillLink, "enchant:(%d+)"))
|
||||
local skillItemID = select(3, strfind(skillLink, "item:(%d+)"))
|
||||
if skillLink then
|
||||
local skillEnchantID = select(3, find(skillLink, "enchant:(%d+)"))
|
||||
local skillItemID = select(3, find(skillLink, "item:(%d+)"))
|
||||
local skillID = skillEnchantID or skillItemID
|
||||
if skillEnchantID or skillItemID then
|
||||
CraftRequirements:SetTextColor(1, 0.80, 0.10)
|
||||
if skillID then
|
||||
local quality = select(3, GetItemInfo(skillID))
|
||||
if quality and quality > 1 then
|
||||
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
@@ -94,15 +95,19 @@ local function LoadSkin()
|
||||
CraftName:SetTextColor(1, 1, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local numReagents = GetCraftNumReagents(id)
|
||||
for i = 1, numReagents, 1 do
|
||||
local reagentName, reagentTexture, reagentCount, playerReagentCount = GetCraftReagentInfo(id, i)
|
||||
local _, _, reagentCount, playerReagentCount = GetCraftReagentInfo(id, i)
|
||||
local reagentLink = GetCraftReagentItemLink(id, i)
|
||||
local reagentID = select(3, strfind(reagentLink, "item:(%d+)"))
|
||||
local icon = _G["CraftReagent" .. i .. "IconTexture"]
|
||||
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 quality = select(3, GetItemInfo(reagentID))
|
||||
if quality and quality > 1 then
|
||||
@@ -117,6 +122,7 @@ local function LoadSkin()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
for i = 1, CRAFTS_DISPLAYED do
|
||||
|
||||
@@ -3,16 +3,16 @@ local S = E:GetModule("Skins");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = getfenv()
|
||||
local unpack, select = unpack, select
|
||||
local _G = _G
|
||||
local unpack = unpack
|
||||
local select = select
|
||||
--WoW API / Variables
|
||||
local hooksecurefunc = hooksecurefunc
|
||||
local GetInboxItem = GetInboxItem
|
||||
local GetItemInfo = GetItemInfo
|
||||
local GetItemQualityColor = GetItemQualityColor
|
||||
local GetSendMailItem = GetSendMailItem
|
||||
local hooksecurefunc = hooksecurefunc
|
||||
local INBOXITEMS_TO_DISPLAY = INBOXITEMS_TO_DISPLAY
|
||||
local ATTACHMENTS_MAX_RECEIVE = ATTACHMENTS_MAX_RECEIVE
|
||||
|
||||
local function LoadSkin()
|
||||
-- if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.mail ~= true then return end
|
||||
|
||||
@@ -3,11 +3,13 @@ local S = E:GetModule("Skins");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = getfenv()
|
||||
local _G = _G
|
||||
local pairs = pairs
|
||||
local unpack = unpack
|
||||
local find = string.find
|
||||
--WoW API / Variables
|
||||
local GetItemInfo = GetItemInfo
|
||||
local GetItemQualityColor = GetItemQualityColor
|
||||
local hooksecurefunc = hooksecurefunc
|
||||
|
||||
local function LoadSkin()
|
||||
@@ -61,7 +63,6 @@ local function LoadSkin()
|
||||
item:SetFrameLevel(item:GetFrameLevel() + 2)
|
||||
|
||||
icon:SetDrawLayer("OVERLAY")
|
||||
-- icon:Size(icon:GetWidth() -(E.Spacing*2), icon:GetHeight() -(E.Spacing*2))
|
||||
icon:SetWidth(icon:GetWidth() -(E.Spacing*2))
|
||||
icon:SetHeight(icon:GetHeight() -(E.Spacing*2))
|
||||
icon:SetPoint("TOPLEFT", E.Border, -E.Border)
|
||||
@@ -83,7 +84,6 @@ local function LoadSkin()
|
||||
item:SetFrameLevel(item:GetFrameLevel() + 2)
|
||||
|
||||
icon:SetDrawLayer("OVERLAY")
|
||||
-- icon:Size(icon:GetWidth() -(E.Spacing*2), icon:GetHeight() -(E.Spacing*2))
|
||||
icon:SetWidth(icon:GetWidth() -(E.Spacing*2))
|
||||
icon:SetHeight(icon:GetHeight() -(E.Spacing*2))
|
||||
icon:SetPoint("TOPLEFT", E.Border, -E.Border)
|
||||
@@ -105,7 +105,6 @@ local function LoadSkin()
|
||||
item:SetFrameLevel(item:GetFrameLevel() + 2)
|
||||
|
||||
icon:SetDrawLayer("OVERLAY")
|
||||
-- icon:Size(icon:GetWidth() -(E.Spacing*2), icon:GetHeight() -(E.Spacing*2))
|
||||
icon:SetWidth(icon:GetWidth() -(E.Spacing*2))
|
||||
icon:SetHeight(icon:GetHeight() -(E.Spacing*2))
|
||||
icon:SetPoint("TOPLEFT", E.Border, -E.Border)
|
||||
@@ -117,19 +116,24 @@ local function LoadSkin()
|
||||
|
||||
local function QuestQualityColors(frame, text, quality, link)
|
||||
if link and not quality then
|
||||
_, _, quality = GetItemInfo(link)
|
||||
local itemEnchantID = select(3, find(link, "enchant:(%d+)"))
|
||||
local itemItemID = select(3, find(link, "item:(%d+)"))
|
||||
local itemID = itemEnchantID or itemItemID
|
||||
if itemID then
|
||||
_, _, quality = GetItemInfo(itemID)
|
||||
end
|
||||
end
|
||||
|
||||
if quality and quality > 1 then
|
||||
if frame then
|
||||
frame:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
-- frame.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
frame.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
end
|
||||
text:SetTextColor(GetItemQualityColor(quality))
|
||||
else
|
||||
if frame then
|
||||
frame:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
-- frame.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
frame.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
end
|
||||
text:SetTextColor(1, 1, 1)
|
||||
end
|
||||
@@ -139,7 +143,6 @@ local function LoadSkin()
|
||||
E:SetTemplate(QuestRewardItemHighlight, "Default", nil, true)
|
||||
QuestRewardItemHighlight:SetBackdropBorderColor(1, 1, 0)
|
||||
QuestRewardItemHighlight:SetBackdropColor(0, 0, 0, 0)
|
||||
-- QuestRewardItemHighlight:Size(142, 40)
|
||||
QuestRewardItemHighlight:SetWidth(142)
|
||||
QuestRewardItemHighlight:SetHeight(40)
|
||||
|
||||
@@ -306,7 +309,6 @@ local function LoadSkin()
|
||||
S:HandleButton(QuestTrack)
|
||||
QuestTrack:SetText(TRACK_QUEST)
|
||||
QuestTrack:SetPoint("TOP", QuestLogFrame, "TOP", -64, -42)
|
||||
-- QuestTrack:Size(110, 21)
|
||||
QuestTrack:SetWidth(110)
|
||||
QuestTrack:SetHeight(21)
|
||||
|
||||
@@ -342,8 +344,11 @@ local function LoadSkin()
|
||||
else
|
||||
QuestTrack:Enable()
|
||||
end
|
||||
|
||||
if EmptyQuestLogFrame:IsVisible() then
|
||||
QuestLogListScrollFrame:Hide()
|
||||
else
|
||||
QuestLogListScrollFrame:Show()
|
||||
end
|
||||
end)
|
||||
|
||||
for i = 1, 6 do
|
||||
@@ -358,7 +363,6 @@ local function LoadSkin()
|
||||
item:SetFrameLevel(item:GetFrameLevel() + 2)
|
||||
|
||||
icon:SetDrawLayer("OVERLAY")
|
||||
-- icon:Size(icon:GetWidth() -(E.Spacing*2), icon:GetHeight() -(E.Spacing*2))
|
||||
icon:SetWidth(icon:GetWidth() -(E.Spacing*2))
|
||||
icon:SetHeight(icon:GetHeight() -(E.Spacing*2))
|
||||
icon:SetPoint("TOPLEFT", E.Border, -E.Border)
|
||||
@@ -389,16 +393,6 @@ local function LoadSkin()
|
||||
end
|
||||
end)
|
||||
|
||||
-- QUESTS_DISPLAYED = 25
|
||||
|
||||
-- for i = 7, 25 do
|
||||
-- local questLogTitle = CreateFrame("Button", "QuestLogTitle" .. i, QuestLogFrame, "QuestLogTitleButtonTemplate")
|
||||
|
||||
-- questLogTitle:SetID(i)
|
||||
-- questLogTitle:Hide()
|
||||
-- questLogTitle:SetPoint("TOPLEFT", _G["QuestLogTitle" .. i - 1], "BOTTOMLEFT", 0, 1)
|
||||
-- end
|
||||
|
||||
for i = 1, QUESTS_DISPLAYED do
|
||||
local questLogTitle = _G["QuestLogTitle" .. i]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = getfenv()
|
||||
local _G = _G
|
||||
local unpack = unpack
|
||||
local select = select
|
||||
local find = string.find
|
||||
@@ -13,6 +13,7 @@ local GetItemQualityColor = GetItemQualityColor
|
||||
local GetTradeSkillItemLink = GetTradeSkillItemLink
|
||||
local GetTradeSkillReagentInfo = GetTradeSkillReagentInfo
|
||||
local GetTradeSkillReagentItemLink = GetTradeSkillReagentItemLink
|
||||
local hooksecurefunc = hooksecurefunc
|
||||
|
||||
local function LoadSkin()
|
||||
-- if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.tradeskill ~= true then return end
|
||||
@@ -142,11 +143,11 @@ local function LoadSkin()
|
||||
TradeSkillSkillIcon:SetPoint("TOPLEFT", 4, -3)
|
||||
|
||||
local skillLink = GetTradeSkillItemLink(id)
|
||||
local skillID = select(3, strfind(skillLink, "item:(%d+)"))
|
||||
if skillID then
|
||||
if skillLink then
|
||||
TradeSkillRequirementLabel:SetTextColor(1, 0.80, 0.10)
|
||||
local skillID = select(3, find(skillLink, "item:(%d+)"))
|
||||
if skillID then
|
||||
local quality = select(3, GetItemInfo(skillID))
|
||||
|
||||
if quality and quality > 1 then
|
||||
TradeSkillSkillIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
TradeSkillSkillName:SetTextColor(GetItemQualityColor(quality))
|
||||
@@ -155,20 +156,22 @@ local function LoadSkin()
|
||||
TradeSkillSkillName:SetTextColor(1, 1, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local numReagents = GetTradeSkillNumReagents(id)
|
||||
for i = 1, numReagents, 1 do
|
||||
local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i)
|
||||
local _, _, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i)
|
||||
local reagentLink = GetTradeSkillReagentItemLink(id, i)
|
||||
local reagentID = select(3, strfind(reagentLink, "item:(%d+)"))
|
||||
local icon = _G["TradeSkillReagent" .. i .. "IconTexture"]
|
||||
local name = _G["TradeSkillReagent" .. i .. "Name"]
|
||||
|
||||
if reagentLink then
|
||||
local reagentID = select(3, find(reagentLink, "item:(%d+)"))
|
||||
if reagentID then
|
||||
local quality = select(3, GetItemInfo(reagentID))
|
||||
if quality and quality > 1 then
|
||||
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
if(playerReagentCount < reagentCount) then
|
||||
if playerReagentCount < reagentCount then
|
||||
name:SetTextColor(0.5, 0.5, 0.5)
|
||||
else
|
||||
name:SetTextColor(GetItemQualityColor(quality))
|
||||
@@ -178,6 +181,7 @@ local function LoadSkin()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user