diff --git a/CHANGELOG b/CHANGELOG index 673345aa..7adce611 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,16 @@ [Eng] - All changes to this project will be documented in this file. The latest changes are at the top. [Ger] - Alle Ă„nderungen an diesem Projekt werden in dieser Datei dokumentiert. Die neuesten Ă„nderungen stehen ganz oben. +## [ver. 2.92.2] - 22.01.2023 +### Update +- FIX Auto media Color +- FIX Auto Execute marker +- UPDATE Instance difficulty for Minimap add color gardient function and add gardient keys +- UPDATE Instance difficulty for Minimap prevents being taken over by squareminimap +- UPDATE diseable Custom class colore if EltreumUI gardient mode is on +### Added +- NEW Texture R28 + ## [ver. 2.92.1] - 16.01.2023 ### Update - UPDATE Datatex for the new ElvUI update diff --git a/ElvUI_mMediaTag.toc b/ElvUI_mMediaTag.toc index 2aff4dce..c8cef32e 100644 --- a/ElvUI_mMediaTag.toc +++ b/ElvUI_mMediaTag.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r ## Author: Blinkii -## Version: 2.92.1 +## Version: 2.92.2 ## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de ## RequiredDeps: ElvUI ## DefaultState: Enabled diff --git a/ElvUI_mMediaTag_Classic.toc b/ElvUI_mMediaTag_Classic.toc index 06f72288..9e2de7b4 100644 --- a/ElvUI_mMediaTag_Classic.toc +++ b/ElvUI_mMediaTag_Classic.toc @@ -1,7 +1,7 @@ ## Interface: 11403 ## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r ## Author: Blinkii -## Version: 2.92.1 +## Version: 2.92.2 ## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de ## RequiredDeps: ElvUI ## DefaultState: Enabled diff --git a/ElvUI_mMediaTag_Mainline.toc b/ElvUI_mMediaTag_Mainline.toc index 98c2f216..b17761f3 100644 --- a/ElvUI_mMediaTag_Mainline.toc +++ b/ElvUI_mMediaTag_Mainline.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r ## Author: Blinkii -## Version: 2.92.1 +## Version: 2.92.2 ## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de ## RequiredDeps: ElvUI ## DefaultState: Enabled diff --git a/ElvUI_mMediaTag_Wrath.toc b/ElvUI_mMediaTag_Wrath.toc index 6fd3e591..82705915 100644 --- a/ElvUI_mMediaTag_Wrath.toc +++ b/ElvUI_mMediaTag_Wrath.toc @@ -1,7 +1,7 @@ ## Interface: 30401 ## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r ## Author: Blinkii -## Version: 2.92.1 +## Version: 2.92.2 ## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de ## RequiredDeps: ElvUI ## DefaultState: Enabled diff --git a/core/init.lua b/core/init.lua index 29f599c3..7eff42aa 100644 --- a/core/init.lua +++ b/core/init.lua @@ -32,12 +32,20 @@ function mMT:AddOptions() end end +function mMT:Check_ElvUI_EltreumUI() + return (IsAddOnLoaded("ElvUI_EltreumUI") and E.db.ElvUI_EltreumUI.unitframes.gradientmode.enable) +end + -- addon laden function mMT:Initialize() - if E.db[mPlugin].mCustomClassColors.enable then + if E.db[mPlugin].mCustomClassColors.enable and not mMT:Check_ElvUI_EltreumUI() then mMT:SetCustomColors() end + if E.db[mPlugin].mCustomClassColors.emediaenable then + mMT:SetElvUIMediaColor() + end + mMT:mMisc() -- module laden if E.Retail then diff --git a/core/mChangelog.lua b/core/mChangelog.lua index 18fff963..9dc1eceb 100644 --- a/core/mChangelog.lua +++ b/core/mChangelog.lua @@ -9,7 +9,7 @@ local format = format --Variables local ChangelogText = - "## [ver. 2.92.1] - 16.01.2023\n\n### Update\n- |CFFFF7F50###Update|r Datatex for the new ElvUI update\n- |CFFFF7F50###Update|r Removed some Fonts\n- |CFFFF7F50###Update|r Instance difficulty for Minimap update Shortname function\n- |CFFFF7F50###Update|r Instance difficulty for Minimap update HC color\n\n### Added\n- |CFF6495EDNEW|r Tag mName:last & mName:last:onlyininstance" + "## [ver. 2.92.2] - 22.01.2023\n### Update\n- |CFFDFFF00FIX|r Auto media Color\n- |CFFDFFF00FIX|r Auto Execute marker\n- |CFFFF7F50###Update|r Instance difficulty for Minimap add color gardient function and add gardient keys\n- |CFFFF7F50###Update|r Instance difficulty for Minimap prevents being taken over by squareminimap\n- |CFFFF7F50###Update|r diseable Custom class colore if EltreumUI gardient mode is on\n### Added\n- |CFF6495EDNEW|r Texture R28\n" function mMT:Changelog(opt) local Frame = CreateFrame("Frame", "mMediaTagChangelog", E.UIParent, "BackdropTemplate") @@ -37,9 +37,9 @@ function mMT:Changelog(opt) local Label2 = Frame:CreateFontString("ChangelogText", "OVERLAY", "GameTooltipText") Label2:SetFont(Font, 14) Label2:SetPoint("TOPLEFT", 20, -90) + Label2:SetText(ChangelogText) Label2:SetWidth(360) Label2:SetHeight(500) - Label2:SetText(ChangelogText) local Close = CreateFrame("Button", "CloseButton", Frame, BackdropTemplateMixin and "BackdropTemplate") Close:Point("BOTTOM", Frame, "BOTTOM", 0, 10) diff --git a/core/mFunctions.lua b/core/mFunctions.lua index 62e24514..4eae8e26 100644 --- a/core/mFunctions.lua +++ b/core/mFunctions.lua @@ -27,6 +27,22 @@ function mMT:ColorCheck(value) end end +function mMT:ColorFade(colorA, colorB, percent) + local color = {} + if colorA and colorA.r and colorA.g and colorA.b and colorB and colorB.r and colorB.g and colorB.b and percent then + color.r = colorA.r - (colorA.r - colorB.r) * percent + color.g = colorA.g - (colorA.g - colorB.g) * percent + color.b = colorA.b - (colorA.b - colorB.b) * percent + color.color = E:RGBToHex(color.r, color.g, color.b) + return color + elseif colorA and colorA.r and colorA.g and colorA.b then + return colorA + else + print("|CFFE74C3CERROR - mMediaTag - COLORFADE|r") + return nil + end +end + function mMT:mMisc() if E.db[mPlugin].mMsg then print(format(L["Welcome to %s version |CFF8E44AD%q|r, for |cff1784d1ElvUI|r!"], ns.mName, ns.mVersion)) diff --git a/core/mSettings.lua b/core/mSettings.lua index 16aaab3d..b0e2f8d5 100644 --- a/core/mSettings.lua +++ b/core/mSettings.lua @@ -3,8 +3,6 @@ local mPlugin = "mMediaTag" local addon, ns = ... P[mPlugin] = { - ["mKeystoneDB"] = {}, - ["mLogKeystone"] = true, ["mMsg"] = true, ["mTIcon"] = true, ["mTIconSize"] = 32, @@ -450,14 +448,15 @@ P[mPlugin] = { }, ["mInstanceDifficulty"] = { ["enable"] = false, - ["mpe"] = { ["color"] = "|cffff003e", ["r"] = 1, ["g"] = 0, ["b"] = 0.24, }, + ["mpe"] = { ["color"] = "|cffff8f00", ["r"] = 1, ["g"] = 0, ["b"] = 0, }, + ["mpf"] = { ["color"] = "|cffff0056", ["r"] = 1, ["g"] = 0, ["b"] = 0.33, }, ["hc"] = { ["color"] = "|cff0595ff", ["b"] = 1, ["g"] = 0.58, ["r"] = 0.01, }, ["guild"] = { ["color"] = "|cff94ff00", ["r"] = 0.58, ["g"] = 1, ["b"] = 0, }, - ["tw"] = { ["color"] = "|cff00c0ff", ["r"] = 0, ["g"] = 0.75, ["b"] = 1, }, - ["mpc"] = { ["color"] = "|cfffff819", ["r"] = 1, ["g"] = 0.97, ["b"] = 0.098, }, + ["tw"] = { ["color"] = "|cff00c0ff", ["r"] = 0, ["g"] = 0.44, ["b"] = 1, }, + ["mpc"] = { ["color"] = "|cff0072ff", ["r"] = 1, ["g"] = 0.97, ["b"] = 1, }, ["nhc"] = { ["color"] = "|cff52ff76", ["b"] = 0.46, ["g"] = 1, ["r"] = 0.32, }, ["mpa"] = { ["color"] = "|cff97ffbd", ["r"] = 0.59, ["g"] = 1, ["b"] = 0.74, }, - ["mpd"] = { ["color"] = "|cffff8b00", ["r"] = 1, ["g"] = 0.54, ["b"] = 0, }, + ["mpd"] = { ["color"] = "|cff8800ff", ["r"] = 0.53, ["g"] = 0, ["b"] = 1, }, ["m"] = { ["color"] = "|cffaf00ff", ["g"] = 0, ["r"] = 0.68, ["b"] = 1.00, }, ["name"] = { ["color"] = "|cffffffff", ["r"] = 1, ["g"] = 1, ["b"] = 1, }, ["mp"] = { ["color"] = "|cffff8f00", ["b"] = 0, ["g"] = 0.56, ["r"] = 1, }, @@ -466,4 +465,4 @@ P[mPlugin] = { ["tg"] = { ["color"] = "|cff5dffb8", ["r"] = 0.36, ["g"] = 1, ["b"] = 0.72, }, ["pvp"] = { ["color"] = "|cffeb0056", ["r"] = 0.92, ["g"] = 0, ["b"] = 0.33, }, }, -} +} \ No newline at end of file diff --git a/media/sharedmedia.lua b/media/sharedmedia.lua index 291bd9c3..12f2efd2 100644 --- a/media/sharedmedia.lua +++ b/media/sharedmedia.lua @@ -349,6 +349,7 @@ mAddStatusbar("mMediaTag R25", "r25.tga") mAddStatusbar("mMediaTag R26", "r26.tga") mAddStatusbar("mMediaTag R27", "r27.tga") mAddStatusbar("mMediaTag R28", "r28.tga") +mAddStatusbar("mMediaTag R29", "r29.tga") mAddStatusbar("mMediaTag Caith UI 1", "Wglass.tga") mAddStatusbar("mMediaTag Caith UI 2", "Wisps.tga") diff --git a/media/textures/r29.tga b/media/textures/r29.tga new file mode 100644 index 00000000..a9d19af0 Binary files /dev/null and b/media/textures/r29.tga differ diff --git a/misc/mCustomClassColors.lua b/misc/mCustomClassColors.lua index 40154c12..d48339e1 100644 --- a/misc/mCustomClassColors.lua +++ b/misc/mCustomClassColors.lua @@ -37,9 +37,9 @@ local function ResetColors() UF:Update_AllFrames() end -local function SetElvUIMediaColor() +function mMT:SetElvUIMediaColor() local _, unitClass = UnitClass("PLAYER") - local colorDB = E.db[mPlugin].mCustomClassColors.colors[unitClass] + local colorDB = (E.db[mPlugin].mCustomClassColors.enable and not mMT:Check_ElvUI_EltreumUI()) and E.db[mPlugin].mCustomClassColors.colors[unitClass] or E:ClassColor(E.myclass, true) E.db.general.valuecolor["r"] = colorDB.r E.db.general.valuecolor["g"] = colorDB.g E.db.general.valuecolor["b"] = colorDB.b @@ -72,9 +72,6 @@ end function mMT:SetCustomColors() UpdateColors() hooksecurefunc(E, "ClassColor", mClassColor) - if E.db[mPlugin].mCustomClassColors.emediaenable then - SetElvUIMediaColor() - end end local function customclasscolorsOptions() @@ -101,13 +98,12 @@ local function customclasscolorsOptions() order = 3, type = "toggle", name = L["Change ElvUI Media color"], - disabled = function() return not E.db[mPlugin].mCustomClassColors.enable end, get = function(info) return E.db[mPlugin].mCustomClassColors.emediaenable end, set = function(info, value) E.db[mPlugin].mCustomClassColors.emediaenable = value - SetElvUIMediaColor() + mMT:SetElvUIMediaColor() E:StaticPopup_Show('CONFIG_RL') end }, @@ -115,6 +111,7 @@ local function customclasscolorsOptions() order = 4, type = "execute", name = L["Set Custom colors"], + desc = L["Set Custom colors"], disabled = function() return not E.db[mPlugin].mCustomClassColors.enable end, func = function() UpdateColors() @@ -125,6 +122,7 @@ local function customclasscolorsOptions() order = 5, type = "execute", name = L["Reset Custom colors"], + desc = L["Reset Custom colors"], func = function() ResetColors() E:StaticPopup_Show('CONFIG_RL') diff --git a/misc/mFunctionsRetail.lua b/misc/mFunctionsRetail.lua index 85e78a81..83febfdd 100644 --- a/misc/mFunctionsRetail.lua +++ b/misc/mFunctionsRetail.lua @@ -109,12 +109,6 @@ function mMT:OwenKeystone() 2, format("%s%s: |r %s%s|r%s +%s|r", other, L["Keystone"], myth, name, E:RGBToHex(r, g, b), keyStoneLevel) ) - - --if E.db[mPlugin].mLogKeystone then - -- --E.db[mPlugin].mKeystoneDB = - -- mInsert(E.db[mPlugin].mKeystoneDB, "name", "key") - --end - return OwenKeystoneText end end diff --git a/misc/mInstanceDifficulty.lua b/misc/mInstanceDifficulty.lua index ac1f9615..dd2488ee 100644 --- a/misc/mInstanceDifficulty.lua +++ b/misc/mInstanceDifficulty.lua @@ -21,6 +21,37 @@ local challenge = difficulty and difficulty.ChallengeMode or _G.MiniMapChallenge --Variables local mIDF = nil + +local percentValue = { + [2] = 0, + [3] = 0.14, + [4] = 0.28, + [5] = 0.42, + [6] = 0.56, + [7] = 0.71, + [8] = 0.85, + [9] = 1, + [10] = 0.2, + [11] = 0.4, + [12] = 0.6, + [13] = 0.8, + [14] = 1, + [15] = 0.2, + [16] = 0.4, + [17] = 0.6, + [18] = 0.8, + [19] = 1, + [20] = 0.2, + [21] = 0.4, + [22] = 0.6, + [23] = 0.8, + [24] = 1, + [25] = 0.2, + [26] = 0.4, + [27] = 0.6, + [28] = 0.8, + [29] = 1, +} local instanceDifficulty = { [1] = { c = "|CFF00FC00", d = "N" }, [2] = { c = "|CFF005AFC", d = "H" }, @@ -97,6 +128,7 @@ local shortNames = { local colors = { ["mpe"] = { ["color"] = "|cffff003e", ["r"] = 1, ["g"] = 0, ["b"] = 0.24, }, + ["mpf"] = { ["color"] = "|cffff003e", ["r"] = 1, ["g"] = 0, ["b"] = 0.24, }, ["hc"] = { ["color"] = "|cff004dff", ["b"] = 1, ["g"] = 0.30, ["r"] = 0, }, ["guild"] = { ["color"] = "|cff94ff00", ["r"] = 0.58, ["g"] = 1, ["b"] = 0, }, ["tw"] = { ["color"] = "|cff00c0ff", ["r"] = 0, ["g"] = 0.75, ["b"] = 1, }, @@ -104,7 +136,7 @@ local colors = { ["nhc"] = { ["color"] = "|cff52ff76", ["b"] = 0.46, ["g"] = 1, ["r"] = 0.32, }, ["mpa"] = { ["color"] = "|cff97ffbd", ["r"] = 0.59, ["g"] = 1, ["b"] = 0.74, }, ["mpd"] = { ["color"] = "|cffff8b00", ["r"] = 1, ["g"] = 0.54, ["b"] = 0, }, - ["m"] = { ["color"] = "|cffaf00ff", ["g"] = 0, ["r"] = 0.68, ["b"] = 1.00,}, + ["m"] = { ["color"] = "|cffaf00ff", ["g"] = 0, ["r"] = 0.68, ["b"] = 1.00, }, ["name"] = { ["color"] = "|cffffffff", ["r"] = 1, ["g"] = 1, ["b"] = 1, }, ["mp"] = { ["color"] = "|cffff8f00", ["b"] = 0, ["g"] = 0.56, ["r"] = 1, }, ["mpb"] = { ["color"] = "|cff27ff59", ["r"] = 0.15, ["g"] = 1, ["b"] = 0.34, }, @@ -156,6 +188,7 @@ local function UodateColors() ["mpc"] = db.mpc, ["mpd"] = db.mpd, ["mpe"] = db.mpe, + ["mpf"] = db.mpf, } end @@ -181,18 +214,34 @@ local function GetIconSettings(button) profile.xOffset or defaults.xOffset, profile.yOffset or defaults.yOffset end + local function GetKeystoneLevelandColor() + local color = {} local keyStoneLevel, _ = C_ChallengeMode.GetActiveKeystoneInfo() if keyStoneLevel == 2 then return format("%s%s|r", colors.mpa.color, keyStoneLevel) - elseif keyStoneLevel >= 10 then - return format("%s%s|r", colors.mpb.color, keyStoneLevel) - elseif keyStoneLevel >= 15 then - return format("%s%s|r", colors.mpc.color, keyStoneLevel) - elseif keyStoneLevel >= 20 then - return format("%s%s|r", colors.mpd.color, keyStoneLevel) + elseif keyStoneLevel <= 9 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpa, E.db[mPlugin].mInstanceDifficulty.mpb, + percentValue[keyStoneLevel]) + return format("%s%s|r", color.color, keyStoneLevel) + elseif keyStoneLevel <= 14 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpb, E.db[mPlugin].mInstanceDifficulty.mpc, + percentValue[keyStoneLevel]) + return format("%s%s|r", color.color, keyStoneLevel) + elseif keyStoneLevel <= 19 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpc, E.db[mPlugin].mInstanceDifficulty.mpd, + percentValue[keyStoneLevel]) + return format("%s%s|r", color.color, keyStoneLevel) + elseif keyStoneLevel >= 24 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpd, E.db[mPlugin].mInstanceDifficulty.mpe, + percentValue[keyStoneLevel]) + return format("%s%s|r", color.color, keyStoneLevel) + elseif keyStoneLevel >= 29 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpe, E.db[mPlugin].mInstanceDifficulty.mpf, + percentValue[keyStoneLevel]) + return format("%s%s|r", color.color, keyStoneLevel) else - return format("%s%s|r", colors.mpe.color, keyStoneLevel) + return format("%s%s|r", colors.mpf.color, keyStoneLevel) end end @@ -202,7 +251,7 @@ function UpdateDifficulty() challenge:Hide() local name, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceID, instanceGroupSize, LfgDungeonID = - GetInstanceInfo() + GetInstanceInfo() local inInstance, InstanceType = IsInInstance() if inInstance and name then @@ -211,8 +260,7 @@ function UpdateDifficulty() local difficultyColor = instanceDifficulty[difficultyID] and instanceDifficulty[difficultyID].c or "|CFFFFFFFF" local difficultyShort = instanceDifficulty[difficultyID] and instanceDifficulty[difficultyID].d or "" local isGuildParty = InGuildParty() - if - difficultyID == 8 + if difficultyID == 8 and C_MythicPlus.IsMythicPlusActive() and (C_ChallengeMode.GetActiveChallengeMapID() ~= nil) then @@ -301,9 +349,9 @@ end function mMT:SetupInstanceDifficulty() local position, xOffset, yOffset = GetIconSettings("difficulty") - local Font = LSM:Fetch("font", E.db.general.font) + local Font = LSM:Fetch("font", E.db.general.font) - mIDF = CreateFrame("Frame", "m_MinimapInstanceDifficulty", Minimap) + mIDF = CreateFrame("Frame", "m_MinimapInstanceDifficulty", E.UIParent) mIDF:Size(32, 32) mIDF:SetPoint(position, Minimap, xOffset, yOffset) mIDF.Text = mIDF:CreateFontString("mIDF_Text", "OVERLAY", "GameTooltipText") @@ -342,7 +390,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_NHC = { type = "color", - order = 3, + order = 4, name = "NHC", hasAlpha = false, get = function(info) @@ -357,7 +405,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_HC = { type = "color", - order = 4, + order = 5, name = "HC", hasAlpha = false, get = function(info) @@ -372,7 +420,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_M = { type = "color", - order = 5, + order = 6, name = "M", hasAlpha = false, get = function(info) @@ -387,7 +435,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_MP = { type = "color", - order = 6, + order = 7, name = "M+", hasAlpha = false, get = function(info) @@ -402,7 +450,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_LFR = { type = "color", - order = 7, + order = 8, name = "LFR", hasAlpha = false, get = function(info) @@ -417,7 +465,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_PVP = { type = "color", - order = 8, + order = 9, name = "PVP", hasAlpha = false, get = function(info) @@ -432,7 +480,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_TW = { type = "color", - order = 9, + order = 10, name = "TW", hasAlpha = false, get = function(info) @@ -447,7 +495,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_TG = { type = "color", - order = 10, + order = 11, name = "TG", hasAlpha = false, get = function(info) @@ -461,13 +509,13 @@ local function mInstanceDifficultyOptions() end, }, ID_Header_Other = { - order = 11, + order = 12, type = "header", name = L["Other Colors"], }, ID_Color_Name = { type = "color", - order = 12, + order = 13, name = L["Instance Name"], hasAlpha = false, get = function(info) @@ -482,7 +530,7 @@ local function mInstanceDifficultyOptions() }, ID_Color_Guild = { type = "color", - order = 13, + order = 14, name = L["Guild Group"], hasAlpha = false, get = function(info) @@ -496,13 +544,13 @@ local function mInstanceDifficultyOptions() end, }, ID_Header_Keylevel = { - order = 14, + order = 15, type = "header", name = L["M+ Keystone Level"], }, ID_Color_MA = { type = "color", - order = 15, + order = 16, name = "+2", hasAlpha = false, get = function(info) @@ -517,8 +565,8 @@ local function mInstanceDifficultyOptions() }, ID_Color_MB = { type = "color", - order = 16, - name = ">=10", + order = 17, + name = "<=9", hasAlpha = false, get = function(info) local t = E.db[mPlugin].mInstanceDifficulty.mpb @@ -532,8 +580,8 @@ local function mInstanceDifficultyOptions() }, ID_Color_MC = { type = "color", - order = 17, - name = ">=15", + order = 18, + name = "<=14", hasAlpha = false, get = function(info) local t = E.db[mPlugin].mInstanceDifficulty.mpc @@ -547,8 +595,8 @@ local function mInstanceDifficultyOptions() }, ID_Color_MD = { type = "color", - order = 18, - name = ">=20", + order = 19, + name = "<=19", hasAlpha = false, get = function(info) local t = E.db[mPlugin].mInstanceDifficulty.mpd @@ -562,8 +610,8 @@ local function mInstanceDifficultyOptions() }, ID_Color_ME = { type = "color", - order = 19, - name = "<=21", + order = 20, + name = "<=14", hasAlpha = false, get = function(info) local t = E.db[mPlugin].mInstanceDifficulty.mpe @@ -575,6 +623,65 @@ local function mInstanceDifficultyOptions() UodateColors() end, }, + ID_Color_MF = { + type = "color", + order = 21, + name = "<=29", + hasAlpha = false, + get = function(info) + local t = E.db[mPlugin].mInstanceDifficulty.mpf + return t.r, t.g, t.b + end, + set = function(info, r, g, b) + local t = E.db[mPlugin].mInstanceDifficulty.mpf + t.r, t.g, t.b, t.color = r, g, b, E:RGBToHex(r, g, b) + UodateColors() + end, + }, + ID_Header_Example = { + order = 30, + type = "header", + name = L["Example"], + }, + ID_Header_Test = { + order = 31, + type = "description", + name = function() + local tmpText = "" + tmpText = "[DIFFICULTY] = " .. + colors.nhc.color .. "N |r" .. " - " .. colors.hc.color .. "H |r" .. " - " .. colors.m.color .. "M |r " + tmpText = tmpText .. + colors.lfr.color .. "LFR |r" .. " - " .. colors.tw.color .. "TW |r" .. " - " .. colors.tg.color .. "TG |r " + tmpText = tmpText .. colors.pvp.color .. "PVP |r" .. " - " .. colors.mp.color .. "M+ |r\n" + tmpText = tmpText .. "[OTHERS] = " .. colors.name.color .. "NAME |r" .. " - " .. colors.guild.color .. "GUILD |r\n\n" + tmpText = tmpText .. "[KEYLEVELS]\n" + local color = {} + for i = 2, 29, 1 do + if i <= 9 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpa, E.db[mPlugin].mInstanceDifficulty.mpb, percentValue[i + ]) + elseif i <= 14 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpb, E.db[mPlugin].mInstanceDifficulty.mpc, percentValue[i + ]) + elseif i <= 19 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpc, E.db[mPlugin].mInstanceDifficulty.mpd, percentValue[i + ]) + elseif i <= 24 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpd, E.db[mPlugin].mInstanceDifficulty.mpe, percentValue[i + ]) + elseif i <= 29 then + color = mMT:ColorFade(E.db[mPlugin].mInstanceDifficulty.mpe, E.db[mPlugin].mInstanceDifficulty.mpf, percentValue[i + ]) + end + color = E:RGBToHex(color.r, color.g, color.b) + tmpText = tmpText .. color .. tostring(i) .. "|r " + end + + tmpText = tmpText .. "\n\n\n[DEMO]\n" .. colors.name.color .. "HOV |r\n" .. colors.m.color .. "M|r |CFFF7DC6F5|r" + + return tmpText + end, + }, } end diff --git a/misc/mNameplateTools.lua b/misc/mNameplateTools.lua index e22d47c4..5704b18f 100644 --- a/misc/mNameplateTools.lua +++ b/misc/mNameplateTools.lua @@ -154,11 +154,18 @@ function mMT:updateAutoRange() executeAutoRange.range = IsPlayerSpell(309072) and 35 or 20 end elseif class == "WARRIOR" then - local execute_Id = (specID == 72) and 280735 or 163201 - local massacre_Id = (specID == 72) and 206315 or 281001 - if IsPlayerSpell(execute_Id) or IsPlayerSpell(massacre_Id) then -- Execute or Massacre - executeAutoRange.enabel = true - executeAutoRange.range = IsPlayerSpell(massacre_Id) and 35 or 20 + if specID == 72 then + local execute_Id = (specID == 72) and 280735 or 163201 + local massacre_Id = (specID == 72) and 206315 or 281001 + if IsPlayerSpell(execute_Id) or IsPlayerSpell(massacre_Id) then -- Execute or Massacre + executeAutoRange.enabel = true + executeAutoRange.range = IsPlayerSpell(massacre_Id) and 35 or 20 + end + elseif specID == 73 then + if IsPlayerSpell(163201) then -- Execute + executeAutoRange.enabel = true + executeAutoRange.range = 20 + end end elseif class == "HUNTER" then if IsPlayerSpell(273887) or ((specID == 255) and IsPlayerSpell(385718)) then @@ -304,7 +311,7 @@ local function mNameplateTools(table, event, frame) healthMarkers(table, percent) end - if E.db[mPlugin].mExecutemarker.enable and (E.db[mPlugin].mExecutemarker.auto and not executeAutoRange.enabel) then + if E.db[mPlugin].mExecutemarker.enable then executeMarker(table, percent) end end