diff --git a/EUI_MacroFactory.lua b/EUI_MacroFactory.lua index f24cb980d..3a05ef1dd 100644 --- a/EUI_MacroFactory.lua +++ b/EUI_MacroFactory.lua @@ -618,10 +618,10 @@ function EllesmereUI.BuildMacroFactory(parent, startY, PP) } -- Detect current spec and class - local specIndex = GetSpecialization() + local specIndex = C_SpecializationInfo.GetSpecialization() local activeSpecID, activeSpecName if specIndex then - activeSpecID, activeSpecName = GetSpecializationInfo(specIndex) + activeSpecID, activeSpecName = C_SpecializationInfo.GetSpecializationInfo(specIndex) end local activeClassName = UnitClass("player") or "Unknown" -- All spec macro bodies use spell-ID {n} tokens (localized at build time via @@ -1681,8 +1681,8 @@ function EllesmereUI.RefreshMacroFactory() if not mf or not mf.parent or not mf.parent.IsObjectType then return end -- PLAYER_SPECIALIZATION_CHANGED can fire several times for one switch; skip -- the rebuild if the spec that's already built hasn't actually changed. - local idx = GetSpecialization() - local curSpecID = idx and GetSpecializationInfo(idx) or nil + local idx = C_SpecializationInfo.GetSpecialization() + local curSpecID = idx and C_SpecializationInfo.GetSpecializationInfo(idx) or nil if curSpecID == mf.builtSpecID then return end local oldContainer = mf.container diff --git a/EllesmereUI.lua b/EllesmereUI.lua index dbfc742d8..cca4ba76b 100644 --- a/EllesmereUI.lua +++ b/EllesmereUI.lua @@ -1433,6 +1433,18 @@ end ------------------------------------------------------------------------------- local EllesmereUI = _G.EllesmereUI or {} _G.EllesmereUI = EllesmereUI + +-- Icon file IDs the Forever client does not ship. Resolve them only when the +-- client identifies itself as Forever; Retail continues to use its originals. +EllesmereUI._FOREVER_ICON = { + [7548911] = 133975, -- Bags "Consumables" + [7549094] = 136249, -- Bags "Gear Enhancements" + [7548925] = 134332, -- Bags "Professions" +} +function EllesmereUI.ClientIcon(icon) + if EUI_CLIENT_FOREVER ~= true then return icon end + return EllesmereUI._FOREVER_ICON[icon] or icon +end EllesmereUI.GLOBAL_KEY = "_EUIGlobal" EllesmereUI.ADDON_ROSTER = ADDON_ROSTER EllesmereUI.LOCALE_FONT_FALLBACK = LOCALE_FONT_FALLBACK diff --git a/EllesmereUIBags/EllesmereUIBags.lua b/EllesmereUIBags/EllesmereUIBags.lua index 1f0a073a7..3763c3c90 100644 --- a/EllesmereUIBags/EllesmereUIBags.lua +++ b/EllesmereUIBags/EllesmereUIBags.lua @@ -22,6 +22,10 @@ EUI_BagsWindow = CreateFrame("Frame", "EUI_BagsWindowFrame", UIParent) EUI_BagsWindow:Hide() local SLOT_SIZE, SPACING = 34, 4 +local GetItemInfo = C_Item.GetItemInfo +local GetItemInfoInstant = C_Item.GetItemInfoInstant +local GetItemQualityColor = C_Item.GetItemQualityColor +local IsEquippableItem = C_Item.IsEquippableItem -- Red-tint usability test (shared with the bank module via EUI). Tooltip must come from -- the real item, never GetItemByID: scaling gear's bonus IDs lower its required level, but @@ -4903,7 +4907,7 @@ local function BuildSidebarButtons(categoryCounts, totalCount) btn._icon:SetAtlas(entry.icon) btn._icon:SetTexCoord(0, 1, 0, 1) else - btn._icon:SetTexture(entry.icon) + btn._icon:SetTexture(EllesmereUI.ClientIcon(entry.icon)) btn._icon:SetTexCoord(0.08, 0.92, 0.08, 0.92) end btn._icon:SetAlpha(isSelected and 1 or 0.75) @@ -5030,8 +5034,13 @@ local function BuildSidebarButtons(categoryCounts, totalCount) iconLbl:SetTextColor(0.7, 0.7, 0.7, 1) iconLbl:SetText(EllesmereUI.L("Icon:")) - -- Icon grid (placeholder IDs -- replace with real set) - local ICON_IDS = { + -- Forever does not include the newer icon files used by the + -- Midnight picker. Keep its choices to long-standing client + -- icons, including a profession icon. + local ICON_IDS = EUI_CLIENT_FOREVER and { + 134400, 132996, 136240, 136241, 136242, 136244, 136245, + 136246, 136247, 136248, 136249, 132485, 132640, 134332, + } or { 7514178, 7548926, 7427980, 7548966, 2143125, 6025441, 7451177, 7548901, 7501337, 7704166, 7549083, 7549010, 7136579, 7549012, diff --git a/EllesmereUIBags/EllesmereUIBags_Bank.lua b/EllesmereUIBags/EllesmereUIBags_Bank.lua index 58b5704de..c6cad186f 100644 --- a/EllesmereUIBags/EllesmereUIBags_Bank.lua +++ b/EllesmereUIBags/EllesmereUIBags_Bank.lua @@ -5,6 +5,9 @@ if EUI_CLIENT_BLOCKED then return end -- pre-12.1 client failsafe (EllesmereUI_C -- Visually matches the Bags module with sidebar, search, and sorting ------------------------------------------------------------------------------- local EUI = EllesmereUI +local GetItemInfo = C_Item.GetItemInfo +local GetItemInfoInstant = C_Item.GetItemInfoInstant +local GetItemQualityColor = C_Item.GetItemQualityColor -- Profile access helper (DB created in EUI_Bags_Options.lua, loaded first per TOC) local _emptyP = {} local function BP() return (EUI._bagsDB and EUI._bagsDB.profile) or _emptyP end diff --git a/EllesmereUIBags/EllesmereUIBags_Categories.lua b/EllesmereUIBags/EllesmereUIBags_Categories.lua index e2e944125..7270a7113 100644 --- a/EllesmereUIBags/EllesmereUIBags_Categories.lua +++ b/EllesmereUIBags/EllesmereUIBags_Categories.lua @@ -9,6 +9,7 @@ if EUI_CLIENT_BLOCKED then return end -- pre-12.1 client failsafe (EllesmereUI_C local CategoryManager = {} -- Profile access helper (DB created in EUI_Bags_Options.lua, loaded first per TOC) local EUI = EllesmereUI +local GetItemInfoInstant = C_Item.GetItemInfoInstant local _emptyP = {} local function BP() return (EUI._bagsDB and EUI._bagsDB.profile) or _emptyP end @@ -47,6 +48,14 @@ local DEFAULT_CATEGORIES = { { name = "Miscellaneous", types = { IC_MISC, IC_CONTAINER }, isCatchAll = true, icon = 5524917 }, } +if EUI_CLIENT_FOREVER then + for i = #DEFAULT_CATEGORIES, 1, -1 do + if DEFAULT_CATEGORIES[i].name == "Housing" then + table.remove(DEFAULT_CATEGORIES, i) + end + end +end + ------------------------------------------------------------------------------- -- Init -- Builds the runtime category list from hardcoded defaults + saved user state diff --git a/EllesmereUIBlizzardSkin/EllesmereUIBlizzardSkin_WindowEngine.lua b/EllesmereUIBlizzardSkin/EllesmereUIBlizzardSkin_WindowEngine.lua index 76848a092..9a991062c 100644 --- a/EllesmereUIBlizzardSkin/EllesmereUIBlizzardSkin_WindowEngine.lua +++ b/EllesmereUIBlizzardSkin/EllesmereUIBlizzardSkin_WindowEngine.lua @@ -1191,9 +1191,10 @@ function WSkin.Tab(tab, opts) hooksecurefunc(sys, "SetTabVisuallySelected", UpdateAllTabs) end end + -- Icon tabs carry their label in Icon; retain its clipping mask as well. for j = 1, select("#", tab:GetRegions()) do local r = select(j, tab:GetRegions()) - if r and r:IsObjectType("Texture") then + if r and r ~= tab.Icon and r ~= tab.IconMask and r:IsObjectType("Texture") then r:SetTexture("") if r.SetAtlas then r:SetAtlas("") end end diff --git a/EllesmereUIQoL/EllesmereUIQoL_MovementAlert.lua b/EllesmereUIQoL/EllesmereUIQoL_MovementAlert.lua index a306cd145..ecbdc2745 100644 --- a/EllesmereUIQoL/EllesmereUIQoL_MovementAlert.lua +++ b/EllesmereUIQoL/EllesmereUIQoL_MovementAlert.lua @@ -791,9 +791,9 @@ local function SafeGetBaseDuration(spellId) end local function ResolvePlayerSpecId() - local spec = GetSpecialization() + local spec = C_SpecializationInfo.GetSpecialization() if not spec then return nil end - local specId = select(1, GetSpecializationInfo(spec)) + local specId = C_SpecializationInfo.GetSpecializationInfo(spec) if specId and specId > 0 then return specId end return nil end diff --git a/EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua b/EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua index 7f6fabde0..610228596 100644 --- a/EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua +++ b/EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua @@ -1,4 +1,5 @@ if EUI_CLIENT_BLOCKED then return end -- pre-12.1 client failsafe (EllesmereUI_ClientGate.lua) +local GetSpecialization = (C_SpecializationInfo and C_SpecializationInfo.GetSpecialization) or GetSpecialization local addonName, ns = ... if not (EllesmereUI and EllesmereUI._ModuleNS) then EUI_CLIENT_BLOCKED = true; return end -- stale-parent guard: a partially updated install (old parent, new child) goes dormant via the line-1 failsafe instead of erroring EllesmereUI._ModuleNS[addonName] = ns -- LOD options files read this module ns via the registry