From 2339375e500871fb269da6ebe393e2ac67547710 Mon Sep 17 00:00:00 2001 From: Apollyonn Date: Wed, 23 Jan 2019 03:46:32 +0200 Subject: [PATCH] update --- !Compatibility/libs/QuestItemStarterDB.lua | 1 + ElvUI/modules/datatexts/spellpower.lua | 3 ++- ElvUI/modules/skins/blizzard/craft.lua | 23 +++++++-------------- ElvUI/modules/skins/blizzard/quest.lua | 17 ++++----------- ElvUI/modules/skins/blizzard/tradeskill.lua | 23 +++++++-------------- ElvUI/modules/skins/blizzard/trainer.lua | 19 ++++++----------- ElvUI_Config/locales/german_config.lua | 2 +- 7 files changed, 28 insertions(+), 60 deletions(-) diff --git a/!Compatibility/libs/QuestItemStarterDB.lua b/!Compatibility/libs/QuestItemStarterDB.lua index 8135728..f1c2f2f 100644 --- a/!Compatibility/libs/QuestItemStarterDB.lua +++ b/!Compatibility/libs/QuestItemStarterDB.lua @@ -289,6 +289,7 @@ lib.QuestItemIDs = { -- Items ["5880"] = true, -- Crate With Holes ["6464"] = true, -- Wailing Essence + ["8548"] = true, -- Divino-matic Rod ["11148"] = true, -- Samophlange Manual Page ["12884"] = true, -- Arnak's Hoof ["14542"] = true, -- Kravel's Crate diff --git a/ElvUI/modules/datatexts/spellpower.lua b/ElvUI/modules/datatexts/spellpower.lua index cf259d4..7b0cc2c 100644 --- a/ElvUI/modules/datatexts/spellpower.lua +++ b/ElvUI/modules/datatexts/spellpower.lua @@ -14,12 +14,13 @@ local function OnEvent(self) local minModifier = GetSpellBonusDamage(holySchool) local bonusHealing = GetSpellBonusHealing() local bonusDamage + for i = (holySchool + 1), MAX_SPELL_SCHOOLS do bonusDamage = GetSpellBonusDamage(i) minModifier = max(minModifier, bonusDamage) end - if bonusHealing > minModifier then + if E:GetPlayerRole() == "HEALER" then self.text:SetFormattedText(displayNumberString, L["HP"], bonusHealing) else self.text:SetFormattedText(displayNumberString, L["SP"], minModifier) diff --git a/ElvUI/modules/skins/blizzard/craft.lua b/ElvUI/modules/skins/blizzard/craft.lua index 364174d..c202b2e 100644 --- a/ElvUI/modules/skins/blizzard/craft.lua +++ b/ElvUI/modules/skins/blizzard/craft.lua @@ -144,8 +144,6 @@ local function LoadSkin() CraftName:Point("TOPLEFT", 58, -3) - CraftHighlight:StripTextures() - CraftIcon:SetTemplate("Default") CraftIcon:StyleButton(nil, true) CraftIcon:Size(47) @@ -204,6 +202,8 @@ local function LoadSkin() CraftReagent7:Point("TOPLEFT", CraftReagent5, "BOTTOMLEFT", 0, -3) CraftReagent8:Point("LEFT", CraftReagent7, "RIGHT", 3, 0) + CraftHighlight:StripTextures() + CraftHighlightFrame.Left = CraftHighlightFrame:CreateTexture(nil, "ARTWORK") CraftHighlightFrame.Left:Size(152, 15) CraftHighlightFrame.Left:SetPoint("LEFT", CraftHighlightFrame, "CENTER") @@ -214,6 +214,11 @@ local function LoadSkin() CraftHighlightFrame.Right:SetPoint("RIGHT", CraftHighlightFrame, "CENTER") CraftHighlightFrame.Right:SetTexture(E.media.blankTex) + hooksecurefunc(CraftHighlight, "SetVertexColor", function(_, r, g, b) + CraftHighlightFrame.Left:SetGradientAlpha("Horizontal", r, g, b, 0.35, r, g, b, 0) + CraftHighlightFrame.Right:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35) + end) + hooksecurefunc("CraftFrame_SetSelection", function(id) if CraftIcon:GetNormalTexture() then CraftReagentLabel:SetAlpha(1) @@ -237,20 +242,6 @@ local function LoadSkin() end end - local _, _, craftType = GetCraftInfo(id) - local r, g, b - if craftType == "trivial" then - r, g, b = 0.5, 0.5, 0.5 - elseif craftType == "easy" then - r, g, b = 0, 1, 0 - elseif craftType == "medium" then - r, g, b = 1, 1, 0 - elseif craftType == "optimal" then - r, g, b = 1, 0.45, 0.15 - end - CraftHighlightFrame.Left:SetGradientAlpha("Horizontal", r, g, b, 0.35, r, g, b, 0) - CraftHighlightFrame.Right:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35) - local numReagents = GetCraftNumReagents(id) for i = 1, numReagents, 1 do local _, _, reagentCount, playerReagentCount = GetCraftReagentInfo(id, i) diff --git a/ElvUI/modules/skins/blizzard/quest.lua b/ElvUI/modules/skins/blizzard/quest.lua index 697d908..ea5cae4 100644 --- a/ElvUI/modules/skins/blizzard/quest.lua +++ b/ElvUI/modules/skins/blizzard/quest.lua @@ -280,7 +280,7 @@ local function LoadSkin() QuestLogNoQuestsText:ClearAllPoints() QuestLogNoQuestsText:Point("CENTER", EmptyQuestLogFrame, "CENTER", -45, 65) - QuestLogHighlightFrame:Width(301) + QuestLogHighlightFrame:Width(306) QuestLogHighlightFrame.SetWidth = E.noop QuestLogSkillHighlight:StripTextures() @@ -295,18 +295,9 @@ local function LoadSkin() QuestLogHighlightFrame.Right:SetPoint("RIGHT", QuestLogHighlightFrame, "CENTER") QuestLogHighlightFrame.Right:SetTexture(E.media.blankTex) - hooksecurefunc("QuestLog_SetSelection", function(questID) - local _, level, _, _, isHeader = GetQuestLogTitle(questID) - local color = GetDifficultyColor(level) - - if not isHeader then - local scrollFrameOffset = FauxScrollFrame_GetOffset(QuestLogListScrollFrame) - - if questID > scrollFrameOffset and questID <= (scrollFrameOffset + QUESTS_DISPLAYED) and questID <= GetNumQuestLogEntries() then - QuestLogHighlightFrame.Left:SetGradientAlpha("Horizontal", color.r, color.g, color.b, 0.35, color.r, color.g, color.b, 0) - QuestLogHighlightFrame.Right:SetGradientAlpha("Horizontal", color.r, color.g, color.b, 0, color.r, color.g, color.b, 0.35) - end - end + hooksecurefunc(QuestLogSkillHighlight, "SetVertexColor", function(_, r, g, b) + QuestLogHighlightFrame.Left:SetGradientAlpha("Horizontal", r, g, b, 0.35, r, g, b, 0) + QuestLogHighlightFrame.Right:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35) end) QuestLogFrameAbandonButton:Point("BOTTOMLEFT", 18, 15) diff --git a/ElvUI/modules/skins/blizzard/tradeskill.lua b/ElvUI/modules/skins/blizzard/tradeskill.lua index 604cfe6..38a6efa 100644 --- a/ElvUI/modules/skins/blizzard/tradeskill.lua +++ b/ElvUI/modules/skins/blizzard/tradeskill.lua @@ -146,8 +146,6 @@ local function LoadSkin() TradeSkillSkillName:Point("TOPLEFT", 58, -3) - TradeSkillHighlight:StripTextures() - TradeSkillSkillIcon:SetTemplate("Default") TradeSkillSkillIcon:StyleButton(nil, true) TradeSkillSkillIcon:Size(47) @@ -216,6 +214,8 @@ local function LoadSkin() S:HandleCloseButton(TradeSkillFrameCloseButton, TradeSkillFrame.backdrop) + TradeSkillHighlight:StripTextures() + TradeSkillHighlightFrame.Left = TradeSkillHighlightFrame:CreateTexture(nil, "ARTWORK") TradeSkillHighlightFrame.Left:Size(152, 15) TradeSkillHighlightFrame.Left:SetPoint("LEFT", TradeSkillHighlightFrame, "CENTER") @@ -226,6 +226,11 @@ local function LoadSkin() TradeSkillHighlightFrame.Right:SetPoint("RIGHT", TradeSkillHighlightFrame, "CENTER") TradeSkillHighlightFrame.Right:SetTexture(E.media.blankTex) + hooksecurefunc(TradeSkillHighlight, "SetVertexColor", function(_, r, g, b) + TradeSkillHighlightFrame.Left:SetGradientAlpha("Horizontal", r, g, b, 0.35, r, g, b, 0) + TradeSkillHighlightFrame.Right:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35) + end) + hooksecurefunc("TradeSkillFrame_SetSelection", function(id) if TradeSkillSkillIcon:GetNormalTexture() then TradeSkillReagentLabel:SetAlpha(1) @@ -249,20 +254,6 @@ local function LoadSkin() end end - local _, skillType = GetTradeSkillInfo(id) - local r, g, b - if skillType == "trivial" then - r, g, b = 0.5, 0.5, 0.5 - elseif skillType == "easy" then - r, g, b = 0, 1, 0 - elseif skillType == "medium" then - r, g, b = 1, 1, 0 - elseif skillType == "optimal" then - r, g, b = 1, 0.45, 0.15 - end - TradeSkillHighlightFrame.Left:SetGradientAlpha("Horizontal", r, g, b, 0.35, r, g, b, 0) - TradeSkillHighlightFrame.Right:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35) - local numReagents = GetTradeSkillNumReagents(id) for i = 1, numReagents, 1 do local _, _, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i) diff --git a/ElvUI/modules/skins/blizzard/trainer.lua b/ElvUI/modules/skins/blizzard/trainer.lua index 2fbae4f..5854f0a 100644 --- a/ElvUI/modules/skins/blizzard/trainer.lua +++ b/ElvUI/modules/skins/blizzard/trainer.lua @@ -85,7 +85,12 @@ local function LoadSkin() ClassTrainerSkillHighlightFrame.Right:SetPoint("RIGHT", ClassTrainerSkillHighlightFrame, "CENTER") ClassTrainerSkillHighlightFrame.Right:SetTexture(E.media.blankTex) - hooksecurefunc("ClassTrainer_SetSelection", function(id) + hooksecurefunc(ClassTrainerSkillHighlight, "SetVertexColor", function(_, r, g, b) + ClassTrainerSkillHighlightFrame.Left:SetGradientAlpha("Horizontal", r, g, b, 0.35, r, g, b, 0) + ClassTrainerSkillHighlightFrame.Right:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35) + end) + + hooksecurefunc("ClassTrainer_SetSelection", function() local skillIcon = ClassTrainerSkillIcon:GetNormalTexture() if skillIcon and not skillIcon.isSkinned then @@ -94,18 +99,6 @@ local function LoadSkin() skillIcon.isSkinned = true end - - local _, _, serviceType = GetTrainerServiceInfo(id) - local r, g, b - if serviceType == "available" then - r, g, b = 0, 1, 0 - elseif serviceType == "used" then - r, g, b = 0.5, 0.5, 0.5 - elseif serviceType == "unavailable" then - r, g, b = 1, 0, 0 - end - ClassTrainerSkillHighlightFrame.Left:SetGradientAlpha("Horizontal", r, g, b, 0.35, r, g, b, 0) - ClassTrainerSkillHighlightFrame.Right:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35) end) CLASS_TRAINER_SKILLS_DISPLAYED = 19 diff --git a/ElvUI_Config/locales/german_config.lua b/ElvUI_Config/locales/german_config.lua index deeba24..b9410ee 100644 --- a/ElvUI_Config/locales/german_config.lua +++ b/ElvUI_Config/locales/german_config.lua @@ -781,7 +781,7 @@ L["Side Arrows"] = "Seitliche Pfeile" L["Style Filter"] = "Stil Filter" L["Tank"] = "Schutz" L["Target Indicator Color"] = "Ziel Indikator Farbe" -L["Target/Low Health Indicator"] = "Ziel Indikator" +L["Target/Low Health Indicator"] = "Ziel-/Geringer Leben Indikator" L["Target Scale"] = "Ziel Skalierung" L["Targeted Nameplate"] = "Ausgewählte Namensplaketten" L["Texture"] = "Textur"