diff --git a/CHANGELOG.md b/CHANGELOG.md index 61f1320bf9..aedd0409da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +## Version 13.47 \[ November 7th 2023 \] +* Skinned role check frame (Wrath). +* Left buttons for Plugins now highlight again. +* Blacklisted auras "Tricked or Treated" and "Wicker Men's Curse". +* Aura Indicators now have Cooldown Text position settings (Filters > Aura Indicator). +* Aura Indicators now have Count Font and Outline settings (UnitFrame > Units > Frame > Aura Indicator). +* More fonts follow the Font Size setting. Unified Fonts was removed and Blizzard Font Size added which has different functionality, also an option to not Font Scale (General > Media > Fonts). +* Mage's Ice Cold and Alter Time added to Player Buffs and Turtle Buffs. +* Style Filter triggers "Amount Below" and "Amount Above" under Unit Conditions which reacts off the amount of visible Nameplates. +* Nameplate Portrait now has an option to prefer Specialization Icon instead of Class Icon. +* Nameplate Portrait Spec and Class Icon not have Keep Size Ratio option. +* Chat Tab text should be displayed fully when detached from the dock. +* Chat Tab not being selected after reloading. (Thanks Daenarys) +* 2D Portrait option removed, this was causing performance issues on Nameplates. +* Quest Icons code was optimized to further reduce strain on Nameplates. +* Quest Icons now have spacing and text offset options. +* **Tags** + * [permana] for mana added, like health and power tags. + * [target:last] and [target:abbrev] with variants for the unit's target. + * [spec:icon] and [spec] added which support other units and [specialization] is now the same as [spec]. + * [classpowercolor] and [classpower] supports other units, limited by Blizzard's API which means, it only works for Stagger. + ## Version 13.46 \[ October 26th 2023 \] * Guild Bank timeout error fixed. * Lowered Graveyard button to prevent overlap. diff --git a/ElvUI/Classic/Modules/Skins/Communities.lua b/ElvUI/Classic/Modules/Skins/Communities.lua index e5b0cc9716..67fadfe875 100644 --- a/ElvUI/Classic/Modules/Skins/Communities.lua +++ b/ElvUI/Classic/Modules/Skins/Communities.lua @@ -23,8 +23,7 @@ local function UpdateNames(button) if memberInfo and memberInfo.classID then local classInfo = C_CreatureInfo_GetClassInfo(memberInfo.classID) if classInfo then - local tcoords = _G.CLASS_ICON_TCOORDS[classInfo.classFile] - button.Class:SetTexCoord(tcoords[1] + .022, tcoords[2] - .025, tcoords[3] + .022, tcoords[4] - .025) + button.Class:SetTexCoord(E:GetClassCoords(classInfo.classFile, true)) end end end diff --git a/ElvUI/Classic/Modules/Skins/Friends.lua b/ElvUI/Classic/Modules/Skins/Friends.lua index 94f51e83ee..9051a2f876 100644 --- a/ElvUI/Classic/Modules/Skins/Friends.lua +++ b/ElvUI/Classic/Modules/Skins/Friends.lua @@ -254,7 +254,7 @@ function S:FriendsFrame() if info.filename then classTextColor = E:ClassColor(info.filename) button.icon:Show() - button.icon:SetTexCoord(unpack(_G.CLASS_ICON_TCOORDS[info.filename])) + button.icon:SetTexCoord(E:GetClassCoords(info.filename)) else classTextColor = _G.HIGHLIGHT_FONT_COLOR button.icon:Hide() @@ -348,7 +348,7 @@ function S:FriendsFrame() end end - button.icon:SetTexCoord(unpack(_G.CLASS_ICON_TCOORDS[classFileName])) + button.icon:SetTexCoord(E:GetClassCoords(classFileName)) end end else diff --git a/ElvUI/Classic/Modules/Skins/Raid.lua b/ElvUI/Classic/Modules/Skins/Raid.lua index 32a344cadb..e1f97c4164 100644 --- a/ElvUI/Classic/Modules/Skins/Raid.lua +++ b/ElvUI/Classic/Modules/Skins/Raid.lua @@ -81,6 +81,7 @@ function S:Blizzard_RaidUI() end count:FontTemplate(nil, 12, 'OUTLINE') + count:SetTextHeight(12) -- fixes blur end end diff --git a/ElvUI/Classic/Modules/Skins/Tooltip.lua b/ElvUI/Classic/Modules/Skins/Tooltip.lua index 4ef5745fdc..42da57a075 100644 --- a/ElvUI/Classic/Modules/Skins/Tooltip.lua +++ b/ElvUI/Classic/Modules/Skins/Tooltip.lua @@ -21,8 +21,8 @@ function S:StyleTooltips() _G.ShoppingTooltip2, _G.QuickKeybindTooltip, -- ours - _G.ElvUIConfigTooltip, - _G.ElvUISpellBookTooltip, + E.ConfigTooltip, + E.SpellBookTooltip, -- libs _G.LibDBIconTooltip, _G.SettingsTooltip, diff --git a/ElvUI/Core/Defaults/Global.lua b/ElvUI/Core/Defaults/Global.lua index 85b6a684d7..1185404c23 100644 --- a/ElvUI/Core/Defaults/Global.lua +++ b/ElvUI/Core/Defaults/Global.lua @@ -49,7 +49,7 @@ G.datatexts = { CombatIndicator = { OutOfCombat = '', InCombat = '', OutOfCombatColor = {r = 0, g = 0.8, b = 0}, InCombatColor = {r = 0.8, g = 0, b = 0} }, Currencies = { goldFormat = 'BLIZZARD', goldCoins = true, displayedCurrency = 'BACKPACK', displayStyle = 'ICON', tooltipData = {}, idEnable = {}, headers = true, maxCurrency = false }, Crit = { Label = '', NoLabel = false, decimalLength = 1 }, - Durability = { Label = '', NoLabel = false, percThreshold = 30 }, + Durability = { Label = '', NoLabel = false, percThreshold = 30, goldFormat = 'BLIZZARD', goldCoins = true }, DualSpecialization = { NoLabel = false }, ElvUI = { Label = '' }, ['Equipment Sets'] = { Label = '', NoLabel = false, NoIcon = false }, diff --git a/ElvUI/Core/Defaults/Private.lua b/ElvUI/Core/Defaults/Private.lua index f34ffc4bbf..dfc6289061 100644 --- a/ElvUI/Core/Defaults/Private.lua +++ b/ElvUI/Core/Defaults/Private.lua @@ -28,7 +28,8 @@ V.general = { replaceBubbleFont = true, replaceNameplateFont = true, replaceBlizzFonts = true, - unifiedBlizzFonts = false, + blizzardFontSize = false, + noFontScale = false, totemTracker = true, queueStatus = true, minimap = { diff --git a/ElvUI/Core/Defaults/Profile.lua b/ElvUI/Core/Defaults/Profile.lua index b707179808..fc4a11717d 100644 --- a/ElvUI/Core/Defaults/Profile.lua +++ b/ElvUI/Core/Defaults/Profile.lua @@ -577,7 +577,8 @@ local NP_PvPClassificationIndicator = { local NP_Portrait = { enable = false, position = 'RIGHT', - classicon = true, + specicon = E.Retail, + keepSizeRatio = true, height = 28, width = 28, xOffset = 3, @@ -669,12 +670,15 @@ local NP_QuestIcon = { enable = true, hideIcon = false, position = 'RIGHT', - textPosition = 'BOTTOMRIGHT', size = 20, xOffset = 0, yOffset = 0, + spacing = 5, font = 'PT Sans Narrow', fontOutline = 'OUTLINE', + textPosition = 'BOTTOMRIGHT', + textXOffset = 2, + textYOffset = 2, fontSize = 12 } @@ -1330,8 +1334,10 @@ local UF_AuraBars = { local UF_AuraWatch = { enable = false, profileSpecific = false, - size = 8, + countFont = 'PT Sans Narrow', + countFontOutline = 'OUTLINE', countFontSize = 12, + size = 8 } local UF_Castbar = { diff --git a/ElvUI/Core/Defaults/StyleFilters.lua b/ElvUI/Core/Defaults/StyleFilters.lua index e6ee073cbc..d569a722d5 100644 --- a/ElvUI/Core/Defaults/StyleFilters.lua +++ b/ElvUI/Core/Defaults/StyleFilters.lua @@ -139,6 +139,8 @@ E.StyleFilterDefaults = { curlevel = 0, maxlevel = 0, minlevel = 0, + amountAbove = 0, + amountBelow = 0, healthThreshold = false, healthUsePlayer = false, underHealthThreshold = 0, diff --git a/ElvUI/Core/Developer/Frame.lua b/ElvUI/Core/Developer/Frame.lua index f3cf0cdcc2..e2c070e4f2 100644 --- a/ElvUI/Core/Developer/Frame.lua +++ b/ElvUI/Core/Developer/Frame.lua @@ -44,7 +44,7 @@ AddCommand('DEVCON', '/devcon', function() end end) --- /rl, /reloadui, /reload NOTE: /reload is from SLASH_RELOAD +-- /rl, /reloadui, /reload NOTE: /reload is from SLASH_RELOAD AddCommand('RELOADUI', {'/rl','/reloadui'}, _G.ReloadUI) AddCommand('GETPOINT', '/getpoint', function(arg) diff --git a/ElvUI/Core/Filters/Filters.lua b/ElvUI/Core/Filters/Filters.lua index 4e4f4ebb94..7d5d9de58b 100644 --- a/ElvUI/Core/Filters/Filters.lua +++ b/ElvUI/Core/Filters/Filters.lua @@ -39,6 +39,9 @@ E.Filters.Aura = function(auraID, includeIDs, point, color, anyUnit, onlyShowMis yOffset = yOffset or 0, style = 'coloredIcon', sizeOffset = 0, + cooldownAnchor = 'CENTER', + cooldownX = 1, + cooldownY = 1, countAnchor = 'BOTTOMRIGHT', countX = 1, countY = 1 diff --git a/ElvUI/Core/General/API.lua b/ElvUI/Core/General/API.lua index 66834d42c3..22e70d2caf 100644 --- a/ElvUI/Core/General/API.lua +++ b/ElvUI/Core/General/API.lua @@ -2,10 +2,11 @@ -- Collection of functions that can be used in multiple places ------------------------------------------------------------------------ local E, L, V, P, G = unpack(ElvUI) +local TT = E:GetModule('Tooltip') local LCS = E.Libs.LCS local _G = _G -local wipe, max, next = wipe, max, next +local wipe, max, next, tinsert = wipe, max, next, tinsert local type, ipairs, pairs, unpack = type, ipairs, pairs, unpack local strfind, strlen, tonumber, tostring = strfind, strlen, tonumber, tostring local hooksecurefunc = hooksecurefunc @@ -13,8 +14,10 @@ local hooksecurefunc = hooksecurefunc local CreateFrame = CreateFrame local GetAddOnEnableState = GetAddOnEnableState local GetBattlefieldArenaFaction = GetBattlefieldArenaFaction +local GetClassInfo = GetClassInfo local GetInstanceInfo = GetInstanceInfo local GetNumGroupMembers = GetNumGroupMembers +local GetSpecializationInfoForSpecID = GetSpecializationInfoForSpecID local HideUIPanel = HideUIPanel local InCombatLockdown = InCombatLockdown local IsAddOnLoaded = IsAddOnLoaded @@ -36,11 +39,15 @@ local UnitHasVehicleUI = UnitHasVehicleUI local UnitInParty = UnitInParty local UnitInRaid = UnitInRaid local UnitIsMercenary = UnitIsMercenary +local UnitIsPlayer = UnitIsPlayer local UnitIsUnit = UnitIsUnit local GetSpecialization = (E.Classic or E.Wrath) and LCS.GetSpecialization or GetSpecialization local GetSpecializationRole = (E.Classic or E.Wrath) and LCS.GetSpecializationRole or GetSpecializationRole +local C_TooltipInfo_GetUnit = C_TooltipInfo and C_TooltipInfo.GetUnit +local C_TooltipInfo_GetHyperlink = C_TooltipInfo and C_TooltipInfo.GetHyperlink +local C_TooltipInfo_GetInventoryItem = C_TooltipInfo and C_TooltipInfo.GetInventoryItem local C_MountJournal_GetMountIDs = C_MountJournal and C_MountJournal.GetMountIDs local C_MountJournal_GetMountInfoByID = C_MountJournal and C_MountJournal.GetMountInfoByID local C_MountJournal_GetMountInfoExtraByID = C_MountJournal and C_MountJournal.GetMountInfoExtraByID @@ -64,6 +71,96 @@ E.MountIDs = {} E.MountText = {} E.MountDragons = {} +E.SpecInfoBySpecClass = {} -- ['Protection Warrior'] = specInfo (table) +E.SpecInfoBySpecID = {} -- [250] = specInfo (table) + +E.SpecByClass = { + DEATHKNIGHT = { 250, 251, 252 }, + DEMONHUNTER = { 577, 581 }, + DRUID = { 102, 103, 104, 105 }, + EVOKER = { 1467, 1468, 1473}, + HUNTER = { 253, 254, 255 }, + MAGE = { 62, 63, 64 }, + MONK = { 268, 270, 269 }, + PALADIN = { 65, 66, 70 }, + PRIEST = { 256, 257, 258 }, + ROGUE = { 259, 260, 261 }, + SHAMAN = { 262, 263, 264 }, + WARLOCK = { 265, 266, 267 }, + WARRIOR = { 71, 72, 73 }, +} + +E.ClassName = { -- english locale + DEATHKNIGHT = 'Death Knight', + DEMONHUNTER = 'Demon Hunter', + DRUID = 'Druid', + EVOKER = 'Evoker', + HUNTER = 'Hunter', + MAGE = 'Mage', + MONK = 'Monk', + PALADIN = 'Paladin', + PRIEST = 'Priest', + ROGUE = 'Rogue', + SHAMAN = 'Shaman', + WARLOCK = 'Warlock', + WARRIOR = 'Warrior', +} + +E.SpecName = { -- english locale + -- Death Knight + [250] = 'Blood', + [251] = 'Frost', + [252] = 'Unholy', + -- Demon Hunter + [577] = 'Havoc', + [581] = 'Vengeance', + -- Druids + [102] = 'Balance', + [103] = 'Feral', + [104] = 'Guardian', + [105] = 'Restoration', + -- Evoker + [1467] = 'Devastation', + [1468] = 'Preservation', + [1473] = 'Augmentation', + -- Hunter + [253] = 'Beast Mastery', + [254] = 'Marksmanship', + [255] = 'Survival', + -- Mage + [62] = 'Arcane', + [63] = 'Fire', + [64] = 'Frost', + -- Monk + [268] = 'Brewmaster', + [270] = 'Mistweaver', + [269] = 'Windwalker', + -- Paladin + [65] = 'Holy', + [66] = 'Protection', + [70] = 'Retribution', + -- Priest + [256] = 'Discipline', + [257] = 'Holy', + [258] = 'Shadow', + -- Rogue + [259] = 'Assasination', + [260] = 'Combat', + [261] = 'Sublety', + -- Shaman + [262] = 'Elemental', + [263] = 'Enhancement', + [264] = 'Restoration', + -- Walock + [265] = 'Affliction', + [266] = 'Demonology', + [267] = 'Destruction', + -- Warrior + [71] = 'Arms', + [72] = 'Fury', + [73] = 'Protection', +} + function E:ClassColor(class, usePriestColor) if not class then return end @@ -101,7 +198,7 @@ do -- other non-english locales require this for k, v in pairs(_G.LOCALIZED_CLASS_NAMES_FEMALE) do E.UnlocalizedClasses[v] = k end function E:UnlocalizedClassName(className) - return (className and className ~= '') and E.UnlocalizedClasses[className] + return E.UnlocalizedClasses[className] end end @@ -197,7 +294,7 @@ function E:GetPlayerRole() end function E:CheckRole() - E.myspec = E.Retail and GetSpecialization() + E.myspec = GetSpecialization() E.myrole = E:GetPlayerRole() end @@ -651,6 +748,114 @@ function E:IsDragonRiding() -- currently unused, was used to help actionbars fad end end +function E:CompatibleTooltip(tt) -- knock off compatibility + if tt.GetTooltipData then return end -- real support exists + + local info = { name = tt:GetName(), lines = {} } + info.leftTextName = info.name .. 'TextLeft' + info.rightTextName = info.name .. 'TextRight' + + tt.GetTooltipData = function() + wipe(info.lines) + + for i = 1, tt:NumLines() do + local left = _G[info.leftTextName..i] + local leftText = left and left:GetText() or nil + + local right = _G[info.rightTextName..i] + local rightText = right and right:GetText() or nil + + tinsert(info.lines, i, { lineIndex = i, leftText = leftText, rightText = rightText }) + end + + return info + end +end + +function E:GetUnitSpecInfo(unit) + if not UnitIsPlayer(unit) then return end + + E.ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE') + E.ScanTooltip:SetUnit(unit) + E.ScanTooltip:Show() + + local _, specLine = TT:GetLevelLine(E.ScanTooltip, 1, true) + local specText = specLine and specLine.leftText + if specText then + return E.SpecInfoBySpecClass[specText] + end +end + +function E:GetClassCoords(classFile, crop, get) + local t = _G.CLASS_ICON_TCOORDS[classFile] + if not t then return 0, 1, 0, 1 end + + if get then + return t + elseif type(crop) == 'number' then + return t[1] + crop, t[2] - crop, t[3] + crop, t[4] - crop + elseif crop then + return t[1] + 0.022, t[2] - 0.025, t[3] + 0.022, t[4] - 0.025 + else + return t[1], t[2], t[3], t[4] + end +end + +function E:CropRatio(frame, coords, mult) + local left, right, top, bottom = unpack(coords or E.TexCoords) + if not mult then mult = 0.5 end + + local width, height = frame:GetSize() + local ratio = width / height + if ratio > 1 then + local trimAmount = (1 - (1 / ratio)) * mult + top = top + trimAmount + bottom = bottom - trimAmount + else + local trimAmount = (1 - ratio) * mult + left = left + trimAmount + right = right - trimAmount + end + + return left, right, top, bottom +end + +function E:ScanTooltip_UnitInfo(unit) + if C_TooltipInfo_GetUnit then + return C_TooltipInfo_GetUnit(unit) + else + E.ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE') + E.ScanTooltip:SetUnit(unit) + E.ScanTooltip:Show() + + return E.ScanTooltip:GetTooltipData() + end +end + +function E:ScanTooltip_InventoryInfo(unit, slot) + if C_TooltipInfo_GetInventoryItem then + return C_TooltipInfo_GetInventoryItem(unit, slot) + else + E.ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE') + E.ScanTooltip:SetInventoryItem(unit, slot) + E.ScanTooltip:Show() + + return E.ScanTooltip:GetTooltipData() + end +end + +function E:ScanTooltip_HyperlinkInfo(link) + if C_TooltipInfo_GetHyperlink then + return C_TooltipInfo_GetHyperlink(link) + else + E.ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE') + E.ScanTooltip:SetHyperlink(link) + E.ScanTooltip:Show() + + return E.ScanTooltip:GetTooltipData() + end +end + function E:LoadAPI() E:RegisterEvent('PLAYER_LEVEL_UP') E:RegisterEvent('PLAYER_ENTERING_WORLD') @@ -672,12 +877,71 @@ function E:LoadAPI() end end + do -- fill the spec info tables + local MALE = _G.LOCALIZED_CLASS_NAMES_MALE + local FEMALE = _G.LOCALIZED_CLASS_NAMES_FEMALE + + local i = 1 + local className, classFile, classID = GetClassInfo(i) + local male, female = MALE[classFile], FEMALE[classFile] + while classID do + for index, id in next, E.SpecByClass[classFile] do + local info = { + id = id, + index = index, + classFile = classFile, + className = className, + englishName = E.SpecName[id] + } + + E.SpecInfoBySpecID[id] = info + + for x = 3, 1, -1 do + local _, name, desc, icon, role = GetSpecializationInfoForSpecID(id, x) + + if x == 1 then -- SpecInfoBySpecID + info.name = name + info.desc = desc + info.icon = icon + info.role = role + + E.SpecInfoBySpecClass[name..' '..className] = info + else + local copy = E:CopyTable({}, info) + copy.name = name + copy.desc = desc + copy.icon = icon + copy.role = role + + local localized = (x == 3 and female) or male + copy.className = localized + + E.SpecInfoBySpecClass[name..' '..localized] = copy + end + end + end + + i = i + 1 + className, classFile, classID = GetClassInfo(i) + male, female = MALE[classFile], FEMALE[classFile] + end + end + E:RegisterEvent('NEUTRAL_FACTION_SELECT_RESULT') E:RegisterEvent('PET_BATTLE_CLOSE', 'AddNonPetBattleFrames') E:RegisterEvent('PET_BATTLE_OPENING_START', 'RemoveNonPetBattleFrames') E:RegisterEvent('PLAYER_SPECIALIZATION_CHANGED', 'CheckRole') + else + E:CompatibleTooltip(E.ScanTooltip) + E:CompatibleTooltip(E.ConfigTooltip) + E:CompatibleTooltip(E.SpellBookTooltip) + E:CompatibleTooltip(_G.GameTooltip) end + E.ScanTooltip.GetUnitInfo = E.ScanTooltip_UnitInfo + E.ScanTooltip.GetHyperlinkInfo = E.ScanTooltip_HyperlinkInfo + E.ScanTooltip.GetInventoryInfo = E.ScanTooltip_InventoryInfo + if E.Retail or E.Wrath then E:RegisterEvent('UNIT_ENTERED_VEHICLE', 'EnterVehicleHideFrames') E:RegisterEvent('UNIT_EXITED_VEHICLE', 'ExitVehicleShowFrames') diff --git a/ElvUI/Core/General/Config.lua b/ElvUI/Core/General/Config.lua index d1cced4fd2..5ffcfef67c 100644 --- a/ElvUI/Core/General/Config.lua +++ b/ElvUI/Core/General/Config.lua @@ -24,11 +24,8 @@ local UIParent = UIParent local EditBox_HighlightText = EditBox_HighlightText local EditBox_ClearFocus = EditBox_ClearFocus -local RESET = RESET -- GLOBALS: ElvUIMoverNudgeWindow, ElvUIMoverPopupWindow, ElvUIMoverPopupWindowDropDown -local ConfigTooltip = CreateFrame('GameTooltip', 'ElvUIConfigTooltip', E.UIParent, 'GameTooltipTemplate') - local grid E.ConfigModeLayouts = { 'ALL', @@ -505,7 +502,7 @@ function E:CreateMoverPopup() nudgeFrame.yOffset = yOffset local resetButton = CreateFrame('Button', nudgeFrame:GetName()..'ResetButton', nudgeFrame, 'UIPanelButtonTemplate') - resetButton:SetText(RESET) + resetButton:SetText(L["Reset"]) resetButton:Point('TOP', nudgeFrame, 'CENTER', 0, 2) resetButton:Size(100, 25) resetButton:SetScript('OnClick', function() @@ -623,17 +620,17 @@ function E:Config_StopMoving() end function E:Config_ButtonOnEnter() - if ConfigTooltip:IsForbidden() or not self.desc then return end + if E.ConfigTooltip:IsForbidden() or not self.desc then return end - ConfigTooltip:SetOwner(self, 'ANCHOR_TOPRIGHT', 0, 2) - ConfigTooltip:AddLine(self.desc, 1, 1, 1, true) - ConfigTooltip:Show() + E.ConfigTooltip:SetOwner(self, 'ANCHOR_TOPRIGHT', 0, 2) + E.ConfigTooltip:AddLine(self.desc, 1, 1, 1, true) + E.ConfigTooltip:Show() end function E:Config_ButtonOnLeave() - if ConfigTooltip:IsForbidden() then return end + if E.ConfigTooltip:IsForbidden() then return end - ConfigTooltip:Hide() + E.ConfigTooltip:Hide() end function E:Config_RepositionOnEnter() @@ -838,7 +835,7 @@ function E:Config_UpdateLeftButtons() if not (frame and frame.leftHolder) then return end local _, selected = E:Config_GetStatus(frame) - for _, btn in ipairs(frame.leftHolder.buttons) do + for _, btn in next, frame.leftHolder.buttons do if type(btn) == 'table' and btn.IsObjectType and btn:IsObjectType('Button') then local enabled = btn.info.key == selected E:Config_SetButtonColor(btn, enabled) @@ -973,7 +970,6 @@ function E:Config_CreateLeftButtons(frame, unskinned, options) last = E:Config_HandleLeftButton(info, frame, unskinned, buttons, last, index) end end - end function E:Config_CloseClicked() @@ -985,16 +981,16 @@ end function E:Config_CloseWindow() ACD:Close('ElvUI') - if not ConfigTooltip:IsForbidden() then - ConfigTooltip:Hide() + if not E.ConfigTooltip:IsForbidden() then + E.ConfigTooltip:Hide() end end function E:Config_OpenWindow() ACD:Open('ElvUI') - if not ConfigTooltip:IsForbidden() then - ConfigTooltip:Hide() + if not E.ConfigTooltip:IsForbidden() then + E.ConfigTooltip:Hide() end end diff --git a/ElvUI/Core/General/Fonts.lua b/ElvUI/Core/General/Fonts.lua index 840b5a6025..3edeb761b5 100644 --- a/ElvUI/Core/General/Fonts.lua +++ b/ElvUI/Core/General/Fonts.lua @@ -27,7 +27,6 @@ function E:SetFont(obj, font, size, style, sR, sG, sB, sA, sX, sY, r, g, b, a) end local lastFont = {} -local chatFontHeights = {6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20} function E:UpdateBlizzardFonts() local db = E.private.general local NORMAL = E.media.normFont @@ -37,8 +36,6 @@ function E:UpdateBlizzardFonts() -- set an invisible font for xp, honor kill, etc local COMBAT = (E.eyefinity or E.ultrawide) and E.Media.Fonts.Invisible or LSM:Fetch('font', db.dmgfont) - _G.CHAT_FONT_HEIGHTS = chatFontHeights - if db.replaceNameFont then _G.UNIT_NAME_FONT = NAMEFONT end if db.replaceCombatFont then _G.DAMAGE_TEXT_FONT = COMBAT end if db.replaceCombatText then -- Blizzard_CombatText @@ -59,8 +56,8 @@ function E:UpdateBlizzardFonts() end if db.replaceBlizzFonts then - local size, style, stock = E.db.general.fontSize, E.db.general.fontStyle, not db.unifiedBlizzFonts - if lastFont.font == NORMAL and lastFont.size == size and lastFont.style == style and lastFont.stock == stock then + local size, style, blizz, noscale = E.db.general.fontSize, E.db.general.fontStyle, db.blizzardFontSize, db.noFontScale + if lastFont.font == NORMAL and lastFont.size == size and lastFont.style == style and lastFont.blizz == blizz and lastFont.noscale == noscale then return -- only execute this when needed as it's excessive to reset all of these end @@ -69,128 +66,156 @@ function E:UpdateBlizzardFonts() lastFont.font = NORMAL lastFont.size = size lastFont.style = style - lastFont.stock = stock - - local enormous = size * 1.9 - local mega = size * 1.7 - local huge = size * 1.5 - local large = size * 1.3 - local medium = size * 1.1 - local small = size * 0.9 - local tiny = size * 0.8 - + lastFont.blizz = blizz + lastFont.noscale = noscale + + --> large fonts (over x2) + local yourmom = size * 4.5 -- 54 + local titanic = size * 4.0 -- 48 + local monstrous = size * 3.5 -- 42 + local colossal = size * 3.0 -- 36 + local massive = size * 2.5 -- 30 + local gigantic = size * 2.0 -- 24 + + --> normal fonts + local enormous = size * 1.9 -- 22.8 + local mega = size * 1.7 -- 20.4 + local huge = size * 1.5 -- 18 + local large = size * 1.3 -- 15.6 + local big = size * 1.2 -- 14.4 + local medium = size * 1.1 -- 13.2 + local unscale = noscale and size -- 12 + + --> small fonts (under x1) + local small = size * 0.9 -- 10.8 + local tiny = size * 0.8 -- 9.6 + + -- handle outlines local prefix = strmatch(style, '(SHADOW)') or strmatch(style, '(MONOCHROME)') or '' local thick, outline = prefix..'THICKOUTLINE', prefix..'OUTLINE' - E:SetFont(_G.AchievementFont_Small, NORMAL, stock and small or size) -- 10 Achiev dates - E:SetFont(_G.BossEmoteNormalHuge, NORMAL, 24, 'SHADOW') -- Talent Title - E:SetFont(_G.CoreAbilityFont, NORMAL, 26) -- 32 Core abilities, title - E:SetFont(_G.DestinyFontHuge, NORMAL, 32) -- Garrison Mission Report - E:SetFont(_G.DestinyFontMed, NORMAL, 14) -- Added in 7.3.5 used for ? - E:SetFont(_G.Fancy12Font, NORMAL, 12) -- Added in 7.3.5 used for ? - E:SetFont(_G.Fancy14Font, NORMAL, 14) -- Added in 7.3.5 used for ? - E:SetFont(_G.Fancy22Font, NORMAL, stock and 22 or 20) -- Talking frame Title font - E:SetFont(_G.Fancy24Font, NORMAL, stock and 24 or 20) -- Artifact frame - weapon name - E:SetFont(_G.FriendsFont_11, NORMAL, 11, 'SHADOW') - E:SetFont(_G.FriendsFont_Large, NORMAL, stock and large or size, 'SHADOW') -- 14 - E:SetFont(_G.FriendsFont_Normal, NORMAL, size, 'SHADOW') -- 12 - E:SetFont(_G.FriendsFont_Small, NORMAL, stock and small or size, 'SHADOW') -- 10 - E:SetFont(_G.FriendsFont_UserText, NORMAL, size, 'SHADOW') -- 11 - E:SetFont(_G.Game10Font_o1, NORMAL, 10, 'OUTLINE') - E:SetFont(_G.Game120Font, NORMAL, 120) - E:SetFont(_G.Game12Font, NORMAL, 12) -- PVP Stuff - E:SetFont(_G.Game13FontShadow, NORMAL, stock and 13 or 14, 'SHADOW') -- InspectPvpFrame - E:SetFont(_G.Game15Font_o1, NORMAL, 15) -- CharacterStatsPane, ItemLevelFrame - E:SetFont(_G.Game16Font, NORMAL, 16) -- Added in 7.3.5 used for ? - E:SetFont(_G.Game18Font, NORMAL, 18) -- MissionUI Bonus Chance - E:SetFont(_G.Game24Font, NORMAL, 24) -- Garrison Mission level, in detail frame - E:SetFont(_G.Game30Font, NORMAL, 30) -- Mission Level - E:SetFont(_G.Game40Font, NORMAL, 40) - E:SetFont(_G.Game42Font, NORMAL, 42) -- PVP Stuff - E:SetFont(_G.Game46Font, NORMAL, 46) -- Added in 7.3.5 used for ? - E:SetFont(_G.Game48Font, NORMAL, 48) - E:SetFont(_G.Game48FontShadow, NORMAL, 48, 'SHADOW') - E:SetFont(_G.Game60Font, NORMAL, 60) - E:SetFont(_G.Game72Font, NORMAL, 72) - E:SetFont(_G.GameFont_Gigantic, NORMAL, 32, 'SHADOW') -- Used at the install steps - E:SetFont(_G.GameFontHighlightMedium, NORMAL, stock and medium or 15, 'SHADOW') -- 14 Fix QuestLog Title mouseover - E:SetFont(_G.GameFontHighlightSmall2, NORMAL, stock and small or size, 'SHADOW') -- 11 Skill or Recipe description on TradeSkill frame - E:SetFont(_G.GameFontHighlightHuge2, NORMAL, stock and huge or 24, 'SHADOW') - E:SetFont(_G.GameFontNormalHuge2, NORMAL, stock and huge or 24, 'SHADOW') -- 24 Mythic weekly best dungeon name - E:SetFont(_G.GameFontNormalLarge, NORMAL, stock and large or 16, 'SHADOW') -- 16 - E:SetFont(_G.GameFontNormalLarge2, NORMAL, stock and large or 15, 'SHADOW') -- 18 Garrison Follower Names - E:SetFont(_G.GameFontNormalMed1, NORMAL, stock and medium or 14, 'SHADOW') -- 13 WoW Token Info - E:SetFont(_G.GameFontNormalMed2, NORMAL, stock and medium or medium, 'SHADOW') -- 14 Quest tracker - E:SetFont(_G.GameFontNormalMed3, NORMAL, stock and medium or 15, 'SHADOW') -- 14 - E:SetFont(_G.GameFontNormalSmall2, NORMAL, stock and small or 12, 'SHADOW') -- 11 MissionUI Followers names - E:SetFont(_G.GameTooltipHeader, NORMAL, size) -- 14 - E:SetFont(_G.InvoiceFont_Med, NORMAL, stock and size or 12) -- 12 Mail - E:SetFont(_G.InvoiceFont_Small, NORMAL, stock and small or size) -- 10 Mail - E:SetFont(_G.MailFont_Large, NORMAL, 14) -- 10 Mail - E:SetFont(_G.Number11Font, NORMAL, 11) - E:SetFont(_G.Number11Font, NUMBER, 11) - E:SetFont(_G.Number12Font, NORMAL, 12) - E:SetFont(_G.Number12Font_o1, NUMBER, 12, 'OUTLINE') - E:SetFont(_G.Number13Font, NUMBER, 13) - E:SetFont(_G.Number13FontGray, NUMBER, 13, 'SHADOW') - E:SetFont(_G.Number13FontWhite, NUMBER, 13, 'SHADOW') - E:SetFont(_G.Number13FontYellow, NUMBER, 13, 'SHADOW') - E:SetFont(_G.Number14FontGray, NUMBER, 14, 'SHADOW') - E:SetFont(_G.Number14FontWhite, NUMBER, 14, 'SHADOW') - E:SetFont(_G.Number15Font, NORMAL, 15) - E:SetFont(_G.Number18Font, NUMBER, 18) - E:SetFont(_G.Number18FontWhite, NUMBER, 18, 'SHADOW') - E:SetFont(_G.NumberFont_Outline_Huge, NUMBER, stock and huge or 28, thick) -- 30 - E:SetFont(_G.NumberFont_Outline_Large, NUMBER, stock and large or 15, outline) -- 16 - E:SetFont(_G.NumberFont_Outline_Med, NUMBER, medium, 'OUTLINE') -- 14 - E:SetFont(_G.NumberFont_OutlineThick_Mono_Small, NUMBER, size, 'OUTLINE') -- 12 - E:SetFont(_G.NumberFont_Shadow_Med, NORMAL, stock and medium or size, 'SHADOW') -- 14 Chat EditBox - E:SetFont(_G.NumberFont_Shadow_Small, NORMAL, stock and small or size, 'SHADOW') -- 12 - E:SetFont(_G.NumberFontNormalSmall, NORMAL, stock and small or 11, 'OUTLINE') -- 12 Calendar, EncounterJournal - E:SetFont(_G.PriceFont, NORMAL, 13) - E:SetFont(_G.PVPArenaTextString, NORMAL, 22, outline) - E:SetFont(_G.PVPInfoTextString, NORMAL, 22, outline) - E:SetFont(_G.QuestFont, NORMAL, size) -- 13 - E:SetFont(_G.QuestFont_Large, NORMAL, stock and large or 14) -- 14 - E:SetFont(_G.QuestFont_Larger, NORMAL, 16) -- Wrath - E:SetFont(_G.QuestFont_39, NORMAL, 39) -- Wrath - E:SetFont(_G.QuestFont_Huge, NORMAL, stock and huge or 15) -- 18 Quest rewards title, Rewards - E:SetFont(_G.QuestFont_Super_Huge, NORMAL, stock and mega or 22) -- 24 - E:SetFont(_G.QuestFont_Enormous, NORMAL, stock and enormous or 24) -- 30 Garrison Titles - E:SetFont(_G.QuestFont_Shadow_Small, NORMAL, stock and size or 14, 'SHADOW', 0.49, 0.35, 0.05, 1) -- 14 - E:SetFont(_G.QuestFont_Shadow_Huge, NORMAL, stock and huge or 15, 'SHADOW', 0.49, 0.35, 0.05, 1) -- 18 Quest Title - E:SetFont(_G.QuestFont_Shadow_Super_Huge, NORMAL, stock and mega or 22, 'SHADOW', 0.49, 0.35, 0.05, 1) - E:SetFont(_G.QuestFont_Shadow_Enormous, NORMAL, stock and enormous or 24, 'SHADOW', 0.49, 0.35, 0.05, 1) - E:SetFont(_G.ReputationDetailFont, NORMAL, size, 'SHADOW') -- 10 Rep Desc when clicking a rep - E:SetFont(_G.SpellFont_Small, NORMAL, 10) - E:SetFont(_G.SubSpellFont, NORMAL, 10) -- Spellbook Sub Names - E:SetFont(_G.SubZoneTextFont, NORMAL, 24, outline) -- 26 WorldMap, SubZone - E:SetFont(_G.SubZoneTextString, NORMAL, 25, outline) -- 26 - E:SetFont(_G.SystemFont_Huge1, NORMAL, 20) -- Garrison Mission XP - E:SetFont(_G.SystemFont_Huge1_Outline, NORMAL, 18, outline) -- 20 Garrison Mission Chance - E:SetFont(_G.SystemFont_Huge2, NORMAL, 22) -- 22 Mythic+ Score - E:SetFont(_G.SystemFont_Large, NORMAL, stock and large or 16) -- 16 - E:SetFont(_G.SystemFont_Med1, NORMAL, stock and size or 12) -- 12 - E:SetFont(_G.SystemFont_Med2, NORMAL, stock and medium or 13) -- 13 - E:SetFont(_G.SystemFont_Med3, NORMAL, stock and medium or 14) -- 14 - E:SetFont(_G.SystemFont_Outline, NORMAL, stock and size or 13, outline) -- 13 WorldMap, Pet level - E:SetFont(_G.SystemFont_Outline_Small, NUMBER, stock and small or size, 'OUTLINE') -- 10 - E:SetFont(_G.SystemFont_OutlineThick_Huge2, NORMAL, stock and huge or 20, thick) -- 22 - E:SetFont(_G.SystemFont_OutlineThick_WTF, NORMAL, stock and enormous or 32, outline) -- 32 WorldMap - E:SetFont(_G.SystemFont_Shadow_Huge1, NORMAL, 20, outline) -- Raid Warning, Boss emote frame too - E:SetFont(_G.SystemFont_Shadow_Huge3, NORMAL, 22, 'SHADOW') -- 25 FlightMap - E:SetFont(_G.SystemFont_Shadow_Huge4, NORMAL, 27, 'SHADOW') - E:SetFont(_G.SystemFont_Shadow_Large, NORMAL, 15, 'SHADOW') - E:SetFont(_G.SystemFont_Shadow_Large2, NORMAL, 18, 'SHADOW') -- Auction House ItemDisplay - E:SetFont(_G.SystemFont_Shadow_Large_Outline, NUMBER, 20, 'SHADOWOUTLINE') -- 16 - E:SetFont(_G.SystemFont_Shadow_Med1, NORMAL, size, 'SHADOW') -- 12 - E:SetFont(_G.SystemFont_Shadow_Med2, NORMAL, stock and medium or 14.3, 'SHADOW') -- 14 Shows Order resourses on OrderHallTalentFrame - E:SetFont(_G.SystemFont_Shadow_Med3, NORMAL, medium, 'SHADOW') -- 14 - E:SetFont(_G.SystemFont_Shadow_Small, NORMAL, small, 'SHADOW') -- 10 - E:SetFont(_G.SystemFont_Small, NORMAL, stock and small or size) -- 10 - E:SetFont(_G.SystemFont_Tiny, NORMAL, stock and tiny or size) -- 09 - E:SetFont(_G.Tooltip_Med, NORMAL, size) -- 12 - E:SetFont(_G.Tooltip_Small, NORMAL, stock and small or size) -- 10 - E:SetFont(_G.ZoneTextString, NORMAL, stock and enormous or 32, outline) -- 32 + -- Raid Warnings look blurry when animated, even without addons. This is due to a mismatch between Font Size and SetTextHeight. + -- RaidBossEmoteFramePrivate: The size of this cant be changed without looking blurry. We have no access to its RAID_NOTICE_MIN_HEIGHT and RAID_NOTICE_MAX_HEIGHT. + E:SetFont(_G.GameFontNormalHuge, NORMAL, 20, outline) -- RaidWarning and RaidBossEmote Text + + -- number fonts + E:SetFont(_G.Number11Font, NUMBER, (blizz and 11) or unscale or small) + E:SetFont(_G.Number11Font, NUMBER, (blizz and 11) or unscale or small) + E:SetFont(_G.Number12Font, NUMBER, (blizz and 12) or unscale or size) + E:SetFont(_G.Number12Font_o1, NUMBER, (blizz and 12) or unscale or size, 'OUTLINE') + E:SetFont(_G.NumberFont_OutlineThick_Mono_Small, NUMBER, (blizz and 12) or unscale or size, 'OUTLINE') + E:SetFont(_G.NumberFont_Shadow_Small, NUMBER, (blizz and 12) or unscale or size, 'SHADOW') + E:SetFont(_G.NumberFont_Small, NUMBER, (blizz and 12) or unscale or size) + E:SetFont(_G.NumberFontNormalSmall, NUMBER, (blizz and 12) or unscale or size, 'OUTLINE') -- Calendar, EncounterJournal + E:SetFont(_G.Number13Font, NUMBER, (blizz and 13) or unscale or medium) + E:SetFont(_G.Number13FontGray, NUMBER, (blizz and 13) or unscale or medium, 'SHADOW') + E:SetFont(_G.Number13FontWhite, NUMBER, (blizz and 13) or unscale or medium, 'SHADOW') + E:SetFont(_G.Number13FontYellow, NUMBER, (blizz and 13) or unscale or medium, 'SHADOW') + E:SetFont(_G.Number14FontGray, NUMBER, (blizz and 14) or unscale or medium, 'SHADOW') + E:SetFont(_G.Number14FontWhite, NUMBER, (blizz and 14) or unscale or medium, 'SHADOW') + E:SetFont(_G.NumberFont_Outline_Med, NUMBER, (blizz and 14) or unscale or medium, 'OUTLINE') + E:SetFont(_G.NumberFont_Shadow_Med, NUMBER, (blizz and 14) or unscale or medium, 'SHADOW') -- Chat EditBox + E:SetFont(_G.NumberFontNormal, NUMBER, (blizz and 14) or unscale or medium, 'OUTLINE') + E:SetFont(_G.Number15Font, NUMBER, (blizz and 15) or unscale or medium) + E:SetFont(_G.NumberFont_Outline_Large, NUMBER, (blizz and 16) or unscale or big, outline) + E:SetFont(_G.Number18Font, NUMBER, (blizz and 18) or unscale or big) + E:SetFont(_G.Number18FontWhite, NUMBER, (blizz and 18) or unscale or big, 'SHADOW') + E:SetFont(_G.NumberFont_Outline_Huge, NUMBER, (blizz and 30) or unscale or enormous, thick) + + -- quest fonts (shadow variants) + E:SetFont(_G.QuestFont_Shadow_Small, NORMAL, (blizz and 14) or unscale or medium, 'SHADOW', 0.49, 0.35, 0.05, 1) + E:SetFont(_G.QuestFont_Shadow_Huge, NORMAL, (blizz and 20) or unscale or large, 'SHADOW', 0.49, 0.35, 0.05, 1) -- Quest Title + E:SetFont(_G.QuestFont_Shadow_Super_Huge, NORMAL, (blizz and 22) or unscale or large, 'SHADOW', 0.49, 0.35, 0.05, 1) + E:SetFont(_G.QuestFont_Shadow_Enormous, NORMAL, (blizz and 25) or unscale or mega, 'SHADOW', 0.49, 0.35, 0.05, 1) + + -- game fonts + E:SetFont(_G.SystemFont_Tiny, NORMAL, (blizz and 9) or unscale or tiny) + E:SetFont(_G.AchievementFont_Small, NORMAL, (blizz and 10) or unscale or small) -- Achiev dates + E:SetFont(_G.FriendsFont_Small, NORMAL, (blizz and 10) or unscale or small, 'SHADOW') + E:SetFont(_G.Game10Font_o1, NORMAL, (blizz and 10) or unscale or small, 'OUTLINE') + E:SetFont(_G.InvoiceFont_Small, NORMAL, (blizz and 10) or unscale or small) -- Mail + E:SetFont(_G.ReputationDetailFont, NORMAL, (blizz and 10) or unscale or small, 'SHADOW') -- Rep Desc when clicking a rep + E:SetFont(_G.SpellFont_Small, NORMAL, (blizz and 10) or unscale or small) + E:SetFont(_G.SubSpellFont, NORMAL, (blizz and 10) or unscale or small) -- Spellbook Sub Names + E:SetFont(_G.SystemFont_Outline_Small, NORMAL, (blizz and 10) or unscale or small, 'OUTLINE') + E:SetFont(_G.SystemFont_Shadow_Small, NORMAL, (blizz and 10) or unscale or small, 'SHADOW') + E:SetFont(_G.SystemFont_Small, NORMAL, (blizz and 10) or unscale or small) + E:SetFont(_G.Tooltip_Small, NORMAL, (blizz and 10) or unscale or small) + E:SetFont(_G.FriendsFont_11, NORMAL, (blizz and 11) or unscale or small, 'SHADOW') + E:SetFont(_G.FriendsFont_UserText, NORMAL, (blizz and 11) or unscale or small, 'SHADOW') + E:SetFont(_G.GameFontHighlightSmall2, NORMAL, (blizz and 11) or unscale or small, 'SHADOW') -- Skill or Recipe description on TradeSkill frame + E:SetFont(_G.GameFontNormalSmall2, NORMAL, (blizz and 11) or unscale or small, 'SHADOW') -- MissionUI Followers names + E:SetFont(_G.Fancy12Font, NORMAL, (blizz and 12) or unscale or size) -- Added in 7.3.5 used for ? + E:SetFont(_G.FriendsFont_Normal, NORMAL, (blizz and 12) or unscale or size, 'SHADOW') + E:SetFont(_G.Game12Font, NORMAL, (blizz and 12) or unscale or size) -- PVP Stuff + E:SetFont(_G.InvoiceFont_Med, NORMAL, (blizz and 12) or unscale or size) -- Mail + E:SetFont(_G.SystemFont_Med1, NORMAL, (blizz and 12) or unscale or size) + E:SetFont(_G.SystemFont_Shadow_Med1, NORMAL, (blizz and 12) or unscale or size, 'SHADOW') + E:SetFont(_G.Tooltip_Med, NORMAL, (blizz and 12) or unscale or size) + E:SetFont(_G.Game13FontShadow, NORMAL, (blizz and 13) or unscale or medium, 'SHADOW') -- InspectPvpFrame + E:SetFont(_G.GameFontNormalMed1, NORMAL, (blizz and 13) or unscale or medium, 'SHADOW') -- WoW Token Info + E:SetFont(_G.QuestFont, NORMAL, (blizz and 13) or unscale or medium) + E:SetFont(_G.SystemFont_Med2, NORMAL, (blizz and 13) or unscale or medium) + E:SetFont(_G.SystemFont_Outline, NORMAL, (blizz and 13) or unscale or medium, outline) -- WorldMap, Pet level + E:SetFont(_G.DestinyFontMed, NORMAL, (blizz and 14) or unscale or medium) -- Added in 7.3.5 used for ? + E:SetFont(_G.Fancy14Font, NORMAL, (blizz and 14) or unscale or medium) -- Added in 7.3.5 used for ? + E:SetFont(_G.FriendsFont_Large, NORMAL, (blizz and 14) or unscale or medium, 'SHADOW') + E:SetFont(_G.GameFontHighlightMedium, NORMAL, (blizz and 14) or unscale or medium, 'SHADOW') -- Fix QuestLog Title mouseover + E:SetFont(_G.GameFontNormalMed2, NORMAL, (blizz and 14) or unscale or medium, 'SHADOW') -- Quest tracker + E:SetFont(_G.GameFontNormalMed3, NORMAL, (blizz and 14) or unscale or medium, 'SHADOW') + E:SetFont(_G.GameTooltipHeader, NORMAL, (blizz and 14) or unscale or medium) + E:SetFont(_G.PriceFont, NORMAL, (blizz and 14) or unscale or medium) + E:SetFont(_G.SystemFont_Med3, NORMAL, (blizz and 14) or unscale or medium) + E:SetFont(_G.SystemFont_Shadow_Med2, NORMAL, (blizz and 14) or unscale or medium, 'SHADOW') -- Shows Order resourses on OrderHallTalentFrame + E:SetFont(_G.SystemFont_Shadow_Med3, NORMAL, (blizz and 14) or unscale or medium, 'SHADOW') + E:SetFont(_G.Game15Font_o1, NORMAL, (blizz and 15) or unscale or medium) -- CharacterStatsPane, ItemLevelFrame + E:SetFont(_G.MailFont_Large, NORMAL, (blizz and 15) or unscale or medium) -- Mail + E:SetFont(_G.QuestFont_Large, NORMAL, (blizz and 15) or unscale or medium) + E:SetFont(_G.Game16Font, NORMAL, (blizz and 16) or unscale or big) -- Added in 7.3.5 used for ? + E:SetFont(_G.GameFontNormalLarge, NORMAL, (blizz and 16) or unscale or big, 'SHADOW') + E:SetFont(_G.QuestFont_Larger, NORMAL, (blizz and 16) or unscale or big) -- Wrath + E:SetFont(_G.SystemFont_Large, NORMAL, (blizz and 16) or unscale or big) + E:SetFont(_G.SystemFont_Shadow_Large, NORMAL, (blizz and 16) or unscale or big, 'SHADOW') + E:SetFont(_G.SystemFont_Shadow_Large_Outline, NORMAL, (blizz and 16) or unscale or big, 'SHADOWOUTLINE') + E:SetFont(_G.Game18Font, NORMAL, (blizz and 18) or unscale or big) -- MissionUI Bonus Chance + E:SetFont(_G.GameFontNormalLarge2, NORMAL, (blizz and 18) or unscale or big, 'SHADOW') -- Garrison Follower Names + E:SetFont(_G.QuestFont_Huge, NORMAL, (blizz and 18) or unscale or big) -- Quest rewards title, Rewards + E:SetFont(_G.SystemFont_Shadow_Large2, NORMAL, (blizz and 18) or unscale or big, 'SHADOW') -- Auction House ItemDisplay + E:SetFont(_G.SystemFont_Huge1, NORMAL, (blizz and 20) or unscale or large) -- Garrison Mission XP + E:SetFont(_G.SystemFont_Huge1_Outline, NORMAL, (blizz and 20) or unscale or large, outline) -- Garrison Mission Chance + E:SetFont(_G.SystemFont_Shadow_Huge1, NORMAL, (blizz and 20) or unscale or large, outline) + E:SetFont(_G.Fancy22Font, NORMAL, (blizz and 22) or unscale or large) -- Talking frame Title font + E:SetFont(_G.PVPArenaTextString, NORMAL, (blizz and 22) or unscale or large, outline) + E:SetFont(_G.PVPInfoTextString, NORMAL, (blizz and 22) or unscale or large, outline) + E:SetFont(_G.SystemFont_OutlineThick_Huge2, NORMAL, (blizz and 22) or unscale or large, thick) + E:SetFont(_G.Fancy24Font, NORMAL, (blizz and 24) or unscale or huge) -- Artifact frame - weapon name + E:SetFont(_G.Game24Font, NORMAL, (blizz and 24) or unscale or huge) -- Garrison Mission level, in detail frame + E:SetFont(_G.GameFontHighlightHuge2, NORMAL, (blizz and 24) or unscale or huge, 'SHADOW') + E:SetFont(_G.GameFontNormalHuge2, NORMAL, (blizz and 24) or unscale or huge, 'SHADOW') -- Mythic weekly best dungeon name + E:SetFont(_G.QuestFont_Super_Huge, NORMAL, (blizz and 24) or unscale or huge) + E:SetFont(_G.SubZoneTextString, NORMAL, (blizz and 24) or unscale or huge, outline) + E:SetFont(_G.SystemFont_Huge2, NORMAL, (blizz and 24) or unscale or huge) -- Mythic+ Score + E:SetFont(_G.BossEmoteNormalHuge, NORMAL, (blizz and 25) or unscale or mega, 'SHADOW') -- Talent Title + E:SetFont(_G.SystemFont_Shadow_Huge3, NORMAL, (blizz and 25) or unscale or mega, 'SHADOW') -- FlightMap + E:SetFont(_G.ZoneTextString, NORMAL, (blizz and 25) or unscale or mega, outline) + E:SetFont(_G.SubZoneTextFont, NORMAL, (blizz and 26) or unscale or mega, outline) -- WorldMap, SubZone + E:SetFont(_G.SystemFont_Shadow_Huge4, NORMAL, (blizz and 27) or unscale or mega, 'SHADOW') + E:SetFont(_G.Game30Font, NORMAL, (blizz and 30) or unscale or enormous) -- Mission Level + E:SetFont(_G.QuestFont_Enormous, NORMAL, (blizz and 30) or unscale or enormous) -- Garrison Titles + E:SetFont(_G.CoreAbilityFont, NORMAL, (blizz and 32) or unscale or enormous) -- Core abilities, title + E:SetFont(_G.DestinyFontHuge, NORMAL, (blizz and 32) or unscale or enormous) -- Garrison Mission Report + E:SetFont(_G.GameFont_Gigantic, NORMAL, (blizz and 32) or unscale or enormous, 'SHADOW') -- Used at the install steps + E:SetFont(_G.SystemFont_OutlineThick_WTF, NORMAL, (blizz and 32) or unscale or enormous, outline) -- WorldMap + + -- big fonts + E:SetFont(_G.QuestFont_39, NORMAL, (blizz and 39) or unscale or gigantic) -- Wrath + E:SetFont(_G.Game40Font, NORMAL, (blizz and 40) or unscale or gigantic) + E:SetFont(_G.Game42Font, NORMAL, (blizz and 42) or unscale or gigantic) -- PVP Stuff + E:SetFont(_G.Game46Font, NORMAL, (blizz and 46) or unscale or massive) -- Added in 7.3.5 used for ? + E:SetFont(_G.Game48Font, NORMAL, (blizz and 48) or unscale or massive) + E:SetFont(_G.Game48FontShadow, NORMAL, (blizz and 48) or unscale or massive, 'SHADOW') + E:SetFont(_G.Game60Font, NORMAL, (blizz and 60) or unscale or colossal) + E:SetFont(_G.Game72Font, NORMAL, (blizz and 72) or unscale or monstrous) + E:SetFont(_G.Game120Font, NORMAL, (blizz and 120) or unscale or titanic) end end diff --git a/ElvUI/Core/General/ItemLevel.lua b/ElvUI/Core/General/ItemLevel.lua index e0931a8e14..8e2d1e827d 100644 --- a/ElvUI/Core/General/ItemLevel.lua +++ b/ElvUI/Core/General/ItemLevel.lua @@ -81,9 +81,10 @@ end function E:GetGearSlotInfo(unit, slot, deepScan) local tt = E.ScanTooltip tt:SetOwner(UIParent, 'ANCHOR_NONE') - tt:SetInventoryItem(unit, slot) + local hasItem = tt:SetInventoryItem(unit, slot) tt:Show() + local info = hasItem and tt:GetTooltipData() if not tt.slotInfo then tt.slotInfo = {} else wipe(tt.slotInfo) end local slotInfo = tt.slotInfo @@ -95,30 +96,30 @@ function E:GetGearSlotInfo(unit, slot, deepScan) slotInfo.enchantColors = tt.enchantColors slotInfo.itemLevelColors = tt.itemLevelColors - for x = 1, tt:NumLines() do - local line = _G['ElvUI_ScanTooltipTextLeft'..x] - if line then - local lineText = line:GetText() - if x == 1 and lineText == RETRIEVING_ITEM_INFO then + if info then + for i, line in next, info.lines do + local text = line and line.leftText + if i == 1 and text == RETRIEVING_ITEM_INFO then return 'tooSoon' else - E:InspectGearSlot(line, lineText, slotInfo) - E:CollectEssenceInfo(x, lineText, slotInfo) + E:InspectGearSlot(_G['ElvUI_ScanTooltipTextLeft'..i], text, slotInfo) + E:CollectEssenceInfo(i, text, slotInfo) end end end - else - local firstLine = _G.ElvUI_ScanTooltipTextLeft1:GetText() - if firstLine == RETRIEVING_ITEM_INFO then + elseif info then + local firstLine = info.lines[1] + local firstText = firstLine and firstLine.leftText + if firstText == RETRIEVING_ITEM_INFO then return 'tooSoon' end local colorblind = GetCVarBool('colorblindmode') and 4 or 3 for x = 2, colorblind do - local line = _G['ElvUI_ScanTooltipTextLeft'..x] + local line = info.lines[x] if line then - local lineText = line:GetText() - local itemLevel = lineText and (strmatch(lineText, MATCH_ITEM_LEVEL_ALT) or strmatch(lineText, MATCH_ITEM_LEVEL)) + local text = line.leftText + local itemLevel = (text and text ~= '') and (strmatch(text, MATCH_ITEM_LEVEL_ALT) or strmatch(text, MATCH_ITEM_LEVEL)) if itemLevel then slotInfo.iLvl = tonumber(itemLevel) end diff --git a/ElvUI/Core/General/StaticPopups.lua b/ElvUI/Core/General/StaticPopups.lua index 389bbb1a3f..afa1d8efe6 100644 --- a/ElvUI/Core/General/StaticPopups.lua +++ b/ElvUI/Core/General/StaticPopups.lua @@ -1,9 +1,9 @@ local E, L, V, P, G = unpack(ElvUI) local AB = E:GetModule('ActionBars') local UF = E:GetModule('UnitFrames') -local Misc = E:GetModule('Misc') -local Bags = E:GetModule('Bags') -local Skins = E:GetModule('Skins') +local M = E:GetModule('Misc') +local B = E:GetModule('Bags') +local S = E:GetModule('Skins') local _G = _G local pairs, type, unpack, assert = pairs, type, unpack, assert @@ -274,14 +274,14 @@ E.PopupDialogs.DELETE_GRAYS = { button1 = YES, button2 = NO, OnAccept = function() - Bags:VendorGrays(true) + B:VendorGrays(true) - for _, info in ipairs(Bags.SellFrame.Info.itemList) do + for _, info in ipairs(B.SellFrame.Info.itemList) do PickupContainerItem(info[1], info[2]) DeleteCursorItem() end - wipe(Bags.SellFrame.Info.itemList) + wipe(B.SellFrame.Info.itemList) end, OnShow = function(self) MoneyFrame_Update(self.moneyFrame, E.PopupDialogs.DELETE_GRAYS.Money) @@ -330,7 +330,7 @@ E.PopupDialogs.DISBAND_RAID = { text = L["Are you sure you want to disband the group?"], button1 = ACCEPT, button2 = CANCEL, - OnAccept = function() Misc:DisbandRaidGroup() end, + OnAccept = function() M:DisbandRaidGroup() end, whileDead = 1, } @@ -1100,7 +1100,7 @@ function E:StaticPopup_CreateSecureButton(popup, button, text, macro) btn:Size(button:GetSize()) btn:HookScript('OnEnter', SecureOnEnter) btn:HookScript('OnLeave', SecureOnLeave) - Skins:HandleButton(btn) + S:HandleButton(btn) local t = btn:CreateFontString(nil, 'OVERLAY', btn) t:Point('CENTER', 0, 1) @@ -1171,20 +1171,20 @@ function E:Contruct_StaticPopups() E.StaticPopup_OnClick(btn:GetParent(), btn:GetID()) end) - Skins:HandleButton(button) + S:HandleButton(button) end _G['ElvUI_StaticPopup'..index..'CheckButton']:Size(24) _G['ElvUI_StaticPopup'..index..'CheckButtonText']:FontTemplate(nil, nil, 'SHADOW') _G['ElvUI_StaticPopup'..index..'CheckButtonText']:SetTextColor(1,0.17,0.26) _G['ElvUI_StaticPopup'..index..'CheckButtonText']:Point('LEFT', _G['ElvUI_StaticPopup'..index..'CheckButton'], 'RIGHT', 4, 1) - Skins:HandleCheckBox(_G['ElvUI_StaticPopup'..index..'CheckButton']) + S:HandleCheckBox(_G['ElvUI_StaticPopup'..index..'CheckButton']) _G['ElvUI_StaticPopup'..index..'EditBox']:SetFrameLevel(_G['ElvUI_StaticPopup'..index..'EditBox']:GetFrameLevel()+1) - Skins:HandleEditBox(_G['ElvUI_StaticPopup'..index..'EditBox']) - Skins:HandleEditBox(_G['ElvUI_StaticPopup'..index..'MoneyInputFrameGold']) - Skins:HandleEditBox(_G['ElvUI_StaticPopup'..index..'MoneyInputFrameSilver']) - Skins:HandleEditBox(_G['ElvUI_StaticPopup'..index..'MoneyInputFrameCopper']) + S:HandleEditBox(_G['ElvUI_StaticPopup'..index..'EditBox']) + S:HandleEditBox(_G['ElvUI_StaticPopup'..index..'MoneyInputFrameGold']) + S:HandleEditBox(_G['ElvUI_StaticPopup'..index..'MoneyInputFrameSilver']) + S:HandleEditBox(_G['ElvUI_StaticPopup'..index..'MoneyInputFrameCopper']) _G['ElvUI_StaticPopup'..index..'EditBox'].backdrop:Point('TOPLEFT', -2, -4) _G['ElvUI_StaticPopup'..index..'EditBox'].backdrop:Point('BOTTOMRIGHT', 2, 4) _G['ElvUI_StaticPopup'..index..'ItemFrameNameFrame']:Kill() diff --git a/ElvUI/Core/General/StatusReport.lua b/ElvUI/Core/General/StatusReport.lua index 59ee66aeed..c374a37d7d 100644 --- a/ElvUI/Core/General/StatusReport.lua +++ b/ElvUI/Core/General/StatusReport.lua @@ -9,7 +9,6 @@ local GetAddOnInfo = GetAddOnInfo local GetCVarBool = GetCVarBool local GetNumAddOns = GetNumAddOns local GetRealZoneText = GetRealZoneText -local GetSpecialization = GetSpecialization local GetSpecializationInfo = GetSpecializationInfo local UNKNOWN = UNKNOWN @@ -30,66 +29,9 @@ function E:GetDisplayMode() return GetCVarBool('gxMaximize') and 'Fullscreen' or 'Windowed' end -local EnglishClassName = { - DEATHKNIGHT = 'Death Knight', - DEMONHUNTER = 'Demon Hunter', - DRUID = 'Druid', - HUNTER = 'Hunter', - MAGE = 'Mage', - MONK = 'Monk', - PALADIN = 'Paladin', - PRIEST = 'Priest', - ROGUE = 'Rogue', - SHAMAN = 'Shaman', - WARLOCK = 'Warlock', - WARRIOR = 'Warrior', - EVOKER = 'Evoker' -} - -local EnglishSpecName = { - [250] = 'Blood', - [251] = 'Frost', - [252] = 'Unholy', - [102] = 'Balance', - [103] = 'Feral', - [104] = 'Guardian', - [105] = 'Restoration', - [253] = 'Beast Mastery', - [254] = 'Marksmanship', - [255] = 'Survival', - [62] = 'Arcane', - [63] = 'Fire', - [64] = 'Frost', - [268] = 'Brewmaster', - [270] = 'Mistweaver', - [269] = 'Windwalker', - [65] = 'Holy', - [66] = 'Protection', - [70] = 'Retribution', - [256] = 'Discipline', - [257] = 'Holy', - [258] = 'Shadow', - [259] = 'Assasination', - [260] = 'Combat', - [261] = 'Sublety', - [262] = 'Elemental', - [263] = 'Enhancement', - [264] = 'Restoration', - [265] = 'Affliction', - [266] = 'Demonology', - [267] = 'Destruction', - [71] = 'Arms', - [72] = 'Fury', - [73] = 'Protection', - [577] = 'Havoc', - [581] = 'Vengeance', - [1467] = 'Devastation', - [1468] = 'Preservation', - [1473] = 'Augmentation', -} - local function GetSpecName() - return EnglishSpecName[GetSpecializationInfo(GetSpecialization())] + local info = E.myspec and E.SpecName[GetSpecializationInfo(E.myspec)] + return info and info.englishName end function E:CreateStatusContent(num, width, parent, anchorTo, content) @@ -234,7 +176,7 @@ function E:CreateStatusFrame() StatusFrame.Section2.Content.Line2.Text:SetFormattedText('Client Language: |cff4beb2c%s|r', E.locale) StatusFrame.Section3.Content.Line1.Text:SetFormattedText('Faction: |cff4beb2c%s|r', E.myfaction) StatusFrame.Section3.Content.Line2.Text:SetFormattedText('Race: |cff4beb2c%s|r', E.myrace) - StatusFrame.Section3.Content.Line3.Text:SetFormattedText('Class: |cff4beb2c%s|r', EnglishClassName[E.myclass]) + StatusFrame.Section3.Content.Line3.Text:SetFormattedText('Class: |cff4beb2c%s|r', E.ClassName[E.myclass]) return StatusFrame end diff --git a/ElvUI/Core/General/Tags.lua b/ElvUI/Core/General/Tags.lua index daaed7b9a5..61894c82d9 100644 --- a/ElvUI/Core/General/Tags.lua +++ b/ElvUI/Core/General/Tags.lua @@ -3,7 +3,6 @@ local NP = E:GetModule('NamePlates') local ElvUF = E.oUF local Tags = ElvUF.Tags -local LCS = E.Libs.LCS local RangeCheck = E.Libs.RangeCheck local Translit = E.Libs.Translit local translitMark = '!' @@ -23,11 +22,9 @@ local GetNumGroupMembers = GetNumGroupMembers local GetPetLoyalty = GetPetLoyalty local GetPVPRankInfo = GetPVPRankInfo local GetPVPTimer = GetPVPTimer -local GetQuestDifficultyColor = GetQuestDifficultyColor local GetRaidRosterInfo = GetRaidRosterInfo local GetRelativeDifficultyColor = GetRelativeDifficultyColor local GetRuneCooldown = GetRuneCooldown -local GetSpecialization = (E.Classic or E.Wrath) and LCS.GetSpecialization or GetSpecialization local GetSpecializationInfo = GetSpecializationInfo local GetTime = GetTime local GetTitleName = GetTitleName @@ -37,8 +34,6 @@ local IsInGroup = IsInGroup local IsInInstance = IsInInstance local IsInRaid = IsInRaid local QuestDifficultyColors = QuestDifficultyColors -local UIParent = UIParent -local UnitAffectingCombat = UnitAffectingCombat local UnitBattlePetLevel = UnitBattlePetLevel local UnitClass = UnitClass local UnitClassification = UnitClassification @@ -74,8 +69,6 @@ local UnitSex = UnitSex local UnitStagger = UnitStagger local GetUnitPowerBarTextureInfo = GetUnitPowerBarTextureInfo -local C_QuestLog_GetTitleForQuestID = C_QuestLog.GetTitleForQuestID -local C_QuestLog_GetQuestDifficultyLevel = C_QuestLog.GetQuestDifficultyLevel local C_PetJournal_GetPetTeamAverageLevel = C_PetJournal and C_PetJournal.GetPetTeamAverageLevel local LEVEL = strlower(LEVEL) @@ -191,65 +184,74 @@ local ClassPowers = { WARLOCK = Enum.PowerType.SoulShards } -local function GetClassPower(Class) - local spec = GetSpecialization() - local min, max, r, g, b +local function GetClassPower(unit) + local spec, unitClass, Min, Max, r, g, b + if unit == 'player' then + spec = E.myspec + unitClass = E.myclass + elseif E.Retail then + local info = E:GetUnitSpecInfo(unit) + if info then + spec = info.index + unitClass = info.classFile + end + end -- try stagger - local monk = Class == 'MONK' + local monk = unitClass == 'MONK' if monk and spec == SPEC_MONK_BREWMASTER then - min = UnitStagger('player') or 0 - max = UnitHealthMax('player') + Min = UnitStagger(unit) or 0 + Max = UnitHealthMax(unit) - local staggerRatio = min / max + local staggerRatio = Min / Max local staggerIndex = (staggerRatio >= STAGGER_RED_TRANSITION and STAGGER_RED_INDEX) or (staggerRatio >= STAGGER_YELLOW_TRANSITION and STAGGER_YELLOW_INDEX) or STAGGER_GREEN_INDEX local color = ElvUF.colors.power.STAGGER[staggerIndex] r, g, b = color.r, color.g, color.b end -- try special powers or combo points - local barType = not r and ClassPowers[Class] + local barType = not r and ClassPowers[unitClass] if barType then - local dk = Class == 'DEATHKNIGHT' - min = (dk and 0) or UnitPower('player', barType) - max = (dk and 6) or UnitPowerMax('player', barType) + local dk = unitClass == 'DEATHKNIGHT' + Min = (dk and 0) or UnitPower(unit, barType) + Max = (dk and 6) or UnitPowerMax(unit, barType) - if dk then - for i = 1, max do + if dk and unit == 'player' then + for i = 1, Max do local _, _, runeReady = GetRuneCooldown(i) if runeReady then - min = min + 1 + Min = Min + 1 end end end - if min > 0 then - local power = ElvUF.colors.ClassBars[Class] - local color = (monk and power[min]) or (dk and (E.Wrath and ElvUF.colors.class.DEATHKNIGHT or power[spec ~= 5 and spec or 1])) or power + if Min > 0 then + local power = ElvUF.colors.ClassBars[unitClass] + local color = (monk and power[Min]) or (dk and (E.Wrath and ElvUF.colors.class.DEATHKNIGHT or power[spec ~= 5 and spec or 1])) or power r, g, b = color.r, color.g, color.b end elseif not r then - min = UnitPower('player', POWERTYPE_COMBOPOINTS) - max = UnitPowerMax('player', POWERTYPE_COMBOPOINTS) + Min = UnitPower(unit, POWERTYPE_COMBOPOINTS) + Max = UnitPowerMax(unit, POWERTYPE_COMBOPOINTS) - if min > 0 then + if Min > 0 then local combo = ElvUF.colors.ComboPoints local c1, c2, c3 = combo[1], combo[2], combo[3] - r, g, b = ElvUF:ColorGradient(min, max, c1.r, c1.g, c1.b, c2.r, c2.g, c2.b, c3.r, c3.g, c3.b) + r, g, b = ElvUF:ColorGradient(Min, Max, c1.r, c1.g, c1.b, c2.r, c2.g, c2.b, c3.r, c3.g, c3.b) end end -- try additional mana - local altIndex = not r and E.Retail and _G.ALT_POWER_BAR_PAIR_DISPLAY_INFO[Class] - if altIndex and altIndex[UnitPowerType('player')] then - min = UnitPower('player', POWERTYPE_MANA) - max = UnitPowerMax('player', POWERTYPE_MANA) + local altIndex = not r and E.Retail and _G.ALT_POWER_BAR_PAIR_DISPLAY_INFO[unitClass] + if altIndex and altIndex[UnitPowerType(unit)] then + Min = UnitPower(unit, POWERTYPE_MANA) + Max = UnitPowerMax(unit, POWERTYPE_MANA) local mana = ElvUF.colors.power.MANA r, g, b = mana.r, mana.g, mana.b end - return min or 0, max or 0, r or 1, g or 1, b or 1 + return Min or 0, Max or 0, r or 1, g or 1, b or 1 end E.TagFunctions.GetClassPower = GetClassPower @@ -315,8 +317,8 @@ for textFormat in pairs(E.GetFormattedTextStyles) do end end) - E:AddTag(format('classpower:%s', tagFormat), (E.myclass == 'MONK' and 'UNIT_AURA ' or E.myclass == 'DEATHKNIGHT' and 'RUNE_POWER_UPDATE ' or '') .. 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER', function() - local min, max = GetClassPower(E.myclass) + E:AddTag(format('classpower:%s', tagFormat), (E.myclass == 'MONK' and 'UNIT_AURA ' or E.myclass == 'DEATHKNIGHT' and 'RUNE_POWER_UPDATE ' or '') .. 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER', function(unit) + local min, max = GetClassPower(unit) if min ~= 0 then return E:GetFormattedText(textFormat, min, max) end @@ -366,8 +368,8 @@ for textFormat in pairs(E.GetFormattedTextStyles) do end end, not E.Retail) - E:AddTag(format('classpower:%s:shortvalue', tagFormat), (E.myclass == 'MONK' and 'UNIT_AURA ' or E.myclass == 'DEATHKNIGHT' and 'RUNE_POWER_UPDATE ' or '') .. 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER', function() - local min, max = GetClassPower(E.myclass) + E:AddTag(format('classpower:%s:shortvalue', tagFormat), (E.myclass == 'MONK' and 'UNIT_AURA ' or E.myclass == 'DEATHKNIGHT' and 'RUNE_POWER_UPDATE ' or '') .. 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER', function(unit) + local min, max = GetClassPower(unit) if min ~= 0 then return E:GetFormattedText(textFormat, min, max, nil, true) end @@ -422,6 +424,17 @@ for textFormat, length in pairs({ veryshort = 5, short = 10, medium = 15, long = end end) + E:AddTag(format('target:abbrev:%s', textFormat), 'UNIT_TARGET', function(unit) + local targetName = UnitName(unit..'target') + if targetName and strfind(targetName, '%s') then + targetName = Abbrev(targetName) + end + + if targetName then + return E:ShortenString(targetName, length) + end + end) + E:AddTag(format('target:%s', textFormat), 'UNIT_TARGET', function(unit) local targetName = UnitName(unit..'target') if targetName then @@ -452,6 +465,24 @@ E:AddTag('target', 'UNIT_TARGET', function(unit) end end) +E:AddTag('target:abbrev', 'UNIT_TARGET', function(unit) + local targetName = UnitName(unit..'target') + if targetName and strfind(targetName, '%s') then + targetName = Abbrev(targetName) + end + + return targetName +end) + +E:AddTag('target:last', 'UNIT_TARGET', function(unit) + local targetName = UnitName(unit..'target') + if targetName and strfind(targetName, '%s') then + targetName = strmatch(targetName, '([%S]+)$') + end + + return targetName +end) + E:AddTag('target:translit', 'UNIT_TARGET', function(unit) local targetName = UnitName(unit..'target') if targetName then @@ -653,11 +684,20 @@ E:AddTag('pvptimer', 1, function(unit) end end) -E:AddTag('classpowercolor', 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER'..(E.Retail and (E.myclass == 'DEATHKNIGHT' or E.myclass == 'MONK') and ' PLAYER_SPECIALIZATION_CHANGED' or ''), function() - local _, _, r, g, b = GetClassPower(E.myclass) +E:AddTag('classpowercolor', 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER'..(E.Retail and ' PLAYER_SPECIALIZATION_CHANGED' or ''), function(unit) + local _, _, r, g, b = GetClassPower(unit) return Hex(r, g, b) end, E.Classic) +E:AddTag('permana', 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER', function(unit) + local m = UnitPowerMax(unit) + if m == 0 then + return 0 + else + return floor(UnitPower(unit, POWERTYPE_MANA) / m * 100 + .5) + end +end) + E:AddTag('manacolor', 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER', function() local color = ElvUF.colors.power.MANA return Hex(color.r, color.g, color.b) @@ -780,16 +820,6 @@ E:AddTag('class', 'UNIT_NAME_UPDATE', function(unit) end end) -E:AddTag('specialization', 'PLAYER_TALENT_UPDATE', function(unit) - local currentSpec = UnitIsPlayer(unit) and GetSpecialization() - if currentSpec then - local _, currentSpecName = GetSpecializationInfo(currentSpec) - if currentSpecName then - return currentSpecName - end - end -end, not E.Retail) - E:AddTag('name:title', 'UNIT_NAME_UPDATE INSTANCE_ENCOUNTER_ENGAGE_UNIT', function(unit) return UnitIsPlayer(unit) and UnitPVPName(unit) or UnitName(unit) end) @@ -1096,18 +1126,16 @@ end do local function GetTitleNPC(unit, custom) - if UnitIsPlayer(unit) or (E.Wrath and UnitAffectingCombat('player') and IsInInstance()) then return end - - E.ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE') - E.ScanTooltip:SetUnit(unit) - E.ScanTooltip:Show() + if UnitIsPlayer(unit) then return end -- similar to TT.GetLevelLine - local ttLine = _G[format('ElvUI_ScanTooltipTextLeft%d', GetCVarBool('colorblindmode') and 3 or 2)] - local ttText = ttLine and ttLine:GetText() - local ttLower = ttText and strlower(ttText) - if ttLower and not strfind(ttLower, LEVEL) then - return custom and format(custom, ttText) or ttText + local info = E.ScanTooltip:GetUnitInfo(unit) + local line = info and info.lines[GetCVarBool('colorblindmode') and 3 or 2] + local text = line and line.leftText + + local lower = text and strlower(text) + if lower and not strfind(lower, LEVEL) then + return custom and format(custom, text) or text end end E.TagFunctions.GetTitleNPC = GetTitleNPC @@ -1123,53 +1151,51 @@ end do local function GetQuestData(unit, which, Hex) - if UnitIsPlayer(unit) or (E.Wrath and UnitAffectingCombat('player') and IsInInstance()) then return end + if IsInInstance() or UnitIsPlayer(unit) then return end - E.ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE') - E.ScanTooltip:SetUnit(unit) - E.ScanTooltip:Show() + local notMyQuest, lastTitle + local info = E.ScanTooltip:GetUnitInfo(unit) + if not (info and info.lines[2]) then return end - local notMyQuest, activeID - for i = 3, E.ScanTooltip:NumLines() do - local str = _G['ElvUI_ScanTooltipTextLeft' .. i] - local text = str and str:GetText() + for _, line in next, info.lines, 2 do + local text = line and line.leftText if not text or text == '' then return end - if UnitIsPlayer(text) then + if line.type == 18 or (not E.Retail and UnitIsPlayer(text)) then -- 18 is QuestPlayer notMyQuest = text ~= E.myname elseif text and not notMyQuest then - local count, percent = NP.QuestIcons.CheckTextForQuest(text) - - -- this line comes from one line up in the tooltip - local activeQuest = NP.QuestIcons.activeQuests[text] - if activeQuest then activeID = activeQuest end - - if count then - if not which then - return text - elseif which == 'count' then - return percent and format('%s%%', count) or count - elseif which == 'title' and activeID then - local title = C_QuestLog_GetTitleForQuestID(activeID) - local level = Hex and C_QuestLog_GetQuestDifficultyLevel(activeID) - if level then - local colors = GetQuestDifficultyColor(level) - title = format('%s%s|r', Hex(colors.r, colors.g, colors.b), title) - end - - return title - elseif (which == 'info' or which == 'full') and activeID then - local title = C_QuestLog_GetTitleForQuestID(activeID) - local level = Hex and C_QuestLog_GetQuestDifficultyLevel(activeID) - if level then - local colors = GetQuestDifficultyColor(level) - title = format('%s%s|r', Hex(colors.r, colors.g, colors.b), title) - end - - if which == 'full' then - return format('%s: %s', title, text) - else - return format(percent and '%s: %s%%' or '%s: %s', title, count) + if line.type == 17 or not E.Retail then + lastTitle = NP.QuestIcons.activeQuests[text] + end -- this line comes from one line up in the tooltip + + local objectives = (line.type == 8 or not E.Retail) and lastTitle and lastTitle.objectives + if objectives then + local quest = objectives[text] + if quest then + if not which then + return text + elseif which == 'count' then + return quest.isPercent and format('%s%%', quest.value) or quest.value + elseif which == 'title' then + local colors = lastTitle.color + if colors then + return format('%s%s|r', Hex(colors.r, colors.g, colors.b), lastTitle.title) + end + + return lastTitle.title + elseif (which == 'info' or which == 'full') then + local title = lastTitle.title + + local colors = lastTitle.color + if colors then + title = format('%s%s|r', Hex(colors.r, colors.g, colors.b), title) + end + + if which == 'full' then + return format('%s: %s', title, text) + else + return format(quest.isPercent and '%s: %s%%' or '%s: %s', title, quest.value) + end end end end @@ -1180,23 +1206,23 @@ do E:AddTag('quest:text', 'QUEST_LOG_UPDATE', function(unit) return GetQuestData(unit, nil, Hex) - end) + end, not E.Retail) E:AddTag('quest:full', 'QUEST_LOG_UPDATE', function(unit) return GetQuestData(unit, 'full', Hex) - end) + end, not E.Retail) E:AddTag('quest:info', 'QUEST_LOG_UPDATE', function(unit) return GetQuestData(unit, 'info', Hex) - end) + end, not E.Retail) E:AddTag('quest:title', 'QUEST_LOG_UPDATE', function(unit) return GetQuestData(unit, 'title', Hex) - end) + end, not E.Retail) E:AddTag('quest:count', 'QUEST_LOG_UPDATE', function(unit) return GetQuestData(unit, 'count', Hex) - end) + end, not E.Retail) end do @@ -1237,16 +1263,47 @@ do } E:AddTag('class:icon', 'PLAYER_TARGET_CHANGED', function(unit) - if UnitIsPlayer(unit) then - local _, class = UnitClass(unit) - local icon = classIcons[class] - if icon then - return format(classIcon, icon) - end + if not UnitIsPlayer(unit) then return end + + local _, class = UnitClass(unit) + local icon = classIcons[class] + if icon then + return format(classIcon, icon) end end) + + local specIcon = [[|T%s:16:16:0:0:64:64:4:60:4:60|t]] + E:AddTag('spec:icon', 'PLAYER_TALENT_UPDATE UNIT_NAME_UPDATE', function(unit) + if not UnitIsPlayer(unit) then return end + + -- try to get spec from tooltip + local info = E.Retail and E:GetUnitSpecInfo(unit) + if info then + return info.icon and format(specIcon, info.icon) + end + end, not E.Retail) end +E:AddTag('spec', 'PLAYER_TALENT_UPDATE UNIT_NAME_UPDATE', function(unit) + if not UnitIsPlayer(unit) then return end + + -- try to get spec from tooltip + local info = E.Retail and E:GetUnitSpecInfo(unit) + if info then + return info.name + end + + -- fallback, player only + if unit == 'player' and E.myspec then + local _, name = GetSpecializationInfo(E.myspec) + return name + end +end, not E.Retail) + +E:AddTag('specialization', 'PLAYER_TALENT_UPDATE UNIT_NAME_UPDATE', function(unit) + return _TAGS.spec(unit) +end) + E:AddTag('loyalty', 'UNIT_HAPPINESS PET_UI_UPDATE', function(unit) local hasPetUI, isHunterPet = HasPetUI() if hasPetUI and isHunterPet and UnitIsUnit('pet', unit) then @@ -1354,7 +1411,8 @@ E.TagInfo = { ['class'] = { category = 'Class', description = "Displays the class of the unit, if that unit is a player" }, ['class:icon'] = { category = 'Class', description = "Displays the class icon of the unit, if that unit is a player" }, ['smartclass'] = { category = 'Class', description = "Displays the player's class or creature's type" }, - ['specialization'] = { hidden = not E.Retail, category = 'Class', description = "Displays your current specialization as text" }, + ['spec'] = { hidden = not E.Retail, category = 'Class', description = "Displays the specialization icon of the unit as text" }, + ['spec:icon'] = { hidden = not E.Retail, category = 'Class', description = "Displays the specialization icon of the unit, if that unit is a player" }, -- Classification ['affix'] = { category = 'Classification', description = "Displays low level critter mobs" }, ['classification:icon'] = { category = 'Classification', description = "Displays the unit's classification in icon form (golden icon for 'ELITE' silver icon for 'RARE')" }, @@ -1465,7 +1523,8 @@ E.TagInfo = { ['additionalmana:current-percent:shortvalue'] = { category = 'Mana', description = "" }, ['additionalmana:current:shortvalue'] = { category = 'Mana', description = "" }, ['additionalmana:deficit:shortvalue'] = { category = 'Mana', description = "" }, - ['curmana'] = { category = 'Mana', description = "Displays the current mana without decimals" }, + ['permana'] = { category = 'Mana', description = "Displays the unit's mana percentage without decimals" }, + ['curmana'] = { category = 'Mana', description = "Displays the unit's current mana" }, ['mana:current-max-percent'] = { category = 'Mana', description = "Displays the current and max mana of the unit, separated by a dash (% when not full)" }, ['mana:current-max'] = { category = 'Mana', description = "Displays the unit's current and maximum mana, separated by a dash" }, ['mana:current-percent'] = { category = 'Mana', description = "Displays the current mana of the unit and % when not full" }, @@ -1515,7 +1574,7 @@ E.TagInfo = { ['curpp'] = { category = 'Power', description = "Displays the unit's current power without decimals" }, ['maxpp'] = { category = 'Power', description = "Displays the max amount of power of the unit in whole numbers without decimals" }, ['missingpp'] = { category = 'Power', description = "Displays the missing power of the unit in whole numbers when not at full power" }, - ['perpp'] = { category = 'Power', description = "Displays the unit's percentage power without decimals " }, + ['perpp'] = { category = 'Power', description = "Displays the unit's percentage power without decimals" }, ['power:current-max-percent:shortvalue'] = { category = 'Power', description = "Shortvalue of the current power and max power, separated by a dash (% when not full power)" }, ['power:current-max-percent'] = { category = 'Power', description = "Displays the current power and max power, separated by a dash (% when not full power)" }, ['power:current-max:shortvalue'] = { category = 'Power', description = "Shortvalue of the current power and max power, separated by a dash" }, @@ -1585,6 +1644,11 @@ E.TagInfo = { ['statustimer'] = { category = 'Status', description = "Displays a timer for how long a unit has had the status (e.g 'DEAD - 0:34')" }, -- Target ['classcolor:target'] = { category = 'Target', description = "[classcolor] but for the current target of the unit" }, + ['target:abbrev:long'] = { category = 'Target', description = "Displays the name of the unit's target with abbreviation (limited to 20 letters)" }, + ['target:abbrev:medium'] = { category = 'Target', description = "Displays the name of the unit's target with abbreviation (limited to 15 letters)" }, + ['target:abbrev:short'] = { category = 'Target', description = "Displays the name of the unit's target with abbreviation (limited to 10 letters)" }, + ['target:abbrev:veryshort'] = { category = 'Target', description = "Displays the name of the unit's target with abbreviation (limited to 5 letters)" }, + ['target:abbrev'] = { category = 'Target', description = "Displays the name of the unit's target with abbreviation (e.g. 'Shadowfury Witch Doctor' becomes 'S. W. Doctor')" }, ['target:long:translit'] = { category = 'Target', description = "Displays the current target of the unit with transliteration for cyrillic letters (limited to 20 letters)" }, ['target:long'] = { category = 'Target', description = "Displays the current target of the unit (limited to 20 letters)" }, ['target:medium:translit'] = { category = 'Target', description = "Displays the current target of the unit with transliteration for cyrillic letters (limited to 15 letters)" }, @@ -1594,6 +1658,7 @@ E.TagInfo = { ['target:translit'] = { category = 'Target', description = "Displays the current target of the unit with transliteration for cyrillic letters" }, ['target:veryshort:translit'] = { category = 'Target', description = "Displays the current target of the unit with transliteration for cyrillic letters (limited to 5 letters)" }, ['target:veryshort'] = { category = 'Target', description = "Displays the current target of the unit (limited to 5 letters)" }, + ['target:last'] = { category = 'Target', description = "Displays the last word of the unit's target's name" }, ['target'] = { category = 'Target', description = "Displays the current target of the unit" }, -- Threat ['threat:current'] = { category = 'Threat', description = "Displays the current threat as a value" }, diff --git a/ElvUI/Core/General/Tutorials.lua b/ElvUI/Core/General/Tutorials.lua index f9f6e39575..bc9cc4fc9e 100644 --- a/ElvUI/Core/General/Tutorials.lua +++ b/ElvUI/Core/General/Tutorials.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local Skins = E:GetModule('Skins') +local S = E:GetModule('Skins') local _G = _G local CreateFrame = CreateFrame @@ -79,28 +79,28 @@ function E:SpawnTutorialFrame() f.disableButton = CreateFrame('CheckButton', f:GetName()..'DisableButton', f, 'UICheckButtonTemplate') _G[f.disableButton:GetName() .. 'Text']:SetText(DISABLE) f.disableButton:Point('BOTTOMLEFT') - Skins:HandleCheckBox(f.disableButton) + S:HandleCheckBox(f.disableButton) f.disableButton:SetScript('OnShow', function(btn) btn:SetChecked(E.db.hideTutorial) end) f.disableButton:SetScript('OnClick', function(btn) E.db.hideTutorial = btn:GetChecked() end) f.hideButton = CreateFrame('Button', f:GetName()..'HideButton', f, 'UIPanelButtonTemplate') f.hideButton:Point('BOTTOMRIGHT', -5, 5) - Skins:HandleButton(f.hideButton) + S:HandleButton(f.hideButton) _G[f.hideButton:GetName() .. 'Text']:SetText(HIDE) f.hideButton:SetScript('OnClick', function(btn) E:StaticPopupSpecial_Hide(btn:GetParent()) end) f.nextButton = CreateFrame('Button', f:GetName()..'NextButton', f, 'UIPanelButtonTemplate') f.nextButton:Point('RIGHT', f.hideButton, 'LEFT', -4, 0) f.nextButton:Width(20) - Skins:HandleButton(f.nextButton) + S:HandleButton(f.nextButton) _G[f.nextButton:GetName() .. 'Text']:SetText('>') f.nextButton:SetScript('OnClick', function() E:SetNextTutorial() end) f.prevButton = CreateFrame('Button', f:GetName()..'PrevButton', f, 'UIPanelButtonTemplate') f.prevButton:Point('RIGHT', f.nextButton, 'LEFT', -4, 0) f.prevButton:Width(20) - Skins:HandleButton(f.prevButton) + S:HandleButton(f.prevButton) _G[f.prevButton:GetName() .. 'Text']:SetText('<') f.prevButton:SetScript('OnClick', function() E:SetPrevTutorial() end) diff --git a/ElvUI/Core/Modules/ActionBars/ActionBars.lua b/ElvUI/Core/Modules/ActionBars/ActionBars.lua index dc18230352..0d5f20ffd8 100644 --- a/ElvUI/Core/Modules/ActionBars/ActionBars.lua +++ b/ElvUI/Core/Modules/ActionBars/ActionBars.lua @@ -201,26 +201,10 @@ function AB:TrimIcon(button, masque) local icon = button.icon or button.Icon if not icon then return end - local left, right, top, bottom = unpack(button.db and button.db.customCoords or E.TexCoords) - local changeRatio = button.db and not button.db.keepSizeRatio - - if changeRatio then - local width, height = button:GetSize() - local ratio = width / height - if ratio > 1 then - local trimAmount = (1 - (1 / ratio)) * 0.5 - top = top + trimAmount - bottom = bottom - trimAmount - else - local trimAmount = (1 - ratio) * 0.5 - left = left + trimAmount - right = right - trimAmount - end - end - - -- always when masque is off, otherwise only when keepSizeRatio is off - if not masque or changeRatio then - icon:SetTexCoord(left, right, top, bottom) + if not masque and button.db and not button.db.keepSizeRatio then + icon:SetTexCoord(E:CropRatio(button, button.db.customCoords)) + else + icon:SetTexCoord(unpack(E.TexCoords)) end end @@ -683,9 +667,11 @@ function AB:StyleButton(button, noBackdrop, useMasque, ignoreNormal) if flash then if AB.db.flashAnimation then + local flashOffset = E.PixelMode and 2 or 4 + flash:SetColorTexture(1.0, 0.2, 0.2, 0.45) flash:ClearAllPoints() - flash:SetOutside(icon, 2, 2) + flash:SetOutside(icon, flashOffset, flashOffset) flash:SetDrawLayer('BACKGROUND', -1) else flash:SetTexture() @@ -927,7 +913,6 @@ do end end -local SpellBookTooltip = CreateFrame('GameTooltip', 'ElvUISpellBookTooltip', E.UIParent, 'GameTooltipTemplate') function AB:SpellBookTooltipOnUpdate(elapsed) self.elapsed = (self.elapsed or 0) + elapsed if self.elapsed < TOOLTIP_UPDATE_TIME then return end @@ -939,7 +924,7 @@ end function AB:SpellButtonOnEnter(_, tt) -- TT:MODIFIER_STATE_CHANGED uses this function to safely update the spellbook tooltip when the actionbar module is disabled - if not tt then tt = SpellBookTooltip end + if not tt then tt = E.SpellBookTooltip end if tt:IsForbidden() then return end tt:SetOwner(self, 'ANCHOR_RIGHT') @@ -977,7 +962,7 @@ function AB:SpellButtonOnEnter(_, tt) tt:AddLine(_G.SPELLBOOK_SPELL_NOT_ON_ACTION_BAR, color.r, color.g, color.b) end - if tt == SpellBookTooltip then + if tt == E.SpellBookTooltip then tt:SetScript('OnUpdate', (needsUpdate and AB.SpellBookTooltipOnUpdate) or nil) end @@ -990,7 +975,7 @@ end function AB:UpdateSpellBookTooltip(event) -- only need to check the shown state when its not called from TT:MODIFIER_STATE_CHANGED which already checks the shown state - local button = (not event or SpellBookTooltip:IsShown()) and SpellBookTooltip:GetOwner() + local button = (not event or E.SpellBookTooltip:IsShown()) and E.SpellBookTooltip:GetOwner() if button then AB.SpellButtonOnEnter(button) end end @@ -1002,8 +987,8 @@ function AB:SpellButtonOnLeave() ActionBarController_UpdateAllSpellHighlights() end - SpellBookTooltip:Hide() - SpellBookTooltip:SetScript('OnUpdate', nil) + E.SpellBookTooltip:Hide() + E.SpellBookTooltip:SetScript('OnUpdate', nil) end function AB:ButtonEventsRegisterFrame(added) diff --git a/ElvUI/Core/Modules/ActionBars/Bind.lua b/ElvUI/Core/Modules/ActionBars/Bind.lua index 60d9bf4e03..6ffeda8332 100644 --- a/ElvUI/Core/Modules/ActionBars/Bind.lua +++ b/ElvUI/Core/Modules/ActionBars/Bind.lua @@ -1,6 +1,6 @@ local E, L, V, P, G = unpack(ElvUI) local AB = E:GetModule('ActionBars') -local Skins = E:GetModule('Skins') +local S = E:GetModule('Skins') local _G = _G local tonumber = tonumber @@ -405,8 +405,8 @@ function AB:LoadKeyBinder() Popup.save:Point('BOTTOMRIGHT', -14, 10) Popup.discard:Point('BOTTOMLEFT', 14, 10) - Skins:HandleCheckBox(Popup.perCharCheck) - Skins:HandleButton(Popup.discard) - Skins:HandleButton(Popup.header) - Skins:HandleButton(Popup.save) + S:HandleCheckBox(Popup.perCharCheck) + S:HandleButton(Popup.discard) + S:HandleButton(Popup.header) + S:HandleButton(Popup.save) end diff --git a/ElvUI/Core/Modules/Bags/Bags.lua b/ElvUI/Core/Modules/Bags/Bags.lua index 62e0e91826..f048521973 100644 --- a/ElvUI/Core/Modules/Bags/Bags.lua +++ b/ElvUI/Core/Modules/Bags/Bags.lua @@ -1,7 +1,7 @@ local E, L, V, P, G = unpack(ElvUI) local B = E:GetModule('Bags') +local S = E:GetModule('Skins') local TT = E:GetModule('Tooltip') -local Skins = E:GetModule('Skins') local AB = E:GetModule('ActionBars') local NP = E:GetModule('NamePlates') local LSM = E.Libs.LSM @@ -46,7 +46,6 @@ local SetItemButtonTexture = SetItemButtonTexture local SetItemButtonTextureVertexColor = SetItemButtonTextureVertexColor local StaticPopup_Show = StaticPopup_Show local ToggleFrame = ToggleFrame -local UIParent = UIParent local UnitAffectingCombat = UnitAffectingCombat local IsBagOpen, IsOptionFrameOpen = IsBagOpen, IsOptionFrameOpen @@ -381,6 +380,12 @@ function B:UpdateItemDisplay() for _, bagFrame in next, B.BagFrames do for _, bag in next, bagFrame.Bags do for _, slot in ipairs(bag) do + if B.db.itemLevel then + B:UpdateItemLevel(slot) + else + slot.itemLevel:SetText('') + end + slot.itemLevel:ClearAllPoints() slot.itemLevel:Point(B.db.itemLevelPosition, B.db.itemLevelxOffset, B.db.itemLevelyOffset) slot.itemLevel:FontTemplate(LSM:Fetch('font', B.db.itemLevelFont), B.db.itemLevelFontSize, B.db.itemLevelFontOutline) @@ -551,17 +556,17 @@ function B:GetItemQuestInfo(itemLink, bindType, itemClassID) if bindType == 4 or itemClassID == LE_ITEM_CLASS_QUESTITEM then return true, true else - E.ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE') - E.ScanTooltip:SetHyperlink(itemLink) - E.ScanTooltip:Show() - local isQuestItem, isStarterItem - for i = BIND_START, BIND_END do - local line = _G['ElvUI_ScanTooltipTextLeft'..i]:GetText() - - if not line or line == '' then break end - if not isQuestItem and line == _G.ITEM_BIND_QUEST then isQuestItem = true end - if not isStarterItem and line == _G.ITEM_STARTS_QUEST then isStarterItem = true end + local info = E.ScanTooltip:GetHyperlinkInfo(itemLink) + if info then + for i = BIND_START, BIND_END do + local line = info.lines[i] + local text = line and line.leftText + + if not text or text == '' then break end + if not isQuestItem and text == _G.ITEM_BIND_QUEST then isQuestItem = true end + if not isStarterItem and text == _G.ITEM_STARTS_QUEST then isStarterItem = true end + end end E.ScanTooltip:Hide() @@ -1299,6 +1304,18 @@ function B:UpdateTokens() button.currencyID = info.currencyTypesID button:Show() + if button.currencyID and E.Wrath then + local tokens = _G.TokenFrameContainer.buttons + if tokens then + for _, token in next, tokens do + if token.itemID == button.currencyID then + button.index = token.index + break + end + end + end + end + local icon = button.icon or button.Icon icon:SetTexture(info.iconFileID) @@ -1565,7 +1582,7 @@ function B:ConstructContainerFrame(name, isBank) GameTooltip:Show() end) - Skins:HandleCloseButton(f.closeButton) + S:HandleCloseButton(f.closeButton) f.holderFrame = CreateFrame('Frame', nil, f) f.holderFrame:Point('TOP', f, 'TOP', 0, -f.topOffset) @@ -1766,7 +1783,7 @@ function B:ConstructContainerFrame(name, isBank) f.reagentFrame.cover.purchaseButton:Height(20) f.reagentFrame.cover.purchaseButton:Width(150) f.reagentFrame.cover.purchaseButton:Point('CENTER', f.reagentFrame.cover, 'CENTER') - Skins:HandleButton(f.reagentFrame.cover.purchaseButton) + S:HandleButton(f.reagentFrame.cover.purchaseButton) f.reagentFrame.cover.purchaseButton:SetFrameLevel(16) f.reagentFrame.cover.purchaseButton.text = f.reagentFrame.cover.purchaseButton:CreateFontString(nil, 'OVERLAY') f.reagentFrame.cover.purchaseButton.text:FontTemplate() @@ -2821,7 +2838,7 @@ function B:Initialize() local BagFrameHolder = CreateFrame('Frame', nil, E.UIParent) BagFrameHolder:Width(200) BagFrameHolder:Height(22) - BagFrameHolder:SetFrameLevel(40) + BagFrameHolder:SetFrameLevel(355) if not E.private.bags.enable then -- Set a different default anchor @@ -2845,7 +2862,7 @@ function B:Initialize() BankFrameHolder:Width(200) BankFrameHolder:Height(22) BankFrameHolder:Point('BOTTOMLEFT', _G.LeftChatPanel, 'BOTTOMLEFT', 0, 22 + E.Border*4 - E.Spacing*2) - BankFrameHolder:SetFrameLevel(40) + BankFrameHolder:SetFrameLevel(350) E:CreateMover(BankFrameHolder, 'ElvUIBankMover', L["Bank (Grow Up)"], nil, nil, B.PostBagMove, nil, nil, 'bags,general') --Set some variables on movers diff --git a/ElvUI/Core/Modules/Blizzard/AlertFrame.lua b/ElvUI/Core/Modules/Blizzard/AlertFrame.lua index d07082cb53..b3982c101e 100644 --- a/ElvUI/Core/Modules/Blizzard/AlertFrame.lua +++ b/ElvUI/Core/Modules/Blizzard/AlertFrame.lua @@ -1,6 +1,6 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') -local Misc = E:GetModule('Misc') +local BL = E:GetModule('Blizzard') +local M = E:GetModule('Misc') local _G = _G local ipairs = ipairs @@ -32,7 +32,7 @@ function E:PostAlertMove() AlertFrameMover:SetFormattedText('%s %s', AlertFrameMover.textString, growUp and '(Grow Up)' or '(Grow Down)') - local anchor = perksAnchor or (E.private.general.lootRoll and Misc:UpdateLootRollAnchors(POSITION)) or _G.AlertFrameHolder + local anchor = perksAnchor or (E.private.general.lootRoll and M:UpdateLootRollAnchors(POSITION)) or _G.AlertFrameHolder AlertFrame:ClearAllPoints() AlertFrame:SetAllPoints(anchor) @@ -41,11 +41,11 @@ function E:PostAlertMove() GroupLootContainer:Point(POSITION, anchor, ANCHOR_POINT, 0, Y_OFFSET) if GroupLootContainer:IsShown() then - B.GroupLootContainer_Update(GroupLootContainer) + BL.GroupLootContainer_Update(GroupLootContainer) end end -function B:AdjustQueuedAnchors(relativeAlert) +function BL:AdjustQueuedAnchors(relativeAlert) local base = BASE_YOFFSET -- copy we can clear after the first for alert in self.alertFramePool:EnumerateActive() do alert:ClearAllPoints() @@ -61,7 +61,7 @@ function B:AdjustQueuedAnchors(relativeAlert) return relativeAlert end -function B:AdjustAnchors(relativeAlert) +function BL:AdjustAnchors(relativeAlert) local alert = self.alertFrame if alert:IsShown() then alert:ClearAllPoints() @@ -73,7 +73,7 @@ function B:AdjustAnchors(relativeAlert) return relativeAlert end -function B:AdjustAnchorsNonAlert(relativeAnchor) +function BL:AdjustAnchorsNonAlert(relativeAnchor) local anchor = self.anchorFrame if anchor:IsShown() then anchor:ClearAllPoints() @@ -85,7 +85,7 @@ function B:AdjustAnchorsNonAlert(relativeAnchor) return relativeAnchor end -function B:GroupLootContainer_Update() +function BL:GroupLootContainer_Update() local lastIdx for i = 1, self.maxIndex do @@ -114,15 +114,15 @@ end local function AlertSubSystem_AdjustPosition(alertFrameSubSystem) if alertFrameSubSystem.alertFramePool then --queued alert system - alertFrameSubSystem.AdjustAnchors = B.AdjustQueuedAnchors + alertFrameSubSystem.AdjustAnchors = BL.AdjustQueuedAnchors elseif not alertFrameSubSystem.anchorFrame then --simple alert system - alertFrameSubSystem.AdjustAnchors = B.AdjustAnchors + alertFrameSubSystem.AdjustAnchors = BL.AdjustAnchors elseif alertFrameSubSystem.anchorFrame then --anchor frame system - alertFrameSubSystem.AdjustAnchors = B.AdjustAnchorsNonAlert + alertFrameSubSystem.AdjustAnchors = BL.AdjustAnchorsNonAlert end end -function B:AlertMovers() +function BL:AlertMovers() local AlertFrameHolder = CreateFrame('Frame', 'AlertFrameHolder', E.UIParent) AlertFrameHolder:Size(180, 20) AlertFrameHolder:Point('TOP', E.UIParent, 'TOP', 0, -20) @@ -154,7 +154,7 @@ function B:AlertMovers() end self:SecureHook(_G.AlertFrame, 'UpdateAnchors', E.PostAlertMove) - hooksecurefunc('GroupLootContainer_Update', B.GroupLootContainer_Update) + hooksecurefunc('GroupLootContainer_Update', BL.GroupLootContainer_Update) --[=[ Code you can use for alert testing --Queued Alerts: diff --git a/ElvUI/Core/Modules/Blizzard/Blizzard.lua b/ElvUI/Core/Modules/Blizzard/Blizzard.lua index be3b52b10c..84b153937c 100644 --- a/ElvUI/Core/Modules/Blizzard/Blizzard.lua +++ b/ElvUI/Core/Modules/Blizzard/Blizzard.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local LSM = E.Libs.LSM local _G = _G @@ -35,14 +35,14 @@ local function PostMove(mover) mover.parent:Point(point, mover) end -function B:RepositionFrame(frame, _, anchor) +function BL:RepositionFrame(frame, _, anchor) if anchor ~= frame.mover then frame:ClearAllPoints() frame:Point(frame.mover.anchorPoint or 'TOPLEFT', frame.mover, frame.mover.anchorPoint or 'TOPLEFT') end end -function B:QuestXPPercent() +function BL:QuestXPPercent() if not E.db.general.questXPPercent then return end local unitXP, unitXPMax = UnitXP('player'), UnitXPMax('player') @@ -64,7 +64,7 @@ function B:QuestXPPercent() end end -function B:HandleAddonCompartment() +function BL:HandleAddonCompartment() local compartment = _G.AddonCompartmentFrame if compartment then if not compartment.mover then @@ -90,19 +90,19 @@ function B:HandleAddonCompartment() end end -function B:ObjectiveTracker_HasQuestTracker() +function BL:ObjectiveTracker_HasQuestTracker() return E:IsAddOnEnabled('!KalielsTracker') or E:IsAddOnEnabled('DugisGuideViewerZ') end -function B:ObjectiveTracker_AutoHide() +function BL:ObjectiveTracker_AutoHide() local tracker = (E.Wrath and _G.WatchFrame) or _G.ObjectiveTrackerFrame if not tracker then return end if not tracker.AutoHider then tracker.AutoHider = CreateFrame('Frame', nil, tracker, 'SecureHandlerStateTemplate') tracker.AutoHider:SetAttribute('_onstate-objectiveHider', 'if newstate == 1 then self:Hide() else self:Show() end') - tracker.AutoHider:SetScript('OnHide', B.ObjectiveTracker_AutoHideOnHide) - tracker.AutoHider:SetScript('OnShow', B.ObjectiveTracker_AutoHideOnShow) + tracker.AutoHider:SetScript('OnHide', BL.ObjectiveTracker_AutoHideOnHide) + tracker.AutoHider:SetScript('OnShow', BL.ObjectiveTracker_AutoHideOnShow) end if E.db.general.objectiveFrameAutoHide then @@ -112,55 +112,55 @@ function B:ObjectiveTracker_AutoHide() end end -function B:ADDON_LOADED(_, addon) +function BL:ADDON_LOADED(_, addon) if addon == 'Blizzard_GuildBankUI' then - B:ImproveGuildBank() - elseif B.TryDisableTutorials then - B:ShutdownTutorials() + BL:ImproveGuildBank() + elseif BL.TryDisableTutorials then + BL:ShutdownTutorials() end end -function B:Initialize() - B.Initialized = true +function BL:Initialize() + BL.Initialized = true - B:EnhanceColorPicker() - B:AlertMovers() - B:HandleWidgets() - B:PositionCaptureBar() + BL:EnhanceColorPicker() + BL:AlertMovers() + BL:HandleWidgets() + BL:PositionCaptureBar() - B:RegisterEvent('ADDON_LOADED') + BL:RegisterEvent('ADDON_LOADED') if not E.Retail then - B:KillBlizzard() + BL:KillBlizzard() else - B:DisableHelpTip() - B:DisableTutorials() - B:SkinBlizzTimers() - B:HandleTalkingHead() - B:HandleAddonCompartment() + BL:DisableHelpTip() + BL:DisableTutorials() + BL:SkinBlizzTimers() + BL:HandleTalkingHead() + BL:HandleAddonCompartment() E:CreateMover(_G.LossOfControlFrame, 'LossControlMover', L["Loss Control Icon"]) --Add (+X%) to quest rewards experience text - B:SecureHook('QuestInfo_Display', 'QuestXPPercent') + BL:SecureHook('QuestInfo_Display', 'QuestXPPercent') if not E:IsAddOnEnabled('SimplePowerBar') then - B:PositionAltPowerBar() - B:SkinAltPowerBar() + BL:PositionAltPowerBar() + BL:SkinAltPowerBar() end end if E.Wrath then - B:PositionVehicleFrame() + BL:PositionVehicleFrame() end if E.Classic then if E.db.general.objectiveTracker then - B:QuestWatch_MoveFrames() - hooksecurefunc('QuestWatch_Update', B.QuestWatch_AddQuestClick) + BL:QuestWatch_MoveFrames() + hooksecurefunc('QuestWatch_Update', BL.QuestWatch_AddQuestClick) end - elseif not B:ObjectiveTracker_HasQuestTracker() then - B:ObjectiveTracker_Setup() + elseif not BL:ObjectiveTracker_HasQuestTracker() then + BL:ObjectiveTracker_Setup() end local MinimapAnchor = _G.ElvUI_MinimapHolder or _G.Minimap @@ -169,15 +169,15 @@ function B:Initialize() _G.BNToastFrame:Point('TOPRIGHT', MinimapAnchor, 'BOTTOMRIGHT', 0, -10) E:CreateMover(_G.BNToastFrame, 'BNETMover', L["BNet Frame"], nil, nil, PostMove) _G.BNToastFrame.mover:Size(_G.BNToastFrame:GetSize()) - B:SecureHook(_G.BNToastFrame, 'SetPoint', 'RepositionFrame') + BL:SecureHook(_G.BNToastFrame, 'SetPoint', 'RepositionFrame') end if GetCurrentRegion() == 2 then -- TimeAlertFrame Frame _G.TimeAlertFrame:Point('TOPRIGHT', MinimapAnchor, 'BOTTOMRIGHT', 0, -80) E:CreateMover(_G.TimeAlertFrame, 'TimeAlertFrameMover', L["Time Alert Frame"], nil, nil, PostMove) _G.TimeAlertFrame.mover:Size(_G.TimeAlertFrame:GetSize()) - B:SecureHook(_G.TimeAlertFrame, 'SetPoint', 'RepositionFrame') + BL:SecureHook(_G.TimeAlertFrame, 'SetPoint', 'RepositionFrame') end end -E:RegisterModule(B:GetName()) +E:RegisterModule(BL:GetName()) diff --git a/ElvUI/Core/Modules/Blizzard/CaptureBar.lua b/ElvUI/Core/Modules/Blizzard/CaptureBar.lua index 1d7b12ac34..1032b9d2ad 100644 --- a/ElvUI/Core/Modules/Blizzard/CaptureBar.lua +++ b/ElvUI/Core/Modules/Blizzard/CaptureBar.lua @@ -1,10 +1,10 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local hooksecurefunc = hooksecurefunc -function B:CaptureBarUpdate() +function BL:CaptureBarUpdate() local numFrames = _G.NUM_EXTENDED_UI_FRAMES if not numFrames then return end @@ -22,6 +22,6 @@ function B:CaptureBarUpdate() end end -function B:PositionCaptureBar() - hooksecurefunc('UIParent_ManageFramePositions', B.CaptureBarUpdate) +function BL:PositionCaptureBar() + hooksecurefunc('UIParent_ManageFramePositions', BL.CaptureBarUpdate) end diff --git a/ElvUI/Core/Modules/Blizzard/ColorPicker.lua b/ElvUI/Core/Modules/Blizzard/ColorPicker.lua index 4349a7345a..79c4a132c1 100644 --- a/ElvUI/Core/Modules/Blizzard/ColorPicker.lua +++ b/ElvUI/Core/Modules/Blizzard/ColorPicker.lua @@ -3,7 +3,7 @@ -- Modified and optimized by Simpy. ------------------------------------------------------------------------------ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local S = E:GetModule('Skins') local _G = _G @@ -157,7 +157,7 @@ local function onValueChanged(_, value) end end -function B:EnhanceColorPicker() +function BL:EnhanceColorPicker() if E:IsAddOnEnabled('ColorPickerPlus') then return end local Picker = _G.ColorPickerFrame diff --git a/ElvUI/Core/Modules/Blizzard/GuildBank.lua b/ElvUI/Core/Modules/Blizzard/GuildBank.lua index 5df6482f76..2f139dc6a5 100644 --- a/ElvUI/Core/Modules/Blizzard/GuildBank.lua +++ b/ElvUI/Core/Modules/Blizzard/GuildBank.lua @@ -1,6 +1,6 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') -local Bags = E:GetModule('Bags') +local BL = E:GetModule('Blizzard') +local B = E:GetModule('Bags') local LSM = E.Libs.LSM local _G = _G @@ -14,7 +14,7 @@ local GetItemInfo = GetItemInfo local NUM_SLOTS_PER_GUILDBANK_GROUP = 14 local NUM_GUILDBANK_COLUMNS = 7 -function B:GuildBank_ItemLevel(button) +function BL:GuildBank_ItemLevel(button) local db = E.db.general.guildBank if not db then return end @@ -44,7 +44,7 @@ function B:GuildBank_ItemLevel(button) end end - local canShowItemLevel = Bags:IsItemEligibleForItemLevelDisplay(classID, subclassID, itemEquipLoc, rarity) + local canShowItemLevel = B:IsItemEligibleForItemLevelDisplay(classID, subclassID, itemEquipLoc, rarity) if canShowItemLevel then local color = db.itemLevelCustomColorEnable and db.itemLevelCustomColor if color then @@ -63,7 +63,7 @@ function B:GuildBank_ItemLevel(button) button.itemLevel:SetTextColor(r or 1, g or 1, b or 1) end -function B:GuildBank_CountText(button) +function BL:GuildBank_CountText(button) local db = E.db.general.guildBank if not db then return end @@ -73,7 +73,7 @@ function B:GuildBank_CountText(button) button.Count:SetTextColor(db.countFontColor.r, db.countFontColor.g, db.countFontColor.b) end -function B:GuildBank_Update() +function BL:GuildBank_Update() local frame = _G.GuildBankFrame if not frame or not frame:IsShown() then return end @@ -83,14 +83,14 @@ function B:GuildBank_Update() for x = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do local button = column['Button'..x] - B:GuildBank_ItemLevel(button) - B:GuildBank_CountText(button) + BL:GuildBank_ItemLevel(button) + BL:GuildBank_CountText(button) end end end -function B:ImproveGuildBank() - hooksecurefunc(_G.GuildBankFrame, 'Update', B.GuildBank_Update) +function BL:ImproveGuildBank() + hooksecurefunc(_G.GuildBankFrame, 'Update', BL.GuildBank_Update) -- blizzard bug fix when trying to search after having the guild bank open if not E.Retail then -- they copy pasted too much diff --git a/ElvUI/Core/Modules/Blizzard/QuestWatch.lua b/ElvUI/Core/Modules/Blizzard/QuestWatch.lua index 12134b0a20..18f22b705b 100644 --- a/ElvUI/Core/Modules/Blizzard/QuestWatch.lua +++ b/ElvUI/Core/Modules/Blizzard/QuestWatch.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local CreateFrame = CreateFrame @@ -10,8 +10,8 @@ local QuestLog_SetSelection = QuestLog_SetSelection local QuestLog_Update = QuestLog_Update local ShowUIPanel = ShowUIPanel -B.QuestWatch_ClickFrames = {} -function B:QuestWatch_MoveFrames() +BL.QuestWatch_ClickFrames = {} +function BL:QuestWatch_MoveFrames() local QuestWatchFrameHolder = CreateFrame('Frame', nil, E.UIParent) QuestWatchFrameHolder:Size(130, 22) QuestWatchFrameHolder:SetPoint('TOPRIGHT', E.UIParent, 'TOPRIGHT', -135, -300) @@ -33,31 +33,31 @@ function B:QuestWatch_MoveFrames() QuestTimerFrame:SetAllPoints(QuestTimerFrameHolder) end -function B:QuestWatch_OnClick() +function BL:QuestWatch_OnClick() ShowUIPanel(_G.QuestLogFrame) QuestLog_SetSelection(self.Quest) QuestLog_Update() end -function B:QuestWatch_SetClickFrames(index, quest, text) - if not B.QuestWatch_ClickFrames[index] then - B.QuestWatch_ClickFrames[index] = CreateFrame('Frame') +function BL:QuestWatch_SetClickFrames(index, quest, text) + if not BL.QuestWatch_ClickFrames[index] then + BL.QuestWatch_ClickFrames[index] = CreateFrame('Frame') end - local frame = B.QuestWatch_ClickFrames[index] - frame:SetScript('OnMouseUp', B.QuestWatch_OnClick) + local frame = BL.QuestWatch_ClickFrames[index] + frame:SetScript('OnMouseUp', BL.QuestWatch_OnClick) frame:SetAllPoints(text) frame.Quest = quest end -function B:QuestWatch_AddQuestClick() +function BL:QuestWatch_AddQuestClick() local clickIndex = 1 - local clickFrame = B.QuestWatch_ClickFrames[clickIndex] + local clickFrame = BL.QuestWatch_ClickFrames[clickIndex] while clickFrame do clickFrame:SetScript('OnMouseUp', nil) clickIndex = clickIndex + 1 - clickFrame = B.QuestWatch_ClickFrames[clickIndex] + clickFrame = BL.QuestWatch_ClickFrames[clickIndex] end if not E.db.general.objectiveTracker then return end @@ -72,7 +72,7 @@ function B:QuestWatch_AddQuestClick() lineIndex = numQuests + lineIndex + 1 -- Bump index - B:QuestWatch_SetClickFrames(i, questIndex, text) + BL:QuestWatch_SetClickFrames(i, questIndex, text) end end end diff --git a/ElvUI/Core/Modules/Blizzard/TalkingHeadFrame.lua b/ElvUI/Core/Modules/Blizzard/TalkingHeadFrame.lua index f0fbcbd10c..2213f6b2d0 100644 --- a/ElvUI/Core/Modules/Blizzard/TalkingHeadFrame.lua +++ b/ElvUI/Core/Modules/Blizzard/TalkingHeadFrame.lua @@ -1,10 +1,10 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local ipairs, tremove = ipairs, tremove -function B:ScaleTalkingHeadFrame() +function BL:ScaleTalkingHeadFrame() local frame = _G.TalkingHeadFrame frame:SetScale(E.db.general.talkingHeadFrameScale or 1) @@ -22,7 +22,7 @@ function B:ScaleTalkingHeadFrame() -- frame:UnregisterEvent('LOADING_SCREEN_ENABLED') end -function B:HandleTalkingHead() +function BL:HandleTalkingHead() -- Prevent WoW from moving the frame around if not E.Retail then _G.UIPARENT_MANAGED_FRAME_POSITIONS.TalkingHeadFrame = nil @@ -37,5 +37,5 @@ function B:HandleTalkingHead() end -- Now scale it - B:ScaleTalkingHeadFrame() + BL:ScaleTalkingHeadFrame() end diff --git a/ElvUI/Core/Modules/Blizzard/TimerTracker.lua b/ElvUI/Core/Modules/Blizzard/TimerTracker.lua index b8c9413a66..ea1ecb989e 100644 --- a/ElvUI/Core/Modules/Blizzard/TimerTracker.lua +++ b/ElvUI/Core/Modules/Blizzard/TimerTracker.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local next = next @@ -31,7 +31,7 @@ local function SkinIt(bar) end end -function B:START_TIMER() +function BL:START_TIMER() for _, b in pairs(_G.TimerTracker.timerList) do if b.bar and not b.bar.skinned then SkinIt(b.bar) @@ -40,7 +40,7 @@ function B:START_TIMER() end end -function B:SkinBlizzTimers() - B:RegisterEvent('START_TIMER') - B:START_TIMER() +function BL:SkinBlizzTimers() + BL:RegisterEvent('START_TIMER') + BL:START_TIMER() end diff --git a/ElvUI/Core/Modules/Blizzard/TutorialFrames.lua b/ElvUI/Core/Modules/Blizzard/TutorialFrames.lua index 828542561c..a785ad0224 100644 --- a/ElvUI/Core/Modules/Blizzard/TutorialFrames.lua +++ b/ElvUI/Core/Modules/Blizzard/TutorialFrames.lua @@ -1,11 +1,11 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local wipe, next = wipe, next local hooksecurefunc = hooksecurefunc -function B:KillBlizzard() -- current not E.Retail +function BL:KillBlizzard() -- current not E.Retail _G.Advanced_UIScaleSlider:Kill() _G.Advanced_UseUIScale:Kill() end @@ -16,7 +16,7 @@ local function AcknowledgeTips() end end -function B:DisableHelpTip() -- auto complete helptips +function BL:DisableHelpTip() -- auto complete helptips if not E.global.general.disableTutorialButtons then return end hooksecurefunc(_G.HelpTip, 'Show', AcknowledgeTips) @@ -105,15 +105,15 @@ local function ShutdownTD() -- Blizzard_TutorialDispatcher return TD end -function B:ShutdownTutorials() +function BL:ShutdownTutorials() local NPE, GT, TM, TD = ShutdownNPE(), ShutdownGT(), ShutdownTM(), ShutdownTD() if NPE and GT and TM and TD then -- they exist unregister this - B.TryDisableTutorials = nil + BL.TryDisableTutorials = nil end end -- disable new player experience stuff -function B:DisableTutorials() +function BL:DisableTutorials() local NPE, GT, TM, TD = ShutdownNPE(), ShutdownGT(), ShutdownTM(), ShutdownTD() - B.TryDisableTutorials = not NPE or not GT or not TM or not TD or nil -- wait for them to exist + BL.TryDisableTutorials = not NPE or not GT or not TM or not TD or nil -- wait for them to exist end diff --git a/ElvUI/Core/Modules/Blizzard/Vehicle.lua b/ElvUI/Core/Modules/Blizzard/Vehicle.lua index a5a3e537b9..def4e4d3c3 100644 --- a/ElvUI/Core/Modules/Blizzard/Vehicle.lua +++ b/ElvUI/Core/Modules/Blizzard/Vehicle.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local hooksecurefunc = hooksecurefunc @@ -35,11 +35,11 @@ local function VehicleSetUp(vehicleID) end end -function B:UpdateVehicleFrame() +function BL:UpdateVehicleFrame() VehicleSetUp(_G.VehicleSeatIndicator.currSkin) end -function B:PositionVehicleFrame() +function BL:PositionVehicleFrame() local indicator = _G.VehicleSeatIndicator if not indicator.PositionVehicleFrameHooked then hooksecurefunc(indicator, 'SetPoint', SetPosition) @@ -53,7 +53,7 @@ function B:PositionVehicleFrame() indicator.PositionVehicleFrameHooked = true end - B:UpdateVehicleFrame() + BL:UpdateVehicleFrame() if E.Retail and E.private.actionbar.enable then -- fix a taint when actionbars in use indicator.UnloadTextures = function(frame) -- removes UIParent_ManageFramePositions() diff --git a/ElvUI/Core/Modules/Blizzard/WidgetsUI.lua b/ElvUI/Core/Modules/Blizzard/WidgetsUI.lua index 8857533ea2..3893648646 100644 --- a/ElvUI/Core/Modules/Blizzard/WidgetsUI.lua +++ b/ElvUI/Core/Modules/Blizzard/WidgetsUI.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local NP = E:GetModule('NamePlates') local _G = _G @@ -12,7 +12,7 @@ local ignoreWidgets = { [283] = true -- Cosmic Energy } -function B:UIWidgetTemplateStatusBar() +function BL:UIWidgetTemplateStatusBar() local forbidden = self:IsForbidden() local bar = self.Bar @@ -80,7 +80,7 @@ local captureBarSkins = { [252] = EmberCourtCaptureBar } -function B:UIWidgetTemplateCaptureBar(_, widget) +function BL:UIWidgetTemplateCaptureBar(_, widget) if self:IsForbidden() or not widget then return end local skinFunc = captureBarSkins[widget.widgetSetID] @@ -95,7 +95,7 @@ local function UpdatePosition(frame, _, anchor) end end -function B:BuildWidgetHolder(holderName, moverName, moverPoint, localeName, container, point, relativeTo, relativePoint, x, y, width, height, config) +function BL:BuildWidgetHolder(holderName, moverName, moverPoint, localeName, container, point, relativeTo, relativePoint, x, y, width, height, config) local holder = (holderName and CreateFrame('Frame', holderName, E.UIParent)) or container if width and height then holder:Size(width, height) end @@ -109,35 +109,35 @@ function B:BuildWidgetHolder(holderName, moverName, moverPoint, localeName, cont hooksecurefunc(container, 'SetPoint', UpdatePosition) end -function B:UpdateDurabilityScale() +function BL:UpdateDurabilityScale() _G.DurabilityFrame:SetScale(E.db.general.durabilityScale or 1) end -function B:HandleWidgets() - B:BuildWidgetHolder('TopCenterContainerHolder', 'TopCenterContainerMover', 'CENTER', L["TopCenterWidget"], _G.UIWidgetTopCenterContainerFrame, 'TOP', E.UIParent, 'TOP', 0, -30, 125, 20, 'ALL,WIDGETS') - B:BuildWidgetHolder('BelowMinimapContainerHolder', 'BelowMinimapContainerMover', 'CENTER', L["BelowMinimapWidget"], _G.UIWidgetBelowMinimapContainerFrame, 'TOPRIGHT', _G.Minimap, 'BOTTOMRIGHT', 0, -16, 150, 30, 'ALL,WIDGETS') +function BL:HandleWidgets() + BL:BuildWidgetHolder('TopCenterContainerHolder', 'TopCenterContainerMover', 'CENTER', L["TopCenterWidget"], _G.UIWidgetTopCenterContainerFrame, 'TOP', E.UIParent, 'TOP', 0, -30, 125, 20, 'ALL,WIDGETS') + BL:BuildWidgetHolder('BelowMinimapContainerHolder', 'BelowMinimapContainerMover', 'CENTER', L["BelowMinimapWidget"], _G.UIWidgetBelowMinimapContainerFrame, 'TOPRIGHT', _G.Minimap, 'BOTTOMRIGHT', 0, -16, 150, 30, 'ALL,WIDGETS') - B:BuildWidgetHolder(nil, 'GMMover', 'TOP', L["GM Ticket Frame"], _G.TicketStatusFrame, 'TOPLEFT', E.UIParent, 'TOPLEFT', 250, -5, nil, nil, 'ALL,GENERAL') + BL:BuildWidgetHolder(nil, 'GMMover', 'TOP', L["GM Ticket Frame"], _G.TicketStatusFrame, 'TOPLEFT', E.UIParent, 'TOPLEFT', 250, -5, nil, nil, 'ALL,GENERAL') if E.Retail then - B:BuildWidgetHolder('PowerBarContainerHolder', 'PowerBarContainerMover', 'CENTER', L["PowerBarWidget"], _G.UIWidgetPowerBarContainerFrame, 'TOP', E.UIParent, 'TOP', 0, -75, 100, 20, 'ALL,WIDGETS') - B:BuildWidgetHolder('EventToastHolder', 'EventToastMover', 'TOP', L["EventToastWidget"], _G.EventToastManagerFrame, 'TOP', E.UIParent, 'TOP', 0, -150, 200, 20, 'ALL,WIDGETS') - B:BuildWidgetHolder('BossBannerHolder', 'BossBannerMover', 'TOP', L["BossBannerWidget"], _G.BossBanner, 'TOP', E.UIParent, 'TOP', 0, -125, 200, 20, 'ALL,WIDGETS') + BL:BuildWidgetHolder('PowerBarContainerHolder', 'PowerBarContainerMover', 'CENTER', L["PowerBarWidget"], _G.UIWidgetPowerBarContainerFrame, 'TOP', E.UIParent, 'TOP', 0, -75, 100, 20, 'ALL,WIDGETS') + BL:BuildWidgetHolder('EventToastHolder', 'EventToastMover', 'TOP', L["EventToastWidget"], _G.EventToastManagerFrame, 'TOP', E.UIParent, 'TOP', 0, -150, 200, 20, 'ALL,WIDGETS') + BL:BuildWidgetHolder('BossBannerHolder', 'BossBannerMover', 'TOP', L["BossBannerWidget"], _G.BossBanner, 'TOP', E.UIParent, 'TOP', 0, -125, 200, 20, 'ALL,WIDGETS') -- handle power bar widgets after reload as Setup will have fired before this for _, widget in pairs(_G.UIWidgetPowerBarContainerFrame.widgetFrames) do - B.UIWidgetTemplateStatusBar(widget) + BL.UIWidgetTemplateStatusBar(widget) end end if not E.Retail then _G.DurabilityFrame:SetFrameStrata('HIGH') local duraWidth, duraHeight = _G.DurabilityFrame:GetSize() - B:BuildWidgetHolder('DurabilityFrameHolder', 'DurabilityFrameMover', 'CENTER', L["Durability Frame"], _G.DurabilityFrame, 'TOPRIGHT', E.UIParent, 'TOPRIGHT', -135, -300, duraWidth, duraHeight, 'ALL,GENERAL') - B:UpdateDurabilityScale() + BL:BuildWidgetHolder('DurabilityFrameHolder', 'DurabilityFrameMover', 'CENTER', L["Durability Frame"], _G.DurabilityFrame, 'TOPRIGHT', E.UIParent, 'TOPRIGHT', -135, -300, duraWidth, duraHeight, 'ALL,GENERAL') + BL:UpdateDurabilityScale() end -- Credits ShestakUI - hooksecurefunc(_G.UIWidgetTemplateStatusBarMixin, 'Setup', B.UIWidgetTemplateStatusBar) - hooksecurefunc(_G.UIWidgetTemplateCaptureBarMixin, 'Setup', B.UIWidgetTemplateCaptureBar) + hooksecurefunc(_G.UIWidgetTemplateStatusBarMixin, 'Setup', BL.UIWidgetTemplateStatusBar) + hooksecurefunc(_G.UIWidgetTemplateCaptureBarMixin, 'Setup', BL.UIWidgetTemplateCaptureBar) end diff --git a/ElvUI/Core/Modules/Chat/Chat.lua b/ElvUI/Core/Modules/Chat/Chat.lua index 390857e24a..c9b8de58d9 100644 --- a/ElvUI/Core/Modules/Chat/Chat.lua +++ b/ElvUI/Core/Modules/Chat/Chat.lua @@ -1,7 +1,7 @@ local E, L, V, P, G = unpack(ElvUI) local CH = E:GetModule('Chat') local LO = E:GetModule('Layout') -local Skins = E:GetModule('Skins') +local S = E:GetModule('Skins') local LSM = E.Libs.LSM local _G = _G @@ -57,9 +57,9 @@ local C_Club_GetInfoFromLastCommunityChatLine = C_Club.GetInfoFromLastCommunityC local C_DateAndTime_GetCurrentCalendarTime = C_DateAndTime.GetCurrentCalendarTime local C_LFGList_GetActivityInfoTable = C_LFGList.GetActivityInfoTable local C_LFGList_GetSearchResultInfo = C_LFGList.GetSearchResultInfo - local C_VoiceChat_GetMemberName = C_VoiceChat.GetMemberName local C_VoiceChat_SetPortraitTexture = C_VoiceChat.SetPortraitTexture +local PanelTemplates_TabResize = PanelTemplates_TabResize local BNET_CLIENT_WOW = BNET_CLIENT_WOW local LFG_LIST_AND_MORE = LFG_LIST_AND_MORE @@ -92,6 +92,7 @@ CH.Keywords = {} CH.PluginMessageFilters = {} CH.Smileys = {} CH.TalkingList = {} +CH.FontHeights = { 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 } CH.RoleIcons = { TANK = E:TextureString(E.Media.Textures.Tank, ':15:15:0:0:64:64:2:56:2:56'), HEALER = E:TextureString(E.Media.Textures.Healer, ':15:15:0:0:64:64:2:56:2:56'), @@ -604,7 +605,8 @@ end function CH:ChatFrameTab_SetAlpha(_, skip) if skip then return end local chat = CH:GetOwner(self) - self:SetAlpha((not chat.isDocked or self.selected) and 1 or 0.6, true) + local selected = _G.GeneralDockManager.selected + self:SetAlpha((not chat.isDocked or chat == selected) and 1 or 0.6, true) end do @@ -793,6 +795,10 @@ function CH:StyleChat(frame) tab.Text:FontTemplate(LSM:Fetch('font', CH.db.tabFont), CH.db.tabFontSize, CH.db.tabFontOutline) + if not frame.isDocked then + PanelTemplates_TabResize(tab, tab.sizePadding or 0) + end + if frame.styled then return end frame:SetFrameLevel(4) @@ -840,14 +846,11 @@ function CH:StyleChat(frame) if right then right:SetTexture() end end - hooksecurefunc(tab, 'SetAlpha', CH.ChatFrameTab_SetAlpha) + tab.Text:ClearAllPoints() + tab.Text:Point('CENTER', tab, 0, -1) - if not tab.Left then - tab.Left = _G[name..'TabLeft'] or _G[name..'Tab'].Left - end + hooksecurefunc(tab, 'SetAlpha', CH.ChatFrameTab_SetAlpha) - tab.Text:ClearAllPoints() - tab.Text:Point('LEFT', tab, 'LEFT', tab.Left:GetWidth(), 0) tab:Height(22) if tab.conversationIcon then @@ -2374,7 +2377,7 @@ do function CH:StyleOverflowButton() local btn = _G.GeneralDockManagerOverflowButton local wasSkinned = btn.isSkinned -- keep this before HandleNextPrev - Skins:HandleNextPrevButton(btn, 'down', overflowColor, true) + S:HandleNextPrevButton(btn, 'down', overflowColor, true) btn:SetHighlightTexture(E.Media.Textures.ArrowUpGlow) if not wasSkinned then @@ -2387,7 +2390,7 @@ do local hl = btn:GetHighlightTexture() hl:SetVertexColor(unpack(E.media.rgbvaluecolor)) - hl:SetRotation(Skins.ArrowRotation.down) + hl:SetRotation(S.ArrowRotation.down) btn.list:SetTemplate('Transparent') end @@ -3118,7 +3121,7 @@ function CH:HandleChatVoiceIcons() end elseif CH.db.pinVoiceButtons then for index, button in ipairs(channelButtons) do - Skins:HandleButton(button, nil, nil, true) + S:HandleButton(button, nil, nil, true) button.Icon:SetDesaturated(CH.db.desaturateVoiceIcons) button:ClearAllPoints() @@ -3176,7 +3179,7 @@ function CH:CreateChatVoicePanel() channelButtons[1]:Point('TOP', Holder, 'TOP', 0, -2) for _, button in ipairs(channelButtons) do - Skins:HandleButton(button, nil, nil, true) + S:HandleButton(button, nil, nil, true) button.Icon:SetParent(button) button.Icon:SetDesaturated(CH.db.desaturateVoiceIcons) button:SetParent(Holder) @@ -3276,7 +3279,7 @@ function CH:BuildCopyChatFrame() local scrollArea = CreateFrame('ScrollFrame', 'CopyChatScrollFrame', frame, 'UIPanelScrollFrameTemplate') scrollArea:Point('TOPLEFT', frame, 'TOPLEFT', 8, -30) scrollArea:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', -30, 8) - Skins:HandleScrollBar(_G.CopyChatScrollFrameScrollBar) + S:HandleScrollBar(_G.CopyChatScrollFrameScrollBar) scrollArea:SetScript('OnSizeChanged', function(scroll) _G.CopyChatFrameEditBox:Width(scroll:GetWidth()) _G.CopyChatFrameEditBox:Height(scroll:GetHeight()) @@ -3307,7 +3310,7 @@ function CH:BuildCopyChatFrame() close:Point('TOPRIGHT') close:SetFrameLevel(close:GetFrameLevel() + 1) close:EnableMouse(true) - Skins:HandleCloseButton(close) + S:HandleCloseButton(close) end CH.TabStyles = { @@ -3613,6 +3616,7 @@ function CH:Initialize() if not ElvCharacterDB.ChatEditHistory then ElvCharacterDB.ChatEditHistory = {} end if not ElvCharacterDB.ChatHistoryLog or not CH.db.chatHistory then ElvCharacterDB.ChatHistoryLog = {} end + _G.CHAT_FONT_HEIGHTS = CH.FontHeights _G.ChatFrameMenuButton:Kill() CH:SetupChat() diff --git a/ElvUI/Core/Modules/DataTexts/Durability.lua b/ElvUI/Core/Modules/DataTexts/Durability.lua index b744114a59..d0251cfc45 100644 --- a/ElvUI/Core/Modules/DataTexts/Durability.lua +++ b/ElvUI/Core/Modules/DataTexts/Durability.lua @@ -2,13 +2,12 @@ local E, L, V, P, G = unpack(ElvUI) local DT = E:GetModule('DataTexts') local _G = _G -local select, wipe = select, wipe -local format, pairs = format, pairs +local format, pairs, wipe = format, pairs, wipe + local ToggleCharacter = ToggleCharacter local GetInventoryItemDurability = GetInventoryItemDurability local GetInventoryItemTexture = GetInventoryItemTexture local GetInventoryItemLink = GetInventoryItemLink -local GetMoneyString = GetMoneyString local DURABILITY = DURABILITY local REPAIR_COST = REPAIR_COST @@ -41,21 +40,18 @@ local function OnEvent(self) for index in pairs(slots) do local currentDura, maxDura = GetInventoryItemDurability(index) if currentDura and maxDura > 0 then - local perc, repairCost = (currentDura/maxDura)*100 + local perc, repairCost, _ = (currentDura/maxDura)*100 invDurability[index] = perc if perc < totalDurability then totalDurability = perc end - if E.Retail and E.ScanTooltip.GetTooltipData then - E.ScanTooltip:SetInventoryItem('player', index) - E.ScanTooltip:Show() - - local data = E.ScanTooltip:GetTooltipData() + if E.Retail then + local data = E.ScanTooltip:GetInventoryInfo('player', index) repairCost = data and data.repairCost else - repairCost = select(3, E.ScanTooltip:SetInventoryItem('player', index)) + _, _, repairCost = E.ScanTooltip:SetInventoryItem('player', index) end totalRepairCost = totalRepairCost + (repairCost or 0) @@ -93,7 +89,7 @@ local function OnEnter() if totalRepairCost > 0 then DT.tooltip:AddLine(' ') - DT.tooltip:AddDoubleLine(REPAIR_COST, GetMoneyString(totalRepairCost), .6, .8, 1, 1, 1, 1) + DT.tooltip:AddDoubleLine(REPAIR_COST, E:FormatMoney(totalRepairCost, db.goldFormat or 'BLIZZARD', not db.goldCoins), .6, .8, 1, 1, 1, 1) end DT.tooltip:Show() diff --git a/ElvUI/Core/Modules/Misc/Loot.lua b/ElvUI/Core/Modules/Misc/Loot.lua index 5807c7028e..1c106c2a5f 100644 --- a/ElvUI/Core/Modules/Misc/Loot.lua +++ b/ElvUI/Core/Modules/Misc/Loot.lua @@ -315,7 +315,7 @@ function M:LOOT_OPENED(_, autoloot) local color = ITEM_QUALITY_COLORS[max_quality] lootFrame:SetBackdropBorderColor(color.r, color.g, color.b, .8) - lootFrame:Width(max(max_width + 60, lootFrame.title:GetStringWidth() + 5)) + lootFrame:Width(max(max_width + 60, lootFrame.title:GetStringWidth() + 5)) end function M:OPEN_MASTER_LOOT_LIST() diff --git a/ElvUI/Core/Modules/Misc/TotemTracker.lua b/ElvUI/Core/Modules/Misc/TotemTracker.lua index 72f13eedf2..d66ab32f15 100644 --- a/ElvUI/Core/Modules/Misc/TotemTracker.lua +++ b/ElvUI/Core/Modules/Misc/TotemTracker.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local T = E:GetModule('TotemTracker') +local TM = E:GetModule('TotemTracker') local AB = E:GetModule('ActionBars') local _G = _G @@ -13,7 +13,7 @@ local MAX_TOTEMS = MAX_TOTEMS local priority = E.myclass == 'SHAMAN' and { [1]=1, [2]=2, [3]=4, [4]=3 } or STANDARD_TOTEM_PRIORITIES priority.classic = { [1]=2, [2]=1, [3]=4, [4]=3 } -- we need to swap 1/2 and 3/4 on classic era -function T:UpdateButton(button, totem) +function TM:UpdateButton(button, totem) if not (button and totem) then return end local haveTotem, _, startTime, duration, icon = GetTotemInfo(E.Classic and totem or totem.slot) @@ -31,85 +31,85 @@ function T:UpdateButton(button, totem) end end -function T:Update() +function TM:Update() if E.Retail then - for _, button in ipairs(T.bar) do + for _, button in ipairs(TM.bar) do if button:IsShown() then button:SetShown(false) end end for totem in _G.TotemFrame.totemPool:EnumerateActive() do - T:UpdateButton(T.bar[priority[totem.layoutIndex]], totem) + TM:UpdateButton(TM.bar[priority[totem.layoutIndex]], totem) end else for i = 1, MAX_TOTEMS do - T:UpdateButton(T.bar[priority[i]], _G['TotemFrameTotem'..i] or priority.classic[i]) + TM:UpdateButton(TM.bar[priority[i]], _G['TotemFrameTotem'..i] or priority.classic[i]) end end end -function T:PositionAndSize() +function TM:PositionAndSize() if not E.private.general.totemTracker then return end for i = 1, MAX_TOTEMS do - local button = T.bar[i] - local prevButton = T.bar[i-1] - local width = T.db.size - local height = T.db.keepSizeRatio and T.db.size or T.db.height + local button = TM.bar[i] + local prevButton = TM.bar[i-1] + local width = TM.db.size + local height = TM.db.keepSizeRatio and TM.db.size or TM.db.height button:Size(width, height) button:ClearAllPoints() AB:TrimIcon(button) - if T.db.growthDirection == 'HORIZONTAL' and T.db.sortDirection == 'ASCENDING' then + if TM.db.growthDirection == 'HORIZONTAL' and TM.db.sortDirection == 'ASCENDING' then if i == 1 then - button:Point('LEFT', T.bar, 'LEFT', T.db.spacing, 0) + button:Point('LEFT', TM.bar, 'LEFT', TM.db.spacing, 0) elseif prevButton then - button:Point('LEFT', prevButton, 'RIGHT', T.db.spacing, 0) + button:Point('LEFT', prevButton, 'RIGHT', TM.db.spacing, 0) end - elseif T.db.growthDirection == 'VERTICAL' and T.db.sortDirection == 'ASCENDING' then + elseif TM.db.growthDirection == 'VERTICAL' and TM.db.sortDirection == 'ASCENDING' then if i == 1 then - button:Point('TOP', T.bar, 'TOP', 0, -T.db.spacing) + button:Point('TOP', TM.bar, 'TOP', 0, -TM.db.spacing) elseif prevButton then - button:Point('TOP', prevButton, 'BOTTOM', 0, -T.db.spacing) + button:Point('TOP', prevButton, 'BOTTOM', 0, -TM.db.spacing) end - elseif T.db.growthDirection == 'HORIZONTAL' and T.db.sortDirection == 'DESCENDING' then + elseif TM.db.growthDirection == 'HORIZONTAL' and TM.db.sortDirection == 'DESCENDING' then if i == 1 then - button:Point('RIGHT', T.bar, 'RIGHT', -T.db.spacing, 0) + button:Point('RIGHT', TM.bar, 'RIGHT', -TM.db.spacing, 0) elseif prevButton then - button:Point('RIGHT', prevButton, 'LEFT', -T.db.spacing, 0) + button:Point('RIGHT', prevButton, 'LEFT', -TM.db.spacing, 0) end else if i == 1 then - button:Point('BOTTOM', T.bar, 'BOTTOM', 0, T.db.spacing) + button:Point('BOTTOM', TM.bar, 'BOTTOM', 0, TM.db.spacing) elseif prevButton then - button:Point('BOTTOM', prevButton, 'TOP', 0, T.db.spacing) + button:Point('BOTTOM', prevButton, 'TOP', 0, TM.db.spacing) end end end - if T.db.growthDirection == 'HORIZONTAL' then - T.bar:Width(T.db.size * MAX_TOTEMS + T.db.spacing * MAX_TOTEMS + T.db.spacing) - T.bar:Height(T.db.size + T.db.spacing * 2) + if TM.db.growthDirection == 'HORIZONTAL' then + TM.bar:Width(TM.db.size * MAX_TOTEMS + TM.db.spacing * MAX_TOTEMS + TM.db.spacing) + TM.bar:Height(TM.db.size + TM.db.spacing * 2) else - T.bar:Height(T.db.size * MAX_TOTEMS + T.db.spacing * MAX_TOTEMS + T.db.spacing) - T.bar:Width(T.db.size + T.db.spacing * 2) + TM.bar:Height(TM.db.size * MAX_TOTEMS + TM.db.spacing * MAX_TOTEMS + TM.db.spacing) + TM.bar:Width(TM.db.size + TM.db.spacing * 2) end - T:Update() + TM:Update() end -function T:Initialize() - T.Initialized = true +function TM:Initialize() + TM.Initialized = true if not E.private.general.totemTracker then return end local bar = CreateFrame('Frame', 'ElvUI_TotemTracker', E.UIParent) bar:Point('BOTTOMLEFT', E.UIParent, 'BOTTOMLEFT', 490, 4) - T.bar = bar - T.db = E.db.general.totems + TM.bar = bar + TM.db = E.db.general.totems for i = 1, MAX_TOTEMS do local button = CreateFrame('Button', bar:GetName()..'Totem'..i, bar) @@ -118,7 +118,7 @@ function T:Initialize() button:StyleButton() button:Hide() - button.db = T.db + button.db = TM.db button.holder = CreateFrame('Frame', nil, button) button.holder:SetAlpha(0) @@ -133,21 +133,21 @@ function T:Initialize() E:RegisterCooldown(button.cooldown) - T.bar[i] = button + TM.bar[i] = button end - T:PositionAndSize() + TM:PositionAndSize() - T:RegisterEvent('PLAYER_TOTEM_UPDATE', 'Update') - T:RegisterEvent('PLAYER_ENTERING_WORLD', 'Update') + TM:RegisterEvent('PLAYER_TOTEM_UPDATE', 'Update') + TM:RegisterEvent('PLAYER_ENTERING_WORLD', 'Update') if E.Retail then - T:RegisterEvent('PLAYER_SPECIALIZATION_CHANGED', 'Update') + TM:RegisterEvent('PLAYER_SPECIALIZATION_CHANGED', 'Update') else - T:RegisterEvent('ACTIVE_TALENT_GROUP_CHANGED', 'Update') + TM:RegisterEvent('ACTIVE_TALENT_GROUP_CHANGED', 'Update') end E:CreateMover(bar, 'TotemTrackerMover', L["Totem Tracker"], nil, nil, nil, nil, nil, 'general,totems') end -E:RegisterModule(T:GetName()) +E:RegisterModule(TM:GetName()) diff --git a/ElvUI/Core/Modules/Nameplates/Elements/Plugins.lua b/ElvUI/Core/Modules/Nameplates/Elements/Plugins.lua index 176065eb55..0af75398ac 100644 --- a/ElvUI/Core/Modules/Nameplates/Elements/Plugins.lua +++ b/ElvUI/Core/Modules/Nameplates/Elements/Plugins.lua @@ -3,7 +3,6 @@ local NP = E:GetModule('NamePlates') local PA = E:GetModule('PrivateAuras') local LSM = E.Libs.LSM -local strfind = strfind local ipairs, unpack = ipairs, unpack local CreateFrame = CreateFrame @@ -13,13 +12,19 @@ function NP:Construct_QuestIcons(nameplate) local QuestIcons = CreateFrame('Frame', nameplate:GetName() .. 'QuestIcons', nameplate) QuestIcons:Size(20) QuestIcons:Hide() + QuestIcons:CreateBackdrop() + QuestIcons.backdrop:Hide() - for _, object in ipairs(NP.QuestIcons.iconTypes) do + for name, object in ipairs(NP.QuestIcons.iconTypes) do local icon = QuestIcons:CreateTexture(nil, 'BORDER', nil, 1) icon.Text = QuestIcons:CreateFontString(nil, 'OVERLAY') icon.Text:FontTemplate() icon:Hide() + if name == 'Item' then + QuestIcons.backdrop:SetOutside(icon) + end + QuestIcons[object] = icon end @@ -32,7 +37,7 @@ end function NP:Update_QuestIcons(nameplate) local plateDB = NP:PlateDB(nameplate) - local db = plateDB.questIcon + local db = E.Retail and plateDB.questIcon if db and db.enable and not nameplate.isBattlePet and (nameplate.frameType == 'FRIENDLY_NPC' or nameplate.frameType == 'ENEMY_NPC') then if not nameplate:IsElementEnabled('QuestIcons') then @@ -42,19 +47,19 @@ function NP:Update_QuestIcons(nameplate) nameplate.QuestIcons:ClearAllPoints() nameplate.QuestIcons:Point(E.InversePoints[db.position], nameplate, db.position, db.xOffset, db.yOffset) + local font = LSM:Fetch('font', db.font) for _, object in ipairs(NP.QuestIcons.iconTypes) do local icon = nameplate.QuestIcons[object] - icon:Size(db.size, db.size) icon:SetAlpha(db.hideIcon and 0 or 1) + icon:Size(db.size) - local xoffset = strfind(db.textPosition, 'LEFT') and -2 or 2 - local yoffset = strfind(db.textPosition, 'BOTTOM') and 2 or -2 icon.Text:ClearAllPoints() - icon.Text:Point('CENTER', icon, db.textPosition, xoffset, yoffset) - icon.Text:FontTemplate(LSM:Fetch('font', db.font), db.fontSize, db.fontOutline) + icon.Text:Point('CENTER', icon, db.textPosition, db.textXOffset, db.textYOffset) + icon.Text:FontTemplate(font, db.fontSize, db.fontOutline) icon.Text:SetJustifyH('CENTER') - icon.size, icon.position = db.size, db.position + -- settings to send to the plugin + icon.size, icon.position, icon.spacing = db.size, db.position, db.spacing end elseif nameplate:IsElementEnabled('QuestIcons') then nameplate:DisableElement('QuestIcons') diff --git a/ElvUI/Core/Modules/Nameplates/Elements/Portraits.lua b/ElvUI/Core/Modules/Nameplates/Elements/Portraits.lua index 4d2be48114..aa10d232f9 100644 --- a/ElvUI/Core/Modules/Nameplates/Elements/Portraits.lua +++ b/ElvUI/Core/Modules/Nameplates/Elements/Portraits.lua @@ -1,26 +1,40 @@ local E, L, V, P, G = unpack(ElvUI) local NP = E:GetModule('NamePlates') -local _G = _G local unpack = unpack local hooksecurefunc = hooksecurefunc +function NP:Portrait_PreUpdate() + local nameplate = self.__owner + + if self.backdrop then + self.backdrop:Hide() + end + + local db = NP:PlateDB(nameplate) + local specIcon = db.portrait and db.portrait.specicon and nameplate.specIcon + self.useClassBase = not specIcon +end + function NP:Portrait_PostUpdate() local nameplate = self.__owner local db = NP:PlateDB(nameplate) local sf = NP:StyleFilterChanges(nameplate) - if sf.Portrait or (db.portrait and db.portrait.enable) then - if db.portrait.classicon and nameplate.isPlayer then - self:SetTexture([[Interface\WorldStateFrame\Icons-Classes]]) - self:SetTexCoord(unpack(_G.CLASS_ICON_TCOORDS[nameplate.classFile])) - self.backdrop:Hide() - else - self:SetTexCoord(.18, .82, .18, .82) + if db.portrait and (sf.Portrait or db.portrait.enable) then + local specIcon = db.portrait.specicon and nameplate.specIcon + if specIcon then + self:SetTexture(specIcon) + self.backdrop:Show() + elseif self.useClassBase then self.backdrop:Show() end - else - self.backdrop:Hide() + + if db.portrait.keepSizeRatio then + self:SetTexCoord(unpack(E.TexCoords)) + else + self:SetTexCoord(E:CropRatio(self)) + end end end @@ -32,11 +46,14 @@ end function NP:Construct_Portrait(nameplate) local Portrait = nameplate:CreateTexture(nameplate:GetName() .. 'Portrait', 'OVERLAY', nil, 2) - Portrait:SetTexCoord(.18, .82, .18, .82) Portrait:CreateBackdrop(nil, nil, nil, nil, nil, true, true) + Portrait:SetTexCoord(.18, .82, .18, .82) + Portrait:SetSize(28, 28) Portrait:Hide() + Portrait.PreUpdate = NP.Portrait_PreUpdate Portrait.PostUpdate = NP.Portrait_PostUpdate + hooksecurefunc(Portrait, 'Hide', NP.Update_PortraitBackdrop) hooksecurefunc(Portrait, 'Show', NP.Update_PortraitBackdrop) @@ -47,7 +64,7 @@ function NP:Update_Portrait(nameplate) local db = NP:PlateDB(nameplate) local sf = NP:StyleFilterChanges(nameplate) - if sf.Portrait or (db.portrait and db.portrait.enable) then + if db.portrait and (sf.Portrait or db.portrait.enable) then if not nameplate:IsElementEnabled('Portrait') then nameplate:EnableElement('Portrait') nameplate.Portrait:ForceUpdate() diff --git a/ElvUI/Core/Modules/Nameplates/Nameplates.lua b/ElvUI/Core/Modules/Nameplates/Nameplates.lua index e41c0e9abc..73f56432ba 100644 --- a/ElvUI/Core/Modules/Nameplates/Nameplates.lua +++ b/ElvUI/Core/Modules/Nameplates/Nameplates.lua @@ -45,6 +45,7 @@ local C_NamePlate_SetNamePlateFriendlyClickThrough = C_NamePlate.SetNamePlateFri local C_NamePlate_SetNamePlateFriendlySize = C_NamePlate.SetNamePlateFriendlySize local C_NamePlate_SetNamePlateSelfClickThrough = C_NamePlate.SetNamePlateSelfClickThrough local C_NamePlate_SetNamePlateSelfSize = C_NamePlate.SetNamePlateSelfSize +local C_NamePlate_GetNamePlates = C_NamePlate.GetNamePlates local hooksecurefunc = hooksecurefunc do -- credit: oUF/private.lua @@ -355,7 +356,7 @@ function NP:UpdatePlate(nameplate, updateBase) nameplate.Castbar:SetAlpha(0) nameplate.ClassPower:SetAlpha(0) end - elseif updateBase then + elseif updateBase and db.enable then NP:Update_Tags(nameplate) NP:Update_Health(nameplate) NP:Update_HealthPrediction(nameplate) @@ -377,7 +378,7 @@ function NP:UpdatePlate(nameplate, updateBase) if nameplate == _G.ElvNP_Player then NP:Update_Fader(nameplate) end - else + elseif db.enable then NP:Update_Health(nameplate, true) -- this will only reset the ouf vars so it won't hold stale threat ones end end @@ -547,7 +548,7 @@ function NP:GROUP_LEFT() end function NP:PLAYER_ENTERING_WORLD(_, initLogin, isReload) - NP.InstanceType = select(2, GetInstanceInfo()) + NP.InstanceName, NP.InstanceType, NP.InstanceDifficultyID, _, _, _, _, NP.InstanceID = GetInstanceInfo() if initLogin or isReload then NP:ConfigureAll(true) @@ -653,6 +654,11 @@ function NP:UnitNPCID(unit) -- also used by Bags.lua return guid and select(6, strsplit('-', guid)), guid end +function NP:UpdateNumPlates() + -- wish there was another way to get just the amount + NP.numPlates = #C_NamePlate_GetNamePlates() +end + function NP:UpdatePlateGUID(nameplate, guid) NP.PlateGUID[nameplate.unitGUID] = (guid and nameplate) or nil end @@ -751,14 +757,24 @@ function NP:NamePlateCallBack(nameplate, event, unit) nameplate.faction = UnitFactionGroup(unit) nameplate.battleFaction = E:GetUnitBattlefieldFaction(unit) nameplate.unitName, nameplate.unitRealm = UnitName(unit) - nameplate.className, nameplate.classFile, nameplate.classID = UnitClass(unit) nameplate.npcID, nameplate.unitGUID = NP:UnitNPCID(unit) + nameplate.className, nameplate.classFile, nameplate.classID = UnitClass(unit) nameplate.classColor = (nameplate.isPlayer and E:ClassColor(nameplate.classFile)) or (nameplate.repReaction and NP.db.colors.reactions[nameplate.repReaction == 4 and 'neutral' or nameplate.repReaction <= 3 and 'bad' or 'good']) or nil + local specID, specIcon + local spec = E.Retail and E:GetUnitSpecInfo(unit) + if spec then + specID, specIcon = spec.id, spec.icon + end + + nameplate.specID = specID + nameplate.specIcon = specIcon + if nameplate.unitGUID then NP:UpdatePlateGUID(nameplate, nameplate.unitGUID) end + NP:UpdateNumPlates() NP:UpdatePlateType(nameplate) NP:UpdatePlateSize(nameplate) @@ -817,6 +833,8 @@ function NP:NamePlateCallBack(nameplate, event, unit) NP:UpdatePlateGUID(nameplate) end + NP:UpdateNumPlates() + if not nameplate.widgetsOnly then NP:BossMods_UpdateIcon(nameplate, true) @@ -902,6 +920,7 @@ function NP:Initialize() NP.StatusBars = {} NP.GroupRoles = {} NP.multiplier = 0.35 + NP.numPlates = 0 local BlizzPlateManaBar = _G.NamePlateDriverFrame.classNamePlatePowerBar if BlizzPlateManaBar then diff --git a/ElvUI/Core/Modules/Nameplates/Plugins/ClassificationIndicator.lua b/ElvUI/Core/Modules/Nameplates/Plugins/ClassificationIndicator.lua index 439fa14488..241159e637 100644 --- a/ElvUI/Core/Modules/Nameplates/Plugins/ClassificationIndicator.lua +++ b/ElvUI/Core/Modules/Nameplates/Plugins/ClassificationIndicator.lua @@ -1,19 +1,29 @@ local E, L, V, P, G = unpack(ElvUI) local oUF = E.oUF +local textures = {} +local atlases = { + elite = 'nameplates-icon-elite-gold', + worldboss = 'nameplates-icon-elite-gold', + rareelite = 'nameplates-icon-elite-silver', + rare = 'nameplates-icon-elite-silver' +} + local function Update(self) local element = self.ClassificationIndicator + local classification = self.classification if element.PreUpdate then element:PreUpdate() end - local classification = self.classification - if classification == 'elite' or classification == 'worldboss' then - element:SetAtlas('nameplates-icon-elite-gold') + local atlas = atlases[classification] + local texture = textures[classification] + if atlas then + element:SetAtlas(atlas) element:Show() - elseif classification == 'rareelite' or classification == 'rare' then - element:SetAtlas('nameplates-icon-elite-silver') + elseif texture then + element:SetTexture(texture) element:Show() else element:Hide() @@ -38,6 +48,14 @@ local function Enable(self) element.__owner = self element.ForceUpdate = ForceUpdate + if not element.ListTexture then + element.ListTexture = textures + end + + if not element.ListAtlas then + element.ListAtlas = atlases + end + if element:IsObjectType('Texture') and not element:GetTexture() then element:SetTexture([[Interface\TARGETINGFRAME\Nameplates]]) end diff --git a/ElvUI/Core/Modules/Nameplates/Plugins/QuestIcons.lua b/ElvUI/Core/Modules/Nameplates/Plugins/QuestIcons.lua index c71ca47e48..ad9c140e74 100644 --- a/ElvUI/Core/Modules/Nameplates/Plugins/QuestIcons.lua +++ b/ElvUI/Core/Modules/Nameplates/Plugins/QuestIcons.lua @@ -2,27 +2,36 @@ local E, L, V, P, G = unpack(ElvUI) local NP = E:GetModule('NamePlates') local oUF = E.oUF -local _G = _G -local pairs, ipairs, ceil, floor, tonumber = pairs, ipairs, ceil, floor, tonumber -local wipe, strmatch, strlower, strfind = wipe, strmatch, strlower, strfind +local ipairs, ceil, floor, tonumber = ipairs, ceil, floor, tonumber +local wipe, strmatch, strlower, strfind, next = wipe, strmatch, strlower, strfind, next local GetQuestLogSpecialItemInfo = GetQuestLogSpecialItemInfo -local IsInInstance = IsInInstance -local UIParent = UIParent +local GetQuestDifficultyColor = GetQuestDifficultyColor local UnitIsPlayer = UnitIsPlayer +local UnitGUID = UnitGUID -local C_QuestLog_GetTitleForLogIndex = C_QuestLog.GetTitleForLogIndex +local C_QuestLog_GetLogIndexForQuestID = C_QuestLog.GetLogIndexForQuestID local C_QuestLog_GetNumQuestLogEntries = C_QuestLog.GetNumQuestLogEntries local C_QuestLog_GetQuestIDForLogIndex = C_QuestLog.GetQuestIDForLogIndex -local ThreatTooltip = THREAT_TOOLTIP:gsub('%%d', '%%d-') - -local questIcons = { - iconTypes = { 'Default', 'Item', 'Skull', 'Chat' }, - indexByID = {}, --[questID] = questIndex - activeQuests = {} --[questTitle] = questID +local C_QuestLog_GetQuestDifficultyLevel = C_QuestLog.GetQuestDifficultyLevel +local C_QuestLog_GetQuestObjectives = C_QuestLog.GetQuestObjectives +local C_QuestLog_GetTitleForQuestID = C_QuestLog.GetTitleForQuestID + +local iconTypes = { 'Default', 'Item', 'Skull', 'Chat' } +local activeQuests = {} --[questTitle] = quest data +local activeTitles = {} --[questID] = questTitle1 +local questElements = { + DEFAULT = 'Default', + KILL = 'Skull', + CHAT = 'Chat', + QUEST_ITEM = 'Item' } -NP.QuestIcons = questIcons +NP.QuestIcons = { + iconTypes = iconTypes, + activeQuests = activeQuests, + activeTitles = activeTitles, +} local typesLocalized = { enUS = { @@ -81,151 +90,152 @@ local typesLocalized = { local questTypes = typesLocalized[E.locale] or typesLocalized.enUS -local function CheckTextForQuest(text) - local x, y = strmatch(text, '(%d+)/(%d+)') - if x and y then - local diff = floor(y - x) - if diff > 0 then - return diff +local function GetObjectiveType(text, texture) + if texture then + return 'QUEST_ITEM' + end + + local lowerText = strlower(text) + + -- check kill type first + for _, listText in ipairs(questTypes.KILL) do + if strfind(lowerText, listText, nil, true) then + return 'KILL' end - elseif not strmatch(text, ThreatTooltip) then - local progress = tonumber(strmatch(text, '([%d%.]+)%%')) - if progress and progress <= 100 then - return ceil(100 - progress), true + end + + -- check chat type if kill type doesn't exist + for _, listText in ipairs(questTypes.CHAT) do + if strfind(lowerText, listText, nil, true) then + return 'CHAT' end end end -NP.QuestIcons.CheckTextForQuest = CheckTextForQuest -local function GetQuests(unitID) - if IsInInstance() then return end - - E.ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE') - E.ScanTooltip:SetUnit(unitID) - E.ScanTooltip:Show() - - local QuestList, notMyQuest, activeID - for i = 3, E.ScanTooltip:NumLines() do - local str = _G['ElvUI_ScanTooltipTextLeft' .. i] - local text = str and str:GetText() - if not text or text == '' then return end - - if UnitIsPlayer(text) then - notMyQuest = text ~= E.myname - elseif text and not notMyQuest then - local count, percent = CheckTextForQuest(text) - - -- this line comes from one line up in the tooltip - local activeQuest = questIcons.activeQuests[text] - if activeQuest then activeID = activeQuest end - - if count then - local type, index, texture, _ - if activeID then - index = questIcons.indexByID[activeID] - _, texture = GetQuestLogSpecialItemInfo(index) - end +local function GetQuestObjectives(id, texture) + local list = {} - if texture then - type = 'QUEST_ITEM' - else - local lowerText = strlower(text) - - -- check kill type first - for _, listText in ipairs(questTypes.KILL) do - if strfind(lowerText, listText, nil, true) then - type = 'KILL' - break - end + for _, objective in next, C_QuestLog_GetQuestObjectives(id) do + local text = not objective.finished and objective.text + if text then + if objective.type == 'progressbar' then + local progress = tonumber(strmatch(text, '([%d%.]+)%%')) + if progress and progress <= 100 then + list[text] = { value = ceil(100 - progress), type = GetObjectiveType(text, texture), isPercent = true } + end + else + local need = objective.numRequired + local have = objective.numFulfilled + if need and have then + local diff = floor(need - have) + if diff > 0 then + list[text] = { value = diff, type = GetObjectiveType(text, texture), isPercent = false } end + end + end + end + end + + return next(list) and list +end - -- check chat type if kill type doesn't exist - if not type then - for _, listText in ipairs(questTypes.CHAT) do - if strfind(lowerText, listText, nil, true) then - type = 'CHAT' - break - end - end +local function GetQuests(unitID) + local QuestList, notMyQuest, lastTitle + local info = E.ScanTooltip:GetUnitInfo(unitID) + if info and info.lines[2] then + for _, line in next, info.lines, 2 do + local text = line and line.leftText + if not text or text == '' then return end + + if line.type == 18 or (not E.Retail and UnitIsPlayer(text)) then -- 18 is QuestPlayer + notMyQuest = text ~= E.myname + elseif text and not notMyQuest then + if line.type == 17 or not E.Retail then + lastTitle = activeQuests[text] + end -- this line comes from one line up in the tooltip + + local objectives = (line.type == 8 or not E.Retail) and lastTitle and lastTitle.objectives + if objectives then + local quest = objectives[text] + if quest then + if not QuestList then QuestList = {} end + QuestList[#QuestList + 1] = { + itemTexture = lastTitle.texture, + isPercent = quest.isPercent, + objectiveCount = quest.value, + questType = quest.type or 'DEFAULT', + } end end - - if not QuestList then QuestList = {} end - QuestList[#QuestList + 1] = { - isPercent = percent, - itemTexture = texture, - objectiveCount = count, - questType = type or 'DEFAULT', - -- below keys are currently unused - questLogIndex = index, - questID = activeID - } end end end E.ScanTooltip:Hide() + return QuestList end -local function hideIcons(element) - for _, object in pairs(questIcons.iconTypes) do - local icon = element[object] - icon:Hide() +local function hideIcon(icon) + icon:Hide() - if icon.Text then - icon.Text:SetText('') - end + if icon.Text then + icon.Text:SetText('') + end +end + +local function hideIcons(element) + for _, object in next, iconTypes do + hideIcon(element[object]) end end -local function Update(self, event, arg1) +local function Update(self, event) local element = self.QuestIcons if not element then return end - local unit = (event == 'UNIT_NAME_UPDATE' and arg1) or self.unit - if unit ~= self.unit then return end + local unit = self.unit + if not unit then return end + + -- this only runs on npc units anyways + if NP.InstanceType ~= 'none' then return end + + local list -- quests + local guid = UnitGUID(unit) + if element.guid ~= guid then + element.guid = guid -- if its the same guid on these events reuse the quest data + elseif event == 'UNIT_NAME_UPDATE' or event == 'NAME_PLATE_UNIT_ADDED' then + list = element.lastQuests + end if element.PreUpdate then element:PreUpdate() end - hideIcons(element) - - local QuestList = GetQuests(unit) - if QuestList then - element:Show() - else - element:Hide() - return + if not list then + list = GetQuests(unit) + element.lastQuests = list end - local shownCount - for i = 1, #QuestList do - local quest = QuestList[i] - local objectiveCount = quest.objectiveCount - local questType = quest.questType - local isPercent = quest.isPercent - - if isPercent or objectiveCount > 0 then - local icon - if questType == 'DEFAULT' then - icon = element.Default - elseif questType == 'KILL' then - icon = element.Skull - elseif questType == 'CHAT' then - icon = element.Chat - elseif questType == 'QUEST_ITEM' then - icon = element.Item - end + element:SetShown(list) + element.backdrop:Hide() + + if list then + hideIcons(element) + + local shown = -1 + for _, quest in next, list do + local objectiveCount = quest.objectiveCount + local questType = quest.questType + local isPercent = quest.isPercent + local icon = (isPercent or objectiveCount > 0) and element[questElements[questType]] if icon and not icon:IsShown() then - shownCount = (shownCount and shownCount + 1) or 0 + shown = shown + 1 - local size = icon.size or 25 local setPosition = icon.position or 'TOPLEFT' local newPosition = E.InversePoints[setPosition] - local offset = shownCount * (5 + size) + local offset = shown * ((icon.spacing or 5) + (icon.size or 25)) icon:Show() icon:ClearAllPoints() @@ -237,6 +247,7 @@ local function Update(self, event, arg1) if questType == 'QUEST_ITEM' then element.Item:SetTexture(quest.itemTexture) + element.backdrop:Show() end end end @@ -273,7 +284,6 @@ local function Enable(self) self:RegisterEvent('QUEST_LOG_UPDATE', Path, true) self:RegisterEvent('UNIT_NAME_UPDATE', Path, true) - self:RegisterEvent('PLAYER_ENTERING_WORLD', Path, true) return true end @@ -285,34 +295,67 @@ local function Disable(self) element:Hide() hideIcons(element) + element.lastQuests = nil + self:UnregisterEvent('QUEST_LOG_UPDATE', Path) self:UnregisterEvent('UNIT_NAME_UPDATE', Path) - self:UnregisterEvent('PLAYER_ENTERING_WORLD', Path) end end +local function UpdateQuest(id, index) + local title = C_QuestLog_GetTitleForQuestID(id) + if not title then return end + + if not index then -- get the index now + index = C_QuestLog_GetLogIndexForQuestID(id) + end + + if not index then return end + local _, texture = GetQuestLogSpecialItemInfo(index) + local level = C_QuestLog_GetQuestDifficultyLevel(id) + + activeTitles[id] = title + activeQuests[title] = { + id = id, + index = index, + texture = texture, + difficulty = level, + title = title, + color = GetQuestDifficultyColor(level), + objectives = GetQuestObjectives(id, texture) + } +end + local frame = CreateFrame('Frame') -frame:RegisterEvent('QUEST_ACCEPTED') frame:RegisterEvent('QUEST_REMOVED') +frame:RegisterEvent('QUEST_ACCEPTED') +frame:RegisterEvent('QUEST_LOG_UPDATE') frame:RegisterEvent('PLAYER_ENTERING_WORLD') -frame:SetScript('OnEvent', function(self, event) - wipe(questIcons.indexByID) - wipe(questIcons.activeQuests) +frame:SetScript('OnEvent', function(self, event, questID) + if not E.Retail then return end + + if event == 'QUEST_ACCEPTED' then + UpdateQuest(questID) + elseif event == 'QUEST_REMOVED' then + local title = activeTitles[questID] + if title then + activeQuests[title] = nil + activeTitles[questID] = nil + end + else -- QUEST_LOG_UPDATE and the first PLAYER_ENTERING_WORLD + wipe(activeQuests) + wipe(activeTitles) - if E.Retail then - for i = 1, C_QuestLog_GetNumQuestLogEntries() do - local id = C_QuestLog_GetQuestIDForLogIndex(i) + for index = 1, C_QuestLog_GetNumQuestLogEntries() do + local id = C_QuestLog_GetQuestIDForLogIndex(index) if id and id > 0 then - questIcons.indexByID[id] = i - - local title = C_QuestLog_GetTitleForLogIndex(i) - if title then questIcons.activeQuests[title] = id end + UpdateQuest(id, index) end end - end - if event == 'PLAYER_ENTERING_WORLD' then - self:UnregisterEvent(event) + if event == 'PLAYER_ENTERING_WORLD' then + self:UnregisterEvent(event) -- only need one + end end end) diff --git a/ElvUI/Core/Modules/Nameplates/StyleFilter.lua b/ElvUI/Core/Modules/Nameplates/StyleFilter.lua index 6a5d35f578..776c79b187 100644 --- a/ElvUI/Core/Modules/Nameplates/StyleFilter.lua +++ b/ElvUI/Core/Modules/Nameplates/StyleFilter.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local mod = E:GetModule('NamePlates') +local NP = E:GetModule('NamePlates') local LSM = E.Libs.LSM local LCG = E.Libs.CustomGlow local ElvUF = E.oUF @@ -9,7 +9,6 @@ local ipairs, next, pairs = ipairs, next, pairs local setmetatable, tostring, tonumber, type, unpack = setmetatable, tostring, tonumber, type, unpack local strmatch, tinsert, tremove, sort, wipe = strmatch, tinsert, tremove, sort, wipe -local GetInstanceInfo = GetInstanceInfo local GetInventoryItemID = GetInventoryItemID local GetRaidTargetIndex = GetRaidTargetIndex local GetSpecializationInfo = GetSpecializationInfo @@ -58,8 +57,8 @@ local BleedList = E.Libs.Dispel:GetBleedList() local FallbackColor = {r=1, b=1, g=1} -mod.StyleFilterStackPattern = '([^\n]+)\n?(%d*)$' -mod.TriggerConditions = { +NP.StyleFilterStackPattern = '([^\n]+)\n?(%d*)$' +NP.TriggerConditions = { reactions = {'hated', 'hostile', 'unfriendly', 'neutral', 'friendly', 'honored', 'revered', 'exalted'}, raidTargets = {'star', 'circle', 'diamond', 'triangle', 'moon', 'square', 'cross', 'skull'}, tankThreat = {[0] = 3, 2, 1, 0}, @@ -335,9 +334,9 @@ do -- E.CreatureTypes; Do *not* change the value, only the key (['key'] = 'value E.CreatureTypes = c end -function mod:StyleFilterTickerCallback(frame, ticker, timer) +function NP:StyleFilterTickerCallback(frame, ticker, timer) if frame and frame:IsShown() then - mod:StyleFilterUpdate(frame, 'FAKE_AuraWaitTimer') + NP:StyleFilterUpdate(frame, 'FAKE_AuraWaitTimer') end if ticker[timer] then @@ -346,20 +345,20 @@ function mod:StyleFilterTickerCallback(frame, ticker, timer) end end -function mod:StyleFilterTickerCreate(delay, frame, ticker, timer) - return C_Timer_NewTimer(delay, function() mod:StyleFilterTickerCallback(frame, ticker, timer) end) +function NP:StyleFilterTickerCreate(delay, frame, ticker, timer) + return C_Timer_NewTimer(delay, function() NP:StyleFilterTickerCallback(frame, ticker, timer) end) end -function mod:StyleFilterAuraWait(frame, ticker, timer, timeLeft, mTimeLeft) +function NP:StyleFilterAuraWait(frame, ticker, timer, timeLeft, mTimeLeft) if not ticker[timer] then local updateIn = timeLeft-mTimeLeft if updateIn > 0 then -- also add a tenth of a second to updateIn to prevent the timer from firing on the same second - ticker[timer] = mod:StyleFilterTickerCreate(updateIn+0.1, frame, ticker, timer) + ticker[timer] = NP:StyleFilterTickerCreate(updateIn+0.1, frame, ticker, timer) end end end -function mod:StyleFilterDispelCheck(frame, filter) +function NP:StyleFilterDispelCheck(frame, filter) local index = 1 local name, _, _, auraType, _, _, _, isStealable, _, spellID = UnitAura(frame.unit, index, filter) while name do @@ -378,7 +377,7 @@ function mod:StyleFilterDispelCheck(frame, filter) end end -function mod:StyleFilterAuraData(frame, filter, unit) +function NP:StyleFilterAuraData(frame, filter, unit) local temp = {} if unit then @@ -401,7 +400,7 @@ function mod:StyleFilterAuraData(frame, filter, unit) return temp end -function mod:StyleFilterAuraCheck(frame, names, tickers, filter, mustHaveAll, missing, minTimeLeft, maxTimeLeft, fromMe, fromPet, onMe, onPet) +function NP:StyleFilterAuraCheck(frame, names, tickers, filter, mustHaveAll, missing, minTimeLeft, maxTimeLeft, fromMe, fromPet, onMe, onPet) local total, matches, now = 0, 0, GetTime() local temp -- data of current auras @@ -410,10 +409,10 @@ function mod:StyleFilterAuraCheck(frame, names, tickers, filter, mustHaveAll, mi total = total + 1 -- keep track of the names if not temp then - temp = mod:StyleFilterAuraData(frame, filter, (onMe and 'player') or (onPet and 'pet') or frame.unit) + temp = NP:StyleFilterAuraData(frame, filter, (onMe and 'player') or (onPet and 'pet') or frame.unit) end - local spell, count = strmatch(key, mod.StyleFilterStackPattern) + local spell, count = strmatch(key, NP.StyleFilterStackPattern) local info = temp[spell] or temp[tonumber(spell)] if info then @@ -435,8 +434,8 @@ function mod:StyleFilterAuraCheck(frame, names, tickers, filter, mustHaveAll, mi if timeLeft then -- if we use a min/max time setting; we must create a delay timer if not tickers[matches] then tickers[matches] = {} end - if hasMinTime then mod:StyleFilterAuraWait(frame, tickers[matches], 'hasMinTimer', timeLeft, minTimeLeft) end - if hasMaxTime then mod:StyleFilterAuraWait(frame, tickers[matches], 'hasMaxTimer', timeLeft, maxTimeLeft) end + if hasMinTime then NP:StyleFilterAuraWait(frame, tickers[matches], 'hasMinTimer', timeLeft, minTimeLeft) end + if hasMaxTime then NP:StyleFilterAuraWait(frame, tickers[matches], 'hasMaxTimer', timeLeft, maxTimeLeft) end end end end end end local stale = matches + 1 @@ -463,7 +462,7 @@ function mod:StyleFilterAuraCheck(frame, names, tickers, filter, mustHaveAll, mi end end -function mod:StyleFilterCooldownCheck(names, mustHaveAll) +function NP:StyleFilterCooldownCheck(names, mustHaveAll) local _, gcd = GetSpellCooldown(61304) local total, count = 0, 0 @@ -490,13 +489,13 @@ function mod:StyleFilterCooldownCheck(names, mustHaveAll) end end -function mod:StyleFilterFinishedFlash(requested) +function NP:StyleFilterFinishedFlash(requested) if not requested then self:Play() end end -function mod:StyleFilterSetupFlash(FlashTexture) +function NP:StyleFilterSetupFlash(FlashTexture) local anim = FlashTexture:CreateAnimationGroup('Flash') - anim:SetScript('OnFinished', mod.StyleFilterFinishedFlash) + anim:SetScript('OnFinished', NP.StyleFilterFinishedFlash) FlashTexture.anim = anim local fadein = anim:CreateAnimation('ALPHA', 'FadeIn') @@ -514,36 +513,36 @@ function mod:StyleFilterSetupFlash(FlashTexture) return anim end -function mod:StyleFilterBaseUpdate(frame, state) +function NP:StyleFilterBaseUpdate(frame, state) if not frame.StyleFilterBaseAlreadyUpdated then -- skip updates from UpdatePlateBase - mod:UpdatePlate(frame, true) -- enable elements back + NP:UpdatePlate(frame, true) -- enable elements back end - local db = mod:PlateDB(frame) -- keep this after UpdatePlate + local db = NP:PlateDB(frame) -- keep this after UpdatePlate if not db.nameOnly then if db.power.enable then frame.Power:ForceUpdate() end if db.health.enable then frame.Health:ForceUpdate() end if db.castbar.enable then frame.Castbar:ForceUpdate() end - if mod.db.threat.enable and mod.db.threat.useThreatColor and not UnitIsTapDenied(frame.unit) then + if NP.db.threat.enable and NP.db.threat.useThreatColor and not UnitIsTapDenied(frame.unit) then frame.ThreatIndicator:ForceUpdate() -- this will account for the threat health color end - if frame.isTarget and frame.frameType ~= 'PLAYER' and mod.db.units.TARGET.glowStyle ~= 'none' then + if frame.isTarget and frame.frameType ~= 'PLAYER' and NP.db.units.TARGET.glowStyle ~= 'none' then frame.TargetIndicator:ForceUpdate() -- so the target indicator will show up end end if frame.isTarget then - mod:SetupTarget(frame, db.nameOnly) -- so the classbar will show up + NP:SetupTarget(frame, db.nameOnly) -- so the classbar will show up end - if state and not mod.SkipFading then - mod:PlateFade(frame, mod.db.fadeIn and 1 or 0, 0, 1) -- fade those back in so it looks clean + if state and not NP.SkipFading then + NP:PlateFade(frame, NP.db.fadeIn and 1 or 0, 0, 1) -- fade those back in so it looks clean end end -function mod:StyleFilterBorderLock(backdrop, r, g, b, a) +function NP:StyleFilterBorderLock(backdrop, r, g, b, a) if r then backdrop.forcedBorderColors = {r,g,b,a} backdrop:SetBackdropBorderColor(r,g,b,a) @@ -555,21 +554,21 @@ end do local empty = {} - function mod:StyleFilterChanges(frame) + function NP:StyleFilterChanges(frame) return (frame and frame.StyleFilterChanges) or empty end end -function mod:StyleFilterSetChanges(frame, actions, HealthColor, PowerColor, Borders, HealthFlash, HealthTexture, HealthGlow, Scale, Alpha, NameTag, PowerTag, HealthTag, TitleTag, LevelTag, Portrait, NameOnly, Visibility) +function NP:StyleFilterSetChanges(frame, actions, HealthColor, PowerColor, Borders, HealthFlash, HealthTexture, HealthGlow, Scale, Alpha, NameTag, PowerTag, HealthTag, TitleTag, LevelTag, Portrait, NameOnly, Visibility) local c = frame.StyleFilterChanges if not c then return end - local db = mod:PlateDB(frame) + local db = NP:PlateDB(frame) if Visibility or NameOnly then c.NameOnly, c.Visibility = NameOnly, Visibility - mod:DisablePlate(frame, NameOnly, NameOnly) + NP:DisablePlate(frame, NameOnly, NameOnly) if Visibility then frame:ClearAllPoints() -- lets still move the frame out cause its clickable otherwise @@ -608,15 +607,15 @@ function mod:StyleFilterSetChanges(frame, actions, HealthColor, PowerColor, Bord -- generic stuff if Scale then c.Scale = true - mod:ScalePlate(frame, actions.scale) + NP:ScalePlate(frame, actions.scale) end if Alpha then c.Alpha = true - mod:PlateFade(frame, mod.db.fadeIn and 1 or 0, frame:GetAlpha(), actions.alpha * 0.01) + NP:PlateFade(frame, NP.db.fadeIn and 1 or 0, frame:GetAlpha(), actions.alpha * 0.01) end if Portrait then c.Portrait = true - mod:Update_Portrait(frame) + NP:Update_Portrait(frame) frame.Portrait:ForceUpdate() end @@ -643,10 +642,10 @@ function mod:StyleFilterSetChanges(frame, actions, HealthColor, PowerColor, Bord local bc = (actions.color.borderClass and frame.classColor) or actions.color.borderColor c.Borders = true - mod:StyleFilterBorderLock(frame.Health.backdrop, bc.r, bc.g, bc.b, bc.a or 1) + NP:StyleFilterBorderLock(frame.Health.backdrop, bc.r, bc.g, bc.b, bc.a or 1) if frame.Power.backdrop and db.power.enable then - mod:StyleFilterBorderLock(frame.Power.backdrop, bc.r, bc.g, bc.b, bc.a or 1) + NP:StyleFilterBorderLock(frame.Power.backdrop, bc.r, bc.g, bc.b, bc.a or 1) end end if HealthGlow then @@ -658,12 +657,12 @@ function mod:StyleFilterSetChanges(frame, actions, HealthColor, PowerColor, Bord c.HealthFlash = true if not HealthTexture then - frame.HealthFlashTexture:SetTexture(LSM:Fetch('statusbar', mod.db.statusbar)) + frame.HealthFlashTexture:SetTexture(LSM:Fetch('statusbar', NP.db.statusbar)) end frame.HealthFlashTexture:SetVertexColor(fc.r, fc.g, fc.b) - local anim = frame.HealthFlashTexture.anim or mod:StyleFilterSetupFlash(frame.HealthFlashTexture) + local anim = frame.HealthFlashTexture.anim or NP:StyleFilterSetupFlash(frame.HealthFlashTexture) anim.fadein:SetToAlpha(fc.a or 1) anim.fadeout:SetFromAlpha(fc.a or 1) @@ -682,8 +681,8 @@ function mod:StyleFilterSetChanges(frame, actions, HealthColor, PowerColor, Bord end end -function mod:StyleFilterClearVisibility(frame, previous) - local state = mod:StyleFilterHiddenState(frame.StyleFilterChanges) +function NP:StyleFilterClearVisibility(frame, previous) + local state = NP:StyleFilterHiddenState(frame.StyleFilterChanges) if (previous == 1 or previous == 3) and (state ~= 1 and state ~= 3) then frame:ClearAllPoints() -- pull the frame back in @@ -691,12 +690,12 @@ function mod:StyleFilterClearVisibility(frame, previous) end if previous and not state then - mod:StyleFilterBaseUpdate(frame, state == 1) + NP:StyleFilterBaseUpdate(frame, state == 1) end end -function mod:StyleFilterClearChanges(frame, HealthColor, PowerColor, Borders, HealthFlash, HealthTexture, HealthGlow, Scale, Alpha, NameTag, PowerTag, HealthTag, TitleTag, LevelTag, Portrait, NameOnly, Visibility) - local db = mod:PlateDB(frame) +function NP:StyleFilterClearChanges(frame, HealthColor, PowerColor, Borders, HealthFlash, HealthTexture, HealthGlow, Scale, Alpha, NameTag, PowerTag, HealthTag, TitleTag, LevelTag, Portrait, NameOnly, Visibility) + local db = NP:PlateDB(frame) local c = frame.StyleFilterChanges if c then wipe(c) end @@ -711,14 +710,13 @@ function mod:StyleFilterClearChanges(frame, HealthColor, PowerColor, Borders, He -- generic stuff if Scale then - mod:ScalePlate(frame, frame.ThreatScale or 1) + NP:ScalePlate(frame, frame.ThreatScale or 1) end if Alpha then - mod:PlateFade(frame, mod.db.fadeIn and 1 or 0, (frame.FadeObject and frame.FadeObject.endAlpha) or 0.5, 1) + NP:PlateFade(frame, NP.db.fadeIn and 1 or 0, (frame.FadeObject and frame.FadeObject.endAlpha) or 0.5, 1) end if Portrait then - mod:Update_Portrait(frame) - frame.Portrait:ForceUpdate() + NP:Update_Portrait(frame) end -- bar stuff @@ -733,15 +731,15 @@ function mod:StyleFilterClearChanges(frame, HealthColor, PowerColor, Borders, He LCG.HideOverlayGlow(frame.Health, HealthGlow) end if PowerColor then - local pc = mod.db.colors.power[frame.Power.token] or _G.PowerBarColor[frame.Power.token] or FallbackColor + local pc = NP.db.colors.power[frame.Power.token] or _G.PowerBarColor[frame.Power.token] or FallbackColor frame.Power:SetStatusBarColor(pc.r, pc.g, pc.b) frame.Cutaway.Power:SetVertexColor(pc.r * 1.5, pc.g * 1.5, pc.b * 1.5, 1) end if Borders then - mod:StyleFilterBorderLock(frame.Health.backdrop) + NP:StyleFilterBorderLock(frame.Health.backdrop) if frame.Power.backdrop and db.power.enable then - mod:StyleFilterBorderLock(frame.Power.backdrop) + NP:StyleFilterBorderLock(frame.Power.backdrop) end end if HealthFlash then @@ -749,15 +747,15 @@ function mod:StyleFilterClearChanges(frame, HealthColor, PowerColor, Borders, He frame.HealthFlashTexture:Hide() end if HealthTexture then - local tx = LSM:Fetch('statusbar', mod.db.statusbar) + local tx = LSM:Fetch('statusbar', NP.db.statusbar) frame.Health.barTexture:SetTexture(tx) end end -function mod:StyleFilterThreatUpdate(frame, unit) - if mod:UnitExists(unit) then - local isTank, offTank, feedbackUnit = mod.ThreatIndicator_PreUpdate(frame.ThreatIndicator, unit, true) - if feedbackUnit and (feedbackUnit ~= unit) and mod:UnitExists(feedbackUnit) then +function NP:StyleFilterThreatUpdate(frame, unit) + if NP:UnitExists(unit) then + local isTank, offTank, feedbackUnit = NP.ThreatIndicator_PreUpdate(frame.ThreatIndicator, unit, true) + if feedbackUnit and (feedbackUnit ~= unit) and NP:UnitExists(feedbackUnit) then return isTank, offTank, UnitThreatSituation(feedbackUnit, unit) else return isTank, offTank, UnitThreatSituation(unit) @@ -765,7 +763,7 @@ function mod:StyleFilterThreatUpdate(frame, unit) end end -function mod:StyleFilterConditionCheck(frame, filter, trigger) +function NP:StyleFilterConditionCheck(frame, filter, trigger) local passed -- skip StyleFilterPass when triggers are empty -- Class and Specialization @@ -778,51 +776,6 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) end end - -- Health - if trigger.healthThreshold then - local healthUnit = (trigger.healthUsePlayer and 'player') or frame.unit - local health, maxHealth = UnitHealth(healthUnit), UnitHealthMax(healthUnit) - local percHealth = (maxHealth and (maxHealth > 0) and health/maxHealth) or 0 - - local underHealth = trigger.underHealthThreshold and (trigger.underHealthThreshold ~= 0) - local overHealth = trigger.overHealthThreshold and (trigger.overHealthThreshold ~= 0) - - local underThreshold = underHealth and (trigger.underHealthThreshold > percHealth) - local overThreshold = overHealth and (trigger.overHealthThreshold < percHealth) - - if underHealth and overHealth then - if underThreshold and overThreshold then passed = true else return end - elseif underThreshold or overThreshold then passed = true else return end - end - - -- Power - if trigger.powerThreshold then - local powerUnit = (trigger.powerUsePlayer and 'player') or frame.unit - local power, maxPower = UnitPower(powerUnit, frame.PowerType), UnitPowerMax(powerUnit, frame.PowerType) - local percPower = (maxPower and (maxPower > 0) and power/maxPower) or 0 - - local underPower = trigger.underPowerThreshold and (trigger.underPowerThreshold ~= 0) - local overPower = trigger.overPowerThreshold and (trigger.overPowerThreshold ~= 0) - - local underThreshold = underPower and (trigger.underPowerThreshold > percPower) - local overThreshold = overPower and (trigger.overPowerThreshold < percPower) - - if underPower and overPower then - if underThreshold and overThreshold then passed = true else return end - elseif underThreshold or overThreshold then passed = true else return end - end - - -- Level - if trigger.level then - local myLevel = E.mylevel - local level = (frame.unit == 'player' and myLevel) or UnitLevel(frame.unit) - local curLevel = (trigger.curlevel and trigger.curlevel ~= 0 and (trigger.curlevel == level)) - local minLevel = (trigger.minlevel and trigger.minlevel ~= 0 and (trigger.minlevel <= level)) - local maxLevel = (trigger.maxlevel and trigger.maxlevel ~= 0 and (trigger.maxlevel >= level)) - local matchMyLevel = trigger.mylevel and (level == myLevel) - if curLevel or minLevel or maxLevel or matchMyLevel then passed = true else return end - end - -- Quest Boss if E.Retail and trigger.questBoss then if UnitIsQuestBoss(frame.unit) then passed = true else return end @@ -834,6 +787,18 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) if (trigger.isResting and resting) or (trigger.notResting and not resting) then passed = true else return end end + do -- Nameplate Amount Displaying + local below, above = trigger.amountBelow or 0, trigger.amountAbove or 0 + local hasBelow, hasAbove = below > 0, above > 0 + if hasBelow or hasAbove then + local isBelow = hasBelow and NP.numPlates < below + local isAbove = hasAbove and NP.numPlates > above + if hasBelow and hasAbove then + if isBelow and isAbove then passed = true else return end + elseif isBelow or isAbove then passed = true else + return + end end end + -- Target Existence if trigger.requireTarget or trigger.noTarget then local target = UnitExists('target') @@ -991,6 +956,23 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) if (trigger.playerCanAttack and canAttack) or (trigger.playerCanNotAttack and not canAttack) then passed = true else return end end + -- Unit Role + if E.Retail and (trigger.unitRole.tank or trigger.unitRole.healer or trigger.unitRole.damager) then + local role = UnitGroupRolesAssigned(frame.unit) + if trigger.unitRole[NP.TriggerConditions.roles[role]] then passed = true else return end + end + + -- Level + if trigger.level then + local myLevel = E.mylevel + local level = (frame.unit == 'player' and myLevel) or UnitLevel(frame.unit) + local curLevel = (trigger.curlevel and trigger.curlevel ~= 0 and (trigger.curlevel == level)) + local minLevel = (trigger.minlevel and trigger.minlevel ~= 0 and (trigger.minlevel <= level)) + local maxLevel = (trigger.maxlevel and trigger.maxlevel ~= 0 and (trigger.maxlevel >= level)) + local matchMyLevel = trigger.mylevel and (level == myLevel) + if curLevel or minLevel or maxLevel or matchMyLevel then passed = true else return end + end + -- NPC Title if trigger.hasTitleNPC or trigger.noTitleNPC then local npcTitle = E.TagFunctions.GetTitleNPC(frame.unit) @@ -1009,18 +991,12 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) -- My Role if trigger.role.tank or trigger.role.healer or trigger.role.damager then - if trigger.role[mod.TriggerConditions.roles[E.myrole]] then passed = true else return end - end - - -- Unit Role - if E.Retail and (trigger.unitRole.tank or trigger.unitRole.healer or trigger.unitRole.damager) then - local role = UnitGroupRolesAssigned(frame.unit) - if trigger.unitRole[mod.TriggerConditions.roles[role]] then passed = true else return end + if trigger.role[NP.TriggerConditions.roles[E.myrole]] then passed = true else return end end -- Unit Type if trigger.nameplateType and trigger.nameplateType.enable then - if trigger.nameplateType[mod.TriggerConditions.frameTypes[frame.frameType]] then passed = true else return end + if trigger.nameplateType[NP.TriggerConditions.frameTypes[frame.frameType]] then passed = true else return end end -- Creature Type @@ -1030,43 +1006,39 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) -- Reaction (or Reputation) Type if trigger.reactionType and trigger.reactionType.enable then - if trigger.reactionType[mod.TriggerConditions.reactions[(trigger.reactionType.reputation and frame.repReaction) or frame.reaction]] then passed = true else return end + if trigger.reactionType[NP.TriggerConditions.reactions[(trigger.reactionType.reputation and frame.repReaction) or frame.reaction]] then passed = true else return end end -- Threat if trigger.threat and trigger.threat.enable then if trigger.threat.good or trigger.threat.goodTransition or trigger.threat.badTransition or trigger.threat.bad or trigger.threat.offTank or trigger.threat.offTankGoodTransition or trigger.threat.offTankBadTransition then - local isTank, offTank, threat = mod:StyleFilterThreatUpdate(frame, frame.unit) + local isTank, offTank, threat = NP:StyleFilterThreatUpdate(frame, frame.unit) local checkOffTank = trigger.threat.offTank or trigger.threat.offTankGoodTransition or trigger.threat.offTankBadTransition - local status = (checkOffTank and offTank and threat and -threat) or (not checkOffTank and ((isTank and mod.TriggerConditions.tankThreat[threat]) or threat)) or nil - if trigger.threat[mod.TriggerConditions.threat[status]] then passed = true else return end + local status = (checkOffTank and offTank and threat and -threat) or (not checkOffTank and ((isTank and NP.TriggerConditions.tankThreat[threat]) or threat)) or nil + if trigger.threat[NP.TriggerConditions.threat[status]] then passed = true else return end end end -- Raid Target if trigger.raidTarget.star or trigger.raidTarget.circle or trigger.raidTarget.diamond or trigger.raidTarget.triangle or trigger.raidTarget.moon or trigger.raidTarget.square or trigger.raidTarget.cross or trigger.raidTarget.skull then - if trigger.raidTarget[mod.TriggerConditions.raidTargets[frame.RaidTargetIndex]] then passed = true else return end + if trigger.raidTarget[NP.TriggerConditions.raidTargets[frame.RaidTargetIndex]] then passed = true else return end end do local activeID = trigger.location.instanceIDEnabled local activeType = trigger.instanceType.none or trigger.instanceType.scenario or trigger.instanceType.party or trigger.instanceType.raid or trigger.instanceType.arena or trigger.instanceType.pvp - local instanceName, instanceType, difficultyID, instanceID, _ - - -- Instance Type - if activeType or activeID then - instanceName, instanceType, difficultyID, _, _, _, _, instanceID = GetInstanceInfo() - end + local instanceType = NP.InstanceType if activeType then if trigger.instanceType[instanceType] then passed = true -- Instance Difficulty if instanceType == 'raid' or instanceType == 'party' then + local difficultyID = NP.InstanceDifficultyID local D = trigger.instanceDifficulty[(instanceType == 'party' and 'dungeon') or instanceType] for _, value in pairs(D) do - if value and not D[mod.TriggerConditions.difficulties[difficultyID]] then return end + if value and not D[NP.TriggerConditions.difficulties[difficultyID]] then return end end end else return end @@ -1075,6 +1047,7 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) -- Location if activeID or trigger.location.mapIDEnabled or trigger.location.zoneNamesEnabled or trigger.location.subZoneNamesEnabled then if activeID and next(trigger.location.instanceIDs) then + local instanceID, instanceName = NP.InstanceID, NP.InstanceName if (instanceID and trigger.location.instanceIDs[tostring(instanceID)]) or trigger.location.instanceIDs[instanceName] then passed = true else return end end if trigger.location.mapIDEnabled and next(trigger.location.mapIDs) then @@ -1089,10 +1062,44 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) end end + -- Health + if trigger.healthThreshold then + local healthUnit = (trigger.healthUsePlayer and 'player') or frame.unit + local health, maxHealth = UnitHealth(healthUnit), UnitHealthMax(healthUnit) + local percHealth = (maxHealth and (maxHealth > 0) and health/maxHealth) or 0 + + local underHealth = trigger.underHealthThreshold and (trigger.underHealthThreshold ~= 0) + local overHealth = trigger.overHealthThreshold and (trigger.overHealthThreshold ~= 0) + + local underThreshold = underHealth and (trigger.underHealthThreshold > percHealth) + local overThreshold = overHealth and (trigger.overHealthThreshold < percHealth) + + if underHealth and overHealth then + if underThreshold and overThreshold then passed = true else return end + elseif underThreshold or overThreshold then passed = true else return end + end + + -- Power + if trigger.powerThreshold then + local powerUnit = (trigger.powerUsePlayer and 'player') or frame.unit + local power, maxPower = UnitPower(powerUnit, frame.PowerType), UnitPowerMax(powerUnit, frame.PowerType) + local percPower = (maxPower and (maxPower > 0) and power/maxPower) or 0 + + local underPower = trigger.underPowerThreshold and (trigger.underPowerThreshold ~= 0) + local overPower = trigger.overPowerThreshold and (trigger.overPowerThreshold ~= 0) + + local underThreshold = underPower and (trigger.underPowerThreshold > percPower) + local overThreshold = overPower and (trigger.overPowerThreshold < percPower) + + if underPower and overPower then + if underThreshold and overThreshold then passed = true else return end + elseif underThreshold or overThreshold then passed = true else return end + end + -- Key Modifier if trigger.keyMod and trigger.keyMod.enable then for key, value in pairs(trigger.keyMod) do - local isDown = mod.TriggerConditions.keys[key] + local isDown = NP.TriggerConditions.keys[key] if value and isDown then if isDown() then passed = true else return end end @@ -1181,7 +1188,7 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) -- Cooldown if trigger.cooldowns and trigger.cooldowns.names and next(trigger.cooldowns.names) then - local cooldown = mod:StyleFilterCooldownCheck(trigger.cooldowns.names, trigger.cooldowns.mustHaveAll) + local cooldown = NP:StyleFilterCooldownCheck(trigger.cooldowns.names, trigger.cooldowns.mustHaveAll) if cooldown ~= nil then -- ignore if none are set to ONCD or OFFCD if cooldown then passed = true else return end end @@ -1191,13 +1198,13 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) if frame.Buffs_ and trigger.buffs then -- Has Stealable if trigger.buffs.hasStealable or trigger.buffs.hasNoStealable then - local isStealable = mod:StyleFilterDispelCheck(frame, filter) + local isStealable = NP:StyleFilterDispelCheck(frame, filter) if (trigger.buffs.hasStealable and isStealable) or (trigger.buffs.hasNoStealable and not isStealable) then passed = true else return end end -- Names / Spell IDs if trigger.buffs.names and next(trigger.buffs.names) then - local buff = mod:StyleFilterAuraCheck(frame, trigger.buffs.names, frame.Buffs_.tickers, 'HELPFUL', trigger.buffs.mustHaveAll, trigger.buffs.missing, trigger.buffs.minTimeLeft, trigger.buffs.maxTimeLeft, trigger.buffs.fromMe, trigger.buffs.fromPet, trigger.buffs.onMe, trigger.buffs.onPet) + local buff = NP:StyleFilterAuraCheck(frame, trigger.buffs.names, frame.Buffs_.tickers, 'HELPFUL', trigger.buffs.mustHaveAll, trigger.buffs.missing, trigger.buffs.minTimeLeft, trigger.buffs.maxTimeLeft, trigger.buffs.fromMe, trigger.buffs.fromPet, trigger.buffs.onMe, trigger.buffs.onPet) if buff ~= nil then -- ignore if none are selected if buff then passed = true else return end end @@ -1208,12 +1215,12 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) if frame.Debuffs_ and trigger.debuffs and trigger.debuffs.names and next(trigger.debuffs.names) then -- Has Dispellable if trigger.debuffs.hasDispellable or trigger.debuffs.hasNoDispellable then - local canDispel = mod:StyleFilterDispelCheck(frame, filter) + local canDispel = NP:StyleFilterDispelCheck(frame, filter) if (trigger.debuffs.hasDispellable and canDispel) or (trigger.debuffs.hasNoDispellable and not canDispel) then passed = true else return end end -- Names / Spell IDs - local debuff = mod:StyleFilterAuraCheck(frame, trigger.debuffs.names, frame.Debuffs_.tickers, 'HARMFUL', trigger.debuffs.mustHaveAll, trigger.debuffs.missing, trigger.debuffs.minTimeLeft, trigger.debuffs.maxTimeLeft, trigger.debuffs.fromMe, trigger.debuffs.fromPet, trigger.debuffs.onMe, trigger.debuffs.onPet) + local debuff = NP:StyleFilterAuraCheck(frame, trigger.debuffs.names, frame.Debuffs_.tickers, 'HARMFUL', trigger.debuffs.mustHaveAll, trigger.debuffs.missing, trigger.debuffs.minTimeLeft, trigger.debuffs.maxTimeLeft, trigger.debuffs.fromMe, trigger.debuffs.fromPet, trigger.debuffs.onMe, trigger.debuffs.onPet) if debuff ~= nil then -- ignore if none are selected if debuff then passed = true else return end end @@ -1238,8 +1245,8 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) end -- Plugin Callback - if mod.StyleFilterCustomChecks then - for _, customCheck in pairs(mod.StyleFilterCustomChecks) do + if NP.StyleFilterCustomChecks then + for _, customCheck in pairs(NP.StyleFilterCustomChecks) do local custom = customCheck(frame, filter, trigger) if custom ~= nil then -- ignore if nil return if custom then passed = true else return end @@ -1249,16 +1256,16 @@ function mod:StyleFilterConditionCheck(frame, filter, trigger) -- Pass it along if passed then - mod:StyleFilterPass(frame, filter.actions) + NP:StyleFilterPass(frame, filter.actions) end end -function mod:StyleFilterPass(frame, actions) - local db = mod:PlateDB(frame) - local healthBarEnabled = db.health.enable or (mod.db.displayStyle ~= 'ALL') or (frame.isTarget and mod.db.alwaysShowTargetHealth) +function NP:StyleFilterPass(frame, actions) + local db = NP:PlateDB(frame) + local healthBarEnabled = db.health.enable or (NP.db.displayStyle ~= 'ALL') or (frame.isTarget and NP.db.alwaysShowTargetHealth) local healthBarShown = healthBarEnabled and frame.Health:IsShown() - mod:StyleFilterSetChanges(frame, actions, + NP:StyleFilterSetChanges(frame, actions, (healthBarShown and actions.color and actions.color.health), --HealthColor (healthBarShown and db.power.enable and actions.color and actions.color.power), --PowerColor (healthBarShown and actions.color and actions.color.border and frame.Health.backdrop), --Borders @@ -1278,32 +1285,32 @@ function mod:StyleFilterPass(frame, actions) ) end -function mod:StyleFilterClear(frame) +function NP:StyleFilterClear(frame) if frame == _G.ElvNP_Test then return end local c = frame.StyleFilterChanges if c and next(c) then - mod:StyleFilterClearChanges(frame, c.HealthColor, c.PowerColor, c.Borders, c.HealthFlash, c.HealthTexture, c.HealthGlow, c.Scale, c.Alpha, c.NameTag, c.PowerTag, c.HealthTag, c.TitleTag, c.LevelTag, c.Portrait, c.NameOnly, c.Visibility) + NP:StyleFilterClearChanges(frame, c.HealthColor, c.PowerColor, c.Borders, c.HealthFlash, c.HealthTexture, c.HealthGlow, c.Scale, c.Alpha, c.NameTag, c.PowerTag, c.HealthTag, c.TitleTag, c.LevelTag, c.Portrait, c.NameOnly, c.Visibility) end end -function mod:StyleFilterSort(place) +function NP:StyleFilterSort(place) if self[2] and place[2] then return self[2] > place[2] -- Sort by priority: 1=first, 2=second, 3=third, etc end end -function mod:StyleFilterVehicleFunction(_, unit) +function NP:StyleFilterVehicleFunction(_, unit) unit = unit or self.unit self.inVehicle = (E.Retail or E.Wrath) and UnitInVehicle(unit) or nil end -function mod:StyleFilterTargetFunction(_, unit) +function NP:StyleFilterTargetFunction(_, unit) unit = unit or self.unit self.isTargetingMe = UnitIsUnit(unit..'target', 'player') or nil end -mod.StyleFilterEventFunctions = { -- a prefunction to the injected ouf watch +NP.StyleFilterEventFunctions = { -- a prefunction to the injected ouf watch PLAYER_TARGET_CHANGED = function(self) self.isTarget = self.unit and UnitIsUnit(self.unit, 'target') or nil end, @@ -1313,30 +1320,30 @@ mod.StyleFilterEventFunctions = { -- a prefunction to the injected ouf watch RAID_TARGET_UPDATE = function(self) self.RaidTargetIndex = self.unit and GetRaidTargetIndex(self.unit) or nil end, - UNIT_TARGET = mod.StyleFilterTargetFunction, - UNIT_THREAT_LIST_UPDATE = mod.StyleFilterTargetFunction, - UNIT_ENTERED_VEHICLE = mod.StyleFilterVehicleFunction, - UNIT_EXITED_VEHICLE = mod.StyleFilterVehicleFunction, - VEHICLE_UPDATE = mod.StyleFilterVehicleFunction + UNIT_TARGET = NP.StyleFilterTargetFunction, + UNIT_THREAT_LIST_UPDATE = NP.StyleFilterTargetFunction, + UNIT_ENTERED_VEHICLE = NP.StyleFilterVehicleFunction, + UNIT_EXITED_VEHICLE = NP.StyleFilterVehicleFunction, + VEHICLE_UPDATE = NP.StyleFilterVehicleFunction } -mod.StyleFilterSetVariablesIgnored = { +NP.StyleFilterSetVariablesIgnored = { UNIT_THREAT_LIST_UPDATE = true, UNIT_ENTERED_VEHICLE = true, UNIT_EXITED_VEHICLE = true } -function mod:StyleFilterSetVariables(nameplate) +function NP:StyleFilterSetVariables(nameplate) if nameplate == _G.ElvNP_Test then return end - for event, func in pairs(mod.StyleFilterEventFunctions) do - if not mod.StyleFilterSetVariablesIgnored[event] then -- ignore extras as we just need one call to Vehicle and Target + for event, func in pairs(NP.StyleFilterEventFunctions) do + if not NP.StyleFilterSetVariablesIgnored[event] then -- ignore extras as we just need one call to Vehicle and Target func(nameplate) end end end -function mod:StyleFilterClearVariables(nameplate) +function NP:StyleFilterClearVariables(nameplate) if nameplate == _G.ElvNP_Test then return end nameplate.isTarget = nil @@ -1347,10 +1354,10 @@ function mod:StyleFilterClearVariables(nameplate) nameplate.ThreatScale = nil end -mod.StyleFilterTriggerList = {} -- configured filters enabled with sorted priority -mod.StyleFilterTriggerEvents = {} -- events required by the filter that we need to watch for -mod.StyleFilterPlateEvents = {} -- events watched inside of ouf, which is called on the nameplate itself, updated by StyleFilterWatchEvents -mod.StyleFilterDefaultEvents = { -- list of events style filter uses to populate plate events (updated during StyleFilterEvents), true if unitless +NP.StyleFilterTriggerList = {} -- configured filters enabled with sorted priority +NP.StyleFilterTriggerEvents = {} -- events required by the filter that we need to watch for +NP.StyleFilterPlateEvents = {} -- events watched inside of ouf, which is called on the nameplate itself, updated by StyleFilterWatchEvents +NP.StyleFilterDefaultEvents = { -- list of events style filter uses to populate plate events (updated during StyleFilterEvents), true if unitless -- existing: UNIT_AURA = false, UNIT_CONNECTION = false, @@ -1360,6 +1367,8 @@ mod.StyleFilterDefaultEvents = { -- list of events style filter uses to populate UNIT_PET = false, UNIT_POWER_UPDATE = false, -- mod events: + NAME_PLATE_UNIT_ADDED = true, + NAME_PLATE_UNIT_REMOVED = true, GROUP_ROSTER_UPDATE = true, INCOMING_RESURRECT_CHANGED = false, MODIFIER_STATE_CHANGED = true, @@ -1383,12 +1392,12 @@ mod.StyleFilterDefaultEvents = { -- list of events style filter uses to populate } if E.Classic then - mod.StyleFilterDefaultEvents.UNIT_HEALTH_FREQUENT = false + NP.StyleFilterDefaultEvents.UNIT_HEALTH_FREQUENT = false else - mod.StyleFilterDefaultEvents.UNIT_HEALTH = false + NP.StyleFilterDefaultEvents.UNIT_HEALTH = false end -mod.StyleFilterCastEvents = { +NP.StyleFilterCastEvents = { UNIT_SPELLCAST_START = 1, -- start UNIT_SPELLCAST_CHANNEL_START = 1, UNIT_SPELLCAST_STOP = 1, -- stop @@ -1396,33 +1405,32 @@ mod.StyleFilterCastEvents = { UNIT_SPELLCAST_FAILED = 1, -- fail UNIT_SPELLCAST_INTERRUPTED = 1 } -for event in pairs(mod.StyleFilterCastEvents) do - mod.StyleFilterDefaultEvents[event] = false +for event in pairs(NP.StyleFilterCastEvents) do + NP.StyleFilterDefaultEvents[event] = false end -function mod:StyleFilterWatchEvents() - for event in pairs(mod.StyleFilterDefaultEvents) do - mod.StyleFilterPlateEvents[event] = mod.StyleFilterTriggerEvents[event] and true or nil +function NP:StyleFilterWatchEvents() + for event in pairs(NP.StyleFilterDefaultEvents) do + NP.StyleFilterPlateEvents[event] = NP.StyleFilterTriggerEvents[event] and true or nil end end -function mod:StyleFilterConfigure() - local events = mod.StyleFilterTriggerEvents - local list = mod.StyleFilterTriggerList +function NP:StyleFilterConfigure() + local events = NP.StyleFilterTriggerEvents + local list = NP.StyleFilterTriggerList wipe(events) wipe(list) - if mod.db.filters then + if NP.db.filters then for filterName, filter in pairs(E.global.nameplates.filters) do local t = filter.triggers - if t and mod.db.filters[filterName] and mod.db.filters[filterName].triggers and mod.db.filters[filterName].triggers.enable then + if t and NP.db.filters[filterName] and NP.db.filters[filterName].triggers and NP.db.filters[filterName].triggers.enable then tinsert(list, {filterName, t.priority or 1}) -- NOTE: 0 for fake events events.FAKE_AuraWaitTimer = 0 -- for minTimeLeft and maxTimeLeft aura trigger events.FAKE_BossModAuras = 0 -- support to trigger filters based on Boss Mod Auras events.PLAYER_TARGET_CHANGED = 1 - events.NAME_PLATE_UNIT_ADDED = 1 events.UNIT_FACTION = 1 -- frameType can change here events.ForceUpdate = -1 events.PoolerUpdate = -1 @@ -1437,7 +1445,7 @@ function mod:StyleFilterConfigure() end end end if spell or (t.casting.interruptible or t.casting.notInterruptible or t.casting.isCasting or t.casting.isChanneling or t.casting.notCasting or t.casting.notChanneling) then - for event in pairs(mod.StyleFilterCastEvents) do + for event in pairs(NP.StyleFilterCastEvents) do events[event] = 1 end end @@ -1458,6 +1466,13 @@ function mod:StyleFilterConfigure() events.RAID_TARGET_UPDATE = 1 end + if (t.amountBelow or 0) > 0 or (t.amountAbove or 0) > 0 then + events.NAME_PLATE_UNIT_REMOVED = 1 + events.NAME_PLATE_UNIT_ADDED = 1 + elseif not events.NAME_PLATE_UNIT_ADDED then + events.NAME_PLATE_UNIT_ADDED = 2 + end + if t.unitInVehicle then events.UNIT_ENTERED_VEHICLE = 1 events.UNIT_EXITED_VEHICLE = 1 @@ -1578,32 +1593,32 @@ function mod:StyleFilterConfigure() end end end end end end - mod:StyleFilterWatchEvents() + NP:StyleFilterWatchEvents() if next(list) then - sort(list, mod.StyleFilterSort) -- sort by priority + sort(list, NP.StyleFilterSort) -- sort by priority end end -function mod:StyleFilterHiddenState(c) +function NP:StyleFilterHiddenState(c) return c and ((c.NameOnly and c.Visibility and 3) or (c.NameOnly and 2) or (c.Visibility and 1)) end -function mod:StyleFilterUpdate(frame, event) - if frame == _G.ElvNP_Test or not frame.StyleFilterChanges or not mod.StyleFilterTriggerEvents[event] then return end +function NP:StyleFilterUpdate(frame, event) + if frame == _G.ElvNP_Test or not frame.StyleFilterChanges or not NP.StyleFilterTriggerEvents[event] then return end - local state = mod:StyleFilterHiddenState(frame.StyleFilterChanges) + local state = NP:StyleFilterHiddenState(frame.StyleFilterChanges) - mod:StyleFilterClear(frame) + NP:StyleFilterClear(frame) - for filterNum in ipairs(mod.StyleFilterTriggerList) do - local filter = E.global.nameplates.filters[mod.StyleFilterTriggerList[filterNum][1]] + for filterNum in ipairs(NP.StyleFilterTriggerList) do + local filter = E.global.nameplates.filters[NP.StyleFilterTriggerList[filterNum][1]] if filter then - mod:StyleFilterConditionCheck(frame, filter, filter.triggers) + NP:StyleFilterConditionCheck(frame, filter, filter.triggers) end end - mod:StyleFilterClearVisibility(frame, state) + NP:StyleFilterClearVisibility(frame, state) end do -- oUF style filter inject watch functions without actually registering any events @@ -1613,7 +1628,7 @@ do -- oUF style filter inject watch functions without actually registering any e pooler.update = function() for frame in pairs(pooler.frames) do - mod:StyleFilterUpdate(frame, 'PoolerUpdate') + NP:StyleFilterUpdate(frame, 'PoolerUpdate') end wipe(pooler.frames) -- clear it out @@ -1632,7 +1647,7 @@ do -- oUF style filter inject watch functions without actually registering any e pooler:SetScript('OnUpdate', pooler.onUpdate) local update = function(frame, event, arg1, arg2, arg3, ...) - local eventFunc = mod.StyleFilterEventFunctions[event] + local eventFunc = NP.StyleFilterEventFunctions[event] if eventFunc then eventFunc(frame, event, arg1, arg2, arg3, ...) end @@ -1643,7 +1658,10 @@ do -- oUF style filter inject watch functions without actually registering any e end -- Trigger Event and (auraEvent or unitless or verifiedUnit); auraEvent is already unit verified by ShouldSkipAuraUpdate - if mod.StyleFilterTriggerEvents[event] and (auraEvent or mod.StyleFilterDefaultEvents[event] or (arg1 and arg1 == frame.unit)) then + local trigger = NP.StyleFilterTriggerEvents[event] + if trigger == 2 and (frame.unit ~= arg1) then + return -- this blocks rechecking other plates on added when not using the amount trigger (preformance thing) + elseif trigger and (auraEvent or NP.StyleFilterDefaultEvents[event] or (arg1 and arg1 == frame.unit)) then pooler.frames[frame] = true end end @@ -1693,16 +1711,16 @@ do -- oUF style filter inject watch functions without actually registering any e end end end - function mod:StyleFilterEventWatch(frame, disable) + function NP:StyleFilterEventWatch(frame, disable) if frame == _G.ElvNP_Test then return end - for event in pairs(mod.StyleFilterDefaultEvents) do + for event in pairs(NP.StyleFilterDefaultEvents) do local holdsEvent = styleFilterIsWatching(frame, event) if disable then if holdsEvent then oUF_fake_register(frame, event, true) end - elseif mod.StyleFilterPlateEvents[event] then + elseif NP.StyleFilterPlateEvents[event] then if not holdsEvent then oUF_fake_register(frame, event) end @@ -1710,7 +1728,7 @@ do -- oUF style filter inject watch functions without actually registering any e oUF_fake_register(frame, event, true) end end end - function mod:StyleFilterRegister(nameplate, event, unitless, func, objectEvent) + function NP:StyleFilterRegister(nameplate, event, unitless, func, objectEvent) if objectEvent then if not nameplate.objectEventFunc then nameplate.objectEventFunc = function(_, evnt, ...) update(nameplate, evnt, ...) end @@ -1725,45 +1743,45 @@ do -- oUF style filter inject watch functions without actually registering any e end -- events we actually register on plates when they aren't added -function mod:StyleFilterEvents(nameplate) +function NP:StyleFilterEvents(nameplate) if nameplate == _G.ElvNP_Test then return end -- happy little table nameplate.StyleFilterChanges = {} -- add events to be watched - for event, unitless in pairs(mod.StyleFilterDefaultEvents) do - mod:StyleFilterRegister(nameplate, event, unitless) + for event, unitless in pairs(NP.StyleFilterDefaultEvents) do + NP:StyleFilterRegister(nameplate, event, unitless) end -- object event pathing (these update after MapInfo updates), these events are not added onto the nameplate itself - mod:StyleFilterRegister(nameplate,'LOADING_SCREEN_DISABLED', nil, nil, E.MapInfo) - mod:StyleFilterRegister(nameplate,'ZONE_CHANGED_NEW_AREA', nil, nil, E.MapInfo) - mod:StyleFilterRegister(nameplate,'ZONE_CHANGED_INDOORS', nil, nil, E.MapInfo) - mod:StyleFilterRegister(nameplate,'ZONE_CHANGED', nil, nil, E.MapInfo) + NP:StyleFilterRegister(nameplate,'LOADING_SCREEN_DISABLED', nil, nil, E.MapInfo) + NP:StyleFilterRegister(nameplate,'ZONE_CHANGED_NEW_AREA', nil, nil, E.MapInfo) + NP:StyleFilterRegister(nameplate,'ZONE_CHANGED_INDOORS', nil, nil, E.MapInfo) + NP:StyleFilterRegister(nameplate,'ZONE_CHANGED', nil, nil, E.MapInfo) end -function mod:StyleFilterAddCustomCheck(name, func) - if not mod.StyleFilterCustomChecks then - mod.StyleFilterCustomChecks = {} +function NP:StyleFilterAddCustomCheck(name, func) + if not NP.StyleFilterCustomChecks then + NP.StyleFilterCustomChecks = {} end - mod.StyleFilterCustomChecks[name] = func + NP.StyleFilterCustomChecks[name] = func end -function mod:StyleFilterRemoveCustomCheck(name) - if not mod.StyleFilterCustomChecks then +function NP:StyleFilterRemoveCustomCheck(name) + if not NP.StyleFilterCustomChecks then return end - mod.StyleFilterCustomChecks[name] = nil + NP.StyleFilterCustomChecks[name] = nil end -function mod:PLAYER_LOGOUT() - mod:StyleFilterClearDefaults(E.global.nameplates.filters) +function NP:PLAYER_LOGOUT() + NP:StyleFilterClearDefaults(E.global.nameplates.filters) end -function mod:StyleFilterClearDefaults(tbl) +function NP:StyleFilterClearDefaults(tbl) for filterName, filterTable in pairs(tbl) do if G.nameplates.filters[filterName] then local defaultTable = E:CopyTable({}, E.StyleFilterDefaults) @@ -1775,12 +1793,12 @@ function mod:StyleFilterClearDefaults(tbl) end end -function mod:StyleFilterCopyDefaults(tbl) +function NP:StyleFilterCopyDefaults(tbl) return E:CopyDefaults(tbl or {}, E.StyleFilterDefaults) end -function mod:StyleFilterInitialize() +function NP:StyleFilterInitialize() for _, filterTable in pairs(E.global.nameplates.filters) do - mod:StyleFilterCopyDefaults(filterTable) + NP:StyleFilterCopyDefaults(filterTable) end end diff --git a/ElvUI/Core/Modules/Skins/Skins.lua b/ElvUI/Core/Modules/Skins/Skins.lua index c6c858710f..bcaad55a2c 100644 --- a/ElvUI/Core/Modules/Skins/Skins.lua +++ b/ElvUI/Core/Modules/Skins/Skins.lua @@ -574,6 +574,52 @@ do end end +do + local keys = { + 'zoomInButton', + 'zoomOutButton', + 'rotateLeftButton', + 'rotateRightButton', + 'resetButton', + } + + local function UpdateLayout(frame) + local last + for _, name in next, keys do + local button = frame[name] + if button then + if not button.isSkinned then + S:HandleButton(button) + button:Size(22) + + if button.Icon then + button.Icon:SetInside(nil, 2, 2) + end + end + + if button:IsShown() then + button:ClearAllPoints() + + if last then + button:Point('LEFT', last, 'RIGHT', 1, 0) + else + button:Point('LEFT', 6, 0) + end + + last = button + end + end + end + end + + function S:HandleModelSceneControlButtons(frame) + if not frame.isSkinned then + frame.isSkinned = true + hooksecurefunc(frame, 'UpdateLayout', UpdateLayout) + end + end +end + function S:HandleButton(button, strip, isDecline, noStyle, createBackdrop, template, noGlossTex, overrideTex, frameLevel, regionsKill, regionsZero) assert(button, 'doesn\'t exist!') diff --git a/ElvUI/Core/Modules/Tooltip/Tooltip.lua b/ElvUI/Core/Modules/Tooltip/Tooltip.lua index d467492a76..6890245786 100644 --- a/ElvUI/Core/Modules/Tooltip/Tooltip.lua +++ b/ElvUI/Core/Modules/Tooltip/Tooltip.lua @@ -1,7 +1,7 @@ local E, L, V, P, G = unpack(ElvUI) local TT = E:GetModule('Tooltip') local AB = E:GetModule('ActionBars') -local Skins = E:GetModule('Skins') +local S = E:GetModule('Skins') local B = E:GetModule('Bags') local LSM = E.Libs.LSM @@ -179,28 +179,38 @@ end function TT:RemoveTrashLines(tt) if tt:IsForbidden() then return end - for i = 3, tt:NumLines() do - local tiptext = _G['GameTooltipTextLeft'..i] - local linetext = tiptext and tiptext:GetText() + local info = tt:GetTooltipData() + if not (info and info.lines[3]) then return end - if not linetext then + for i, line in next, info.lines, 3 do + local text = line and line.leftText + if not text or text == '' then break - elseif linetext == _G.PVP or linetext == _G.FACTION_ALLIANCE or linetext == _G.FACTION_HORDE then - tiptext:SetText('') - tiptext:Hide() + elseif text == _G.PVP or text == _G.FACTION_ALLIANCE or text == _G.FACTION_HORDE then + local left = _G['GameTooltipTextLeft'..i] + left:SetText('') + left:Hide() end end end -function TT:GetLevelLine(tt, offset) +function TT:GetLevelLine(tt, offset, raw) if tt:IsForbidden() then return end - for i = offset, tt:NumLines() do - local tipLine = _G['GameTooltipTextLeft'..i] - local tipText = tipLine and tipLine:GetText() - local tipLower = tipText and strlower(tipText) - if tipLower and (strfind(tipLower, LEVEL1) or strfind(tipLower, LEVEL2)) then - return tipLine, _G['GameTooltipTextLeft'..i+1] or nil + local info = tt:GetTooltipData() + if not (info and info.lines[offset]) then return end + + for i, line in next, info.lines, offset do + local text = line and line.leftText + if not text or text == '' then return end + + local lower = strlower(text) + if lower and (strfind(lower, LEVEL1) or strfind(lower, LEVEL2)) then + if raw then + return line, info.lines[i+1] + else + return _G['GameTooltipTextLeft'..i], _G['GameTooltipTextLeft'..i+1] + end end end end @@ -238,7 +248,7 @@ function TT:SetUnitText(tt, unit, isPlayerUnit) local awayText = UnitIsAFK(unit) and AFK_LABEL or UnitIsDND(unit) and DND_LABEL or '' _G.GameTooltipTextLeft1:SetFormattedText('|c%s%s%s|r', nameColor.colorStr, name or UNKNOWN, awayText) - local levelLine, specLine = TT:GetLevelLine(tt, (guildName and not E.Classic and 3) or 2) + local levelLine, specLine = TT:GetLevelLine(tt, (guildName and not E.Classic and 2) or 1) if guildName then if guildRealm and isShiftKeyDown then guildName = guildName..'-'..guildRealm @@ -290,7 +300,7 @@ function TT:SetUnitText(tt, unit, isPlayerUnit) return nameColor else local isPetCompanion = E.Retail and UnitIsBattlePetCompanion(unit) - local levelLine, classLine = TT:GetLevelLine(tt, 2) + local levelLine, classLine = TT:GetLevelLine(tt, 1) if levelLine then local pvpFlag, classificationString, diffColor, level = '', '' local creatureClassification = UnitClassification(unit) @@ -751,7 +761,7 @@ function TT:GameTooltip_AddQuestRewardsToTooltip(tt, questID) if not (tt and questID and tt.progressBar) or tt:IsForbidden() then return end local _, max = tt.progressBar:GetMinMaxValues() - Skins:StatusBarColorGradient(tt.progressBar, tt.progressBar:GetValue(), max) + S:StatusBarColorGradient(tt.progressBar, tt.progressBar:GetValue(), max) end function TT:GameTooltip_ClearProgressBars(tt) @@ -808,7 +818,7 @@ function TT:MODIFIER_STATE_CHANGED() end end - if _G.ElvUISpellBookTooltip:IsShown() then + if E.SpellBookTooltip:IsShown() then AB:UpdateSpellBookTooltip() end end @@ -848,17 +858,21 @@ function TT:SetUnitAura(tt, unit, index, filter) end function TT:GameTooltip_OnTooltipSetSpell(data) - if (self ~= GameTooltip and self ~= _G.ElvUISpellBookTooltip) or self:IsForbidden() or not TT:IsModKeyDown() then return end + if (self ~= GameTooltip and self ~= E.SpellBookTooltip) or self:IsForbidden() or not TT:IsModKeyDown() then return end local id = (data and data.id) or select(2, self:GetSpell()) if not id then return end local ID = format(IDLine, _G.ID, id) - for i = 3, self:NumLines() do - local line = _G[format('GameTooltipTextLeft%d', i)] - local text = line and line:GetText() - if text and strfind(text, ID) then - return -- this is called twice on talents for some reason? + local info = self:GetTooltipData() + if info and info.lines[3] then + for _, line in next, info.lines, 3 do + local text = line and line.leftText + if not text or text == '' then return end + + if strfind(text, ID) then + return -- this is called twice on talents for some reason? + end end end @@ -1049,7 +1063,7 @@ function TT:Initialize() TT:SecureHookScript(GameTooltip, 'OnTooltipSetSpell', TT.GameTooltip_OnTooltipSetSpell) TT:SecureHookScript(GameTooltip, 'OnTooltipSetItem', TT.GameTooltip_OnTooltipSetItem) TT:SecureHookScript(GameTooltip, 'OnTooltipSetUnit', TT.GameTooltip_OnTooltipSetUnit) - TT:SecureHookScript(_G.ElvUISpellBookTooltip, 'OnTooltipSetSpell', TT.GameTooltip_OnTooltipSetSpell) + TT:SecureHookScript(E.SpellBookTooltip, 'OnTooltipSetSpell', TT.GameTooltip_OnTooltipSetSpell) if not E.Classic then -- what's the replacement in DF TT:SecureHook(GameTooltip, 'SetCurrencyTokenByID') diff --git a/ElvUI/Core/Modules/UnitFrames/Elements/BuffIndicator.lua b/ElvUI/Core/Modules/UnitFrames/Elements/BuffIndicator.lua index 4ab3ad8153..e1744bc309 100644 --- a/ElvUI/Core/Modules/UnitFrames/Elements/BuffIndicator.lua +++ b/ElvUI/Core/Modules/UnitFrames/Elements/BuffIndicator.lua @@ -1,5 +1,6 @@ local E, L, V, P, G = unpack(ElvUI) local UF = E:GetModule('UnitFrames') +local LSM = E.Libs.LSM local unpack = unpack local CreateFrame = CreateFrame @@ -24,7 +25,9 @@ function UF:Configure_AuraWatch(frame, isPet) end frame.AuraWatch.size = db.size + frame.AuraWatch.countFont = LSM:Fetch('font', db.countFont) frame.AuraWatch.countFontSize = db.countFontSize + frame.AuraWatch.countFontOutline = db.countFontOutline if frame.unit == 'pet' or isPet then frame.AuraWatch:SetNewTable(E.global.unitframe.aurawatch.PET) @@ -83,25 +86,25 @@ function UF:BuffIndicator_PostUpdateIcon(_, button) end if not E.db.cooldown.enable then -- cooldown module is off, handle blizzards cooldowns + button.cd.blizzText:ClearAllPoints() + button.cd.blizzText:Point(settings.cooldownAnchor or 'CENTER', settings.cooldownX or 1, settings.cooldownY or 1) + if onlyText then button.cd:SetHideCountdownNumbers(false) - - if button.cd.blizzText then - button.cd.blizzText:SetTextColor(settings.color.r, settings.color.g, settings.color.b) - end + button.cd.blizzText:SetTextColor(settings.color.r, settings.color.g, settings.color.b) else button.cd:SetHideCountdownNumbers(not settings.displayText) - - if button.cd.blizzText then - button.cd.blizzText:SetTextColor(1, 1, 1) - end + button.cd.blizzText:SetTextColor(1, 1, 1) end elseif button.cd.timer then button.cd.textThreshold = settings.textThreshold ~= -1 and settings.textThreshold button.cd.hideText = (not onlyText and not settings.displayText) or nil button.cd.timer.skipTextColor = onlyText or nil - if onlyText and button.cd.timer.text then + button.cd.timer.text:ClearAllPoints() + button.cd.timer.text:Point(settings.cooldownAnchor or 'CENTER', settings.cooldownX or 1, settings.cooldownY or 1) + + if onlyText then button.cd.timer.text:SetTextColor(settings.color.r, settings.color.g, settings.color.b) end end @@ -116,7 +119,7 @@ function UF:BuffIndicator_PostUpdateIcon(_, button) button.count:ClearAllPoints() button.count:Point(settings.countAnchor or 'BOTTOMRIGHT', settings.countX or 1, settings.countY or 1) - button.count:FontTemplate(nil, self.countFontSize or 12, 'OUTLINE') + button.count:FontTemplate(self.countFont, self.countFontSize or 12, self.countFontOutline or 'OUTLINE') if textureIcon and button.filter == 'HARMFUL' then button.icon.border:SetVertexColor(1, 0, 0) diff --git a/ElvUI/Core/Modules/UnitFrames/Elements/Portrait.lua b/ElvUI/Core/Modules/UnitFrames/Elements/Portrait.lua index ca433d4edd..4cdfe9d898 100644 --- a/ElvUI/Core/Modules/UnitFrames/Elements/Portrait.lua +++ b/ElvUI/Core/Modules/UnitFrames/Elements/Portrait.lua @@ -4,12 +4,7 @@ local UF = E:GetModule('UnitFrames') local rad = rad local unpack = unpack local hooksecurefunc = hooksecurefunc - -local UnitClass = UnitClass local CreateFrame = CreateFrame -local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS - -local classIcon = [[Interface\WorldStateFrame\Icons-Classes]] function UF:ModelAlphaFix(value) local portrait = self.Portrait3D @@ -31,6 +26,7 @@ function UF:Construct_Portrait(frame, which) backdrop:SetFrameLevel(frame:GetFrameLevel()) backdrop:SetTemplate(nil, nil, nil, nil, true) portrait.backdrop = backdrop + portrait.useClassBase = true else portrait = CreateFrame('PlayerModel', nil, frame) portrait:CreateBackdrop(nil, nil, nil, nil, true) @@ -66,14 +62,6 @@ function UF:Configure_Portrait(frame) portrait:SetAlpha(frame.USE_PORTRAIT_OVERLAY and portrait.db.overlayAlpha or 1) portrait:SetShown(frame.USE_PORTRAIT) - if portrait.db.style == 'Class' then - portrait:SetTexture(classIcon) - portrait.customTexture = classIcon - elseif portrait.db.style == '2D' then - portrait:SetTexCoord(0.15, 0.85, 0.15, 0.85) - portrait.customTexture = nil - end - if frame.USE_PORTRAIT then if not frame:IsElementEnabled('Portrait') then frame:EnableElement('Portrait') @@ -152,8 +140,6 @@ function UF:PortraitUpdate(unit, hasStateChanged) self:SetDesaturation(db.desaturation) self:SetPaused(db.paused) elseif db.style == 'Class' then - local _, className = UnitClass(unit) - local crop = CLASS_ICON_TCOORDS[className] - if crop then self:SetTexCoord(unpack(crop)) end + self:SetTexCoord(unpack(E.TexCoords)) end end diff --git a/ElvUI/Core/init.lua b/ElvUI/Core/init.lua index 4b78211cec..27b9e9d328 100644 --- a/ElvUI/Core/init.lua +++ b/ElvUI/Core/init.lua @@ -307,6 +307,8 @@ function E:OnInitialize() end end + E.SpellBookTooltip = CreateFrame('GameTooltip', 'ElvUI_SpellBookTooltip', UIParent, 'GameTooltipTemplate') + E.ConfigTooltip = CreateFrame('GameTooltip', 'ElvUI_ConfigTooltip', UIParent, 'GameTooltipTemplate') E.ScanTooltip = CreateFrame('GameTooltip', 'ElvUI_ScanTooltip', UIParent, 'GameTooltipTemplate') E.EasyMenu = CreateFrame('Frame', 'ElvUI_EasyMenu', UIParent, 'UIDropDownMenuTemplate') diff --git a/ElvUI/ElvUI_Classic.toc b/ElvUI/ElvUI_Classic.toc index 2e8121e9ac..1684150cee 100644 --- a/ElvUI/ElvUI_Classic.toc +++ b/ElvUI/ElvUI_Classic.toc @@ -1,7 +1,7 @@ ## Title: |cff1784d1ElvUI|r |cfd9b9b9bClassic|r ## Notes: User Interface Replacement ## Author: Elv, Simpy -## Version: 13.46 +## Version: 13.47 ## SavedVariables: ElvDB, ElvPrivateDB ## SavedVariablesPerCharacter: ElvCharacterDB ## OptionalDeps: SharedMedia, Tukui, Masque diff --git a/ElvUI/ElvUI_Mainline.toc b/ElvUI/ElvUI_Mainline.toc index d6b3da5afa..8c135d0dc8 100644 --- a/ElvUI/ElvUI_Mainline.toc +++ b/ElvUI/ElvUI_Mainline.toc @@ -1,13 +1,13 @@ ## Title: |cff1784d1ElvUI|r ## Notes: User Interface Replacement ## Author: Elv, Simpy -## Version: 13.46 +## Version: 13.47 ## SavedVariables: ElvDB, ElvPrivateDB ## SavedVariablesPerCharacter: ElvCharacterDB ## OptionalDeps: SharedMedia, Tukui, Masque ## RequiredDeps: ElvUI_Libraries -## Interface: 100107 -## X-Interface: 100107 +## Interface: 100200 +## X-Interface: 100200 ## X-Tukui-ProjectID: -2 ## X-Tukui-ProjectFolders: ElvUI, ElvUI_Libraries, ElvUI_Options ## AddonCompartmentFunc: ElvUI_AddonCompartmentFunc diff --git a/ElvUI/ElvUI_Wrath.toc b/ElvUI/ElvUI_Wrath.toc index c97b1404da..ac74ecbe21 100644 --- a/ElvUI/ElvUI_Wrath.toc +++ b/ElvUI/ElvUI_Wrath.toc @@ -1,7 +1,7 @@ ## Title: |cff1784d1ElvUI|r |cfd9b9b9bWrath|r ## Notes: User Interface Replacement ## Author: Elv, Simpy -## Version: 13.46 +## Version: 13.47 ## SavedVariables: ElvDB, ElvPrivateDB ## SavedVariablesPerCharacter: ElvCharacterDB ## OptionalDeps: SharedMedia, Tukui, Masque diff --git a/ElvUI/Mainline/Filters/Filters.lua b/ElvUI/Mainline/Filters/Filters.lua index b2636204a1..2bc3ff69ab 100644 --- a/ElvUI/Mainline/Filters/Filters.lua +++ b/ElvUI/Mainline/Filters/Filters.lua @@ -212,6 +212,7 @@ G.unitframe.aurafilters.TurtleBuffs = { [53480] = List(), -- Roar of Sacrifice [202748] = List(), -- Survival Tactics -- Mage + [414658] = List(), -- Ice Cold [45438] = List(), -- Ice Block [110960] = List(), -- Greater Invisibility [198111] = List(), -- Temporal Shield @@ -220,6 +221,7 @@ G.unitframe.aurafilters.TurtleBuffs = { [235313] = List(), -- Blazing Barrier [235450] = List(), -- Prismatic Barrier [110909] = List(), -- Alter Time + [342246] = List(), -- Alter Time -- Monk [122783] = List(), -- Diffuse Magic [122278] = List(), -- Dampen Harm @@ -247,7 +249,6 @@ G.unitframe.aurafilters.TurtleBuffs = { [86659] = List(), -- Guardian of Ancien Kings [212641] = List(), -- Guardian of Ancien Kings (Glyph of the Queen) [209388] = List(), -- Bulwark of Order - [152262] = List(), -- Seraphim [132403] = List(), -- Shield of the Righteous -- Priest [81782] = List(), -- Power Word: Barrier @@ -267,7 +268,6 @@ G.unitframe.aurafilters.TurtleBuffs = { -- Shaman [325174] = List(), -- Spirit Link [974] = List(), -- Earth Shield - [210918] = List(), -- Ethereal Form [207654] = List(), -- Servant of the Queen [108271] = List(), -- Astral Shift [207498] = List(), -- Ancestral Protection @@ -401,6 +401,7 @@ G.unitframe.aurafilters.PlayerBuffs = { [160452] = List(), -- Netherwinds (Pet) [266779] = List(), -- Coordinated Assault -- Mage + [414658] = List(), -- Ice Cold [45438] = List(), -- Ice Block [110960] = List(), -- Greater Invisibility [198111] = List(), -- Temporal Shield @@ -409,6 +410,7 @@ G.unitframe.aurafilters.PlayerBuffs = { [235313] = List(), -- Blazing Barrier [235450] = List(), -- Prismatic Barrier [110909] = List(), -- Alter Time + [342246] = List(), -- Alter Time [190319] = List(), -- Combustion [80353] = List(), -- Time Warp [12472] = List(), -- Icy Veins @@ -454,7 +456,6 @@ G.unitframe.aurafilters.PlayerBuffs = { [86659] = List(), -- Guardian of Ancien Kings [212641] = List(), -- Guardian of Ancien Kings (Glyph of the Queen) [209388] = List(), -- Bulwark of Order - [152262] = List(), -- Seraphim [132403] = List(), -- Shield of the Righteous [31884] = List(), -- Avenging Wrath [105809] = List(), -- Holy Avenger @@ -516,11 +517,9 @@ G.unitframe.aurafilters.PlayerBuffs = { -- Shaman [325174] = List(), -- Spirit Link [974] = List(), -- Earth Shield - [210918] = List(), -- Ethereal Form [207654] = List(), -- Servant of the Queen [108271] = List(), -- Astral Shift [207498] = List(), -- Ancestral Protection - [204366] = List(), -- Thundercharge [209385] = List(), -- Windfury Totem [208963] = List(), -- Skyfury Totem [204945] = List(), -- Doom Winds @@ -628,19 +627,20 @@ G.unitframe.aurafilters.Blacklist = { [206150] = List(), -- Challenger's Burden SL [206151] = List(), -- Challenger's Burden BfA [206662] = List(), -- Experience Eliminated (in range) + [234143] = List(), -- Temptation (Upper Karazhan Ring Debuff) [287825] = List(), -- Lethargy debuff (fight or flight) [306600] = List(), -- Experience Eliminated (oor - 5m) [313015] = List(), -- Recently Failed (Mechagnome racial) [322695] = List(), -- Drained [328891] = List(), -- A Gilded Perspective [348443] = List(), -- Experience Eliminated - [234143] = List(), -- Temptation (Upper Karazhan Ring Debuff) - [392960] = List(), -- Waygate Travel - [390106] = List(), -- Riding Along + [374037] = List(), -- Overwhelming Rage [383600] = List(), -- Surrounding Storm (Strunraan) + [390106] = List(), -- Riding Along + [392960] = List(), -- Waygate Travel [392992] = List(), -- Silent Lava [393798] = List(), -- Activated Defense Systems - [374037] = List(), -- Overwhelming Rage + [418990] = List(), -- Wicker Men's Curse }, } @@ -902,6 +902,147 @@ G.unitframe.aurafilters.RaidDebuffs = { [388544] = List(), -- Barkbreaker [377008] = List(), -- Deafening Screech ---------------------------------------------------------- + ---------------- Dragonflight (Season 3) ----------------- + ---------------------------------------------------------- + -- Darkheart Thicket + [198408] = List(), -- Nightfall + [196376] = List(), -- Grievous Tear + [200182] = List(), -- Festering Rip + [200238] = List(), -- Feed on the Weak + [200289] = List(), -- Growing Paranoia + [204667] = List(), -- Nightmare Breath + [204611] = List(), -- Crushing Grip + [199460] = List(), -- Falling Rocks + [200329] = List(), -- Overwhelming Terror + [191326] = List(), -- Breath of Corruption + [204243] = List(), -- Tormenting Eye + [225484] = List(), -- Grievous Rip + [200642] = List(), -- Despair + [199063] = List(), -- Strangling Roots + [198477] = List(), -- Fixate + [204246] = List(), -- Tormenting Fear + [198904] = List(), -- Poison Spear + [200684] = List(), -- Nightmare Toxin + [200243] = List(), -- Waking Nightmare + [200580] = List(), -- Maddening Roar + [200771] = List(), -- Propelling Charge + [200273] = List(), -- Cowardice + [201365] = List(), -- Darksoul Drain + [201839] = List(), -- Curse of Isolation + [201902] = List(), -- Scorching Shot + -- Black Rook Hold + [202019] = List(), -- Shadow Bolt Volley + [197521] = List(), -- Blazing Trail + [197478] = List(), -- Dark Rush + [197546] = List(), -- Brutal Glaive + [198079] = List(), -- Hateful Gaze + [224188] = List(), -- Hateful Charge + [201733] = List(), -- Stinging Swarm + [194966] = List(), -- Soul Echoes + [198635] = List(), -- Unerring Shear + [225909] = List(), -- Soul Venom + [198501] = List(), -- Fel Vomitus + [198446] = List(), -- Fel Vomit + [200084] = List(), -- Soul Blade + [197821] = List(), -- Felblazed Ground + [203163] = List(), -- Sic Bats! + [199368] = List(), -- Legacy of the Ravencrest + [225732] = List(), -- Strike Down + [199168] = List(), -- Itchy! + [225963] = List(), -- Bloodthirsty Leap + [214002] = List(), -- Raven's Dive + [197974] = List(), -- Bonecrushing Strike I + [200261] = List(), -- Bonecrushing Strike II + [204896] = List(), -- Drain Life + [199097] = List(), -- Cloud of Hypnosis + -- Waycrest Manor + [260703] = List(), -- Unstable Runic Mark + [261438] = List(), -- Wasting Strike + [261140] = List(), -- Virulent Pathogen + [260900] = List(), -- Soul Manipulation I + [260926] = List(), -- Soul Manipulation II + [260741] = List(), -- Jagged Nettles + [268086] = List(), -- Aura of Dread + [264712] = List(), -- Rotten Expulsion + [271178] = List(), -- Ravaging Leap + [264040] = List(), -- Uprooted Thorns + [265407] = List(), -- Dinner Bell + [265761] = List(), -- Thorned Barrage + [268125] = List(), -- Aura of Thorns + [268080] = List(), -- Aura of Apathy + [264050] = List(), -- Infected Thorn + [260569] = List(), -- Wildfire + [263943] = List(), -- Etch + [264378] = List(), -- Fragment Soul + [267907] = List(), -- Soul Thorns + [264520] = List(), -- Severing Serpent + [264105] = List(), -- Runic Mark + [265881] = List(), -- Decaying Touch + [265882] = List(), -- Lingering Dread + [278456] = List(), -- Infest I + [278444] = List(), -- Infest II + [265880] = List(), -- Dread Mark + -- Atal'Dazar + [250585] = List(), -- Toxic Pool + [258723] = List(), -- Grotesque Pool + [260668] = List(), -- Transfusion I + [260666] = List(), -- Transfusion II + [255558] = List(), -- Tainted Blood + [250036] = List(), -- Shadowy Remains + [257483] = List(), -- Pile of Bones + [253562] = List(), -- Wildfire + [254959] = List(), -- Soulburn + [255814] = List(), -- Rending Maul + [255582] = List(), -- Molten Gold + [252687] = List(), -- Venomfang Strike + [255041] = List(), -- Terrifying Screech + [255567] = List(), -- Frenzied Charge + [255836] = List(), -- Transfusion Boss I + [255835] = List(), -- Transfusion Boss II + [250372] = List(), -- Lingering Nausea + [257407] = List(), -- Pursuit + [255434] = List(), -- Serrated Teeth + [255371] = List(), -- Terrifying Visage + -- Everbloom + [427513] = List(), -- Noxious Discharge + [428834] = List(), -- Verdant Eruption + [427510] = List(), -- Noxious Charge + [427863] = List(), -- Frostbolt I + [169840] = List(), -- Frostbolt II + [428084] = List(), -- Glacial Fusion + [426991] = List(), -- Blazing Cinders + [169179] = List(), -- Colossal Blow + [164886] = List(), -- Dreadpetal Pollen + [169445] = List(), -- Noxious Eruption + [164294] = List(), -- Unchecked Growth I + [164302] = List(), -- Unchecked Growth II + [165123] = List(), -- Venom Burst + [169658] = List(), -- Poisonous Claws + [169839] = List(), -- Pyroblast + [164965] = List(), -- Choking Vines + -- Throne of the Tides + [429048] = List(), -- Flame Shock + [427668] = List(), -- Festering Shockwave + [427670] = List(), -- Crushing Claw + [76363] = List(), -- Wave of Corruption + [426660] = List(), -- Razor Jaws + [426727] = List(), -- Acid Barrage + [428404] = List(), -- Blotting Darkness + [428403] = List(), -- Grimy + [426663] = List(), -- Ravenous Pursuit + [426783] = List(), -- Mind Flay + [75992] = List(), -- Lightning Surge + [428868] = List(), -- Putrid Roar + [428407] = List(), -- Blotting Barrage + [427559] = List(), -- Bubbling Ooze + [76516] = List(), -- Poisoned Spear + [428542] = List(), -- Crushing Depths + [426741] = List(), -- Shellbreaker + [76820] = List(), -- Hex + [426608] = List(), -- Null Blast + [426688] = List(), -- Volatile Acid + [428103] = List(), -- Frostbolt + ---------------------------------------------------------- ---------------- Dragonflight (Season 2) ----------------- ---------------------------------------------------------- -- Freehold @@ -959,6 +1100,59 @@ G.unitframe.aurafilters.RaidDebuffs = { [88171] = List(), -- Hurricane [88182] = List(), -- Lethargic Poison --------------------------------------------------------- + ------------ Amirdrassil: The Dream's Hope -------------- + --------------------------------------------------------- + -- Gnarlroot + [421972] = List(), -- Controlled Burn + [424734] = List(), -- Uprooted Agony + [426106] = List(), -- Dreadfire Barrage + [425002] = List(), -- Ember-Charred I + [421038] = List(), -- Ember-Charred II + -- Igira the Cruel + [414367] = List(), -- Gathering Torment + [424065] = List(), -- Wracking Skewer I + [416056] = List(), -- Wracking Skever II + [414888] = List(), -- Blistering Spear + -- Volcoross + [419054] = List(), -- Molten Venom + [421207] = List(), -- Coiling Flames + [423494] = List(), -- Tidal Blaze + [423759] = List(), -- Serpent's Crucible + -- Council of Dreams + [420948] = List(), -- Barreling Charge + [421032] = List(), -- Captivating Finale + [420858] = List(), -- Poisonous Javelin + [418589] = List(), -- Polymorph Bomb + [421031] = List(6), -- Song of the Dragon + [426390] = List(), -- Corrosive Pollen + -- Larodar, Keeper of the Flame + [425888] = List(), -- Igniting Growth + [426249] = List(), -- Blazing Coalescence + [421594] = List(), -- Smoldering Suffocation + [427299] = List(), -- Flash Fire + [428901] = List(), -- Ashen Devastation + -- Nymue, Weaver of the Cycle + [423195] = List(), -- Inflorescence + [427137] = List(), -- Threads of Life I + [427138] = List(), -- Threads of Life II + [426520] = List(), -- Weaver's Burden + [428273] = List(), -- Woven Resonance + -- Smolderon + [426018] = List(), -- Seeking Inferno + [421455] = List(), -- Overheated + [421643] = List(5), -- Emberscar's Mark + [421656] = List(), -- Cauterizing Wound + [425574] = List(), -- Lingering Burn + -- Tindral Sageswift, Seer of the Flame + [427297] = List(), -- Flame Surge + [424581] = List(), -- Fiery Growth + [424580] = List(), -- Falling Stars + [424578] = List(), -- Blazing Mushroom + [424579] = List(6), -- Suppressive Ember + [424495] = List(), -- Mass Entanblement + [424665] = List(), -- Seed of Flame + -- Fyrakk the Blazing + --------------------------------------------------------- ------------ Aberrus, the Shadowed Crucible ------------- --------------------------------------------------------- -- Kazzara @@ -1060,7 +1254,6 @@ G.unitframe.aurafilters.RaidDebuffs = { [377780] = List(5), -- Skeletal Fractures [372514] = List(5), -- Frost Bite [374554] = List(4), -- Lava Pool - [374709] = List(4), -- Seismic Rupture [374023] = List(6), -- Searing Carnage [374427] = List(6), -- Ground Shatter [390920] = List(5), -- Shocking Burst @@ -1245,6 +1438,95 @@ G.unitframe.aurafilters.RaidBuffsElvUI = { [390938] = List(), -- Agitation [390297] = List(), -- Dormant ---------------------------------------------------------- + ---------------- Dragonflight (Season 3) ----------------- + ---------------------------------------------------------- + -- Darkheart Thicket + [221315] = List(), -- Apocalyptic Empowerment I + [200050] = List(), -- Apocalyptic Empowerment II + [220519] = List(), -- Submerged + [225497] = List(), -- Corrupted Infusion + [199063] = List(), -- Strangling Roots + [199345] = List(), -- Down Draft + [200768] = List(), -- Propelling Charge + [201226] = List(), -- Blood Assault + [218755] = List(), -- Spew Corruption + [198379] = List(), -- Primal Rampage + -- Black Rook Hold + [227913] = List(), -- Felfrenzy + [200099] = List(), -- Sacrifice Soul I + [200105] = List(), -- Sacrifice Soul II + [200345] = List(), -- Arrow Barrage + [201139] = List(), -- Brutal Assault + [8599] = List(), -- Enrage + [197394] = List(), -- Gaining Energy + [200248] = List(), -- Arcane Blitz + [204896] = List(), -- Drain Life + [199193] = List(), -- Dreadlord's Guile + [200291] = List(), -- Knife Dance + [200784] = List(), -- "Drink" Ancient Potion + -- Waycrest Manor + [265368] = List(), -- Spirited Defense + [260512] = List(), -- Soul Harvest + [278431] = List(), -- Parasitic + [264027] = List(), -- Warding Candles + [260805] = List(), -- Focusing Iris + [261447] = List(), -- Putrid Vitality + [265760] = List(), -- Thorned Barrage + [261446] = List(), -- Vitality Transfer + [261265] = List(), -- Ironbark Shield + [261266] = List(), -- Ruinic Ward + [268088] = List(), -- Aura of Dread + [268122] = List(), -- Aura of Thorns + [268077] = List(), -- Aura of Apathy + [260923] = List(), -- Soul Manipulation + [266008] = List(), -- Infected + [261264] = List(), -- Soul Armor I + [271590] = List(), -- Soul Armor II + [257260] = List(), -- Enrage + [256922] = List(), -- Runic Blade + [260541] = List(), -- Burning Brush + [268306] = List(), -- Discordant Cadenza + -- Atal'Dazar + [255824] = List(), -- Fanatic's Rage + [254974] = List(), -- Gathered Souls + [259572] = List(), -- Noxious Stench + [253721] = List(), -- Bulwark of Juju + [253583] = List(), -- Fiery Enchant + [254958] = List(), -- Soulforged Construct + [250192] = List(), -- Bad Voodoo + [255577] = List(), -- Transfusion + [255579] = List(), -- Gilded Claws + [250241] = List(), -- Rapid Decay + -- Everbloom + [428948] = List(), -- Vibrant Flourish + [427223] = List(), -- Cinderbolt Salvo + [38166] = List(), -- Enrage + [165213] = List(), -- Enraged Growth + [172578] = List(), -- Boudning Whirl + [427899] = List(), -- Cinderbolt Storm + [428082] = List(), -- Glacial Fusion + [164275] = List(), -- Brittle Bark + [427498] = List(), -- Torrential Fury + [166475] = List(), -- Fire Affinity + [166476] = List(), -- Frost Affinity + [166477] = List(), -- Arcane Affinity + [428177] = List(), -- Growing Infestation + [427509] = List(), -- Terrestrial Fury + -- Throne of the Tides + [426618] = List(), -- Slithering Assault I + [428291] = List(), -- Slithering Assault II + [428531] = List(), -- Grimy + [426659] = List(), -- Razor Jaws + [76634] = List(), -- Swell + [427451] = List(), -- Congealed Ooze + [428374] = List(), -- Focused Tempest + [429037] = List(), -- Stormflurry Totem + [428329] = List(), -- Icy Veins + [428293] = List(), -- Trident Flurry + [75683] = List(), -- High Tide + [429051] = List(), -- Earthfury + [429046] = List(), -- Raining Darkness + ---------------------------------------------------------- ---------------- Dragonflight (Season 2) ----------------- ---------------------------------------------------------- -- Freehold @@ -1296,6 +1578,46 @@ G.unitframe.aurafilters.RaidBuffsElvUI = { [87761] = List(), -- Rally [87726] = List(), -- Grounding Field --------------------------------------------------------- + ------------ Amirdrassil: The Dream's Hope -------------- + --------------------------------------------------------- + -- Gnarlroot + [425709] = List(), -- Rising Mania + [421013] = List(), -- Potent Fertilization + [424352] = List(), -- Dreadfire Barrage + -- Igira the Cruel + [420251] = List(), -- Harvest of Screams + [422961] = List(), -- Marked for Torment + -- Volcoross + [421675] = List(), -- Burning Vertebrae + [421672] = List(), -- Serpent's Fury + [420933] = List(), -- Flood of the Firelands + -- Council of Dreams + [421029] = List(), -- Song of the Dragon + [420525] = List(), -- Blind Rage I + [420604] = List(), -- Blind Rage II + [418757] = List(), -- Polymorph Bomb + [420979] = List(), -- Barreling Charge + -- Larodar, Keeper of the Flame + [417583] = List(), -- Combusting Presence + [417644] = List(), -- Burning Fury + [421316] = List(), -- Consuming Flame + [417634] = List(), -- Raging Inferno + -- Nymue, Weaver of the Cycle + [413443] = List(), -- Protector's Shroud + [420553] = List(), -- Growing Power of the Dream + -- Smolderon + [425885] = List(), -- Seeking Inferno + [421859] = List(), -- Ignited Essence + [423896] = List(), -- Heating Up + [422067] = List(), -- Blazing Soul + [422172] = List(), -- World In Flames + -- Tindral Sageswift, Seer of the Flame + [422115] = List(), -- Incarnation: Tree of Flame + [421603] = List(), -- Incarnation: Owl of the Flame + [420540] = List(), -- Incarnation: Moonkin + [423265] = List(), -- Tranquility of Flame + -- Fyrakk the Blazing + --------------------------------------------------------- ------------ Aberrus, the Shadowed Crucible ------------- --------------------------------------------------------- -- Kazzara diff --git a/ElvUI/Mainline/Modules/ActionBars/ExtraAB.lua b/ElvUI/Mainline/Modules/ActionBars/ExtraAB.lua index 0d65e22e7d..c647397941 100644 --- a/ElvUI/Mainline/Modules/ActionBars/ExtraAB.lua +++ b/ElvUI/Mainline/Modules/ActionBars/ExtraAB.lua @@ -184,7 +184,7 @@ function AB:SetupExtraButton() ExtraAbilityContainer:KillEditMode() ExtraAbilityContainer:SetScript('OnShow', nil) ExtraAbilityContainer:SetScript('OnUpdate', nil) - ExtraAbilityContainer.OnUpdate = nil -- remove BaseLayoutMixin.OnUpdate + ExtraAbilityContainer.OnUpdate = nil -- remove BaseLayoutMixin.OnUpdate ExtraAbilityContainer.IsLayoutFrame = nil -- dont let it get readded hooksecurefunc(ZoneAbilityFrame.SpellButtonContainer, 'SetSize', AB.ExtraButtons_ZoneScale) diff --git a/ElvUI/Mainline/Modules/Blizzard/AltPower.lua b/ElvUI/Mainline/Modules/Blizzard/AltPower.lua index 80364f277d..7f3fb135dc 100644 --- a/ElvUI/Mainline/Modules/Blizzard/AltPower.lua +++ b/ElvUI/Mainline/Modules/Blizzard/AltPower.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local LSM = E.Libs.LSM local _G = _G @@ -33,7 +33,7 @@ local function onLeave() _G.GameTooltip:Hide() end -function B:SetAltPowerBarText(text, name, value, max, percent) +function BL:SetAltPowerBarText(text, name, value, max, percent) local textFormat = E.db.general.altPowerBar.textFormat if textFormat == 'NONE' or not textFormat then text:SetText('') @@ -54,12 +54,12 @@ function B:SetAltPowerBarText(text, name, value, max, percent) end end -function B:PositionAltPowerBar() +function BL:PositionAltPowerBar() local holder = CreateFrame('Frame', 'AltPowerBarHolder', E.UIParent) holder:Point('TOP', E.UIParent, 'TOP', 0, -40) holder:Size(128, 50) - B.AltPowerBarHolder = holder + BL.AltPowerBarHolder = holder _G.PlayerPowerBarAlt:ClearAllPoints() _G.PlayerPowerBarAlt:Point('CENTER', holder, 'CENTER') @@ -71,8 +71,8 @@ function B:PositionAltPowerBar() E:CreateMover(holder, 'AltPowerBarMover', L["Alternative Power"], nil, nil, nil, nil, nil, 'general,alternativePowerGroup') end -function B:UpdateAltPowerBarColors() - local bar = B.AltPowerBar +function BL:UpdateAltPowerBarColors() + local bar = BL.AltPowerBar if not bar then return end if E.db.general.altPowerBar.statusBarColorGradient then @@ -91,22 +91,22 @@ function B:UpdateAltPowerBarColors() end end -function B:UpdateAltPowerBarSettings() - local bar = B.AltPowerBar +function BL:UpdateAltPowerBarSettings() + local bar = BL.AltPowerBar if not bar then return end local db = E.db.general.altPowerBar bar:Size(db.width or 250, db.height or 20) bar:SetStatusBarTexture(LSM:Fetch('statusbar', db.statusBar)) bar.text:FontTemplate(LSM:Fetch('font', db.font), db.fontSize or 12, db.fontOutline or 'OUTLINE') - B.AltPowerBarHolder:Size(bar.backdrop:GetSize()) + BL.AltPowerBarHolder:Size(bar.backdrop:GetSize()) E:SetSmoothing(bar, db.smoothbars) - B:SetAltPowerBarText(bar.text, bar.powerName or '', bar.powerValue or 0, bar.powerMaxValue or 0, bar.powerPercent or 0) + BL:SetAltPowerBarText(bar.text, bar.powerName or '', bar.powerValue or 0, bar.powerMaxValue or 0, bar.powerPercent or 0) end -function B:UpdateAltPowerBar() +function BL:UpdateAltPowerBar() _G.PlayerPowerBarAlt:UnregisterAllEvents() _G.PlayerPowerBarAlt:Hide() @@ -138,7 +138,7 @@ function B:UpdateAltPowerBar() end end - B:SetAltPowerBarText(self.text, powerName or '', power, maxPower, perc) + BL:SetAltPowerBarText(self.text, powerName or '', power, maxPower, perc) else self.powerMaxValue = nil self.powerName = nil @@ -150,29 +150,29 @@ function B:UpdateAltPowerBar() end end -function B:SkinAltPowerBar() +function BL:SkinAltPowerBar() if not E.db.general.altPowerBar.enable then return end local bar = CreateFrame('StatusBar', 'ElvUI_AltPowerBar', E.UIParent) bar:CreateBackdrop(nil, true) bar:SetMinMaxValues(0, 200) - bar:Point('CENTER', B.AltPowerBarHolder) + bar:Point('CENTER', BL.AltPowerBarHolder) bar:SetScript('OnEnter', onEnter) bar:SetScript('OnLeave', onLeave) bar:Hide() - B.AltPowerBar = bar + BL.AltPowerBar = bar bar.text = bar:CreateFontString(nil, 'OVERLAY') bar.text:Point('CENTER', bar, 'CENTER') bar.text:SetJustifyH('CENTER') - B:UpdateAltPowerBarSettings() - B:UpdateAltPowerBarColors() + BL:UpdateAltPowerBarSettings() + BL:UpdateAltPowerBarColors() bar:RegisterEvent('UNIT_POWER_UPDATE') bar:RegisterEvent('UNIT_POWER_BAR_SHOW') bar:RegisterEvent('UNIT_POWER_BAR_HIDE') bar:RegisterEvent('PLAYER_ENTERING_WORLD') - bar:SetScript('OnEvent', B.UpdateAltPowerBar) + bar:SetScript('OnEvent', BL.UpdateAltPowerBar) end diff --git a/ElvUI/Mainline/Modules/Blizzard/ObjectiveFrame.lua b/ElvUI/Mainline/Modules/Blizzard/ObjectiveFrame.lua index 3bfee0dc7b..8f2f99fe12 100644 --- a/ElvUI/Mainline/Modules/Blizzard/ObjectiveFrame.lua +++ b/ElvUI/Mainline/Modules/Blizzard/ObjectiveFrame.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local GetInstanceInfo = GetInstanceInfo @@ -63,7 +63,7 @@ local function ObjectiveTracker_Expand() end -- end clone -function B:ObjectiveTracker_AutoHideOnHide() +function BL:ObjectiveTracker_AutoHideOnHide() if Tracker.collapsed then return end if E.db.general.objectiveFrameAutoHideInKeystone then @@ -76,14 +76,14 @@ function B:ObjectiveTracker_AutoHideOnHide() end end -function B:ObjectiveTracker_AutoHideOnShow() +function BL:ObjectiveTracker_AutoHideOnShow() if Tracker.collapsed then ObjectiveTracker_Expand() end end -function B:ObjectiveTracker_Setup() +function BL:ObjectiveTracker_Setup() hooksecurefunc(_G.BonusObjectiveRewardsFrameMixin, 'AnimateReward', BonusRewards_SetPosition) - B:ObjectiveTracker_AutoHide() + BL:ObjectiveTracker_AutoHide() end diff --git a/ElvUI/Mainline/Modules/DataTexts/SpecSwitch.lua b/ElvUI/Mainline/Modules/DataTexts/SpecSwitch.lua index 96dcc5361e..f4ec6b6bc3 100644 --- a/ElvUI/Mainline/Modules/DataTexts/SpecSwitch.lua +++ b/ElvUI/Mainline/Modules/DataTexts/SpecSwitch.lua @@ -117,7 +117,7 @@ local function OnEvent(self, event, loadoutID) tinsert(builds, STARTER_ID) end - if event == 'TRAIT_CONFIG_DELETED' then + if event == 'TRAIT_CONFIG_DELETED' then for index = #loadoutList, 2, -1 do -- reverse loop to remove the deleted config from the loadout list local loadout = loadoutList[index] if loadout and loadout.arg1 == loadoutID then diff --git a/ElvUI/Mainline/Modules/Skins/Calendar.lua b/ElvUI/Mainline/Modules/Skins/Calendar.lua index 0f0b825885..5ff3611d91 100644 --- a/ElvUI/Mainline/Modules/Skins/Calendar.lua +++ b/ElvUI/Mainline/Modules/Skins/Calendar.lua @@ -5,7 +5,6 @@ local _G = _G local next, unpack = next, unpack local CLASS_SORT_ORDER = CLASS_SORT_ORDER -local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS local hooksecurefunc = hooksecurefunc local function SkinContainer(frame, container) @@ -17,9 +16,8 @@ local function SkinContainer(frame, container) end end -local function StripClassTextures(button, class) - local tcoords = CLASS_ICON_TCOORDS[class] - button:SetTexCoord(tcoords[1] + .022, tcoords[2] - .025, tcoords[3] + .022, tcoords[4] - .025) +local function StripClassTextures(button, classFile) + button:SetTexCoord(E:GetClassCoords(classFile, true)) end local function HandleEventIcon(icon) diff --git a/ElvUI/Mainline/Modules/Skins/Character.lua b/ElvUI/Mainline/Modules/Skins/Character.lua index 045574fb33..b5be57ada6 100644 --- a/ElvUI/Mainline/Modules/Skins/Character.lua +++ b/ElvUI/Mainline/Modules/Skins/Character.lua @@ -121,12 +121,13 @@ local function TabTextureCoords(tex, x1) end local function FixSidebarTabCoords() - for i=1, #_G.PAPERDOLL_SIDEBARS do - local tab = _G['PaperDollSidebarTab'..i] - - if tab and not tab.backdrop then + local index = 1 + local tab = _G['PaperDollSidebarTab'..index] + while tab do + if not tab.backdrop then tab:CreateBackdrop() tab.Icon:SetAllPoints() + tab.Highlight:SetColorTexture(1, 1, 1, 0.3) tab.Highlight:SetAllPoints() @@ -140,7 +141,7 @@ local function FixSidebarTabCoords() tab.Hider:SetAllPoints(tab.backdrop) tab.TabBg:Kill() - if i == 1 then + if index == 1 then for _, region in next, { tab:GetRegions() } do region:SetTexCoord(0.16, 0.86, 0.16, 0.86) @@ -148,6 +149,9 @@ local function FixSidebarTabCoords() end end end + + index = index + 1 + tab = _G['PaperDollSidebarTab'..index] end end @@ -295,18 +299,9 @@ function S:CharacterFrame() _G.CharacterModelScene:CreateBackdrop() _G.CharacterModelScene.backdrop:Point('TOPLEFT', E.PixelMode and -1 or -2, E.PixelMode and 1 or 2) _G.CharacterModelScene.backdrop:Point('BOTTOMRIGHT', E.PixelMode and 1 or 2, E.PixelMode and -2 or -3) - _G.CharacterFrameInset:CreateBackdrop('Transparent', nil, nil, nil, nil, nil, nil, nil, true) - for _, button in pairs({ - 'CharacterModelSceneZoomInButton', - 'CharacterModelSceneZoomOutButton', - 'CharacterModelSceneRotateLeftButton', - 'CharacterModelSceneRotateRightButton', - 'CharacterModelSceneRotateResetButton', - }) do - S:HandleButton(_G[button]) - end + S:HandleModelSceneControlButtons(_G.CharacterModelScene.ControlFrame) --Titles hooksecurefunc(_G.PaperDollFrame.TitleManagerPane.ScrollBox, 'Update', function(frame) @@ -381,26 +376,31 @@ function S:CharacterFrame() -- Currency Frame _G.TokenFramePopup:StripTextures() _G.TokenFramePopup:SetTemplate('Transparent') - if _G.TokenFramePopup.CloseButton then -- Probably Blizzard Typo - S:HandleCloseButton(_G.TokenFramePopup.CloseButton) - end _G.TokenFramePopup:Point('TOPLEFT', _G.TokenFrame, 'TOPRIGHT', 3, -28) + S:HandleCheckBox(_G.TokenFramePopup.InactiveCheckBox) S:HandleCheckBox(_G.TokenFramePopup.BackpackCheckBox) + if _G.TokenFramePopup.CloseButton then + S:HandleCloseButton(_G.TokenFramePopup.CloseButton) + end + hooksecurefunc(_G.TokenFrame.ScrollBox, 'Update', function(frame) for _, child in next, { frame.ScrollTarget:GetChildren() } do if child.Highlight and not child.IsSkinned then child.CategoryLeft:SetAlpha(0) child.CategoryRight:SetAlpha(0) child.CategoryMiddle:SetAlpha(0) + child.Stripe:SetAlpha(0.75) child.Highlight:SetInside() - child.Highlight.SetPoint = E.noop child.Highlight:SetColorTexture(1, 1, 1, .25) + + child.Highlight.SetPoint = E.noop child.Highlight.SetTexture = E.noop - S:HandleIcon(child.Icon) + S:HandleIcon(child.Icon, true) + child.Icon.backdrop:SetFrameLevel(child:GetFrameLevel()) if child.ExpandIcon then child.ExpandIcon:CreateBackdrop('Transparent') @@ -410,11 +410,9 @@ function S:CharacterFrame() child.IsSkinned = true end - if child.isHeader then - child.ExpandIcon.backdrop:Show() - else - child.ExpandIcon.backdrop:Hide() - end + child.Icon.backdrop:SetShown(not child.isHeader) + child.ExpandIcon.backdrop:SetShown(child.isHeader) + child.Stripe:SetShown(not child.isHeader) end end) diff --git a/ElvUI/Mainline/Modules/Skins/Collectables.lua b/ElvUI/Mainline/Modules/Skins/Collectables.lua index 86bb512a1b..c5f7104567 100644 --- a/ElvUI/Mainline/Modules/Skins/Collectables.lua +++ b/ElvUI/Mainline/Modules/Skins/Collectables.lua @@ -207,8 +207,7 @@ local function SkinMountFrame() S:HandleButton(_G.MountJournalMountButton) S:HandleEditBox(_G.MountJournalSearchBox) S:HandleTrimScrollBar(_G.MountJournal.ScrollBar) - S:HandleRotateButton(MountJournal.MountDisplay.ModelScene.RotateLeftButton) - S:HandleRotateButton(MountJournal.MountDisplay.ModelScene.RotateRightButton) + S:HandleModelSceneControlButtons(_G.MountJournal.MountDisplay.ModelScene.ControlFrame) MountJournal.BottomLeftInset:StripTextures() MountJournal.BottomLeftInset:SetTemplate('Transparent') diff --git a/ElvUI/Mainline/Modules/Skins/Communities.lua b/ElvUI/Mainline/Modules/Skins/Communities.lua index 4c5de0c782..1b001a3fe5 100644 --- a/ElvUI/Mainline/Modules/Skins/Communities.lua +++ b/ElvUI/Mainline/Modules/Skins/Communities.lua @@ -6,7 +6,6 @@ local next, pairs, select = next, pairs, select local C_CreatureInfo_GetClassInfo = C_CreatureInfo.GetClassInfo local C_GuildInfo_GetGuildNewsInfo = C_GuildInfo.GetGuildNewsInfo -local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS local BATTLENET_FONT_COLOR = BATTLENET_FONT_COLOR local GetClassInfo = GetClassInfo local GREEN_FONT_COLOR = GREEN_FONT_COLOR @@ -21,8 +20,7 @@ local function UpdateNames(button) if memberInfo and memberInfo.classID then local classInfo = C_CreatureInfo_GetClassInfo(memberInfo.classID) if classInfo then - local tcoords = _G.CLASS_ICON_TCOORDS[classInfo.classFile] - button.Class:SetTexCoord(tcoords[1] + .022, tcoords[2] - .025, tcoords[3] + .022, tcoords[4] - .025) + button.Class:SetTexCoord(E:GetClassCoords(classInfo.classFile, true)) end end end @@ -33,8 +31,7 @@ local function ColorMemberName(button, info) local class = button.Class local _, classTag = GetClassInfo(info.classID) if classTag then - local tcoords = CLASS_ICON_TCOORDS[classTag] - class:SetTexCoord(tcoords[1] + .022, tcoords[2] - .025, tcoords[3] + .022, tcoords[4] - .025) + class:SetTexCoord(E:GetClassCoords(classTag, true)) end end ---- TODO: need to reimplement this ^ diff --git a/ElvUI/Mainline/Modules/Skins/LFG.lua b/ElvUI/Mainline/Modules/Skins/LFG.lua index 0742f83e6e..227e68d40a 100644 --- a/ElvUI/Mainline/Modules/Skins/LFG.lua +++ b/ElvUI/Mainline/Modules/Skins/LFG.lua @@ -287,6 +287,7 @@ function S:LookingForGroupFrames() -- Raid finder S:HandleButton(_G.LFDQueueFrameFindGroupButton) + S:HandleTrimScrollBar(_G.LFDQueueFrameRandomScrollFrame.ScrollBar) _G.LFDParentFrame:StripTextures() _G.LFDParentFrameInset:StripTextures() diff --git a/ElvUI/Mainline/Modules/Skins/Misc.lua b/ElvUI/Mainline/Modules/Skins/Misc.lua index ada261a567..9de4241cd8 100644 --- a/ElvUI/Mainline/Modules/Skins/Misc.lua +++ b/ElvUI/Mainline/Modules/Skins/Misc.lua @@ -15,6 +15,12 @@ local function ClearSetTexture(texture, tex) end end +local function FixReadyCheckFrame(frame) + if frame.initiator and UnitIsUnit('player', frame.initiator) then + frame:Hide() -- bug fix, don't show it if player is initiator + end +end + function S:BlizzardMiscFrames() if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.misc) then return end @@ -43,6 +49,7 @@ function S:BlizzardMiscFrames() _G.ReadyCheckFrameNoButton:Point('TOPLEFT', ReadyCheckFrame, 'CENTER', 3, -5) _G.ReadyCheckFrameText:ClearAllPoints() _G.ReadyCheckFrameText:Point('TOP', 0, -30) + _G.ReadyCheckFrameText:Width(300) local ListenerFrame = _G.ReadyCheckListenerFrame S:HandleFrame(ListenerFrame) @@ -52,12 +59,7 @@ function S:BlizzardMiscFrames() TitleContainer:Point('TOPLEFT', 1, -1) TitleContainer:Point('TOPRIGHT', -1, 0) - -- Bug fix, don't show it if player is initiator - ReadyCheckFrame:HookScript('OnShow', function(frame) - if frame.initiator and UnitIsUnit('player', frame.initiator) then - frame:Hide() - end - end) + ReadyCheckFrame:HookScript('OnShow', FixReadyCheckFrame) S:HandleButton(_G.StaticPopup1ExtraButton) diff --git a/ElvUI/Mainline/Modules/Skins/PlayerChoice.lua b/ElvUI/Mainline/Modules/Skins/PlayerChoice.lua index d90ba4fd53..b1e9bc04f5 100644 --- a/ElvUI/Mainline/Modules/Skins/PlayerChoice.lua +++ b/ElvUI/Mainline/Modules/Skins/PlayerChoice.lua @@ -1,6 +1,6 @@ local E, L, V, P, G = unpack(ElvUI) local S = E:GetModule('Skins') -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local pairs = pairs @@ -128,7 +128,7 @@ function S:TorghastButton_StartEffect(effectID) end local function SetupTorghastMover() - B:BuildWidgetHolder('TorghastChoiceToggleHolder', 'TorghastChoiceToggle', 'CENTER', L["Torghast Choice Toggle"], _G.TorghastPlayerChoiceToggleButton, 'CENTER', E.UIParent, 'CENTER', 0, -200, 300, 40, 'ALL,GENERAL') + BL:BuildWidgetHolder('TorghastChoiceToggleHolder', 'TorghastChoiceToggle', 'CENTER', L["Torghast Choice Toggle"], _G.TorghastPlayerChoiceToggleButton, 'CENTER', E.UIParent, 'CENTER', 0, -200, 300, 40, 'ALL,GENERAL') -- whole area is clickable which is pretty big; keep an eye on this _G.TorghastPlayerChoiceToggleButton:SetHitRectInsets(70, 70, 40, 40) diff --git a/ElvUI/Mainline/Modules/Skins/Stable.lua b/ElvUI/Mainline/Modules/Skins/Stable.lua index bc194d5ba5..e5f95d7f1e 100644 --- a/ElvUI/Mainline/Modules/Skins/Stable.lua +++ b/ElvUI/Mainline/Modules/Skins/Stable.lua @@ -46,6 +46,7 @@ function S:PetStableFrame() _G.PetStableDietTexture:SetTexCoord(unpack(E.TexCoords)) _G.PetStableFrameInset:SetTemplate('Transparent') + S:HandleModelSceneControlButtons(_G.PetStableModelScene.ControlFrame) S:HandleButton(_G.PetStablePrevPageButton) -- Required to remove graphical glitch from Prev page button S:HandleButton(_G.PetStableNextPageButton) -- Required to remove graphical glitch from Next page button diff --git a/ElvUI/Mainline/Modules/Skins/Tooltip.lua b/ElvUI/Mainline/Modules/Skins/Tooltip.lua index 29c94cca46..179a76b9fb 100644 --- a/ElvUI/Mainline/Modules/Skins/Tooltip.lua +++ b/ElvUI/Mainline/Modules/Skins/Tooltip.lua @@ -24,8 +24,8 @@ function S:StyleTooltips() _G.QuestScrollFrame.StoryTooltip, _G.QuestScrollFrame.CampaignTooltip, -- ours - _G.ElvUIConfigTooltip, - _G.ElvUISpellBookTooltip, + E.ConfigTooltip, + E.SpellBookTooltip, -- libs _G.LibDBIconTooltip, _G.SettingsTooltip, diff --git a/ElvUI/Wrath/Filters/Filters.lua b/ElvUI/Wrath/Filters/Filters.lua index 08cdb4bfb2..ef94053a16 100644 --- a/ElvUI/Wrath/Filters/Filters.lua +++ b/ElvUI/Wrath/Filters/Filters.lua @@ -585,7 +585,8 @@ G.unitframe.aurafilters.Blacklist = { spells = { -- General [186403] = List(), -- Sign of Battle - [377749] = List(), -- Joyous Journeys (50% exp buff) + [377749] = List(), -- Joyous Journeys + [24755] = List(), -- Tricked or Treated }, } diff --git a/ElvUI/Wrath/Modules/Blizzard/ObjectiveFrame.lua b/ElvUI/Wrath/Modules/Blizzard/ObjectiveFrame.lua index 901bd5fdd2..d5c017f672 100644 --- a/ElvUI/Wrath/Modules/Blizzard/ObjectiveFrame.lua +++ b/ElvUI/Wrath/Modules/Blizzard/ObjectiveFrame.lua @@ -1,5 +1,5 @@ local E, L, V, P, G = unpack(ElvUI) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local _G = _G local min = min @@ -17,7 +17,7 @@ local function ObjectiveTracker_SetPoint(tracker, _, parent) end end -function B:ObjectiveTracker_SetHeight() +function BL:ObjectiveTracker_SetHeight() local top = Tracker:GetTop() or 0 local gapFromTop = E.screenHeight - top local maxHeight = E.screenHeight - gapFromTop @@ -26,21 +26,21 @@ function B:ObjectiveTracker_SetHeight() Tracker:Height(frameHeight) end -function B:ObjectiveTracker_AutoHideOnHide() +function BL:ObjectiveTracker_AutoHideOnHide() if not Tracker.collapsed then Tracker.userCollapsed = true Tracker_Collapse(Tracker) end end -function B:ObjectiveTracker_AutoHideOnShow() +function BL:ObjectiveTracker_AutoHideOnShow() if Tracker.collapsed then Tracker.userCollapsed = nil Tracker_Expand(Tracker) end end -function B:ObjectiveTracker_Setup() +function BL:ObjectiveTracker_Setup() local holder = CreateFrame('Frame', 'ObjectiveFrameHolder', E.UIParent) holder:Point('TOPRIGHT', E.UIParent, -135, -300) holder:Size(130, 22) @@ -59,6 +59,6 @@ function B:ObjectiveTracker_Setup() Tracker.holder = holder hooksecurefunc(Tracker, 'SetPoint', ObjectiveTracker_SetPoint) - B:ObjectiveTracker_AutoHide() -- supported but no boss frames, only works for arena - B:ObjectiveTracker_SetHeight() + BL:ObjectiveTracker_AutoHide() -- supported but no boss frames, only works for arena + BL:ObjectiveTracker_SetHeight() end diff --git a/ElvUI/Wrath/Modules/Skins/Calendar.lua b/ElvUI/Wrath/Modules/Skins/Calendar.lua index 1020f175d2..c3b85975c8 100644 --- a/ElvUI/Wrath/Modules/Skins/Calendar.lua +++ b/ElvUI/Wrath/Modules/Skins/Calendar.lua @@ -4,9 +4,7 @@ local S = E:GetModule('Skins') local _G = _G local next, unpack = next, unpack local hooksecurefunc = hooksecurefunc - local CLASS_SORT_ORDER = CLASS_SORT_ORDER -local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS local function SkinContainer(frame, container) frame.NineSlice:Kill() @@ -22,8 +20,7 @@ local function StripClassTextures(button) if region:IsObjectType('Texture') then local texture = region:GetTexture() if texture == [[Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes]] then - local c = CLASS_ICON_TCOORDS[button.class] - region:SetTexCoord(c[1] + 0.02, c[2] - 0.02, c[3] + 0.02, c[4] - 0.02) + region:SetTexCoord(E:GetClassCoords(button.class, 0.02)) region:SetInside() else region:SetTexture(nil) diff --git a/ElvUI/Wrath/Modules/Skins/Character.lua b/ElvUI/Wrath/Modules/Skins/Character.lua index 5c31651ce5..9be457177c 100644 --- a/ElvUI/Wrath/Modules/Skins/Character.lua +++ b/ElvUI/Wrath/Modules/Skins/Character.lua @@ -10,7 +10,6 @@ local HasPetUI = HasPetUI local hooksecurefunc = hooksecurefunc local GetPetHappiness = GetPetHappiness local GetSkillLineInfo = GetSkillLineInfo -local UnitFactionGroup = UnitFactionGroup local GetItemQualityColor = GetItemQualityColor local GetInventoryItemQuality = GetInventoryItemQuality @@ -102,74 +101,67 @@ local function UpdateCurrencySkins() local TokenFrameContainer = _G.TokenFrameContainer if not TokenFrameContainer.buttons then return end - local buttons = TokenFrameContainer.buttons - local numButtons = #buttons + for _, button in next, TokenFrameContainer.buttons do + if button.highlight then button.highlight:Kill() end + if button.categoryLeft then button.categoryLeft:Kill() end + if button.categoryRight then button.categoryRight:Kill() end + if button.categoryMiddle then button.categoryMiddle:Kill() end - for i = 1, numButtons do - local button = buttons[i] - - if button then - if button.highlight then button.highlight:Kill() end - if button.categoryLeft then button.categoryLeft:Kill() end - if button.categoryRight then button.categoryRight:Kill() end - if button.categoryMiddle then button.categoryMiddle:Kill() end + if not button.backdrop then + button:CreateBackdrop(nil, nil, nil, true) + end - if not button.backdrop then - button:CreateBackdrop(nil, nil, nil, true) + if button.icon then + if button.itemID == HONOR_CURRENCY and E.myfaction then + button.icon:SetTexCoord(0.06325, 0.59375, 0.03125, 0.57375) + else + button.icon:SetTexCoord(unpack(E.TexCoords)) end - if button.icon then - if button.itemID == HONOR_CURRENCY and UnitFactionGroup('player') then - button.icon:SetTexCoord(0.06325, 0.59375, 0.03125, 0.57375) - else - button.icon:SetTexCoord(unpack(E.TexCoords)) - end + button.icon:Size(17) - button.icon:Size(17) + button.backdrop:SetOutside(button.icon, 1, 1) + button.backdrop:Show() + else + button.backdrop:Hide() + end - button.backdrop:SetOutside(button.icon, 1, 1) - button.backdrop:Show() - else - button.backdrop:Hide() + if button.expandIcon then + if not button.highlightTexture then + button.highlightTexture = button:CreateTexture(button:GetName()..'HighlightTexture', 'HIGHLIGHT') + button.highlightTexture:SetTexture([[Interface\Buttons\UI-PlusButton-Hilight]]) + button.highlightTexture:SetBlendMode('ADD') + button.highlightTexture:SetInside(button.expandIcon) + + -- these two only need to be called once + -- adding them here will prevent additional calls + button.expandIcon:ClearAllPoints() + button.expandIcon:Point('LEFT', 4, 0) + button.expandIcon:Size(15) end - if button.expandIcon then - if not button.highlightTexture then - button.highlightTexture = button:CreateTexture(button:GetName()..'HighlightTexture', 'HIGHLIGHT') - button.highlightTexture:SetTexture([[Interface\Buttons\UI-PlusButton-Hilight]]) - button.highlightTexture:SetBlendMode('ADD') - button.highlightTexture:SetInside(button.expandIcon) - - -- these two only need to be called once - -- adding them here will prevent additional calls - button.expandIcon:ClearAllPoints() - button.expandIcon:Point('LEFT', 4, 0) - button.expandIcon:Size(15) - end - - if button.isHeader then - button.backdrop:Hide() - - -- TODO: Wrath Fix some quirks for the header point keeps changing after you click the expandIcon button. - for _, region in next, { button:GetRegions() } do - if region:IsObjectType('FontString') and region:GetText() then - region:ClearAllPoints() - region:Point('LEFT', 25, 0) - end - end + if button.isHeader then + button.backdrop:Hide() - if button.isExpanded then - button.expandIcon:SetTexture(E.Media.Textures.MinusButton) - button.expandIcon:SetTexCoord(0,1,0,1) - else - button.expandIcon:SetTexture(E.Media.Textures.PlusButton) - button.expandIcon:SetTexCoord(0,1,0,1) + -- TODO: Wrath Fix some quirks for the header point keeps changing after you click the expandIcon button. + for _, region in next, { button:GetRegions() } do + if region:IsObjectType('FontString') and region:GetText() then + region:ClearAllPoints() + region:Point('LEFT', 25, 0) end + end - button.highlightTexture:Show() + if button.isExpanded then + button.expandIcon:SetTexture(E.Media.Textures.MinusButton) + button.expandIcon:SetTexCoord(0,1,0,1) else - button.highlightTexture:Hide() + button.expandIcon:SetTexture(E.Media.Textures.PlusButton) + button.expandIcon:SetTexCoord(0,1,0,1) end + + button.highlightTexture:Show() + else + button.highlightTexture:Hide() end end end diff --git a/ElvUI/Wrath/Modules/Skins/Communities.lua b/ElvUI/Wrath/Modules/Skins/Communities.lua index 1914fc05e2..be0a2430e2 100644 --- a/ElvUI/Wrath/Modules/Skins/Communities.lua +++ b/ElvUI/Wrath/Modules/Skins/Communities.lua @@ -23,8 +23,7 @@ local function UpdateNames(button) if memberInfo and memberInfo.classID then local classInfo = C_CreatureInfo_GetClassInfo(memberInfo.classID) if classInfo then - local tcoords = _G.CLASS_ICON_TCOORDS[classInfo.classFile] - button.Class:SetTexCoord(tcoords[1] + .022, tcoords[2] - .025, tcoords[3] + .022, tcoords[4] - .025) + button.Class:SetTexCoord(E:GetClassCoords(classInfo.classFile, true)) end end end diff --git a/ElvUI/Wrath/Modules/Skins/Friends.lua b/ElvUI/Wrath/Modules/Skins/Friends.lua index 60627ea8b6..cb9594eac2 100644 --- a/ElvUI/Wrath/Modules/Skins/Friends.lua +++ b/ElvUI/Wrath/Modules/Skins/Friends.lua @@ -255,7 +255,7 @@ function S:FriendsFrame() if info.filename then classTextColor = E:ClassColor(info.filename) button.icon:Show() - button.icon:SetTexCoord(unpack(_G.CLASS_ICON_TCOORDS[info.filename])) + button.icon:SetTexCoord(E:GetClassCoords(info.filename)) else classTextColor = _G.HIGHLIGHT_FONT_COLOR button.icon:Hide() @@ -355,7 +355,7 @@ function S:FriendsFrame() end end - button.icon:SetTexCoord(unpack(_G.CLASS_ICON_TCOORDS[classFileName])) + button.icon:SetTexCoord(E:GetClassCoords(classFileName)) end end else diff --git a/ElvUI/Wrath/Modules/Skins/LFG.lua b/ElvUI/Wrath/Modules/Skins/LFG.lua index 0767c1eded..2c0e3bea5b 100644 --- a/ElvUI/Wrath/Modules/Skins/LFG.lua +++ b/ElvUI/Wrath/Modules/Skins/LFG.lua @@ -229,6 +229,7 @@ function S:LookingForGroupFrames() -- Raid finder S:HandleButton(_G.LFDQueueFrameFindGroupButton) + S:HandleTrimScrollBar(_G.LFDQueueFrameRandomScrollFrame.ScrollBar) _G.LFDParentFrame:StripTextures() _G.LFDParentFrameInset:StripTextures() diff --git a/ElvUI/Wrath/Modules/Skins/Misc.lua b/ElvUI/Wrath/Modules/Skins/Misc.lua index 0c4b71841a..2696eef02d 100644 --- a/ElvUI/Wrath/Modules/Skins/Misc.lua +++ b/ElvUI/Wrath/Modules/Skins/Misc.lua @@ -44,6 +44,7 @@ function S:BlizzardMiscFrames() _G.ReadyCheckFrameText:SetParent(ReadyCheckFrame) _G.ReadyCheckFrameText:ClearAllPoints() _G.ReadyCheckFrameText:Point('TOP', 0, -15) + _G.ReadyCheckFrameText:Width(300) _G.ReadyCheckListenerFrame:SetAlpha(0) ReadyCheckFrame:HookScript('OnShow', FixReadyCheckFrame) @@ -110,6 +111,21 @@ function S:BlizzardMiscFrames() -- Emotes NineSlice _G.ChatMenu.NineSlice:SetTemplate() + --LFD Role Picker frame + _G.LFDRoleCheckPopup:StripTextures() + _G.LFDRoleCheckPopup:SetTemplate('Transparent') + S:HandleButton(_G.LFDRoleCheckPopupAcceptButton) + S:HandleButton(_G.LFDRoleCheckPopupDeclineButton) + + for _, roleButton in next, { + _G.LFDRoleCheckPopupRoleButtonTank, + _G.LFDRoleCheckPopupRoleButtonDPS, + _G.LFDRoleCheckPopupRoleButtonHealer + } do + S:HandleCheckBox(roleButton.checkButton or roleButton.CheckButton, nil, nil, true) + roleButton:DisableDrawLayer('OVERLAY') + end + -- Reskin popup buttons for i = 1, 4 do local StaticPopup = _G['StaticPopup'..i] diff --git a/ElvUI/Wrath/Modules/Skins/Raid.lua b/ElvUI/Wrath/Modules/Skins/Raid.lua index 065a0cee55..a13da37b45 100644 --- a/ElvUI/Wrath/Modules/Skins/Raid.lua +++ b/ElvUI/Wrath/Modules/Skins/Raid.lua @@ -4,7 +4,6 @@ local S = E:GetModule('Skins') local _G = _G local ipairs, unpack = ipairs, unpack local hooksecurefunc = hooksecurefunc -local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS local CLASS_SORT_ORDER = CLASS_SORT_ORDER local StripAllTextures = { @@ -81,12 +80,12 @@ function S:Blizzard_RaidUI() icon:SetTexture([[Interface\RaidFrame\UI-RaidFrame-MainAssist]]) icon:SetTexCoord(unpack(E.TexCoords)) else - local coords = CLASS_ICON_TCOORDS[CLASS_SORT_ORDER[index]] icon:SetTexture([[Interface\WorldStateFrame\Icons-Classes]]) - icon:SetTexCoord(coords[1] + 0.02, coords[2] - 0.02, coords[3] + 0.02, coords[4] - 0.02) + icon:SetTexCoord(E:GetClassCoords(CLASS_SORT_ORDER[index], 0.02)) end count:FontTemplate(nil, 12, 'OUTLINE') + count:SetTextHeight(12) -- fixes blur end end diff --git a/ElvUI/Wrath/Modules/Skins/Tooltip.lua b/ElvUI/Wrath/Modules/Skins/Tooltip.lua index 4ef5745fdc..42da57a075 100644 --- a/ElvUI/Wrath/Modules/Skins/Tooltip.lua +++ b/ElvUI/Wrath/Modules/Skins/Tooltip.lua @@ -21,8 +21,8 @@ function S:StyleTooltips() _G.ShoppingTooltip2, _G.QuickKeybindTooltip, -- ours - _G.ElvUIConfigTooltip, - _G.ElvUISpellBookTooltip, + E.ConfigTooltip, + E.SpellBookTooltip, -- libs _G.LibDBIconTooltip, _G.SettingsTooltip, diff --git a/ElvUI_Libraries/Core/oUF/colors.lua b/ElvUI_Libraries/Core/oUF/colors.lua index 26aee6155f..b0c4ee98f4 100644 --- a/ElvUI_Libraries/Core/oUF/colors.lua +++ b/ElvUI_Libraries/Core/oUF/colors.lua @@ -150,13 +150,22 @@ for eclass, color in next, _G.FACTION_BAR_COLORS do colors.reaction[eclass] = oUF:CreateColor(color.r, color.g, color.b) end +local staggerIndex = { + green = 1, + yellow = 2, + red = 3 +} + for power, color in next, PowerBarColor do if (type(power) == 'string') then if(type(select(2, next(color))) == 'table') then colors.power[power] = {} - for index, color_ in next, color do - colors.power[power][index] = oUF:CreateColor(color_.r, color_.g, color_.b) + for name, color_ in next, color do + local index = staggerIndex[name] + if index then + colors.power[power][index] = oUF:CreateColor(color_.r, color_.g, color_.b) + end end else colors.power[power] = oUF:CreateColor(color.r, color.g, color.b) diff --git a/ElvUI_Libraries/Core/oUF/elements/portrait.lua b/ElvUI_Libraries/Core/oUF/elements/portrait.lua index 81df9bf64c..13e4c41796 100644 --- a/ElvUI_Libraries/Core/oUF/elements/portrait.lua +++ b/ElvUI_Libraries/Core/oUF/elements/portrait.lua @@ -40,18 +40,28 @@ local _, ns = ... local oUF = ns.oUF -- ElvUI block -local UnitIsUnit = UnitIsUnit local UnitGUID = UnitGUID local UnitIsConnected = UnitIsConnected local UnitIsVisible = UnitIsVisible local UnitClassBase = UnitClassBase -local SetPortraitTexture = SetPortraitTexture -- end block -local function Update(self, event, unit) - if(not unit or not UnitIsUnit(self.unit, unit)) then return end - +local function Update(self, event) local element = self.Portrait + if not element then return end + + local unit = self.unit + if not unit then return end + + local guid = UnitGUID(unit) + local newGUID = element.guid ~= guid + + local nameplate = event == 'NAME_PLATE_UNIT_ADDED' + if newGUID then + element.guid = guid + elseif nameplate then + return + end --[[ Callback: Portrait:PreUpdate(unit) Called before the element has been updated. @@ -61,34 +71,28 @@ local function Update(self, event, unit) --]] if(element.PreUpdate) then element:PreUpdate(unit) end - local guid = UnitGUID(unit) local isAvailable = UnitIsConnected(unit) and UnitIsVisible(unit) - local hasStateChanged = event ~= 'OnUpdate' or element.guid ~= guid or element.state ~= isAvailable + local hasStateChanged = newGUID or (not nameplate or element.state ~= isAvailable) if hasStateChanged then element.playerModel = element:IsObjectType('PlayerModel') element.state = isAvailable - element.guid = guid if element.playerModel then if not isAvailable then element:SetCamDistanceScale(0.25) element:SetPortraitZoom(0) element:SetPosition(0, 0, 0.25) - element:ClearModel() element:SetModel([[Interface\Buttons\TalkToMeQuestionMark.m2]]) else element:SetCamDistanceScale(1) element:SetPortraitZoom(1) element:SetPosition(0, 0, 0) - element:ClearModel() element:SetUnit(unit) end - elseif not element.customTexture then -- ElvUI changed - local class = element.showClass and UnitClassBase(unit) - if class then - element:SetAtlas('classicon-' .. class) - else - SetPortraitTexture(element, unit) + elseif element.useClassBase then + local classBase = UnitClassBase(unit) + if classBase then + element:SetAtlas('classicon-' .. classBase) end end end diff --git a/ElvUI_Libraries/ElvUI_Libraries_Classic.toc b/ElvUI_Libraries/ElvUI_Libraries_Classic.toc index 3a52119665..8b2de49693 100644 --- a/ElvUI_Libraries/ElvUI_Libraries_Classic.toc +++ b/ElvUI_Libraries/ElvUI_Libraries_Classic.toc @@ -1,7 +1,7 @@ ## Title: |cff1784d1ElvUI|r |cfd9b9b9bLibraries|r ## Notes: Libraries that power ElvUI ## Author: Elv, Simpy -## Version: 13.46 +## Version: 13.47 ## Interface: 11404 ## OptionalDeps: LibHealComm-4.0 ## X-oUF: ElvUF diff --git a/ElvUI_Libraries/ElvUI_Libraries_Mainline.toc b/ElvUI_Libraries/ElvUI_Libraries_Mainline.toc index 0b7f934858..636e9b1f68 100644 --- a/ElvUI_Libraries/ElvUI_Libraries_Mainline.toc +++ b/ElvUI_Libraries/ElvUI_Libraries_Mainline.toc @@ -1,8 +1,8 @@ ## Title: |cff1784d1ElvUI|r |cfd9b9b9bLibraries|r ## Notes: Libraries that power ElvUI ## Author: Elv, Simpy -## Version: 13.46 -## Interface: 100107 +## Version: 13.47 +## Interface: 100200 ## X-oUF: ElvUF ## IconTexture: Interface\AddOns\ElvUI\Core\Media\Textures\LogoAddon diff --git a/ElvUI_Libraries/ElvUI_Libraries_Wrath.toc b/ElvUI_Libraries/ElvUI_Libraries_Wrath.toc index 5280140de8..db28b2c51b 100644 --- a/ElvUI_Libraries/ElvUI_Libraries_Wrath.toc +++ b/ElvUI_Libraries/ElvUI_Libraries_Wrath.toc @@ -1,7 +1,7 @@ ## Title: |cff1784d1ElvUI|r |cfd9b9b9bLibraries|r ## Notes: Libraries that power ElvUI ## Author: Elv, Simpy -## Version: 13.46 +## Version: 13.47 ## Interface: 30403 ## OptionalDeps: LibHealComm-4.0 ## X-oUF: ElvUF diff --git a/ElvUI_Options/Core/DataTexts.lua b/ElvUI_Options/Core/DataTexts.lua index c84946f43c..f5ea699d92 100644 --- a/ElvUI_Options/Core/DataTexts.lua +++ b/ElvUI_Options/Core/DataTexts.lua @@ -1,9 +1,9 @@ local E, _, V, P, G = unpack(ElvUI) local C, L = unpack(E.Config) local DT = E:GetModule('DataTexts') -local Layout = E:GetModule('Layout') -local Chat = E:GetModule('Chat') -local Minimap = E:GetModule('Minimap') +local LO = E:GetModule('Layout') +local CH = E:GetModule('Chat') +local MM = E:GetModule('Minimap') local ACH = E.Libs.ACH local _G = _G @@ -284,16 +284,16 @@ E:CopyTable(DataTexts.args.panels.args.newPanel.args, DTPanelOptions) DataTexts.args.panels.args.newPanel.args.templateGroup.get = function(_, key) return E.global.datatexts.newPanelInfo[key] end DataTexts.args.panels.args.newPanel.args.templateGroup.set = function(_, key, value) E.global.datatexts.newPanelInfo[key] = value end -DataTexts.args.panels.args.LeftChatDataPanel = ACH:Group(ColorizeName(L["Datatext Panel (Left)"], 'cccccc'), L["Display data panels below the chat, used for datatexts."], 1, nil, function(info) return E.db.datatexts.panels.LeftChatDataPanel[info[#info]] end, function(info, value) E.db.datatexts.panels.LeftChatDataPanel[info[#info]] = value DT:UpdatePanelInfo('LeftChatDataPanel') Layout:SetDataPanelStyle() end) -DataTexts.args.panels.args.LeftChatDataPanel.args.enable = ACH:Toggle(L["Enable"], nil, 0, nil, nil, nil, nil, function(info, value) E.db.datatexts.panels[info[#info - 1]][info[#info]] = value if E.db.LeftChatPanelFaded then E.db.LeftChatPanelFaded = true; _G.HideLeftChat() end if E.private.chat.enable then Chat:UpdateEditboxAnchors() end Layout:ToggleChatPanels() Layout:SetDataPanelStyle() DT:UpdatePanelInfo(info[#info - 1]) end) +DataTexts.args.panels.args.LeftChatDataPanel = ACH:Group(ColorizeName(L["Datatext Panel (Left)"], 'cccccc'), L["Display data panels below the chat, used for datatexts."], 1, nil, function(info) return E.db.datatexts.panels.LeftChatDataPanel[info[#info]] end, function(info, value) E.db.datatexts.panels.LeftChatDataPanel[info[#info]] = value DT:UpdatePanelInfo('LeftChatDataPanel') LO:SetDataPanelStyle() end) +DataTexts.args.panels.args.LeftChatDataPanel.args.enable = ACH:Toggle(L["Enable"], nil, 0, nil, nil, nil, nil, function(info, value) E.db.datatexts.panels[info[#info - 1]][info[#info]] = value if E.db.LeftChatPanelFaded then E.db.LeftChatPanelFaded = true; _G.HideLeftChat() end if E.private.chat.enable then CH:UpdateEditboxAnchors() end LO:ToggleChatPanels() LO:SetDataPanelStyle() DT:UpdatePanelInfo(info[#info - 1]) end) DataTexts.args.panels.args.LeftChatDataPanel.args.templateGroup = CopyTable(defaultTemplateGroup) -DataTexts.args.panels.args.RightChatDataPanel = ACH:Group(ColorizeName(L["Datatext Panel (Right)"], 'cccccc'), L["Display data panels below the chat, used for datatexts."], 1, nil, function(info) return E.db.datatexts.panels.RightChatDataPanel[info[#info]] end, function(info, value) E.db.datatexts.panels.RightChatDataPanel[info[#info]] = value DT:UpdatePanelInfo('RightChatDataPanel') Layout:SetDataPanelStyle() end) -DataTexts.args.panels.args.RightChatDataPanel.args.enable = ACH:Toggle(L["Enable"], nil, 0, nil, nil, nil, nil, function(info, value) E.db.datatexts.panels[info[#info - 1]][info[#info]] = value if E.db.RightChatPanelFaded then E.db.RightChatPanelFaded = true; _G.HideRightChat() end if E.private.chat.enable then Chat:UpdateEditboxAnchors() end Layout:ToggleChatPanels() Layout:SetDataPanelStyle() DT:UpdatePanelInfo(info[#info - 1]) end) +DataTexts.args.panels.args.RightChatDataPanel = ACH:Group(ColorizeName(L["Datatext Panel (Right)"], 'cccccc'), L["Display data panels below the chat, used for datatexts."], 1, nil, function(info) return E.db.datatexts.panels.RightChatDataPanel[info[#info]] end, function(info, value) E.db.datatexts.panels.RightChatDataPanel[info[#info]] = value DT:UpdatePanelInfo('RightChatDataPanel') LO:SetDataPanelStyle() end) +DataTexts.args.panels.args.RightChatDataPanel.args.enable = ACH:Toggle(L["Enable"], nil, 0, nil, nil, nil, nil, function(info, value) E.db.datatexts.panels[info[#info - 1]][info[#info]] = value if E.db.RightChatPanelFaded then E.db.RightChatPanelFaded = true; _G.HideRightChat() end if E.private.chat.enable then CH:UpdateEditboxAnchors() end LO:ToggleChatPanels() LO:SetDataPanelStyle() DT:UpdatePanelInfo(info[#info - 1]) end) DataTexts.args.panels.args.RightChatDataPanel.args.templateGroup = CopyTable(defaultTemplateGroup) DataTexts.args.panels.args.MinimapPanel = ACH:Group(ColorizeName(L["Minimap Panels"], 'cccccc'), L["Display minimap panels below the minimap, used for datatexts."], 3, nil, function(info) return E.db.datatexts.panels.MinimapPanel[info[#info]] end, function(info, value) E.db.datatexts.panels.MinimapPanel[info[#info]] = value DT:UpdatePanelInfo('MinimapPanel') end, function() return not E.private.general.minimap.enable end) -DataTexts.args.panels.args.MinimapPanel.args.enable = ACH:Toggle(L["Enable"], nil, 0, nil, nil, nil, nil, function(info, value) E.db.datatexts.panels[info[#info - 1]][info[#info]] = value DT:UpdatePanelInfo(info[#info - 1]) if E.private.general.minimap.enable then Minimap:UpdateSettings() end end) +DataTexts.args.panels.args.MinimapPanel.args.enable = ACH:Toggle(L["Enable"], nil, 0, nil, nil, nil, nil, function(info, value) E.db.datatexts.panels[info[#info - 1]][info[#info]] = value DT:UpdatePanelInfo(info[#info - 1]) if E.private.general.minimap.enable then MM:UpdateSettings() end end) DataTexts.args.panels.args.MinimapPanel.args.numPoints = ACH:Range(L["Number of DataTexts"], nil, 2, { min = 1, max = 2, step = 1 }, nil, nil, function(info, value) E.db.datatexts.panels.MinimapPanel[info[#info]] = value DT:UpdatePanelInfo('MinimapPanel') DT:SetupPanelOptions('MinimapPanel') end) DataTexts.args.panels.args.MinimapPanel.args.templateGroup = CopyTable(defaultTemplateGroup) diff --git a/ElvUI_Options/Core/Filters.lua b/ElvUI_Options/Core/Filters.lua index 3568416e7d..dd0e59935b 100644 --- a/ElvUI_Options/Core/Filters.lua +++ b/ElvUI_Options/Core/Filters.lua @@ -400,6 +400,11 @@ Filters.mainOptions.args.auraIndicator.args.countGroup.args.countAnchor = ACH:Se Filters.mainOptions.args.auraIndicator.args.countGroup.args.countX = ACH:Range(L["X-Offset"], nil, 2, { min = -75, max = 75, step = 1 }) Filters.mainOptions.args.auraIndicator.args.countGroup.args.countY = ACH:Range(L["Y-Offset"], nil, 3, { min = -75, max = 75, step = 1 }) +Filters.mainOptions.args.auraIndicator.args.cooldownGroup = ACH:Group(L["Cooldown Text"], nil, 25) +Filters.mainOptions.args.auraIndicator.args.cooldownGroup.args.cooldownAnchor = ACH:Select(L["Anchor Point"], nil, 1, C.Values.AllPoints) +Filters.mainOptions.args.auraIndicator.args.cooldownGroup.args.cooldownX = ACH:Range(L["X-Offset"], nil, 2, { min = -75, max = 75, step = 1 }) +Filters.mainOptions.args.auraIndicator.args.cooldownGroup.args.cooldownY = ACH:Range(L["Y-Offset"], nil, 3, { min = -75, max = 75, step = 1 }) + Filters.mainOptions.args.spellGroup = ACH:Group(function() return GetSpellNameRank(GetSelectedSpell()) end, nil, -15, nil, FilterSettings, FilterSettings, nil, function() return not selectedSpell or (selectedFilter == 'Aura Indicator (Pet)' or selectedFilter == 'Aura Indicator (Profile)' or selectedFilter == 'Aura Indicator (Class)' or selectedFilter == 'Aura Indicator (Global)') end) Filters.mainOptions.args.spellGroup.inline = true Filters.mainOptions.args.spellGroup.args.enable = ACH:Toggle(L["Enable"], nil, 0, nil, nil, nil, nil, nil, nil, function() return (selectedFilter == 'Aura Indicator (Pet)' or selectedFilter == 'Aura Indicator (Profile)' or selectedFilter == 'Aura Indicator (Class)' or selectedFilter == 'Aura Indicator (Global)') end) diff --git a/ElvUI_Options/Core/General.lua b/ElvUI_Options/Core/General.lua index 2d979c8b1a..583f8748bb 100644 --- a/ElvUI_Options/Core/General.lua +++ b/ElvUI_Options/Core/General.lua @@ -1,12 +1,12 @@ local E, _, V, P, G = unpack(ElvUI) local C, L = unpack(E.Config) -local Misc = E:GetModule('Misc') -local Layout = E:GetModule('Layout') -local TotemTracker = E:GetModule('TotemTracker') -local Blizzard = E:GetModule('Blizzard') +local AFK = E:GetModule('AFK') +local BL = E:GetModule('Blizzard') +local LO = E:GetModule('Layout') +local M = E:GetModule('Misc') local NP = E:GetModule('NamePlates') +local TM = E:GetModule('TotemTracker') local UF = E:GetModule('UnitFrames') -local AFK = E:GetModule('AFK') local ACH = E.Libs.ACH local _G = _G @@ -60,12 +60,12 @@ GenGen.scaling.args.ScaleAuto = ACH:Execute(L["Auto Scale"], nil, 5, function() GenGen.automation = ACH:Group(L["Automation"], nil, 65) GenGen.automation.inline = true -GenGen.automation.args.interruptAnnounce = ACH:Select(L["Announce Interrupts"], L["Announce when you interrupt a spell to the specified chat channel."], 1, { NONE = L["None"], SAY = L["Say"], YELL = L["Yell"], PARTY = L["Party Only"], RAID = L["Party / Raid"], RAID_ONLY = L["Raid Only"], EMOTE = L["CHAT_MSG_EMOTE"] }, nil, nil, nil, function(info, value) E.db.general[info[#info]] = value if value == 'NONE' then Misc:UnregisterEvent('COMBAT_LOG_EVENT_UNFILTERED') else Misc:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED') end end) +GenGen.automation.args.interruptAnnounce = ACH:Select(L["Announce Interrupts"], L["Announce when you interrupt a spell to the specified chat channel."], 1, { NONE = L["None"], SAY = L["Say"], YELL = L["Yell"], PARTY = L["Party Only"], RAID = L["Party / Raid"], RAID_ONLY = L["Raid Only"], EMOTE = L["CHAT_MSG_EMOTE"] }, nil, nil, nil, function(info, value) E.db.general[info[#info]] = value if value == 'NONE' then M:UnregisterEvent('COMBAT_LOG_EVENT_UNFILTERED') else M:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED') end end) GenGen.automation.args.autoAcceptInvite = ACH:Toggle(L["Accept Invites"], L["Automatically accept invites from guild/friends."], 2) GenGen.automation.args.autoTrackReputation = ACH:Toggle(L["Auto Track Reputation"], nil, 4) GenGen.automation.args.autoRepair = ACH:Select(L["Auto Repair"], L["Automatically repair using the following method when visiting a merchant."], 5, { NONE = L["None"], GUILD = not E.Classic and L["Guild"] or nil, PLAYER = L["Player"] }) -GenGen.totems = ACH:Group(L["Totem Tracker"], nil, 70, nil, function(info) return E.db.general.totems[info[#info]] end, function(info, value) E.db.general.totems[info[#info]] = value TotemTracker:PositionAndSize() end) +GenGen.totems = ACH:Group(L["Totem Tracker"], nil, 70, nil, function(info) return E.db.general.totems[info[#info]] end, function(info, value) E.db.general.totems[info[#info]] = value TM:PositionAndSize() end) GenGen.totems.args.enable = ACH:Toggle(L["Enable"], nil, 1, nil, nil, nil, function() return E.private.general.totemTracker end, function(_, value) E.private.general.totemTracker = value; E.ShowPopup = true end) GenGen.totems.args.sortDirection = ACH:Select(L["Sort Direction"], nil, 2, { ASCENDING = L["Ascending"], DESCENDING = L["Descending"] }) GenGen.totems.args.growthDirection = ACH:Select(L["Bar Direction"], nil, 3, { VERTICAL = L["Vertical"], HORIZONTAL = L["Horizontal"] }) @@ -106,7 +106,8 @@ Media.general.inline = true Media.blizzard = ACH:Group('', nil, 12, nil, function(info) return E.private.general[info[#info]] end, function(info, value) E.private.general[info[#info]] = value E.ShowPopup = true end) Media.blizzard.args.replaceBlizzFonts = ACH:Toggle(L["Replace Blizzard Fonts"], L["Replaces the default Blizzard fonts on various panels and frames with the fonts chosen in the Media section of the ElvUI Options. NOTE: Any font that inherits from the fonts ElvUI usually replaces will be affected as well if you disable this. Enabled by default."], 1) -Media.blizzard.args.unifiedBlizzFonts = ACH:Toggle(L["Unified Font Sizes"], L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."], 2, nil, nil, nil, nil, function(info, value) E.private.general[info[#info]] = value E:UpdateBlizzardFonts() end, function() return not E.private.general.replaceBlizzFonts end) +Media.blizzard.args.blizzardFontSize = ACH:Toggle(E.NewSign..L["Blizzard Font Size"], L["Font Size as defined by Blizzard."], 2, nil, nil, nil, nil, function(info, value) E.private.general[info[#info]] = value E:UpdateBlizzardFonts() end, function() return not E.private.general.replaceBlizzFonts end) +Media.blizzard.args.noFontScale = ACH:Toggle(E.NewSign..L["No Font Scale"], L["Dont scale by Font Size as base."], 3, nil, nil, nil, nil, function(info, value) E.private.general[info[#info]] = value E:UpdateBlizzardFonts() end, function() return not E.private.general.replaceBlizzFonts end) Media.blizzard.inline = true Media.names = ACH:Group('', nil, 13, nil, function(info) return E.private.general[info[#info]] end, function(info, value) E.private.general[info[#info]] = value E.ShowPopup = true end) @@ -117,7 +118,7 @@ Media.names.inline = true Media.combat = ACH:Group('', nil, 14, nil, function(info) return E.private.general[info[#info]] end, function(info, value) E.private.general[info[#info]] = value E.ShowPopup = true end) Media.combat.args.replaceCombatFont = ACH:Toggle(L["Replace Combat Font"], nil, 1) Media.combat.args.dmgfont = ACH:SharedMediaFont(L["Combat Font"], L["The font that combat text will use. |cffFF3333WARNING: This requires a game restart or re-log for this change to take effect.|r"], 2, nil, nil, nil, function() return E.eyefinity or E.ultrawide or not E.private.general.replaceCombatFont end) -Media.combat.args.replaceCombatText = ACH:Toggle(L["Replace Text on Me"], nil, 3) +Media.combat.args.replaceCombatText = ACH:Toggle(L["Replace Text on Me"], nil, 3, nil, nil, nil, nil, nil, function() return not E.private.general.replaceCombatFont end) Media.combat.inline = true Media.nameplates = ACH:Group('', nil, 15, nil, function(info) return E.private.general[info[#info]] end, function(info, value) E.private.general[info[#info]] = value E.ShowPopup = true end, function() return not E.private.general.replaceNameplateFont end) @@ -156,17 +157,17 @@ Cosmetic.customGlowGroup.args.color = ACH:Color(L["COLOR"], nil, 12, true, nil, Cosmetic.cosmeticBottomPanel = ACH:Group(L["Bottom Panel"], nil, 20) Cosmetic.cosmeticBottomPanel.inline = true -Cosmetic.cosmeticBottomPanel.args.bottomPanel = ACH:Toggle(L["Enable"], L["Display a panel across the bottom of the screen. This is for cosmetic only."], 1, nil, nil, nil, nil, function(info, value) E.db.general[info[#info]] = value Layout:UpdateBottomPanel() end) -Cosmetic.cosmeticBottomPanel.args.bottomPanelTransparent = ACH:Toggle(L["Transparent"], nil, 2, nil, nil, nil, function() return E.db.general.bottomPanelSettings.transparent end, function(_, value) E.db.general.bottomPanelSettings.transparent = value Layout:UpdateBottomPanel() end, function() return not E.db.general.bottomPanel end) -Cosmetic.cosmeticBottomPanel.args.bottomPanelWidth = ACH:Range(L["Width"], nil, 3, { min = 0, max = ceil(E.screenWidth), step = 1 }, nil, function() return E.db.general.bottomPanelSettings.width end, function(_, value) E.db.general.bottomPanelSettings.width = value Layout:UpdateBottomPanel() end, function() return not E.db.general.bottomPanel end) -Cosmetic.cosmeticBottomPanel.args.bottomPanelHeight = ACH:Range(L["Height"], nil, 4, { min = 5, max = 128, step = 1 }, nil, function() return E.db.general.bottomPanelSettings.height end, function(_, value) E.db.general.bottomPanelSettings.height = value Layout:UpdateBottomPanel() end, function() return not E.db.general.bottomPanel end) +Cosmetic.cosmeticBottomPanel.args.bottomPanel = ACH:Toggle(L["Enable"], L["Display a panel across the bottom of the screen. This is for cosmetic only."], 1, nil, nil, nil, nil, function(info, value) E.db.general[info[#info]] = value LO:UpdateBottomPanel() end) +Cosmetic.cosmeticBottomPanel.args.bottomPanelTransparent = ACH:Toggle(L["Transparent"], nil, 2, nil, nil, nil, function() return E.db.general.bottomPanelSettings.transparent end, function(_, value) E.db.general.bottomPanelSettings.transparent = value LO:UpdateBottomPanel() end, function() return not E.db.general.bottomPanel end) +Cosmetic.cosmeticBottomPanel.args.bottomPanelWidth = ACH:Range(L["Width"], nil, 3, { min = 0, max = ceil(E.screenWidth), step = 1 }, nil, function() return E.db.general.bottomPanelSettings.width end, function(_, value) E.db.general.bottomPanelSettings.width = value LO:UpdateBottomPanel() end, function() return not E.db.general.bottomPanel end) +Cosmetic.cosmeticBottomPanel.args.bottomPanelHeight = ACH:Range(L["Height"], nil, 4, { min = 5, max = 128, step = 1 }, nil, function() return E.db.general.bottomPanelSettings.height end, function(_, value) E.db.general.bottomPanelSettings.height = value LO:UpdateBottomPanel() end, function() return not E.db.general.bottomPanel end) Cosmetic.cosmeticTopPanel = ACH:Group(L["Top Panel"], nil, 25) Cosmetic.cosmeticTopPanel.inline = true -Cosmetic.cosmeticTopPanel.args.topPanel = ACH:Toggle(L["Enable"], L["Display a panel across the top of the screen. This is for cosmetic only."], 1, nil, nil, nil, nil, function(info, value) E.db.general[info[#info]] = value Layout:UpdateTopPanel() end) -Cosmetic.cosmeticTopPanel.args.topPanelTransparent = ACH:Toggle(L["Transparent"], nil, 2, nil, nil, nil, function() return E.db.general.topPanelSettings.transparent end, function(_, value) E.db.general.topPanelSettings.transparent = value Layout:UpdateTopPanel() end, function() return not E.db.general.topPanel end) -Cosmetic.cosmeticTopPanel.args.topPanelWidth = ACH:Range(L["Width"], nil, 3, { min = 0, max = ceil(E.screenWidth), step = 1 }, nil, function() return E.db.general.topPanelSettings.width end, function(_, value) E.db.general.topPanelSettings.width = value Layout:UpdateTopPanel() end, function() return not E.db.general.topPanel end) -Cosmetic.cosmeticTopPanel.args.topPanelHeight = ACH:Range(L["Height"], nil, 4, { min = 5, max = 128, step = 1 }, nil, function() return E.db.general.topPanelSettings.height end, function(_, value) E.db.general.topPanelSettings.height = value Layout:UpdateTopPanel() end, function() return not E.db.general.topPanel end) +Cosmetic.cosmeticTopPanel.args.topPanel = ACH:Toggle(L["Enable"], L["Display a panel across the top of the screen. This is for cosmetic only."], 1, nil, nil, nil, nil, function(info, value) E.db.general[info[#info]] = value LO:UpdateTopPanel() end) +Cosmetic.cosmeticTopPanel.args.topPanelTransparent = ACH:Toggle(L["Transparent"], nil, 2, nil, nil, nil, function() return E.db.general.topPanelSettings.transparent end, function(_, value) E.db.general.topPanelSettings.transparent = value LO:UpdateTopPanel() end, function() return not E.db.general.topPanel end) +Cosmetic.cosmeticTopPanel.args.topPanelWidth = ACH:Range(L["Width"], nil, 3, { min = 0, max = ceil(E.screenWidth), step = 1 }, nil, function() return E.db.general.topPanelSettings.width end, function(_, value) E.db.general.topPanelSettings.width = value LO:UpdateTopPanel() end, function() return not E.db.general.topPanel end) +Cosmetic.cosmeticTopPanel.args.topPanelHeight = ACH:Range(L["Height"], nil, 4, { min = 5, max = 128, step = 1 }, nil, function() return E.db.general.topPanelSettings.height end, function(_, value) E.db.general.topPanelSettings.height = value LO:UpdateTopPanel() end, function() return not E.db.general.topPanel end) Cosmetic.afkGroup = ACH:Group(L["AFK Mode"], nil, 30) Cosmetic.afkGroup.inline = true @@ -186,19 +187,19 @@ Cosmetic.chatBubblesGroup.args.warning = ACH:Description(L["|cffFF3333This does Cosmetic.chatBubblesGroup.args.chatBubbles = ACH:Select(L["Chat Bubbles Style"], L["Skin the blizzard chat bubbles."], 12, { backdrop = L["Skin Backdrop"], nobackdrop = L["Remove Backdrop"], backdrop_noborder = L["Skin Backdrop (No Borders)"], disabled = L["Disable"] }) Cosmetic.chatBubblesGroup.args.chatBubbleName = ACH:Toggle(L["Chat Bubble Names"], L["Display the name of the unit on the chat bubble. This will not work if backdrop is disabled or when you are in an instance."], 13) -General.alternativePowerGroup = ACH:Group(L["Alternative Power"], nil, 15, nil, function(info) return E.db.general.altPowerBar[info[#info]] end, function(info, value) E.db.general.altPowerBar[info[#info]] = value if Blizzard.AltPowerBar then Blizzard:UpdateAltPowerBarSettings() end end, nil, not E.Retail) +General.alternativePowerGroup = ACH:Group(L["Alternative Power"], nil, 15, nil, function(info) return E.db.general.altPowerBar[info[#info]] end, function(info, value) E.db.general.altPowerBar[info[#info]] = value if BL.AltPowerBar then BL:UpdateAltPowerBarSettings() end end, nil, not E.Retail) General.alternativePowerGroup.args.enable = ACH:Toggle(L["Enable"], L["Replace Blizzard's Alternative Power Bar"], 1, nil, nil, nil, nil, function(info, value) E.db.general.altPowerBar[info[#info]] = value E.ShowPopup = true end) General.alternativePowerGroup.args.width = ACH:Range(L["Width"], nil, 2, { min = 50, max = 1000, step = 1 }) General.alternativePowerGroup.args.height = ACH:Range(L["Height"], nil, 3, { min = 5, max = 100, step = 1 }) -General.alternativePowerGroup.args.statusBarGroup = ACH:Group(L["Status Bar"], nil, 4, nil, nil, function(info, value) E.db.general.altPowerBar[info[#info]] = value Blizzard:UpdateAltPowerBarColors() end, function() return not Blizzard.AltPowerBar end) +General.alternativePowerGroup.args.statusBarGroup = ACH:Group(L["Status Bar"], nil, 4, nil, nil, function(info, value) E.db.general.altPowerBar[info[#info]] = value BL:UpdateAltPowerBarColors() end, function() return not BL.AltPowerBar end) General.alternativePowerGroup.args.statusBarGroup.inline = true General.alternativePowerGroup.args.statusBarGroup.args.smoothbars = ACH:Toggle(L["Smooth Bars"], L["Bars will transition smoothly."], 1) General.alternativePowerGroup.args.statusBarGroup.args.statusBar = ACH:SharedMediaStatusbar(L["StatusBar Texture"], nil, 2) General.alternativePowerGroup.args.statusBarGroup.args.statusBarColorGradient = ACH:Toggle(L["Color Gradient"], nil, 3) -General.alternativePowerGroup.args.statusBarGroup.args.statusBarColor = ACH:Color(L["COLOR"], nil, 3, nil, nil, function(info) local t, d = E.db.general.altPowerBar[info[#info]], P.general.altPowerBar[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, function(info, r, g, b) local t = E.db.general.altPowerBar[info[#info]] t.r, t.g, t.b = r, g, b Blizzard:UpdateAltPowerBarColors() end, function() return E.db.general.altPowerBar.statusBarColorGradient end) +General.alternativePowerGroup.args.statusBarGroup.args.statusBarColor = ACH:Color(L["COLOR"], nil, 3, nil, nil, function(info) local t, d = E.db.general.altPowerBar[info[#info]], P.general.altPowerBar[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, function(info, r, g, b) local t = E.db.general.altPowerBar[info[#info]] t.r, t.g, t.b = r, g, b BL:UpdateAltPowerBarColors() end, function() return E.db.general.altPowerBar.statusBarColorGradient end) -General.alternativePowerGroup.args.textGroup = ACH:Group(L["Text"], nil, 6, nil, nil, nil, function() return not Blizzard.AltPowerBar end) +General.alternativePowerGroup.args.textGroup = ACH:Group(L["Text"], nil, 6, nil, nil, nil, function() return not BL.AltPowerBar end) General.alternativePowerGroup.args.textGroup.inline = true General.alternativePowerGroup.args.textGroup.args.font = ACH:SharedMediaFont(L["Font"], nil, 1) General.alternativePowerGroup.args.textGroup.args.fontSize = ACH:Range(L["Font Size"], nil, 2, C.Values.FontSize) @@ -217,11 +218,11 @@ blizz.general.args.raidUtility = ACH:Toggle(L["RAID_CONTROL"], L["Enables the El blizz.general.args.voiceOverlay = ACH:Toggle(L["Voice Overlay"], L["Replace Blizzard's Voice Overlay."], 5, nil, nil, nil, function(info) return E.private.general[info[#info]] end, function(info, value) E.private.general[info[#info]] = value E.ShowPopup = true end) blizz.general.args.resurrectSound = ACH:Toggle(L["Resurrect Sound"], L["Enable to hear sound if you receive a resurrect."], 6) blizz.general.args.loot = ACH:Toggle(L["Loot Frame"], L["Enable/Disable the loot frame."], 7, nil, nil, nil, function(info) return E.private.general[info[#info]] end, function(info, value) E.private.general[info[#info]] = value E.ShowPopup = true end) -blizz.general.args.hideZoneText = ACH:Toggle(L["Hide Zone Text"], L["Enable/Disable the on-screen zone text when you change zones."], 8, nil, nil, nil, function(info) return E.db.general[info[#info]] end, function(info, value) E.db.general[info[#info]] = value; Misc:ZoneTextToggle() end) +blizz.general.args.hideZoneText = ACH:Toggle(L["Hide Zone Text"], L["Enable/Disable the on-screen zone text when you change zones."], 8, nil, nil, nil, function(info) return E.db.general[info[#info]] end, function(info, value) E.db.general[info[#info]] = value; M:ZoneTextToggle() end) blizz.general.args.spacer1 = ACH:Spacer(14, 'full') blizz.general.args.commandBarSetting = ACH:Select(L["Order Hall Command Bar"], nil, 15, { DISABLED = L["Disable"], ENABLED = L["Enable"], ENABLED_RESIZEPARENT = L["Enable + Adjust Movers"] }, nil, nil, function(info) return E.global.general[info[#info]] end, function(info, value) E.global.general[info[#info]] = value E.ShowPopup = true end, nil, not E.Retail) -blizz.general.args.vehicleSeatIndicatorSize = ACH:Range(L["Vehicle Seat Indicator Size"], nil, 16, { min = 64, max = 128, step = 4 }, nil, nil, function(info, value) E.db.general[info[#info]] = value Blizzard:UpdateVehicleFrame() end, nil, not E.Wrath) -blizz.general.args.durabilityScale = ACH:Range(L["Durability Scale"], nil, 17, { min = .5, max = 8, step = .5 }, nil, nil, function(info, value) E.db.general[info[#info]] = value Blizzard:UpdateDurabilityScale() end, nil, not E.Wrath) +blizz.general.args.vehicleSeatIndicatorSize = ACH:Range(L["Vehicle Seat Indicator Size"], nil, 16, { min = 64, max = 128, step = 4 }, nil, nil, function(info, value) E.db.general[info[#info]] = value BL:UpdateVehicleFrame() end, nil, not E.Wrath) +blizz.general.args.durabilityScale = ACH:Range(L["Durability Scale"], nil, 17, { min = .5, max = 8, step = .5 }, nil, nil, function(info, value) E.db.general[info[#info]] = value BL:UpdateDurabilityScale() end, nil, not E.Wrath) blizz.general.inline = true blizz.quest = ACH:Group(L["Quests"], nil, 2) @@ -230,7 +231,7 @@ blizz.quest.args.questXPPercent = ACH:Toggle(L["XP Quest Percent"], nil, 2, nil, blizz.quest.args.objectiveTracker = ACH:Toggle(L["Objective Frame"], L["Enable"], 1, nil, function() E.ShowPopup = true end, nil, nil, nil, nil, not E.Classic) blizz.quest.inline = true -blizz.lootRollGroup = ACH:Group(L["Loot Roll"], nil, 3, nil, function(info) return E.db.general.lootRoll[info[#info]] end, function(info, value) E.db.general.lootRoll[info[#info]] = value Misc:UpdateLootRollFrames() end) +blizz.lootRollGroup = ACH:Group(L["Loot Roll"], nil, 3, nil, function(info) return E.db.general.lootRoll[info[#info]] end, function(info, value) E.db.general.lootRoll[info[#info]] = value M:UpdateLootRollFrames() end) blizz.lootRollGroup.args.lootRoll = ACH:Toggle(L["Enable"], L["Enable/Disable the loot roll frame."], 0, nil, nil, nil, function(info) return E.private.general[info[#info]] end, function(info, value) E.private.general[info[#info]] = value; E.ShowPopup = true end) blizz.lootRollGroup.args.qualityName = ACH:Toggle(L["Quality Name"], nil, 1) blizz.lootRollGroup.args.qualityItemLevel = ACH:Toggle(L["Quality Itemlevel"], nil, 2) @@ -241,7 +242,7 @@ blizz.lootRollGroup.args.width = ACH:Range(L["Width"], nil, 6, { min = 50, max = blizz.lootRollGroup.args.height = ACH:Range(L["Height"], nil, 7, { min = 5, max = 100, step = 1 }) blizz.lootRollGroup.args.buttonSize = ACH:Range(L["Button Size"], nil, 8, { min = 14, max = 34, step = 1 }) blizz.lootRollGroup.args.statusBarColor = ACH:Color(L["StatusBar Color"], nil, 10, nil, nil, function(info) local c, d = E.db.general.lootRoll[info[#info]], P.general.lootRoll[info[#info]] return c.r, c.g, c.b, 1, d.r, d.g, d.b, 1 end, function(info, r, g, b) local c = E.db.general.lootRoll[info[#info]] c.r, c.g, c.b = r, g, b end, nil, function() return E.db.general.lootRoll.qualityStatusBar end) -blizz.lootRollGroup.args.spacing = ACH:Range(L["Spacing"], nil, 11, { min = 0, max = 20, step = 1 }, nil, nil, function(info, value) E.db.general.lootRoll[info[#info]] = value Misc:UpdateLootRollFrames() _G.AlertFrame:UpdateAnchors() end) +blizz.lootRollGroup.args.spacing = ACH:Range(L["Spacing"], nil, 11, { min = 0, max = 20, step = 1 }, nil, nil, function(info, value) E.db.general.lootRoll[info[#info]] = value M:UpdateLootRollFrames() _G.AlertFrame:UpdateAnchors() end) blizz.lootRollGroup.args.style = ACH:Select(L["Style"], nil, 12, { halfbar = L["Half Bar"], fullbar = L["Full Bar"] }) blizz.lootRollGroup.args.statusBarTexture = ACH:SharedMediaStatusbar(L["Texture"], L["The texture that will be used mainly for statusbars."], 13) blizz.lootRollGroup.args.leftButtons = ACH:Toggle(L["Left Buttons"], nil, 14) @@ -252,36 +253,36 @@ blizz.lootRollGroup.args.fontGroup.args.nameFontSize = ACH:Range(L["Font Size"], blizz.lootRollGroup.args.fontGroup.args.nameFontOutline = ACH:FontFlags(L["Font Outline"], nil, 3) blizz.lootRollGroup.args.fontGroup.inline = true -blizz.itemLevelInfo = ACH:Group(L["Item Level"], nil, 4, nil, function(info) return E.db.general.itemLevel[info[#info]] end, function(info, value) E.db.general.itemLevel[info[#info]] = value Misc:ToggleItemLevelInfo() end, nil, not E.Retail) +blizz.itemLevelInfo = ACH:Group(L["Item Level"], nil, 4, nil, function(info) return E.db.general.itemLevel[info[#info]] end, function(info, value) E.db.general.itemLevel[info[#info]] = value M:ToggleItemLevelInfo() end, nil, not E.Retail) blizz.itemLevelInfo.args.displayInspectInfo = ACH:Toggle(L["Display Inspect Info"], L["Shows item level of each item, enchants, and gems when inspecting another player."], 1) blizz.itemLevelInfo.args.displayCharacterInfo = ACH:Toggle(L["Display Character Info"], L["Shows item level of each item, enchants, and gems on the character page."], 2) blizz.itemLevelInfo.args.itemLevelRarity = ACH:Toggle(L["Rarity Color"], nil, 3) -blizz.itemLevelInfo.args.fontGroup = ACH:Group(L["Font Group"], nil, 50, nil, nil, function(info, value) E.db.general.itemLevel[info[#info]] = value Misc:UpdateInspectPageFonts('Character') Misc:UpdateInspectPageFonts('Inspect') end, function() return not E.db.general.itemLevel.displayCharacterInfo and not E.db.general.itemLevel.displayInspectInfo end) +blizz.itemLevelInfo.args.fontGroup = ACH:Group(L["Font Group"], nil, 50, nil, nil, function(info, value) E.db.general.itemLevel[info[#info]] = value M:UpdateInspectPageFonts('Character') M:UpdateInspectPageFonts('Inspect') end, function() return not E.db.general.itemLevel.displayCharacterInfo and not E.db.general.itemLevel.displayInspectInfo end) blizz.itemLevelInfo.args.fontGroup.args.itemLevelFont = ACH:SharedMediaFont(L["Font"], nil, 4) blizz.itemLevelInfo.args.fontGroup.args.itemLevelFontSize = ACH:Range(L["Font Size"], nil, 5, C.Values.FontSize) blizz.itemLevelInfo.args.fontGroup.args.itemLevelFontOutline = ACH:FontFlags(L["Font Outline"], nil, 6) blizz.itemLevelInfo.args.fontGroup.inline = true -blizz.objectiveFrameGroup = ACH:Group(L["Objective Frame"], nil, 5, nil, function(info) return E.db.general[info[#info]] end, nil, function() return Blizzard:ObjectiveTracker_HasQuestTracker() end, not (E.Retail or E.Wrath)) -blizz.objectiveFrameGroup.args.objectiveFrameAutoHide = ACH:Toggle(L["Auto Hide"], L["Automatically hide the objective frame during boss or arena fights."], 1, nil, nil, nil, nil, function(info, value) E.db.general[info[#info]] = value Blizzard:ObjectiveTracker_AutoHide() end, nil, not (E.Retail or E.Wrath)) +blizz.objectiveFrameGroup = ACH:Group(L["Objective Frame"], nil, 5, nil, function(info) return E.db.general[info[#info]] end, nil, function() return BL:ObjectiveTracker_HasQuestTracker() end, not (E.Retail or E.Wrath)) +blizz.objectiveFrameGroup.args.objectiveFrameAutoHide = ACH:Toggle(L["Auto Hide"], L["Automatically hide the objective frame during boss or arena fights."], 1, nil, nil, nil, nil, function(info, value) E.db.general[info[#info]] = value BL:ObjectiveTracker_AutoHide() end, nil, not (E.Retail or E.Wrath)) blizz.objectiveFrameGroup.args.objectiveFrameAutoHideInKeystone = ACH:Toggle(L["Hide In Keystone"], L["Automatically hide the objective frame during boss fights while you are running a key."], 2, nil, nil, nil, nil, nil, nil, function() return not E.Retail or not E.db.general.objectiveFrameAutoHide end) -blizz.objectiveFrameGroup.args.objectiveFrameHeight = ACH:Range(L["Objective Frame Height"], L["Height of the objective tracker. Increase size to be able to see more objectives."], 3, { min = 400, max = ceil(E.screenHeight), step = 1 }, nil, nil, function(info, value) E.db.general[info[#info]] = value Blizzard:ObjectiveTracker_SetHeight() end, nil, not E.Wrath) +blizz.objectiveFrameGroup.args.objectiveFrameHeight = ACH:Range(L["Objective Frame Height"], L["Height of the objective tracker. Increase size to be able to see more objectives."], 3, { min = 400, max = ceil(E.screenHeight), step = 1 }, nil, nil, function(info, value) E.db.general[info[#info]] = value BL:ObjectiveTracker_SetHeight() end, nil, not E.Wrath) blizz.objectiveFrameGroup.args.bonusObjectivePosition = ACH:Select(L["Bonus Reward Position"], L["Position of bonus quest reward frame relative to the objective tracker."], 4, { RIGHT = L["Right"], LEFT = L["Left"], AUTO = L["Automatic"] }, nil, nil, nil, nil, nil, not E.Retail) -blizz.addonCompartment = ACH:Group(L["Addon Compartment"], nil, 6, nil, function(info) return E.db.general.addonCompartment[info[#info]] end, function(info, value) E.db.general.addonCompartment[info[#info]] = value; Blizzard:HandleAddonCompartment() end, nil, not E.Retail) +blizz.addonCompartment = ACH:Group(L["Addon Compartment"], nil, 6, nil, function(info) return E.db.general.addonCompartment[info[#info]] end, function(info, value) E.db.general.addonCompartment[info[#info]] = value; BL:HandleAddonCompartment() end, nil, not E.Retail) blizz.addonCompartment.args.size = ACH:Range(L["Size"], nil, 1, { min = 10, max = 40, step = 1 }) blizz.addonCompartment.args.frameLevel = ACH:Range(L["Frame Level"], nil, 2, { min = 2, max = 128, step = 1 }) blizz.addonCompartment.args.frameStrata = ACH:Select(L["Frame Strata"], nil, 3, C.Values.Strata) blizz.addonCompartment.args.hide = ACH:Toggle(L["Hide"], nil, 4) -blizz.addonCompartment.args.fontGroup = ACH:Group(L["Font Group"], nil, 50, nil, function(info) return E.db.general.addonCompartment[info[#info]] end, function(info, value) E.db.general.addonCompartment[info[#info]] = value; Blizzard:HandleAddonCompartment() end) +blizz.addonCompartment.args.fontGroup = ACH:Group(L["Font Group"], nil, 50, nil, function(info) return E.db.general.addonCompartment[info[#info]] end, function(info, value) E.db.general.addonCompartment[info[#info]] = value; BL:HandleAddonCompartment() end) blizz.addonCompartment.args.fontGroup.args.font = ACH:SharedMediaFont(L["Font"], nil, 1) blizz.addonCompartment.args.fontGroup.args.fontSize = ACH:Range(L["Font Size"], nil, 2, C.Values.FontSize) blizz.addonCompartment.args.fontGroup.args.fontOutline = ACH:FontFlags(L["Font Outline"], nil, 3) blizz.addonCompartment.args.fontGroup.inline = true -blizz.queueStatus = ACH:Group(L["Queue Status"], nil, 60, nil, function(info) return E.db.general.queueStatus[info[#info]] end, function(info, value) E.db.general.queueStatus[info[#info]] = value Misc:HandleQueueStatus() end) +blizz.queueStatus = ACH:Group(L["Queue Status"], nil, 60, nil, function(info) return E.db.general.queueStatus[info[#info]] end, function(info, value) E.db.general.queueStatus[info[#info]] = value M:HandleQueueStatus() end) blizz.queueStatus.args.enable = ACH:Toggle(L["Enable"], nil, 1, nil, nil, nil, function() return E.private.general.queueStatus end, function(_, value) E.private.general.queueStatus = value E.ShowPopup = true end, nil, function() return not E.Retail or E.private.actionbar.enable end) blizz.queueStatus.args.scale = ACH:Range(L["Scale"], nil, 2, { min = 0.3, max = 1, step = 0.05 }) blizz.queueStatus.args.frameLevel = ACH:Range(L["Frame Level"], nil, 3, { min = 2, max = 128, step = 1 }) @@ -299,14 +300,14 @@ blizz.queueStatus.args.fontGroup.args.xOffset = ACH:Range(L["X-Offset"], nil, 12 blizz.queueStatus.args.fontGroup.args.yOffset = ACH:Range(L["Y-Offset"], nil, 13, { min = -30, max = 30, step = 1 }) blizz.queueStatus.args.fontGroup.inline = true -blizz.guildBank = ACH:Group(E.NewSign..L["Guild Bank"], nil, 70, nil, function(info) return E.db.general.guildBank[info[#info]] end, function(info, value) E.db.general.guildBank[info[#info]] = value Blizzard:GuildBank_Update() end, nil, E.Classic) +blizz.guildBank = ACH:Group(E.NewSign..L["Guild Bank"], nil, 70, nil, function(info) return E.db.general.guildBank[info[#info]] end, function(info, value) E.db.general.guildBank[info[#info]] = value BL:GuildBank_Update() end, nil, E.Classic) blizz.guildBank.args.itemQuality = ACH:Toggle(L["Item Quality"], nil, 1, nil, nil, nil, nil, nil, nil, not E.Wrath) blizz.guildBank.args.ilvlGroup = ACH:Group(L["Item Level"], nil, 10) blizz.guildBank.args.ilvlGroup.args.itemLevel = ACH:Toggle(L["Display Item Level"], L["Displays item level on equippable items."], 1) blizz.guildBank.args.ilvlGroup.args.itemLevelCustomColorEnable = ACH:Toggle(L["Custom Color"], nil, 2, nil, nil, nil, nil, nil, nil, function() return not E.db.general.guildBank.itemLevel end) -blizz.guildBank.args.ilvlGroup.args.itemLevelCustomColor = ACH:Color(L["COLOR"], nil, 3, nil, nil, function(info) local t = E.db.general.guildBank[info[#info]] local d = P.general.guildBank[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, function(info, r, g, b) local t = E.db.general.guildBank[info[#info]] t.r, t.g, t.b = r, g, b Blizzard:GuildBank_Update() end, nil, function() return not E.db.general.guildBank.itemLevel or not E.db.general.guildBank.itemLevelCustomColorEnable end) -blizz.guildBank.args.ilvlGroup.args.itemLevelThreshold = ACH:Range(L["Item Level Threshold"], L["The minimum item level required for it to be shown."], 4, { min = 1, max = 500, step = 1 }, nil, nil, function(info, value) E.db.general.guildBank[info[#info]] = value Blizzard:GuildBank_Update() end, nil, function() return not E.db.general.guildBank.itemLevel end) +blizz.guildBank.args.ilvlGroup.args.itemLevelCustomColor = ACH:Color(L["COLOR"], nil, 3, nil, nil, function(info) local t = E.db.general.guildBank[info[#info]] local d = P.general.guildBank[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, function(info, r, g, b) local t = E.db.general.guildBank[info[#info]] t.r, t.g, t.b = r, g, b BL:GuildBank_Update() end, nil, function() return not E.db.general.guildBank.itemLevel or not E.db.general.guildBank.itemLevelCustomColorEnable end) +blizz.guildBank.args.ilvlGroup.args.itemLevelThreshold = ACH:Range(L["Item Level Threshold"], L["The minimum item level required for it to be shown."], 4, { min = 1, max = 500, step = 1 }, nil, nil, function(info, value) E.db.general.guildBank[info[#info]] = value BL:GuildBank_Update() end, nil, function() return not E.db.general.guildBank.itemLevel end) blizz.guildBank.args.ilvlGroup.args.fontGroup = ACH:Group(L["Fonts"], nil, 5, nil, nil, nil, nil, function() return not E.db.general.guildBank.itemLevel end) blizz.guildBank.args.ilvlGroup.args.fontGroup.inline = true blizz.guildBank.args.ilvlGroup.args.fontGroup.args.itemLevelFontSize = ACH:Range(L["Font Size"], nil, 6, C.Values.FontSize, nil, nil, nil, nil, function() return not E.db.general.guildBank.itemLevel end) @@ -319,7 +320,7 @@ blizz.guildBank.args.ilvlGroup.args.positionGroup.args.itemLevelxOffset = ACH:Ra blizz.guildBank.args.ilvlGroup.args.positionGroup.args.itemLevelyOffset = ACH:Range(L["Y-Offset"], nil, 12, { min = -45, max = 45, step = 1 }, nil, nil, nil, nil, function() return not E.db.general.guildBank.itemLevel end) blizz.guildBank.args.countGroup = ACH:Group(L["Item Count"], nil, 20) -blizz.guildBank.args.countGroup.args.countFontColor = ACH:Color(L["COLOR"], nil, 1, nil, nil, function(info) local t = E.db.general.guildBank[info[#info]] local d = P.general.guildBank[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, function(info, r, g, b) local t = E.db.general.guildBank[info[#info]] t.r, t.g, t.b = r, g, b Blizzard:GuildBank_Update() end) +blizz.guildBank.args.countGroup.args.countFontColor = ACH:Color(L["COLOR"], nil, 1, nil, nil, function(info) local t = E.db.general.guildBank[info[#info]] local d = P.general.guildBank[info[#info]] return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, function(info, r, g, b) local t = E.db.general.guildBank[info[#info]] t.r, t.g, t.b = r, g, b BL:GuildBank_Update() end) blizz.guildBank.args.countGroup.args.fontGroup = ACH:Group(L["Fonts"], nil, 2) blizz.guildBank.args.countGroup.args.fontGroup.inline = true blizz.guildBank.args.countGroup.args.fontGroup.args.countFontSize = ACH:Range(L["Font Size"], nil, 3, C.Values.FontSize) diff --git a/ElvUI_Options/Core/Maps.lua b/ElvUI_Options/Core/Maps.lua index da582d730e..5e773e9680 100644 --- a/ElvUI_Options/Core/Maps.lua +++ b/ElvUI_Options/Core/Maps.lua @@ -89,7 +89,7 @@ Maps.args.minimap.args.icons.args.tracking.args.position = ACH:Select(L["Positio Maps.args.minimap.args.icons.args.tracking.args.scale = ACH:Range(L["Scale"], nil, 4, buttonScale, nil, nil, nil, function() return E.private.general.minimap.hideTracking end) Maps.args.minimap.args.icons.args.tracking.args.xOffset = ACH:Range(L["X-Offset"], nil, 5, buttonOffsets, nil, nil, nil, function() return E.private.general.minimap.hideTracking end) Maps.args.minimap.args.icons.args.tracking.args.yOffset = ACH:Range(L["Y-Offset"], nil, 6, buttonOffsets, nil, nil, nil, function() return E.private.general.minimap.hideTracking end) -Maps.args.minimap.args.icons.args.tracking.args.showAllTracking = ACH:Toggle(L["Show All Tracking Options"], nil, 7, nil, nil, nil, function() return GetCVarBool('minimapTrackingShowAll') end, function(_, value) SetCVar('minimapTrackingShowAll', value and 1 or 0) end, nil, not E.Retail) +Maps.args.minimap.args.icons.args.tracking.args.showAllTracking = ACH:Toggle(L["Show All Tracking Options"], nil, 7, nil, nil, nil, function() return GetCVarBool('minimapTrackingShowAll') end, function(_, value) SetCVar('minimapTrackingShowAll', value and 1 or 0) end, nil, not E.Retail) Maps.args.minimap.args.icons.args.calendar = ACH:Group(L["Calendar"], nil, 5, nil, nil, nil, function() return E.Retail and not E.db.general.minimap.clusterDisable end) Maps.args.minimap.args.icons.args.calendar.args.hideCalendar = ACH:Toggle(L["Hide"], nil, 1, nil, nil, nil, function() return E.private.general.minimap.hideCalendar end, function(_, value) E.private.general.minimap.hideCalendar = value; MM:UpdateSettings() end) diff --git a/ElvUI_Options/Core/Nameplates.lua b/ElvUI_Options/Core/Nameplates.lua index 3452f0e29f..7aa8d3af43 100644 --- a/ElvUI_Options/Core/Nameplates.lua +++ b/ElvUI_Options/Core/Nameplates.lua @@ -363,23 +363,29 @@ local function GetUnitSettings(unit, name) group.args.questIcon = ACH:Group(L["Quest Icon"], nil, 70, nil, function(info) return E.db.nameplates.units[unit].questIcon[info[#info]] end, function(info, value) E.db.nameplates.units[unit].questIcon[info[#info]] = value NP:ConfigureAll() end, nil, not E.Retail) group.args.questIcon.args.enable = ACH:Toggle(L["Enable"], nil, 1) group.args.questIcon.args.hideIcon = ACH:Toggle(L["Hide Icon"], nil, 2) - group.args.questIcon.args.size = ACH:Range(L["Size"], nil, 3, { min = 12, max = 64, step = 1 }) - group.args.questIcon.args.position = ACH:Select(L["Position"], nil, 4, C.Values.AllPositions) - group.args.questIcon.args.xOffset = ACH:Range(L["X-Offset"], nil, 5, { min = -100, max = 100, step = 1 }) - group.args.questIcon.args.yOffset = ACH:Range(L["Y-Offset"], nil, 6, { min = -100, max = 100, step = 1 }) - - group.args.questIcon.args.fontGroup = ACH:Group('', nil, 7) + group.args.questIcon.args.position = ACH:Select(L["Position"], nil, 3, C.Values.AllPositions) + group.args.questIcon.args.spacer1 = ACH:Spacer(5, 'full') + group.args.questIcon.args.size = ACH:Range(L["Size"], nil, 6, { min = 12, max = 64, step = 1 }) + group.args.questIcon.args.spacing = ACH:Range(L["Spacing"], nil, 7, { min = -20, max = 20, step = 1 }) + group.args.questIcon.args.xOffset = ACH:Range(L["X-Offset"], nil, 8, { min = -80, max = 80, step = 1 }) + group.args.questIcon.args.yOffset = ACH:Range(L["Y-Offset"], nil, 9, { min = -80, max = 80, step = 1 }) + + group.args.questIcon.args.fontGroup = ACH:Group('', nil, 20) group.args.questIcon.args.fontGroup.inline = true group.args.questIcon.args.fontGroup.args.font = ACH:SharedMediaFont(L["Font"], nil, 1) group.args.questIcon.args.fontGroup.args.fontSize = ACH:Range(L["Font Size"], nil, 2, { min = 4, max = 60, step = 1 }) group.args.questIcon.args.fontGroup.args.fontOutline = ACH:FontFlags(L["Font Outline"], nil, 3) - group.args.questIcon.args.fontGroup.args.textPosition = ACH:Select(L["Text Position"], nil, 4, C.Values.AllPoints) + group.args.questIcon.args.fontGroup.args.spacer1 = ACH:Spacer(5, 'full') + group.args.questIcon.args.fontGroup.args.textPosition = ACH:Select(L["Text Position"], nil, 6, C.Values.AllPoints) + group.args.questIcon.args.fontGroup.args.textXOffset = ACH:Range(L["X-Offset"], nil, 7, { min = -20, max = 20, step = 1 }) + group.args.questIcon.args.fontGroup.args.textYOffset = ACH:Range(L["Y-Offset"], nil, 8, { min = -20, max = 20, step = 1 }) end if unit == 'PLAYER' or unit == 'FRIENDLY_PLAYER' or unit == 'ENEMY_PLAYER' then group.args.healthGroup.args.useClassColor = ACH:Toggle(L["Use Class Color"], nil, 10) - group.args.portraitGroup.args.classicon = ACH:Toggle(L["Class Icon"], nil, 2) + group.args.portraitGroup.args.specicon = ACH:Toggle(L["Spec Icon"], nil, 21, nil, nil, nil, nil, nil, nil, not E.Retail) + group.args.portraitGroup.args.keepSizeRatio = ACH:Toggle(L["Keep Size Ratio"], nil, 22, nil, nil, nil, nil, nil, nil, not E.Retail) group.args.pvpclassificationindicator = ACH:Group(L["PvP Classification Indicator"], L["Cart / Flag / Orb / Assassin Bounty"], 70, nil, function(info) return E.db.nameplates.units[unit].pvpclassificationindicator[info[#info]] end, function(info, value) E.db.nameplates.units[unit].pvpclassificationindicator[info[#info]] = value NP:ConfigureAll() end) group.args.pvpclassificationindicator.args.enable = ACH:Toggle(L["Enable"], nil, 1) diff --git a/ElvUI_Options/Core/Skins.lua b/ElvUI_Options/Core/Skins.lua index 93228efa47..bd517aefac 100644 --- a/ElvUI_Options/Core/Skins.lua +++ b/ElvUI_Options/Core/Skins.lua @@ -1,6 +1,6 @@ local E, _, V, P, G = unpack(ElvUI) local C, L = unpack(E.Config) -local B = E:GetModule('Blizzard') +local BL = E:GetModule('Blizzard') local ACH = E.Libs.ACH local pairs = pairs @@ -136,7 +136,7 @@ Skins.args.general.sortByValue = true Skins.args.general.customWidth = 140 Skins.args.talkingHead = ACH:Group(L["Talking Head"], nil, 2, nil, function(info) return E.db.general[info[#info]] end, nil, nil, not E.Retail) -Skins.args.talkingHead.args.talkingHeadFrameScale = ACH:Range(L["Talking Head Scale"], nil, 1, { min = .5, max = 2, step = .01, isPercent = true }, nil, nil, function(_, value) E.db.general.talkingHeadFrameScale = value; B:ScaleTalkingHeadFrame() end) +Skins.args.talkingHead.args.talkingHeadFrameScale = ACH:Range(L["Talking Head Scale"], nil, 1, { min = .5, max = 2, step = .01, isPercent = true }, nil, nil, function(_, value) E.db.general.talkingHeadFrameScale = value; BL:ScaleTalkingHeadFrame() end) Skins.args.talkingHead.args.talkingHeadFrameBackdrop = ACH:Toggle(L["Talking Head Backdrop"], nil, 2, nil, nil, nil, nil, function(_, value) E.db.general.talkingHeadFrameBackdrop = value; E.ShowPopup = true end) Skins.args.talkingHead.inline = true diff --git a/ElvUI_Options/Core/StyleFilters.lua b/ElvUI_Options/Core/StyleFilters.lua index c3252e1169..02f639cb07 100644 --- a/ElvUI_Options/Core/StyleFilters.lua +++ b/ElvUI_Options/Core/StyleFilters.lua @@ -264,7 +264,10 @@ StyleFilters.triggers.args.known.args.spells.inline = true StyleFilters.triggers.args.combat = ACH:Group(L["Unit Conditions"], nil, 10, nil, function(info) local triggers = GetFilter(true) return triggers[info[#info]] end, function(info, value) local triggers = GetFilter(true) triggers[info[#info]] = value NP:ConfigureAll() end, DisabledFilter) -StyleFilters.triggers.args.combat.args.playerGroup = ACH:Group(L["Player"], nil, 1) +StyleFilters.triggers.args.combat.args.amountBelow = ACH:Range(L["Amount Below"], nil, 1, { min = 0, max = 40, step = 1 }) +StyleFilters.triggers.args.combat.args.amountAbove = ACH:Range(L["Amount Above"], nil, 2, { min = 0, max = 40, step = 1 }) + +StyleFilters.triggers.args.combat.args.playerGroup = ACH:Group(L["Player"], nil, 10) StyleFilters.triggers.args.combat.args.playerGroup.inline = true StyleFilters.triggers.args.combat.args.playerGroup.args.inCombat = ACH:Toggle(L["In Combat"], L["If enabled then the filter will only activate when you are in combat."], 1) StyleFilters.triggers.args.combat.args.playerGroup.args.outOfCombat = ACH:Toggle(L["Out of Combat"], L["If enabled then the filter will only activate when you are out of combat."], 2) @@ -277,7 +280,7 @@ StyleFilters.triggers.args.combat.args.playerGroup.args.playerCanNotAttack = ACH StyleFilters.triggers.args.combat.args.playerGroup.args.inPetBattle = ACH:Toggle(L["In Pet Battle"], nil, 9, nil, nil, nil, nil, nil, nil, not E.Retail) StyleFilters.triggers.args.combat.args.playerGroup.args.notPetBattle = ACH:Toggle(L["Not Pet Battle"], nil, 10, nil, nil, nil, nil, nil, nil, not E.Retail) -StyleFilters.triggers.args.combat.args.unitGroup = ACH:Group(L["Unit"], nil, 2) +StyleFilters.triggers.args.combat.args.unitGroup = ACH:Group(L["Unit"], nil, 20) StyleFilters.triggers.args.combat.args.unitGroup.inline = true StyleFilters.triggers.args.combat.args.unitGroup.args.inCombatUnit = ACH:Toggle(L["In Combat"], L["If enabled then the filter will only activate when the unit is in combat."], 1) StyleFilters.triggers.args.combat.args.unitGroup.args.outOfCombatUnit = ACH:Toggle(L["Out of Combat"], L["If enabled then the filter will only activate when the unit is out of combat."], 2) diff --git a/ElvUI_Options/Core/Tooltip.lua b/ElvUI_Options/Core/Tooltip.lua index d7c0de3fe7..7fb24f8517 100644 --- a/ElvUI_Options/Core/Tooltip.lua +++ b/ElvUI_Options/Core/Tooltip.lua @@ -1,7 +1,7 @@ local E, _, V, P, G = unpack(ElvUI) local C, L = unpack(E.Config) local TT = E:GetModule('Tooltip') -local Skins = E:GetModule('Skins') +local S = E:GetModule('Skins') local ACH = E.Libs.ACH local tonumber = tonumber @@ -30,7 +30,7 @@ General.showElvUIUsers = ACH:Toggle(L["Show ElvUI Users"], L["Show ElvUI users a General.itemQuality = ACH:Toggle(L["Item Quality"], L["Color tooltip border based on Item Quality."], 9) General.inspectDataEnable = ACH:Toggle(L["Inspect Data"], L["Display the item level and current specialization of the unit on modifier press."], 10, nil, nil, nil, nil, nil, nil, not E.Retail) General.fadeOut = ACH:Toggle(L["Fade Out"], L["Fade out the tooltip when it disappers, instant otherwise. Cursor anchored tooltips are unaffected."], 11, nil, nil, nil, nil, nil, nil, not E.Retail) -General.colorAlpha = ACH:Range(L["OPACITY"], nil, 12, { isPercent = true, min = 0, max = 1, step = 0.01 }, nil, nil, function(info, value) E.db.tooltip[info[#info]] = value; Skins:StyleTooltips() end) +General.colorAlpha = ACH:Range(L["OPACITY"], nil, 12, { isPercent = true, min = 0, max = 1, step = 0.01 }, nil, nil, function(info, value) E.db.tooltip[info[#info]] = value; S:StyleTooltips() end) General.modifierGroup = ACH:Group(L["Spell/Item IDs"], nil, -2) General.modifierGroup.args.modifierID = ACH:Select(L["Modifier for IDs"], nil, 1, modifierValues) diff --git a/ElvUI_Options/Core/UnitFrames.lua b/ElvUI_Options/Core/UnitFrames.lua index d192cf2fe0..ec9d090029 100644 --- a/ElvUI_Options/Core/UnitFrames.lua +++ b/ElvUI_Options/Core/UnitFrames.lua @@ -278,16 +278,24 @@ end local function GetOptionsTable_AuraWatch(updateFunc, groupName, numGroup, subGroup) local config = ACH:Group(L["Aura Indicator"], nil, nil, nil, function(info) return E.db.unitframe.units[groupName].buffIndicator[info[#info]] end, function(info, value) E.db.unitframe.units[groupName].buffIndicator[info[#info]] = value updateFunc(UF, groupName, numGroup) end) config.args.enable = ACH:Toggle(L["Enable"], nil, 1) - config.args.size = ACH:Range(L["Size"], nil, 2, { min = 6, max = 48, step = 1 }) - config.args.countFontSize = ACH:Range(L["Font Size"], nil, 3, { min = 4, max = 20, step = 1 }) - config.args.profileSpecific = ACH:Toggle(L["Profile Specific"], L["Use the profile specific filter Aura Indicator (Profile) instead of the global filter Aura Indicator."], 4) - config.args.configureButton = ACH:Execute(L["Configure Auras"], nil, 5, function() local configString = format('Aura Indicator (%s)', groupName == 'pet' and 'Pet' or E.db.unitframe.units[groupName].buffIndicator.profileSpecific and 'Profile' or 'Class') C:SetToFilterConfig(configString) end) + + config.args.generalGroup = ACH:Group(' ', nil, 2) + config.args.generalGroup.args.profileSpecific = ACH:Toggle(L["Profile Specific"], L["Use the profile specific filter Aura Indicator (Profile) instead of the global filter Aura Indicator."], 1) + config.args.generalGroup.args.size = ACH:Range(L["Size"], nil, 2, { min = 6, max = 48, step = 1 }) + config.args.generalGroup.args.configureButton = ACH:Execute(L["Configure Auras"], nil, 3, function() local configString = format('Aura Indicator (%s)', groupName == 'pet' and 'Pet' or E.db.unitframe.units[groupName].buffIndicator.profileSpecific and 'Profile' or 'Class') C:SetToFilterConfig(configString) end) + config.args.generalGroup.inline = true + + config.args.countGroup = ACH:Group(E.NewSign..L["Count Text"], nil, 15) + config.args.countGroup.args.countFont = ACH:SharedMediaFont(L["Font"], nil, 1) + config.args.countGroup.args.countFontSize = ACH:Range(L["Font Size"], nil, 2, { min = 4, max = 24, step = 1 }) + config.args.countGroup.args.countFontOutline = ACH:FontFlags(L["Font Outline"], L["Set the font outline."], 3) + config.args.countGroup.inline = true if subGroup then config.get = function(info) return E.db.unitframe.units[groupName][subGroup].buffIndicator[info[#info]] end config.set = function(info, value) E.db.unitframe.units[groupName][subGroup].buffIndicator[info[#info]] = value updateFunc(UF, groupName, numGroup) end else - config.args.applyToAll = ACH:Group(' ', nil, 50, nil, function(info) return BuffIndicator_ApplyToAll(info, nil, E.db.unitframe.units[groupName].buffIndicator.profileSpecific, groupName == 'pet') end, function(info, value) BuffIndicator_ApplyToAll(info, value, E.db.unitframe.units[groupName].buffIndicator.profileSpecific, groupName == 'pet') updateFunc(UF, groupName, numGroup) end) + config.args.applyToAll = ACH:Group(L["Apply To All"], nil, 50, nil, function(info) return BuffIndicator_ApplyToAll(info, nil, E.db.unitframe.units[groupName].buffIndicator.profileSpecific, groupName == 'pet') end, function(info, value) BuffIndicator_ApplyToAll(info, value, E.db.unitframe.units[groupName].buffIndicator.profileSpecific, groupName == 'pet') updateFunc(UF, groupName, numGroup) end) config.args.applyToAll.inline = true config.args.applyToAll.args.header = ACH:Description(L["|cffFF3333Warning:|r Changing options in this section will apply to all Aura Indicator auras. To change only one Aura, please click \"Configure Auras\" and change that specific Auras settings. If \"Profile Specific\" is selected it will apply to that filter set."], 1) config.args.applyToAll.args.style = ACH:Select(L["Style"], nil, 2, { timerOnly = L["Timer Only"], coloredIcon = L["Colored Icon"], texturedIcon = L["Textured Icon"] }) diff --git a/ElvUI_Options/ElvUI_Options_Classic.toc b/ElvUI_Options/ElvUI_Options_Classic.toc index ba3a74355d..e9ba827901 100644 --- a/ElvUI_Options/ElvUI_Options_Classic.toc +++ b/ElvUI_Options/ElvUI_Options_Classic.toc @@ -1,7 +1,7 @@ ## Title: |cff1784d1ElvUI|r |cfd9b9b9bOptions|r ## Notes: Powers the configuration window.|n|cffff3333Does not store any profile data.|r ## Author: Elv, Simpy -## Version: 13.46 +## Version: 13.47 ## Interface: 11404 ## RequiredDeps: ElvUI ## LoadOnDemand: 1 diff --git a/ElvUI_Options/ElvUI_Options_Mainline.toc b/ElvUI_Options/ElvUI_Options_Mainline.toc index 6b4e6ac84c..a254eb833a 100644 --- a/ElvUI_Options/ElvUI_Options_Mainline.toc +++ b/ElvUI_Options/ElvUI_Options_Mainline.toc @@ -1,8 +1,8 @@ ## Title: |cff1784d1ElvUI|r |cfd9b9b9bOptions|r ## Notes: Powers the configuration window.|n|cffff3333Does not store any profile data.|r ## Author: Elv, Simpy -## Version: 13.46 -## Interface: 100107 +## Version: 13.47 +## Interface: 100200 ## RequiredDeps: ElvUI ## LoadOnDemand: 1 ## IconTexture: Interface\AddOns\ElvUI\Core\Media\Textures\LogoAddon diff --git a/ElvUI_Options/ElvUI_Options_Wrath.toc b/ElvUI_Options/ElvUI_Options_Wrath.toc index 9e9a66cd08..4643861156 100644 --- a/ElvUI_Options/ElvUI_Options_Wrath.toc +++ b/ElvUI_Options/ElvUI_Options_Wrath.toc @@ -1,7 +1,7 @@ ## Title: |cff1784d1ElvUI|r |cfd9b9b9bOptions|r ## Notes: Powers the configuration window.|n|cffff3333Does not store any profile data.|r ## Author: Elv, Simpy -## Version: 13.46 +## Version: 13.47 ## Interface: 30403 ## RequiredDeps: ElvUI ## LoadOnDemand: 1 diff --git a/ElvUI_Options/Locales/deDE.lua b/ElvUI_Options/Locales/deDE.lua index e53df36555..fa5945ac00 100644 --- a/ElvUI_Options/Locales/deDE.lua +++ b/ElvUI_Options/Locales/deDE.lua @@ -1690,7 +1690,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = "Diese Sektion wird dir dabei helfen spezifische Einstellungen zurückzusetzen." L["This selects the Chat Frame to use as the output of ElvUI messages."] = "Dieses wählt das Chatfenster aus wo die ElvUI Nachrichten erscheinen sollen." L["This setting controls the size of text in item comparison tooltips."] = "Diese Einstellung kontrolliert die Größe der Schrift vom Text im Item Vergleichs-Tooltip." -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = "Diese Einstellung ahmt den älteren Stil von Replace Blizzard Fonts nach, mit einer statischen einheitlichen Schriftgröße." L["This setting will be updated upon changing stances."] = "Diese Einstellungen werden bei Gestaltwandel aktualisiert" L["This texture will get used on objects like chat windows and dropdown menus."] = "Diese Textur wird für Objekte wie Chatfenster und Dropdown-Menüs benutzt." L["This uses the IsPlayerSpell API which is only required sometimes."] = true @@ -1761,7 +1760,6 @@ L["Under Health Threshold"] = "Unter Gesundheit Schwellenwert" L["Under Power Threshold"] = "Unter dem Kraft Schwellenwert" L["Unfriendly"] = "Unfreundlich" L["Unhappy"] = "Unglücklich" -L["Unified Font Sizes"] = "Einheitliche Schriftgrößen" L["Unit Class Color"] = "Einheits Klassenfarbe" L["Unit Conditions"] = "Einheit Konditionen" L["Unit Faction"] = "Einheit Fraktion" diff --git a/ElvUI_Options/Locales/enUS.lua b/ElvUI_Options/Locales/enUS.lua index d0daca4dc4..708c9a937d 100644 --- a/ElvUI_Options/Locales/enUS.lua +++ b/ElvUI_Options/Locales/enUS.lua @@ -1689,7 +1689,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = true L["This selects the Chat Frame to use as the output of ElvUI messages."] = true L["This setting controls the size of text in item comparison tooltips."] = true -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = true L["This setting will be updated upon changing stances."] = true L["This texture will get used on objects like chat windows and dropdown menus."] = true L["This uses the IsPlayerSpell API which is only required sometimes."] = true @@ -1760,7 +1759,6 @@ L["Under Health Threshold"] = true L["Under Power Threshold"] = true L["Unfriendly"] = true L["Unhappy"] = true -L["Unified Font Sizes"] = true L["Unit Class Color"] = true L["Unit Conditions"] = true L["Unit Faction"] = true diff --git a/ElvUI_Options/Locales/esMX.lua b/ElvUI_Options/Locales/esMX.lua index f8c56ad9c7..bca599e164 100644 --- a/ElvUI_Options/Locales/esMX.lua +++ b/ElvUI_Options/Locales/esMX.lua @@ -1690,7 +1690,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = true L["This selects the Chat Frame to use as the output of ElvUI messages."] = true L["This setting controls the size of text in item comparison tooltips."] = true -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = true L["This setting will be updated upon changing stances."] = true L["This texture will get used on objects like chat windows and dropdown menus."] = "Esta textura se usará en objetos como las ventanas de chat y menús desplegables." L["This uses the IsPlayerSpell API which is only required sometimes."] = true @@ -1761,7 +1760,6 @@ L["Under Health Threshold"] = "Por debajo del umbral de salud" L["Under Power Threshold"] = "Por debajo del umbral de poder" L["Unfriendly"] = true L["Unhappy"] = true -L["Unified Font Sizes"] = true L["Unit Class Color"] = true L["Unit Conditions"] = true L["Unit Faction"] = true diff --git a/ElvUI_Options/Locales/frFR.lua b/ElvUI_Options/Locales/frFR.lua index 5f32f180b7..6e276f3295 100644 --- a/ElvUI_Options/Locales/frFR.lua +++ b/ElvUI_Options/Locales/frFR.lua @@ -1687,7 +1687,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specific settings back to default."] = "Cette section vous aidera à réinitialiser des paramètres spécifiques à leurs valeurs par défaut." L["This selects the Chat Frame to use as the output of ElvUI messages."] = "Cela sélectionne la fenêtre de discussion à utiliser comme sortie des messages ElvUI." L["This setting controls the size of text in item comparison tooltips."] = "Ce paramètre contrôle la taille du texte dans les infobulles de comparaison d'objets." -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = "Ce paramètre imite l'ancien style de Remplacer les polices de Blizzard, avec une taille de police plus statique et unifiée." L["This setting will be updated upon changing stances."] = "Ce réglage sera activé lors d'un changement de posture" L["This texture will get used on objects like chat windows and dropdown menus."] = "Cette texture sera utilisée pour les fenêtres de discussion et les menus déroulants." L["This uses the IsPlayerSpell API which is only required sometimes."] = "Cela utilise l'API IsPlayerSpell qui est nécessaire seulement parfois." @@ -1759,7 +1758,6 @@ L["Under Health Threshold"] = "Sous le seuil de santé" L["Under Power Threshold"] = "Sous le seuil de puissance" L["Unfriendly"] = "Inamical" L["Unhappy"] = "Malheureux" -L["Unified Font Sizes"] = "Tailles de police unifiées" L["Unit Class Color"] = "Couleur de classe de l'unité" L["Unit Conditions"] = "Conditions de l'unité" L["Unit Faction"] = "Faction de l'unité" diff --git a/ElvUI_Options/Locales/itIT.lua b/ElvUI_Options/Locales/itIT.lua index 23f36b9999..c7a4abff09 100644 --- a/ElvUI_Options/Locales/itIT.lua +++ b/ElvUI_Options/Locales/itIT.lua @@ -1689,7 +1689,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = true L["This selects the Chat Frame to use as the output of ElvUI messages."] = true L["This setting controls the size of text in item comparison tooltips."] = true -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = true L["This setting will be updated upon changing stances."] = true L["This texture will get used on objects like chat windows and dropdown menus."] = true L["This uses the IsPlayerSpell API which is only required sometimes."] = true @@ -1760,7 +1759,6 @@ L["Under Health Threshold"] = true L["Under Power Threshold"] = true L["Unfriendly"] = true L["Unhappy"] = true -L["Unified Font Sizes"] = true L["Unit Class Color"] = true L["Unit Conditions"] = true L["Unit Faction"] = true diff --git a/ElvUI_Options/Locales/koKR.lua b/ElvUI_Options/Locales/koKR.lua index 8b4883ec7e..7ca233218c 100644 --- a/ElvUI_Options/Locales/koKR.lua +++ b/ElvUI_Options/Locales/koKR.lua @@ -122,7 +122,7 @@ L["Are you sure you want to reset General settings?"] = "[일반] 설정을 초 L["Are you sure you want to reset NamePlates settings?"] = "[이름표] 설정을 초기화 하시겠습니까?" L["Are you sure you want to reset Tooltip settings?"] = "[툴팁] 설정을 재초기화 하시겠습니까?" L["Are you sure you want to reset UnitFrames settings?"] = "[유닛 프레임] 설정을 재설정 하시겠습니까?" -L["Arena Registrar"] = "투기장 기록실" -- 추가 Skins.lua L:126 +L["Arena Registrar"] = "투기장 기록실" -- 추가 Skins.lua L:126 L["Arena"] = "투기장" -- 추가 L["Arrow Scale"] = "화살표 크기" L["Arrow Spacing"] = "화살표 간격" @@ -856,13 +856,13 @@ L["If enabled then the filter will only activate when the unit is not in your Pa L["If enabled then the filter will only activate when the unit is not in your Raid."] = "체크시 해당 대상이 레이드에 없을 때만 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is not owned by the player."] = "체크시 플레이어가 대상을 소유하지 않은 경우에만 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is not pvp-flagged."] = "체크시 닛이 PvP 모드가 아닐 때 필터가 활성화됩니다." -L["If enabled then the filter will only activate when the unit is not tap denied."] = "체크시 다른 플레이어가 유닛을 공격하지 않을 때만 필터가 활성화됩니다." +L["If enabled then the filter will only activate when the unit is not tap denied."] = "체크시 다른 플레이어가 유닛을 공격하지 않을 때만 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is not targeting you."] = "체크시 플레이어가 대상을 목표로 하지 않을때만 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is not the active player's pet."] = "체크시 대상이 플레이어의 소환수가 아닐 때 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is out of combat."] = "체크시 대상 유닛이 전투 중이 아닐 때만 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is owned by the player."] = "체크시 플레이어가 유닛을 소유한 경우에만 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is pvp-flagged."] = "체크시 대상 유닛이 PvP 모드에 있을 때 필터가 활성화됩니다." -L["If enabled then the filter will only activate when the unit is tap denied."] = "체크시 유닛이 다른 플레이어의 공격을 받을 때만 필터가 활성화됩니다." +L["If enabled then the filter will only activate when the unit is tap denied."] = "체크시 유닛이 다른 플레이어의 공격을 받을 때만 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is targeting you."] = "체크시 유닛의 대상일 때만 필터가 활성화됩니다." L["If enabled then the filter will only activate when the unit is the active player's pet."] = "체크시 대상 유닛이 플레이어의 애완동물일 때 필터가 활성화됩니다." L["If enabled then the filter will only activate when you are focusing the unit."] = "체크시 대상이 주시대상일대 필터가 활성화됩니다." @@ -1537,7 +1537,7 @@ L["Show For Healers"] = "치유 표시" L["Show For Tanks"] = "탱커 표시" L["Show Icon"] = "아이콘 표시" L["Show In Combat"] = "전투시 표시" -L["Show Label"] = "제목 표시" +L["Show Label"] = "제목 표시" L["Show Max Currency"] = "최대경험치 표시" L["Show Only Names"] = "이름만 표시" L["Show PvP Badge Indicator if available"] = "PvP 가능한 경우 PvP 계급 표시" @@ -1714,7 +1714,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = "이 항목은 특정 설정을 기본값으로 초기화합니다" L["This selects the Chat Frame to use as the output of ElvUI messages."] = "ElvUI 메시지의 출력으로 사용할 채팅창을 선택합니다." L["This setting controls the size of text in item comparison tooltips."] = "아이템 비교 툴팁의 글씨 크기를 조정합니다." -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = "이 설정은 게임에 내장된 블리자드 글꼴의 크기를 모방하며 더 안정적입니다." L["This setting will be updated upon changing stances."] = "이 설정은 태세를 바꿔야 업데이트 됩니다." L["This texture will get used on objects like chat windows and dropdown menus."] = "채팅창이나 메뉴 같은 프레임에 입혀지는 텍스처입니다." L["This uses the IsPlayerSpell API which is only required sometimes."] = "이것은 때때로 필요한 IsPlayerSpell API를 사용합니다." @@ -1788,7 +1787,6 @@ L["Under Health Threshold"] = "생명력 기준치 아래일때" L["Under Power Threshold"] = "자원 기준치 아래일때" L["Unfriendly"] = "약간 적대적" L["Unhappy"] = "불만족" -L["Unified Font Sizes"] = "글꼴 크기 통합" L["Unit Class Color"] = "대상 직업 생상" L["Unit Conditions"] = "대상의 조건" L["Unit Faction"] = "대상 진영" diff --git a/ElvUI_Options/Locales/ptBR.lua b/ElvUI_Options/Locales/ptBR.lua index 1b45002934..1e9b876b4a 100644 --- a/ElvUI_Options/Locales/ptBR.lua +++ b/ElvUI_Options/Locales/ptBR.lua @@ -1691,7 +1691,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = "Esta seção irá ajudá-lo a resetar configurações específicas para o padrão." L["This selects the Chat Frame to use as the output of ElvUI messages."] = "Isto seleciona o Quadro de Bate-papo para usar como saída para mensagens do ElvUI." L["This setting controls the size of text in item comparison tooltips."] = "Esta opção controla o tamanho do texto na comparação no tooltip." -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = true L["This setting will be updated upon changing stances."] = "Essa configuração atualizará ao trocar posturas." L["This texture will get used on objects like chat windows and dropdown menus."] = "Esta textura será usada em objetos como janelas de bate-papo e menus de suspensão." L["This uses the IsPlayerSpell API which is only required sometimes."] = true @@ -1763,7 +1762,6 @@ L["Under Health Threshold"] = "Abaixo do limiar da Vida" L["Under Power Threshold"] = "Abaixo do limiar do Poder" L["Unfriendly"] = "Não-Amigável" L["Unhappy"] = true -L["Unified Font Sizes"] = true L["Unit Class Color"] = true L["Unit Conditions"] = "Condições da Unidade" L["Unit Faction"] = true diff --git a/ElvUI_Options/Locales/ruRU.lua b/ElvUI_Options/Locales/ruRU.lua index 9acaecb91b..3c81847e2c 100644 --- a/ElvUI_Options/Locales/ruRU.lua +++ b/ElvUI_Options/Locales/ruRU.lua @@ -1701,7 +1701,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = "Эта секция поможет вернуть настройки конкретного модуля на значения по умолчанию." L["This selects the Chat Frame to use as the output of ElvUI messages."] = "В какой чат отправлять сообщения от ElvUI." L["This setting controls the size of text in item comparison tooltips."] = "Эта опция контролирует размер текста подсказок сравнения предметов." -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = "Эта опция косит под старый стиль замены шрифтов с более статичным и унифицированным размером шрифтов." L["This setting will be updated upon changing stances."] = "Эта настройка вступит в силу при смене стойки." L["This texture will get used on objects like chat windows and dropdown menus."] = "Эта текстура будет использоваться для таких объектов, как окно чата и выпадающие меню." L["This uses the IsPlayerSpell API which is only required sometimes."] = "Используется API IsPlayerSpell, который редко используется." @@ -1773,7 +1772,6 @@ L["Under Health Threshold"] = "Менее значения здоровья" L["Under Power Threshold"] = "Менее значения ресурса" L["Unfriendly"] = "Неприязнь" L["Unhappy"] = "Несчатлив" -L["Unified Font Sizes"] = "Единые размеры шрифтов" L["Unit Class Color"] = "Цвет класса юнита" L["Unit Conditions"] = "Условия юнита" L["Unit Faction"] = "Фракция юнита" diff --git a/ElvUI_Options/Locales/trTR.lua b/ElvUI_Options/Locales/trTR.lua index 35cfdab2c4..ad7a164577 100644 --- a/ElvUI_Options/Locales/trTR.lua +++ b/ElvUI_Options/Locales/trTR.lua @@ -584,7 +584,7 @@ L["Enabling this inverts the grouping order when the raid is not full, this will L["Enabling this will check your health amount."] = "Bunu etkinlestirmek, saglik miktarinizi kontrol edecektir." L["Enabling this will check your power amount."] = "Bunu etkinlestirmek, guc miktarinizi kontrol edecektir." L["Enchanting"] = "Vurgulayici" -L["ENCOUNTER_JOURNAL"] = "Zindan Arsivi" +L["ENCOUNTER_JOURNAL"] = "Zindan Arsivi" L["Enemy Aura Type"] = "Dusman Aura Tipi" L["Enemy Combat Toggle"] = "Dusman Savas Gecisi" L["Enemy"] = "Dusman" @@ -1020,7 +1020,7 @@ L["Low Threat"] = "Dusuk Hiddet" L["Low Threshold"] = "Dusuk Esik" L["Low"] = true L["Lower numbers mean a higher priority. Filters are processed in order from 1 to 100."] = "Dusuk sayilar daha yuksek oncelik anlamina gelir. Filtreler 1'den 100'e kadar sirayla islenir." -L["LUNAR_POWER"] = "Lunar Power" +L["LUNAR_POWER"] = "Lunar Power" L["Macro Text"] = "Makro Metni" L["MACROS"] = "Makrolar" L["MAELSTROM"] = "Maelstrom" @@ -1691,7 +1691,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = "Bu bolum, belirli ayarlari varsayilana dondurmeye yardimci olacaktir." L["This selects the Chat Frame to use as the output of ElvUI messages."] = "Bu, ElvUI mesajlarinin ciktisi olarak kullanilacak Sohbet cercevesini secer." L["This setting controls the size of text in item comparison tooltips."] = "Bu ayar, oge karsilastirma sırasında ipucu penceresini metninin boyutunu kontrol eder." -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = "Bu ayar, daha statik bir birlesik yazi tipi boyutuyla, Blizzard Yazi Tiplerini Degistir'in eski stilini taklit ediyor." L["This setting will be updated upon changing stances."] = "Bu ayar, duruslar degistirildiginde guncellenecektir." L["This texture will get used on objects like chat windows and dropdown menus."] = "Bu doku, sohbet pencereleri ve acilir menuler gibi nesnelerde kullanilacak." L["This uses the IsPlayerSpell API which is only required sometimes."] = true @@ -1719,7 +1718,7 @@ L["Time To Hold"] = "Tutma Zamani" L["Time"] = "Zaman" L["TIMEMANAGER_TITLE"] = "Saat" L["Timer Only"] = true -L["TIMESTAMPS_LABEL"] = "Sohbet Zaman Damgalari" +L["TIMESTAMPS_LABEL"] = "Sohbet Zaman Damgalari" L["Title will only appear if Name Only is enabled or triggered in a Style Filter."] = "Baslik yalnizca Yalnizca Isim etkinlestirilirse veya bir Stil Filtresinde tetiklenirse gorunur." L["Title"] = true L["Toggle 24-hour mode for the time datatext."] = "Saat veri metni icin 24 saat modunu degistir." @@ -1763,7 +1762,6 @@ L["Under Health Threshold"] = "Saglik Esigi Altinda" L["Under Power Threshold"] = "Guc Esigi Altinda" L["Unfriendly"] = "Dusmanca" L["Unhappy"] = true -L["Unified Font Sizes"] = "Birlesik Yazi Tipi Boyutlari" L["Unit Class Color"] = true L["Unit Conditions"] = "Birim Kosullari" L["Unit Faction"] = "Birim Fraksiyonu" diff --git a/ElvUI_Options/Locales/zhCN.lua b/ElvUI_Options/Locales/zhCN.lua index 307190a005..3ce2ff7c1d 100644 --- a/ElvUI_Options/Locales/zhCN.lua +++ b/ElvUI_Options/Locales/zhCN.lua @@ -1691,7 +1691,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = "这部分将帮助你重置特定设置为默认." L["This selects the Chat Frame to use as the output of ElvUI messages."] = "选择ElvUI信息的聊天输出" L["This setting controls the size of text in item comparison tooltips."] = "设置对比框中的文字大小" -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = "此设置模仿旧样式的替换暴雪字体,具有更静态的统一字体大小。" L["This setting will be updated upon changing stances."] = "这个设置会在改变姿态时更新" L["This texture will get used on objects like chat windows and dropdown menus."] = "主要用于聊天窗口及下拉选单等物件的材质" L["This uses the IsPlayerSpell API which is only required sometimes."] = true @@ -1763,7 +1762,6 @@ L["Under Health Threshold"] = "低于血量阈值" L["Under Power Threshold"] = "低于能量阈值" L["Unfriendly"] = "非友好" L["Unhappy"] = true -L["Unified Font Sizes"] = "统一字体大小" L["Unit Class Color"] = true L["Unit Conditions"] = "单位状态" L["Unit Faction"] = "单位阵营" diff --git a/ElvUI_Options/Locales/zhTW.lua b/ElvUI_Options/Locales/zhTW.lua index 01bddb87b4..fe2901b458 100644 --- a/ElvUI_Options/Locales/zhTW.lua +++ b/ElvUI_Options/Locales/zhTW.lua @@ -1690,7 +1690,6 @@ L["This section will allow you to copy settings to a select module from or to a L["This section will help reset specfic settings back to default."] = "這個部分會幫助你重置指定的模組設定回預設值" L["This selects the Chat Frame to use as the output of ElvUI messages."] = "選擇 ElvUI 訊息輸出的聊天視窗" L["This setting controls the size of text in item comparison tooltips."] = "設置對比框中的文字大小" -L["This setting mimics the older style of Replace Blizzard Fonts, with a more static unified font sizing."] = "這個設置將會模仿遊戲內建字體的尺寸, 并且更加穩定." L["This setting will be updated upon changing stances."] = "此設定將在切換姿態時更新" L["This texture will get used on objects like chat windows and dropdown menus."] = "主要用於對話視窗及下拉選單等物件的材質." L["This uses the IsPlayerSpell API which is only required sometimes."] = true @@ -1762,7 +1761,6 @@ L["Under Health Threshold"] = "低於血量閾值" L["Under Power Threshold"] = "低於能量閾值" L["Unfriendly"] = "不友好" L["Unhappy"] = true -L["Unified Font Sizes"] = "統一文字大小" L["Unit Class Color"] = true L["Unit Conditions"] = "單位條件" L["Unit Faction"] = "單位陣營"