Commit 32866377 authored by Merathilis's avatar Merathilis

Some skins cleanup

parent ef7ff0c5
......@@ -511,29 +511,6 @@ function MERS:StyleEncounterJournal()
end
end)
hooksecurefunc("EJSuggestFrame_UpdateRewards", function(suggestion)
local rewardData = suggestion.reward.data
if rewardData then
local texture = rewardData.itemIcon or rewardData.currencyIcon or [[Interface\Icons\achievement_guildperk_mobilebanking]]
suggestion.reward.icon:SetMask("")
suggestion.reward.icon:SetTexture(texture)
if not suggestion.reward.icon.backdrop then
MERS:CreateBackdrop(suggestion.reward.icon)
suggestion.reward.icon.backdrop:SetOutside(suggestion.reward.icon)
end
local r, g, b = unpack(E["media"].bordercolor)
if rewardData.itemID then
local quality = select(3, GetItemInfo(rewardData.itemID))
if quality and quality > 1 then
r, g, b = GetItemQualityColor(quality)
end
end
suggestion.reward.icon.backdrop:SetBackdropBorderColor(r, g, b)
end
end)
--Overview Info (From Aurora)
hooksecurefunc("EncounterJournal_SetUpOverview", SkinOverviewInfo)
......
......@@ -77,9 +77,6 @@ local function stylePvP()
button.SelectedTexture:SetAllPoints()
button.Reward.Icon:SetInside(button.Reward)
MERS:CreateBackdrop(button.Reward)
button.Reward.backdrop:SetOutside(button.Reward)
end
-- Honor frame specific
......@@ -117,61 +114,6 @@ local function stylePvP()
bu.Icon.bg:SetDrawLayer("BACKGROUND", 1)
bu.Icon:SetPoint("TOPLEFT", 5, -3)
end
local rewardIcon = HonorFrame.ConquestBar.Reward.Icon
if not rewardIcon.backdrop then
MERS:CreateBackdrop(rewardIcon)
rewardIcon.backdrop:SetOutside(rewardIcon)
end
-- Credits Azilroka
hooksecurefunc(HonorFrame.ConquestBar.Reward.Icon, 'SetTexture', function(self) -- Code taken from :GetConquestLevelInfo the function isn't returning the correct id somehow.
local Quality
for _, questID in ipairs(C_QuestLine_GetQuestLineQuests(782)) do
if not IsQuestFlaggedCompleted(questID) and not C_QuestLog_IsOnQuest(questID) then
break;
end
if HaveQuestRewardData(questID) then
local itemID = select(6, GetQuestLogRewardInfo(1, questID))
Quality = select(3, GetItemInfo(itemID))
else
C_TaskQuest_RequestPreloadRewardData(questID) -- Taken from WorldMapFrame
end
end
if Quality then
self.backdrop:SetBackdropBorderColor(GetItemQualityColor(Quality))
else
self.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
end
end)
-- Rated - ConquestFrame
local rewardIcon = ConquestFrame.ConquestBar.Reward.Icon
if not rewardIcon.backdrop then
MERS:CreateBackdrop(rewardIcon)
rewardIcon.backdrop:SetOutside(rewardIcon)
end
-- Credits Azilroka
hooksecurefunc(ConquestFrame.ConquestBar.Reward.Icon, 'SetTexture', function(self) -- Code taken from :GetConquestLevelInfo the function isn't returning the correct id somehow.
local Quality
for _, questID in ipairs(C_QuestLine_GetQuestLineQuests(782)) do
if not IsQuestFlaggedCompleted(questID) and not C_QuestLog_IsOnQuest(questID) then
break;
end
if HaveQuestRewardData(questID) then
local itemID = select(6, GetQuestLogRewardInfo(1, questID))
Quality = select(3, GetItemInfo(itemID))
else
C_TaskQuest_RequestPreloadRewardData(questID) -- Taken from WorldMapFrame
end
end
if Quality then
self.backdrop:SetBackdropBorderColor(GetItemQualityColor(Quality))
else
self.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
end
end)
end
S:AddCallbackForAddon("Blizzard_PVPUI", "mUIPvPUI", stylePvP)
......@@ -76,21 +76,6 @@ function MERS:CreateBG(frame)
return bg
end
-- Gradient Frame
function MERS:CreateGF(f, w, h, o, r, g, b, a1, a2)
assert(f, "doesn't exist!")
f:SetSize(w, h)
f:SetFrameStrata("BACKGROUND")
local gf = f:CreateTexture(nil, "BACKGROUND")
gf:ClearAllPoints()
gf:SetPoint("TOPLEFT", f, -E.mult, E.mult)
gf:SetPoint("BOTTOMRIGHT", f, E.mult, -E.mult)
gf:SetTexture(E.media.muiNormTex)
gf:SetVertexColor(r, g, b)
gf:SetGradientAlpha(o, r, g, b, a1, r, g, b, a2)
end
-- Gradient Texture
function MERS:CreateGradient(f)
assert(f, "doesn't exist!")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment